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
3.0 KiB
JavaScript
2 lines
3.0 KiB
JavaScript
import{d as g,q as b,c as a,h as p,e as y,i as _,j as v,l as h,r as u,G as x,o as n,F as N,y as $,a as o,t as f,m as l,k as C}from"./index-C9sCss04.js";import{_ as V}from"./PageHead.vue_vue_type_script_setup_true_lang-BJjYuJvl.js";import{_ as q}from"./LoadState.vue_vue_type_script_setup_true_lang-BD6A8a9g.js";import{p as M}from"./presentations-Bl3tHhv5.js";import{c as P}from"./format-bcE-cYHJ.js";const R={key:0,class:"notice error",role:"alert"},T={key:0,class:"stack"},B={class:"small muted",style:{display:"flex","flex-wrap":"wrap","align-items":"center",gap:"8px",margin:"4px 0 0"}},O={key:0,class:"badge online"},D={key:1,class:"badge"},F={style:{display:"flex","flex-wrap":"wrap",gap:"8px","margin-top":"14px"}},L=["href"],A=["href"],E={key:1,class:"muted small",style:{margin:"0"}},G={key:1,class:"empty"},Q=g({__name:"MyPresentationsView",setup(H){const c=v(),k=h(),r=u(null),i=u(""),d=u(!1);function j(t){const e=P(t.slide_count,"slajd","slajdy","slajdów");return t.total_seconds===0?e:`${e} · ${Math.round(t.total_seconds/60)} min`}function w(t){return`/moje-prezentacje/${encodeURIComponent(t)}`}async function m(){i.value="";try{r.value=await M.mine()}catch(t){r.value=null,i.value=x(t)}}return b(()=>{if(c.query.denied==="1"){d.value=!0;const t={...c.query};delete t.denied,k.replace({name:"my-presentations",query:t})}m()}),(t,e)=>{const z=C("router-link");return n(),a("div",null,[p(V,{eyebrow:"Dla prelegenta",title:"Moje prezentacje"}),d.value?(n(),a("p",R," Nie masz dostępu do tej prezentacji albo taka prezentacja nie istnieje. Poniżej są prezentacje przypisane do Twojego konta. ")):y("",!0),p(q,{ready:r.value!==null,error:i.value,onRetry:e[0]||(e[0]=s=>m())},{default:_(()=>[r.value?.length?(n(),a("div",T,[(n(!0),a(N,null,$(r.value,s=>(n(),a("article",{key:s.slug,class:"card accent"},[o("h3",null,f(s.title),1),o("p",B,[o("span",null,f(j(s)),1),s.is_published?(n(),a("span",O,"Opublikowana")):(n(),a("span",D,"Nieopublikowana"))]),o("div",F,[o("a",{class:"btn primary",href:w(s.slug),target:"_blank",rel:"opener"},[...e[1]||(e[1]=[l(" Otwórz wersję prelegenta ",-1),o("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,L),s.is_published&&s.public_path?(n(),a("a",{key:0,class:"btn",href:s.public_path,target:"_blank",rel:"noopener noreferrer"},[...e[2]||(e[2]=[l(" Otwórz wersję publiczną ",-1),o("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,A)):s.is_published?y("",!0):(n(),a("p",E,"Link publiczny zacznie działać po opublikowaniu prezentacji.")),p(z,{class:"btn",to:{name:"presentation-remote",params:{slug:s.slug}}},{default:_(()=>[...e[3]||(e[3]=[l(" Pilot ",-1),o("span",{class:"sr-only"},"(otwórz na telefonie)",-1)])]),_:1},8,["to"])])]))),128))])):(n(),a("p",G,[...e[4]||(e[4]=[o("span",{class:"title",style:{display:"block",color:"var(--ink)"}},"Nie masz jeszcze żadnych prezentacji.",-1),l(" Pojawią się tutaj, gdy administrator przypisze prezentację do Twojego konta. ",-1)])]))]),_:1},8,["ready","error"])])}}});export{Q as default};
|