PageSourceSearch

https://app.schoolmantic.com/_nuxt/DlMyvhre.js

js schoolmantic.com collected 2026-10-02 00:58:14 UTC 2,569 bytes, 1 lines download raw bytes

1import{e as w,f as A,h as N,j as B,c as s,a as e,k as l,t as o,l as i,F as f,r as L,q as m,o as a}from"./6JebYMDS.js";const S={class:"animate-fade-in space-y-4"},C={key:0,class:"text-sm text-red-600"},E={key:1,class:"card flex items-center justify-center gap-3 py-12"},M={key:0,class:"card flex flex-col items-center gap-3 py-16 text-center"},T={key:1,class:"space-y-2"},j={class:"flex flex-wrap items-start justify-between gap-2"},D={class:"min-w-0"},F={class:"flex items-center gap-2 text-sm font-semibold text-slate-800 dark:text-slate-100"},I={key:0,class:"rounded-md bg-primary-100 px-1.5 py-0.5 text-xs font-normal text-primary-600 dark:bg-primary-500/15 dark:text-primary-300"},H={class:"mt-0.5 text-xs text-slate-400"},V={class:"mt-2 whitespace-pre-wrap text-sm text-slate-700 dark:text-slate-200"},P=w({__name:"inbox-wali",setup(q){const{token:h,user:p,apiFetch:y,fetchMe:k}=A(),u=N(),x=m(!0),c=m(""),d=m([]),_={whatsapp:"🟢",telegram:"🔵"},g={whatsapp:"WhatsApp",telegram:"Telegram"};function v(r){return new Date(r).toLocaleString("id-ID",{dateStyle:"medium",timeStyle:"short"})}function b(r){const t=r;return t?.data?.error?.message??t?.message??"Terjadi kesalahan"}return B(async()=>{if(!h.value)return u.push("/masuk-sekolah");try{if(p.value||await k(),p.value?.userType!=="guardian"){u.push("/masuk-sekolah");return}try{const r=await y("/me/messages");d.value=r.items??[]}catch{d.value=[]}}catch(r){c.value=b(r)}finally{x.value=!1}}),(r,t)=>(a(),s("div",S,[t[2]||(t[2]=e("div",{class:"card"},[e("h1",{class:"text-xl font-bold text-slate-900 dark:text-slate-50"},"📥 Inbox"),e("p",{class:"mt-1 text-sm text-slate-500 dark:text-slate-400"}," Pesan masuk dari sekolah kepada Anda. ")],-1)),l(c)?(a(),s("p",C,o(l(c)),1)):i("",!0),l(x)?(a(),s("div",E,[...t[0]||(t[0]=[e("div",{class:"h-8 w-8 animate-spin rounded-full border-4 border-primary-500/20 border-t-primary-500"},null,-1),e("span",{class:"text-sm text-slate-500"},"Memuat pesan...",-1)])])):l(c)?i("",!0):(a(),s(f,{key:2},[l(d).length===0?(a(),s("div",M,[...t[1]||(t[1]=[e("span",{class:"text-5xl"},"📭",-1),e("p",{class:"text-sm text-slate-400"},"Belum ada pesan masuk.",-1)])])):(a(),s("div",T,[(a(!0),s(f,null,L(l(d),n=>(a(),s("div",{key:n.id,class:"card border border-slate-200 dark:border-slate-800"},[e("div",j,[e("div",D,[e("p",F,[e("span",null,o(_[n.channel]??"📨"),1),e("span",null,o(g[n.channel]??n.channel),1),n.direction==="out"?(a(),s("span",I," Balasan ")):i("",!0)]),e("p",H,o(v(n.createdAt)),1)])]),e("p",V,o(n.messageText),1)]))),128))]))],64))]))}});export{P as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.