The schedule showed a lecturer only where the session notes named one (Globalizacja), so the student plan had nobody under the other courses. The session JSON now carries the course lecturer in its course ref and an optional per-session lecturer (new nullable column, admin field, seed key) for courses shared between two people. The student app shows the session's own lecturer or, failing that, the course's.
2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
import{d as _,r as t,c as a,a as o,h as g,i as x,g as V,t as m,e as v,b as q,w as c,v as f,j as z,k as N,o as l,m as h,n as B}from"./index-C9sCss04.js";import{f as C}from"./forms-BPOK5alr.js";const U={class:"auth"},M={key:0,class:"stack"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},j={key:1,class:"field"},D={class:"field"},E={key:0,class:"error-text"},I={class:"field"},P=["disabled"],A=_({__name:"ResetView",setup(R){const u=z(),i=t(typeof u.query.code=="string"?u.query.code:""),n=t(""),p=t(""),d=t(!1),w=t(!1),s=t(null);async function b(){d.value=!0,s.value=null;try{await B.resetPassword({code:i.value.trim(),password:n.value,password_confirmation:p.value}),w.value=!0}catch(y){s.value=C(y)}finally{d.value=!1}}return(y,e)=>{const k=N("router-link");return l(),a("div",U,[e[8]||(e[8]=o("header",{class:"page-head"},[o("span",{class:"eyebrow"},"BM II° · UWr"),o("h1",null,"Nowe hasło")],-1)),w.value?(l(),a("div",M,[e[4]||(e[4]=o("p",{class:"notice",role:"status"},"Hasło zostało zmienione.",-1)),g(k,{class:"btn primary",to:"/logowanie"},{default:x(()=>[...e[3]||(e[3]=[h("Zaloguj się",-1)])]),_:1})])):(l(),a("form",{key:1,onSubmit:V(b,["prevent"]),novalidate:""},[s.value?.message?(l(),a("div",Z,m(s.value.message),1)):v("",!0),q(u).query.code?v("",!0):(l(),a("div",j,[e[5]||(e[5]=o("label",{for:"code"},"Kod z wiadomości",-1)),c(o("input",{id:"code","onUpdate:modelValue":e[0]||(e[0]=r=>i.value=r),type:"text",autocomplete:"one-time-code",required:""},null,512),[[f,i.value]])])),o("div",D,[e[6]||(e[6]=o("label",{for:"password"},"Nowe hasło (min. 8 znaków)",-1)),c(o("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=r=>n.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,n.value]]),s.value?.fields.password?(l(),a("p",E,m(s.value.fields.password),1)):v("",!0)]),o("div",I,[e[7]||(e[7]=o("label",{for:"confirmation"},"Powtórz hasło",-1)),c(o("input",{id:"confirmation","onUpdate:modelValue":e[2]||(e[2]=r=>p.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,p.value]])]),o("button",{class:"btn primary block",type:"submit",disabled:d.value||!i.value||!n.value},m(d.value?"Zapisywanie…":"Zapisz hasło"),9,P)],32))])}}});export{A as default};
|