1import{o as l,c as i,a,F as O,r as K,n as s,t as v,i as h,d as D,ag as Zt,y as Y,f as G,h as c,g as R,I as X,K as nt,e as Xt,k as _t,j as me,m as it,b as H,v as ea,q as Ve,D as re,ah as ta,s as aa}from"./sCfbBLcw.js";import{_ as ra}from"./B40K67no.js";import{_ as sa}from"./DlAUqK2U.js";import{_ as oa}from"./BIu8TroJ.js";import{h as N}from"./B-YVwB4U.js";import{u as la}from"./kXS3pScO.js";import{s as na}from"./_lIrDuDE.js";import"./DynTsD1R.js";const ia={class:"lg:flex gap-2"},da={class:"flex flex-wrap mx-auto w-fit gap-1 mt-1 text-[11px]"},ua={__name:"StatusCounters",props:{darkMode:Boolean,colleges:Array,pendingCount:Function,doneCount:Function,totalCount:Function,getEmailsForCollege:Function},setup(e){return(S,g)=>(l(),i("div",{class:s(e.darkMode?"lg:mx-2 mx-2 shadow-lg rounded-lg p-1 bg-gray-800 border border-gray-700":"lg:mx-2 mx-2 shadow-lg rounded-lg p-1 bg-white border border-gray-200")},[a("div",ia,[(l(!0),i(O,null,K(e.colleges,r=>(l(),i("div",{key:r.value,class:s(e.darkMode?"border border-gray-700 bg-gray-800 rounded-lg px-2 py-1 shadow-sm w-full lg:mb-0 mb-2":"border border-gray-300 bg-white rounded-lg px-2 py-1 shadow-sm w-full lg:mb-0 mb-2")},[a("div",{class:s(["whitespace-nowrap tracking-tight",e.darkMode?"font-semibold text-[10px] text-gray-100 text-center":"font-semibold text-[10px] text-gray-800 text-center"])},v(r.label),3),a("div",{class:s(e.darkMode?"text-[10px] text-gray-400 text-center":"text-[10px] text-gray-500 text-center")},v(e.getEmailsForCollege(r.value).join(", ")),3),a("div",da,[a("span",{class:s(e.darkMode?"border border-red-400 text-red-300 bg-red-900/20 px-2 py-0.5 rounded-full font-semibold":"border border-red-300 text-red-800 bg-red-50 px-2 py-0.5 rounded-full font-semibold")}," Pending: "+v(e.pendingCount(r.value)),3),a("span",{class:s(e.darkMode?"border border-green-400 text-green-300 bg-green-900/20 px-2 py-0.5 rounded-full font-semibold":"border border-green-300 text-green-800 bg-green-50 px-2 py-0.5 rounded-full font-semibold")}," Done: "+v(e.doneCount(r.value)),3),a("span",{class:s(e.darkMode?"border border-emerald-400 text-emerald-300 bg-emerald-900/20 px-2 py-0.5 rounded-full font-semibold":"border border-emerald-300 text-emerald-800 bg-emerald-50 px-2 py-0.5 rounded-full font-semibold")}," Total: "+v(e.totalCount(r.value)),3)])],2))),128))])],2))}},ga={class:"bg-white dark:bg-gray-800 p-8 rounded-2xl shadow-2xl flex flex-col items-center max-w-sm w-full border border-gray-200 dark:border-gray-700 transform transition-all scale-100 opacity-100"},ca={class:"text-gray-900 dark:text-white text-xl font-bold text-center mb-6 leading-relaxed"},ma={__name:"VerifySuccessMessageToaster",props:{darkMode:Boolean,verifySuccessMessage:String,closeSuccessToast:Function},setup(e){const S=e;return(g,r)=>e.verifySuccessMessage?(l(),i("div",{key:0,class:s(["fixed inset-0 z-[1000] flex flex-col items-center justify-center p-4 backdrop-blur-sm transition-all",S.darkMode?"bg-gray-900/80":"bg-gray-500/50"])},[a("div",ga,[r[1]||(r[1]=a("div",{class:"w-16 h-16 bg-green-100 dark:bg-green-900/40 text-green-600 dark:text-green-400 rounded-full flex items-center justify-center mb-4"},[a("i",{class:"fas fa-check text-2xl"})],-1)),a("p",ca,v(e.verifySuccessMessage.replace(/â
/g,"")),1),a("button",{onClick:r[0]||(r[0]=(...n)=>e.closeSuccessToast&&e.closeSuccessToast(...n)),class:"w-full px-6 py-3 bg-green-600 hover:bg-green-700 text-white font-semibold rounded-xl shadow-md hover:shadow-lg transition-all focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"}," Continue ")])],2)):h("",!0)}},fa={class:"text-white text-lg font-semibold text-center mb-6"},ya={__name:"VerifyErrorMessageToaster",props:{darkMode:Boolean,verifyErrorMessage:String,closeErrorMessage:Function},setup(e){const S=e;return(g,r)=>e.verifyErrorMessage?(l(),i("div",{key:0,class:s(["fixed inset-0 z-[1000] bg-opacity-90 flex flex-col items-center justify-center p-4",S.darkMode?"bg-gray-800 text-white":"bg-white text-red-900"])},[a("p",fa,v(e.verifyErrorMessage),1),a("button",{onClick:r[0]||(r[0]=(...n)=>e.closeErrorMessage&&e.closeErrorMessage(...n)),class:"px-8 py-3 bg-red-600 text-white font-bold rounded-xl shadow-lg hover:shadow-xl hover:scale-105 transition-all"}," Dismiss ")],2)):h("",!0)}},ba={class:"w-full lg:flex items-center gap-3"},va={key:0,class:"lg:mb-0 mb-3 flex items-center gap-2 lg:w-3/12 w-full"},xa=["disabled"],ha={key:1,class:"lg:mb-0 mb-3 w-full"},wa=["value"],Ma=["value"],ka={class:"lg:mb-0 mb-3 relative w-full"},pa=["value"],Ca={class:"w-fit mx-auto flex items-center gap-1"}
1,$a={__name:"Filters",props:{darkMode:Boolean,collegeFilterList:Boolean,selectedItems:Array,allSelected:Boolean,selectedCollege:String,searchQuery:String,statusFilter:String,colleges:Array,isLoading:Boolean},emits:["selectAllItems","toggleDeleteMultiple","performSearch","update:selectedCollege","update:searchQuery","update:statusFilter"],setup(e,{emit:S}){const g=e,r=S,n=()=>{r("selectAllItems")},p=()=>{r("toggleDeleteMultiple")},j=()=>{r("performSearch")};return(C,w)=>(l(),i("div",{class:s(["w-full lg:flex flex-wrap items-center gap-3 mb-1 px-3 py-1 border rounded-md shadow-sm",g.darkMode?"bg-gray-800 text-white":"bg-white text-red-900"])},[a("div",ba,[e.collegeFilterList?(l(),i("div",va,[a("button",{onClick:n,class:s(["flex items-center text-xs px-2 py-1 rounded-md transition whitespace-nowrap",e.darkMode?"bg-gray-700 hover:bg-gray-600 text-gray-200":"bg-gray-100 hover:bg-gray-200 text-gray-700"])},v(e.allSelected?"Deselect All":"Select All"),3),a("button",{onClick:p,disabled:e.selectedItems.length===0,class:s([e.selectedItems.length===0?e.darkMode?"bg-red-900/30 text-red-400 cursor-not-allowed":"bg-pink-100 text-red-300 cursor-not-allowed":"bg-red-600 text-white hover:bg-red-700","flex items-center text-xs px-2 py-1 rounded-md transition whitespace-nowrap"])},[w[5]||(w[5]=a("i",{class:"fa fa-trash mr-1"},null,-1)),D(" ("+v(e.selectedItems.length)+") ",1)],10,xa)])):h("",!0),e.collegeFilterList?(l(),i("div",ha,[a("select",{value:e.selectedCollege,onChange:w[0]||(w[0]=I=>C.$emit("update:selectedCollege",I.target.value)),class:s(["w-full text-xs px-2 py-1 border rounded-md focus:outline-none focus:ring-1 focus:ring-green-500 focus:border-green-500",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200":"bg-white border-gray-300 text-gray-900"])},[w[6]||(w[6]=a("option",{value:""},"All Colleges",-1)),(l(!0),i(O,null,K(e.colleges,I=>(l(),i("option",{key:I.value,value:I.value},v(I.label),9,Ma))),128))],42,wa)])):h("",!0),a("div",ka,[a("input",{value:e.searchQuery,onInput:w[1]||(w[1]=I=>C.$emit("update:searchQuery",I.target.value)),type:"search",placeholder:"Search",class:s(["text-xs w-full border rounded-md px-2 py-1 pr-8 focus:outline-none focus:ring-1 focus:ring-green-500 focus:border-green-500",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200 placeholder-gray-400":"bg-white border-gray-300 text-gray-900 placeholder-gray-500"]),onKeyup:Zt(j,["enter"])},null,42,pa),a("button",{onClick:j,class:s(["absolute right-2 top-1/2 -translate-y-1/2 hover:text-green-600",e.darkMode?"text-gray-400":"text-gray-500"])},[...w[7]||(w[7]=[a("i",{class:"fa fa-search"},null,-1)])],2)]),a("div",Ca,[a("button",{onClick:w[2]||(w[2]=I=>C.$emit("update:statusFilter","all")),class:s([[e.statusFilter==="all"?"bg-gray-900 text-white":e.darkMode?"bg-gray-700 text-gray-200 border-gray-600 hover:bg-gray-900 hover:text-white":"bg-white text-gray-900 border hover:bg-gray-900 hover:text-white",e.darkMode?"border-gray-600":"border-gray-900"],"text-xs border px-2 py-1 rounded-full transition"])}," All ",2),a("button",{onClick:w[3]||(w[3]=I=>C.$emit("update:statusFilter","pending")),class:s([[e.statusFilter==="pending"?"bg-red-500 text-white":e.darkMode?"bg-gray-700 text-red-400 border-red-500 hover:bg-red-500 hover:text-white":"bg-white text-red-600 border hover:bg-red-500 hover:text-white"],"text-xs border border-red-600 px-2 py-1 rounded-full transition"])}," Pending ",2),a("button",{onClick:w[4]||(w[4]=I=>C.$emit("update:statusFilter","done")),class:s([[e.statusFilter==="done"?"bg-green-600 text-white":e.darkMode?"bg-gray-700 text-green-400 border-green-500 hover:bg-green-600 hover:text-white":"bg-white text-green-600 border hover:bg-green-600 hover:text-white"],"text-xs border border-green-600 px-2 py-1 rounded-full transition"])}," Done ",2)])])],2))}},Ia={class:"lg:w-8/12 w-full"},Da={class:"w-full"},Pa={class:"w-full text-[10px]"},Sa={class:"w-fit mx-auto"},Aa={class:"lg:w-fit mx-auto w-full py-1 lg:flex lg:whitespace-nowrap text-left"},Ta={class:"w-full flex items-center"},La={class:"text-[10px] font-light whitespace-nowrap"},Fa={class:"font-semibold uppercase"}
1,Ra={__name:"List",props:{b:Object,i:Number,darkMode:Boolean,verificationStatuses:Object,paymentStatuses:Object,prepDocStatuses:Object,releasingDocStatuses:Object,transactionClosedStatuses:Object},emits:["openChatCommunication","openPersonalInfoModal","openPaymentModal","openPrepDocModal","openReleasingDocModal","openTransactionClosedModal","openLogsModal"],setup(e,{emit:S}){return(g,r)=>(l(),i("div",{class:s(["w-full border-l lg:flex items-center",[e.i%2?e.darkMode?"bg-gray-800/50":"bg-gray-100":e.darkMode?"bg-gray-900/30":"bg-white",e.darkMode?"border-gray-700":"border-gray-200"]])},[a("div",Ia,[a("div",Da,[a("div",{class:s(["w-full text-xs uppercase px-1 flex items-center font-montserrat mt-1",e.darkMode?"text-gray-200":"text-black"])},[r[7]||(r[7]=a("i",{class:"fa fa-user mr-2.5 ml-1"},null,-1)),D(" "+v(e.b.lastname)+", "+v(e.b.firstname)+" "+v(e.b.middlename),1)],2),a("div",{class:s(["text-[10px] pl-[29px] -mt-1",e.darkMode?"text-gray-400":"text-gray-600"])},v(e.b.tracking_id),3)])]),a("div",Pa,[a("div",Sa,[a("div",Aa,[a("button",{class:s(["lg:w-fit w-full px-2 py-1 font-bold cursor-pointer lg:px-5 border-b shadow-lg border-green-500 transition-colors duration-200",e.darkMode?"text-white bg-green-700 hover:bg-gray-700 hover:text-green-400":"text-white bg-green-800 hover:bg-white hover:text-green-800"]),onClick:r[0]||(r[0]=n=>g.$emit("openChatCommunication",e.b))},[...r[8]||(r[8]=[a("i",{class:"fa fa-comments mr-3"},null,-1),a("i",{class:"fa fa-file"},null,-1)])],2),a("button",{onClick:r[1]||(r[1]=n=>g.$emit("openPersonalInfoModal",e.b)),class:s(["w-full lg:text-center text-left px-1.5 py-1 cursor-pointer lg:px-5 border-b shadow-lg border-green-500 transition-colors duration-200",[e.verificationStatuses[e.b.id]?"bg-green-800 text-white":e.darkMode?"bg-gray-700 text-gray-200 hover:bg-green-800 hover:text-white":"bg-white text-green-800 hover:bg-green-800 hover:text-white"]])}," Verify ",2),a("button",{class:s(["w-full lg:text-center text-left px-1.5 py-1 cursor-pointer lg:px-5 border-b shadow-lg border-green-500 transition-colors duration-200",[e.paymentStatuses[e.b.id]?"bg-green-800 text-white":e.darkMode?"bg-gray-700 text-gray-200 hover:bg-green-800 hover:text-white":"bg-white text-green-800 hover:bg-green-800 hover:text-white"]]),onClick:r[2]||(r[2]=n=>g.$emit("openPaymentModal",e.b))}," Assessment ",2),a("button",{onClick:r[3]||(r[3]=n=>g.$emit("openPrepDocModal",e.b)),class:s(["w-full lg:text-center text-left px-1.5 py-1 cursor-pointer lg:px-5 border-b shadow-lg border-green-500 transition-colors duration-200",[e.prepDocStatuses[e.b.id]?"bg-green-800 text-white":e.darkMode?"bg-gray-700 text-gray-200 hover:bg-green-800 hover:text-white":"bg-white text-green-800 hover:bg-green-800 hover:text-white"]])}," Preparing ",2),a("button",{onClick:r[4]||(r[4]=n=>g.$emit("openReleasingDocModal",e.b)),class:s(["w-full lg:text-center text-left px-1.5 py-1 cursor-pointer lg:px-5 border-b shadow-lg border-green-500 transition-colors duration-200",[e.releasingDocStatuses[e.b.id]?"bg-green-800 text-white":e.darkMode?"bg-gray-700 text-gray-200 hover:bg-green-800 hover:text-white":"bg-white text-green-800 hover:bg-green-800 hover:text-white"]])}," Releasing ",2),a("button",{onClick:r[5]||(r[5]=n=>g.$emit("openTransactionClosedModal",e.b)),class:s(["w-full lg:text-center text-left px-1.5 py-1 cursor-pointer lg:px-5 border-b shadow-lg border-green-500 transition-colors duration-200",[e.transactionClosedStatuses[e.b.id]?"bg-green-800 text-white":e.darkMode?"bg-gray-700 text-gray-200 hover:bg-green-800 hover:text-white":"bg-white text-green-800 hover:bg-green-800 hover:text-white"]])}," Closed ",2),a("button",{class:s(["lg:w-fit w-full px-2 py-1 cursor-pointer border-b shadow-lg border-green-500 transition-colors duration-200",e.darkMode?"text-green-400 bg-gray-700 hover:bg-green-800 hover:text-white":"text-green-700 bg-white hover:bg-green-800 hover:text-white"]),onClick:r[6]||(r[6]=n=>g.$emit("openLogsModal",e.b))},[...r[9]||(r[9]=[a("i",{class:"fa fa-ellipsis-h"},null,-1)])],2)])])]),a("div",Ta,[a("div",La,[a("span",Fa,v(e.b.course),1)])])],2))}},ja={class:"flex justify-between items-center p-5 border-b bg-gradient-to-r from-green-600 to-green-700"},Ea={class:"text-lg font-bold text-white flex items-center gap-2"},Ba={class:"flex gap-3 overflow-x-auto pb-2"},Va=["src","onClick"],Ua=["onClick"],Na={key:0,class:"fa fa-file-pdf-o text-3xl text-red-600"},Oa={key:1,class:"fa fa-file-word-o text-3xl text-blue-600"},Ya={key:2,class:"fa fa-file-o text-3xl text-gray-500"},qa={class:"flex-shrink-0"},za={key:0,class:"w-10 h-10 rounded-full bg-green-600 flex items-center justify-center text-white shadow-md"},Qa={key:1,class:"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-white font-bold shadow-md"},Ha={key:1,class:"text-center py-8"},Ga={class:"relative"},Ka=["value"],Ja=["disabled"],Wa={class:"flex justify-between items-center p-3 border-b"},Za={class:"truncate font-medium"},Xa={class:"flex gap-2"},_a=["href"],er={class:"flex-1 bg-gray-100"},tr=["src"],ar=["src"],rr={__name:"ChatCommunicationModal",props:{currentItem:Object,showChatModal:Boolean,modelValue:String,darkMode:B
1oolean},emits:["closeChatModal","sendFollowUpMessage","openImageModal","update:modelValue"],setup(e,{emit:S}){const g=e,r=k=>k?k.split("?")[0]:"",n=k=>r(k).split("/").pop()||"Document",p=k=>{const m=r(k).toLowerCase();return[".jpg",".jpeg",".png",".webp"].some(y=>m.includes(y))},j=(k,m="")=>r(k).toLowerCase().endsWith(".pdf")||m?.toLowerCase().includes(".pdf"),C=(k="")=>k?.toLowerCase().includes(".doc"),w=c(!1),I=c(""),E=c(""),fe=k=>{!k||k==="N/A"||(I.value=r(k),E.value=n(k),w.value=!0)},q=()=>{w.value=!1,I.value="",E.value=""},ne=k=>r(k).toLowerCase().endsWith(".pdf"),z=k=>`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(k)}`,Q=G(()=>g.currentItem?.additional_documents&&g.currentItem.additional_documents.length>0&&g.currentItem.additional_documents[0].name!=="N/A");return(k,m)=>e.showChatModal?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm transition-opacity duration-300",onClick:m[5]||(m[5]=y=>k.$emit("closeChatModal"))},[a("div",{class:s(["rounded-xl shadow-2xl w-full max-w-3xl mx-4 transform transition-transform duration-300 max-h-[90vh] overflow-hidden flex flex-col",[{"scale-100 opacity-100":e.showChatModal,"scale-95 opacity-0":!e.showChatModal},e.darkMode?"bg-gray-800":"bg-white"]]),onClick:m[3]||(m[3]=Y(()=>{},["stop"]))},[a("div",ja,[a("h3",Ea,[m[6]||(m[6]=a("i",{class:"fa fa-comments"},null,-1)),D(" Communication Chat - "+v(e.currentItem?.tracking_id||"N/A"),1)]),a("button",{onClick:m[0]||(m[0]=y=>k.$emit("closeChatModal")),class:"text-white hover:text-gray-200 transition-colors"},[...m[7]||(m[7]=[a("i",{class:"fa fa-times text-xl"},null,-1)])])]),Q.value?(l(),i("div",{key:0,class:s(["p-4 border-b",e.darkMode?"bg-gray-900 border-gray-700":"bg-gray-50 border-gray-200"])},[a("div",{class:s(["text-xs font-bold mb-3 flex items-center gap-2",e.darkMode?"text-gray-200":"text-gray-700"])},[...m[8]||(m[8]=[a("i",{class:"fa fa-paperclip text-green-500"},null,-1),D(" Attached Documents ",-1),a("span",{class:"text-xs font-normal text-gray-500"},"(Click to View File)",-1)])],2),a("div",Ba,[(l(!0),i(O,null,K(e.currentItem.additional_documents,(y,B)=>(l(),i("div",{key:"doc-"+B,class:"flex-shrink-0"},[a("div",{class:s(["rounded-xl w-20 hover:shadow-lg transition-all hover:scale-105 overflow-hidden border",e.darkMode?"bg-gray-800 border-gray-600":"bg-white border-gray-200"])},[p(y.url)?(l(),i("img",{key:0,src:r(y.url),class:"w-full h-20 object-cover cursor-pointer",onClick:J=>k.$emit("openImageModal",r(y.url))},null,8,Va)):(l(),i("div",{key:1,class:s(["w-full h-20 flex flex-col items-center justify-center cursor-pointer",e.darkMode?"bg-gray-800":""]),onClick:J=>fe(y.url)},[m[9]||(m[9]=a("img",{src:"https://lsu-media-styles.sgp1.digitaloceanspaces.com/PDF.png"},null,-1)),j(y.url,y.name)?(l(),i("i",Na)):C(y.name)?(l(),i("i",Oa)):(l(),i("i",Ya))],10,Ua))],2)]))),128))])],2)):h("",!0),a("div",{class:s(["flex-1 p-5 space-y-4 overflow-y-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-thumb]:bg-green-600 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-green-700",e.darkMode?"bg-gray-900/50":"bg-gray-50"]),style:{"max-height":"400px"}},[e.currentItem&&Array.isArray(e.currentItem.additional_response_details)&&e.currentItem.additional_response_details.length>0&&e.currentItem.additional_response_details[0].message!=="N/A"?(l(!0),i(O,{key:0},K(e.currentItem.additional_response_details,(y,B)=>(l(),i("div",{key:"msg-"+B,class:s(y.sender==="Registrar"?"flex gap-3 flex-row-reverse animate-fade-in":"flex gap-3 animate-fade-in")},[a("div",qa,[y.sender==="Registrar"?(l(),i("div",za,[...m[10]||(m[10]=[a("i",{class:"fa fa-user-tie"},null,-1)])])):(l(),i("div",Qa,v(e.currentItem.firstname?.charAt(0))+v(e.currentItem.lastname?.charAt(0)),1))]),a("div",{class:s(y.sender==="Registrar"?"flex-1 text-right":"flex-1")},[a("div",{class:s(y.sender==="Registrar"?"flex items-center gap-2 mb-1 justify-end":"flex items-center gap-2 mb-1")},[y.sender==="Registrar"?(l(),i("span",{key:0,class:s(["text-xs",e.darkMode?"text-gray-400":"text-gray-500"])},"Registrar",2)):h("",!0),a("span",{class:s(["text-sm font-bold",e.darkMode?"text-gray-200":"text-gray-900"])},v(y.sender==="Registrar"?"You":e.currentItem.firstname+" "+e.currentItem.lastname),3),y.sender!=="Registrar"?(l(),i("span",{key:1,class:s(["text-xs",e.darkMode?"text-gray-400":"text-gray-500"])},"Applicant",2)):h("",!0)],2),a("div",{class:s(y.sender==="Registrar"?"bg-gradient-to-r from-green-500 to-green-600 rounded-2xl rounded-tr-none px-4 py-3 shadow-md inline-block text-left":e.darkMode?"bg-gray-700 border border-gray-600 rounded-2xl rounded-tl-none px-4 py-3 shadow-sm":"bg-white border border-blue-200 rounded-2xl rounded-tl-none px-4 py-3 shadow-sm")},[a("p",{class:s(["whitespace-pre-wrap",y.sender==="Registrar"?"text-sm text-white":e.darkMode?"text-sm text-gray-200":"text-sm text-gray-800"])},v(y.message),3),a("p",{class:s(y.sender==="Registrar"?"text-xs text-white/70 mt-1":e.darkMode?"text-xs text-gray-400 mt-1":"text-xs text-gray-500 mt-1")}
1,v(y.timestamp),3)],2)],2)],2))),128)):h("",!0),!e.currentItem||!Array.isArray(e.currentItem.additional_response_details)||e.currentItem.additional_response_details.length===0||e.currentItem.additional_response_details[0].message==="N/A"?(l(),i("div",Ha,[...m[11]||(m[11]=[a("i",{class:"fa fa-comment-slash text-gray-300 text-4xl mb-3"},null,-1),a("p",{class:"text-sm text-gray-500"}," No messages yet ",-1)])])):h("",!0)],2),a("div",{class:s(["p-4 border-t",e.darkMode?"bg-gray-800 border-gray-700":"bg-white border-gray-200"])},[a("label",{class:s(["text-xs font-semibold mb-2 flex items-center gap-2",e.darkMode?"text-gray-300":"text-gray-700"])},[...m[12]||(m[12]=[a("i",{class:"fa fa-pencil text-green-600"},null,-1),D(" Send Follow-up Message ",-1)])],2),a("div",Ga,[a("textarea",{class:s(["w-full border-2 rounded-xl px-4 py-3 text-sm focus:ring-2 focus:ring-green-500 focus:border-transparent transition-all resize-none",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200 placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"]),placeholder:"Type your follow-up remarks here...",value:e.modelValue,onInput:m[1]||(m[1]=y=>k.$emit("update:modelValue",y.target.value)),rows:"3"},null,42,Ka)]),a("button",{onClick:m[2]||(m[2]=y=>k.$emit("sendFollowUpMessage",e.currentItem)),disabled:!e.modelValue?.trim(),class:"mt-3 w-full flex items-center justify-center gap-2 px-4 py-2.5 font-semibold text-white bg-gradient-to-r from-green-600 to-green-700 rounded-lg shadow-md hover:shadow-lg hover:from-green-700 hover:to-green-800 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed"},[...m[13]||(m[13]=[a("i",{class:"fa fa-paper-plane"},null,-1),a("span",null,"Send Message",-1)])],8,Ja)],2)],2),w.value?(l(),i("div",{key:0,class:"fixed inset-0 z-[999] bg-black/80 flex items-center justify-center p-4",onClick:q},[a("div",{class:"w-full max-w-6xl h-[90vh] bg-white rounded-xl overflow-hidden flex flex-col",onClick:m[4]||(m[4]=Y(()=>{},["stop"]))},[a("div",Wa,[a("span",Za,v(E.value),1),a("div",Xa,[a("a",{href:I.value,target:"_blank",class:"bg-green-600 text-white px-3 py-1 rounded"}," Download ",8,_a),a("button",{onClick:q,class:"bg-red-600 text-white px-3 py-1 rounded"}," Close ")])]),a("div",er,[ne(I.value)?(l(),i("iframe",{key:0,src:I.value,class:"w-full h-full"},null,8,tr)):(l(),i("iframe",{key:1,src:z(I.value),class:"w-full h-full"},null,8,ar))])])])):h("",!0)])):h("",!0)}},sr=sa(rr,[["__scopeId","data-v-f3b547ee"]]),or={class:"flex items-center gap-3"},lr={class:"lg:flex lg:gap-6 w-full space-y-4 lg:space-y-0"},nr={class:"mb-4"},ir={class:"mb-4"},dr={class:"mb-4"},ur={class:"mb-4"},gr={class:"mb-2"},cr={class:"w-full space-y-4"},mr={class:"lg:flex lg:gap-4"},fr={class:"mb-4 w-full"},yr={class:"mb-4 w-full"},br={class:"mb-4"},vr={class:"mb-4"},xr={class:"space-y-1"},hr=["disabled"],wr={key:0,class:"fa fa-spinner fa-spin"},Mr={key:1,class:"fa fa-paper-plane"},kr={key:2},pr={key:3},Cr={__name:"PersonalInfoModal",props:{showPersonalInfoModal:Boolean,currentItem:Object,darkMode:Boolean,isVerifying:Boolean},emits:["closePersonalInfoModal","verifiedConfirm"],setup(e,{emit:S}){return(g,r)=>e.showPersonalInfoModal?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-md transition-opacity duration-300",onClick:r[11]||(r[11]=n=>g.$emit("closePersonalInfoModal"))},[a("div",{class:s(["rounded-2xl shadow-2xl px-5 py-2 lg:w-7/12 w-11/12 mx-auto transform transition-transform duration-300 max-h-[95vh] overflow-y-auto",[{"scale-100 opacity-100":e.showPersonalInfoModal,"scale-95 opacity-0":!e.showPersonalInfoModal},e.darkMode?"bg-gradient-to-br from-gray-800 to-gray-900":"bg-gradient-to-br from-white to-gray-50"]]),onClick:r[10]||(r[10]=Y(()=>{},["stop"]))},[a("div",{class:s(["flex justify-between items-center mb-2 pb-2 border-b-2",e.darkMode?"border-green-700":"border-green-200"])},[a("div",or,[r[12]||(r[12]=a("div",{class:"w-12 h-12 bg-gradient-to-br from-green-500 to-green-700 rounded-full flex items-center justify-center shadow-lg"},[a("i",{class:"fa fa-user text-white text-xl"})],-1)),a("div",null,[a("h3",{class:s(["text-lg font-bold",e.darkMode?"text-gray-200":"text-gray-900"])}," Personal Information ",2),a("p",{class:s(e.darkMode?"text-gray-400":"text-gray-600")},v(e.currentItem?.tracking_id),3)])]),a("button",{onClick:r[0]||(r[0]=n=>g.$emit("closePersonalInfoModal")),class:"w-10 h-10 flex items-center justify-center rounded-full bg-red-100 text-red-600 hover:bg-red-600 hover:text-white transition-all duration-200 shadow-md"},[...r[13]||(r[13]=[a("i",{class:"fa fa-times text-lg"},null,-1)])])],2),a("div",lr,[a("div",{class:s(["lg:w-9/12 w-full rounded-xl p-4 shadow-md border",e.darkMode?"bg-gray-800 border-gray-700":"bg-white border-gray-200"])},[a("h4",{class:s(["text-lg font-bold mb-4 flex items-center gap-2",e.darkMode?"text-gray-200":"text-gray-800"])},[...r[14]||(r[14]=[a("i",{class:"fa fa-id-card text-green-600"},null,-1),D(" Personal Details ",-1)])],2),a("div",nr,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[15]||(r[15]=[a("i",{class:"fa fa-user text-green-600 mr-2"},null,-1),D(" Fullname ",-1)])],2),a("div",{class:s(["border rounded-lg px-3 py-2 text-sm",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200":"bg-gray-50 border-gray-300 text-gray-900"])},v(e.currentItem?.firstname)+" "+v(e.currentItem?.middlename)+" "+v(e.currentItem?.lastname),3)]),a("div",ir,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[16]||(r[16]=[a("i",{class:"fa fa-birthday-cake text-green-500 mr-2"},null,-1),D(" Date of Birth ",-1)])],2),R(a("input",{type:"text",class:s(["w-full border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-green-500 transition",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200":"bg-white border-gray-300 text-gray-900"]),"onUpdate:modelValue":r[1]||(r[1]=n=>e.currentItem.birthdate=n)},null,2),[[X,e.currentItem.birthdate]])]),a("div",dr,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[17]||(r[17]=[a("i",{class:"fa fa-female text-green-500 mr-2"}
1,null,-1),D(" Mother's Maiden Name ",-1)])],2),R(a("input",{type:"text",class:s(["w-full border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-green-500 transition",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200":"bg-white border-gray-300 text-gray-900"]),"onUpdate:modelValue":r[2]||(r[2]=n=>e.currentItem.mother_maiden_name=n)},null,2),[[X,e.currentItem.mother_maiden_name]])]),a("div",ur,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[18]||(r[18]=[a("i",{class:"fa fa-envelope text-green-600 mr-2"},null,-1),D(" Email ",-1)])],2),R(a("input",{type:"text",class:s(["w-full border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-green-500 transition",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200":"bg-white border-gray-300 text-gray-900"]),"onUpdate:modelValue":r[3]||(r[3]=n=>e.currentItem.email=n)},null,2),[[X,e.currentItem.email]])]),a("div",gr,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[19]||(r[19]=[a("i",{class:"fa fa-phone text-green-600 mr-2"},null,-1),D(" Contact Number ",-1)])],2),R(a("input",{type:"text",class:s(["w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-green-500 transition",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200":"bg-white border-gray-300 text-gray-900"]),"onUpdate:modelValue":r[4]||(r[4]=n=>e.currentItem.contact_number=n)},null,2),[[X,e.currentItem.contact_number]])])],2),a("div",cr,[a("div",{class:s(["rounded-xl p-4 shadow-md border",e.darkMode?"bg-gray-800 border-gray-700":"bg-white border-gray-200"])},[a("h4",{class:s(["text-lg font-bold mb-4 flex items-center gap-2",e.darkMode?"text-gray-200":"text-gray-800"])},[...r[20]||(r[20]=[a("i",{class:"fa fa-graduation-cap text-green-600"},null,-1),D(" Academic Information ",-1)])],2),a("div",mr,[a("div",fr,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[21]||(r[21]=[a("i",{class:"fa fa-graduation-cap text-green-500 mr-2"},null,-1),D(" ICC / LSU Graduate? ",-1)])],2),R(a("select",{"onUpdate:modelValue":r[5]||(r[5]=n=>e.currentItem.alumni=n),class:s(["w-full rounded-lg px-3 py-2 text-sm transition focus:ring-2",e.darkMode?"bg-gray-700 border border-gray-600 text-gray-100 focus:ring-green-400":"bg-white border border-gray-300 text-gray-900 focus:ring-green-500"])},[...r[22]||(r[22]=[a("option",{value:"yes"},"Alumnus",-1),a("option",{value:"no"},"Non-Alumnus",-1)])],2),[[nt,e.currentItem.alumni]])]),a("div",yr,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1 whitespace-nowrap",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[23]||(r[23]=[a("i",{class:"fa fa-calendar text-green-500 mr-2"},null,-1),D(" A.Y Graduated or Attended ",-1)])],2),R(a("input",{type:"text","onUpdate:modelValue":r[6]||(r[6]=n=>e.currentItem.year_graduated_last_attended=n),class:s(["w-full rounded-lg px-3 py-2 text-sm transition focus:ring-2",e.darkMode?"bg-gray-700 border border-gray-600 text-gray-100 focus:ring-green-400":"bg-white border border-gray-300 text-gray-900 focus:ring-green-500"])},null,2),[[X,e.currentItem.year_graduated_last_attended]])])]),a("div",br,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[24]||(r[24]=[a("i",{class:"fa fa-university text-green-500 mr-2"},null,-1),D(" College ",-1)])],2),R(a("select",{"onUpdate:modelValue":r[7]||(r[7]=n=>e.currentItem.college=n),class:s(["w-full rounded-lg px-3 py-2 text-sm transition focus:ring-2",e.darkMode?"bg-gray-700 border border-gray-600 text-gray-100 focus:ring-green-400":"bg-white border border-gray-300 text-gray-900 focus:ring-green-500"])},[...r[25]||(r[25]=[Xt('<option value="">Choose</option><option value="Arts and Sciences, Engineering, Architecture, Computer Studies"> Arts and Sciences, Engineering, Architecture, Computer Studies </option><option value="Business, Commerce, Accountancy"> Business, Commerce, Accountancy </option><option value="Education / Graduate Studies"> Education / Graduate Studies </option>
1<option value="Nursing / Tourism and Hospitality Management"> Nursing / Tourism and Hospitality Management </option><option value="Criminology / BS Psychology"> Criminology / BS Psychology </option>',6)])],2),[[nt,e.currentItem.college]])]),a("div",vr,[a("label",{class:s(["flex items-center text-sm font-semibold mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},[...r[26]||(r[26]=[a("i",{class:"fa fa-book text-green-500 mr-2"},null,-1),D(" Course ",-1)])],2),R(a("input",{type:"text","onUpdate:modelValue":r[8]||(r[8]=n=>e.currentItem.course=n),class:s(["w-full rounded-lg px-3 py-2 text-sm transition focus:ring-2",e.darkMode?"bg-gray-700 border border-gray-600 text-gray-100 focus:ring-green-400":"bg-white border border-gray-300 text-gray-900 focus:ring-green-500"])},null,2),[[X,e.currentItem.course]])]),e.currentItem?.details?(l(),i("div",{key:0,class:s(["mt-4 p-4 border-l-4 rounded-r-lg",e.darkMode?"bg-blue-900 border-blue-600 text-gray-200":"bg-blue-50 border-blue-500 text-gray-700"])},[r[27]||(r[27]=a("p",{class:"flex items-center text-sm font-semibold mb-1"},[a("i",{class:"fa fa-info-circle text-green-600 mr-2"}),D(" Purpose and Details: ")],-1)),a("p",{class:s(["text-sm",e.darkMode?"text-gray-200":"text-gray-700"])},v(e.currentItem.details),3)],2)):h("",!0),a("div",{class:s(["p-3 border-2 mt-4 rounded-lg",e.darkMode?"bg-blue-900 border-blue-600 text-gray-200":"bg-blue-50 border-blue-200 text-blue-800"])},[r[29]||(r[29]=a("h4",{class:"text-xs font-bold mb-2 flex items-center uppercase"},[a("i",{class:"fa fa-file-text mr-2"}),D(" Requested Document/s ")],-1)),a("div",xr,[(l(!0),i(O,null,K(e.currentItem?.detail_fees_type_document_requests,(n,p)=>(l(),i("div",{key:p,class:s(["flex items-center gap-2 text-xs",e.darkMode?"text-gray-200":"text-gray-900"])},[r[28]||(r[28]=a("i",{class:"fa fa-check-circle text-blue-500 text-[10px]"},null,-1)),a("span",null,v(n.fee_name),1)],2))),128))])],2)],2)])]),a("div",{class:s(["mt-4 pt-4 border-t-2",e.darkMode?"border-gray-700":"border-gray-200"])},[a("button",{onClick:r[9]||(r[9]=n=>g.$emit("verifiedConfirm",e.currentItem)),disabled:e.isVerifying,class:"w-full flex items-center justify-center gap-2 px-6 py-3 font-bold text-white bg-gradient-to-r from-green-600 to-green-700 rounded-xl shadow-lg hover:shadow-xl hover:from-green-700 hover:to-green-800 transition disabled:opacity-50 disabled:cursor-not-allowed"},[e.isVerifying?(l(),i("i",wr)):(l(),i("i",Mr)),e.isVerifying?(l(),i("span",kr,"Verifying...")):(l(),i("span",pr,"Verify Information"))],8,hr)],2)],2)])):h("",!0)}},$r={class:"grid lg:grid-cols-2 md:grid-cols-2 gap-4 mb-3"},Ir={class:"mt-4"},Dr={class:"w-full"},Pr=["for"],Sr=["id","onUpdate:modelValue"],Ar={class:"lg:w-3/12 w-full"},Tr=["for"],Lr=["id","onUpdate:modelValue"],Fr=["onClick"],Rr={class:"mt-6"},jr=["disabled"],Er={__name:"PaymentDetailsModal",props:{showPaymentModal:Boolean,currentItem:Object,currentItemInfo:Object,darkMode:Boolean,addDetailFee:Function,removeDetailFee:Function,sendEmailDetailFee:Function,hasEmptyFeeName:Boolean,isSendingPayment:Boolean,showSuccessMessage:Boolean},emits:["closePaymentModal"],setup(e,{emit:S}){return(g,r)=>e.showPaymentModal?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm transition-opacity duration-300",onClick:r[4]||(r[4]=n=>g.$emit("closePaymentModal"))},[a("div",{class:s(["rounded-xl shadow-2xl p-6 w-full max-w-3xl mx-4 transform transition-transform duration-300 max-h-[90vh] overflow-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-thumb]:bg-green-600 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-green-700",[{"scale-100 opacity-100":e.showPaymentModal,"scale-95 opacity-0":!e.showPaymentModal},e.darkMode?"bg-gray-800":"bg-white"]]),onClick:r[3]||(r[3]=Y(()=>{},["stop"]))},[a("div",{class:s(["flex justify-between items-center mb-4 border-b pb-3",e.darkMode?"border-gray-700":"border-gray-200"])},[a("h3",{class:s(["text-lg font-medium",e.darkMode?"text-gray-200":"text-gray-900"])}," Payment Information ",2),a("button",{onClick:r[0]||(r[0]=n=>g.$emit("closePaymentModal")),class:s(["hover:text-gray-500",(e.darkMode,"text-gray-400")])},[...r[5]||(r[5]=[a("i",{class:"fa fa-times"},null,-1)])],2)],2),a("div",{class:s(["border px-5 py-4 my-4 roun
1ded-xl shadow-sm",e.darkMode?"border-gray-700 bg-gray-900/50":"border-gray-200 bg-gray-50/50"])},[a("div",$r,[a("div",null,[a("label",{class:s(["block text-xs font-medium mb-1",e.darkMode?"text-gray-300":"text-gray-700"])},"Total : "+v(e.currentItemInfo.total),3)])]),a("div",Ir,[!e.currentItemInfo?.detail_fees_type_document_requests||e.currentItemInfo.detail_fees_type_document_requests.length===0?(l(),i("div",{key:0,class:s(["text-center py-6 rounded-lg border-2 border-dashed mb-4",e.darkMode?"bg-gray-800/50 border-gray-700":"bg-gray-50 border-gray-300"])},[a("i",{class:s(["fa fa-file-invoice-dollar text-3xl mb-2",e.darkMode?"text-gray-500":"text-gray-400"])},null,2),a("p",{class:s(["text-sm",e.darkMode?"text-gray-400":"text-gray-500"])}," No document request fees added yet ",2),a("p",{class:s(["text-xs mt-1",e.darkMode?"text-gray-500":"text-gray-400"])},' Click "Add Fee" below to add document request fees ',2)],2)):h("",!0),(l(!0),i(O,null,K(e.currentItemInfo?.detail_fees_type_document_requests,(n,p)=>(l(),i("div",{key:p,class:s(["flex items-end gap-3 mb-3 p-3 rounded-lg shadow-sm border",e.darkMode?"bg-gray-800 border-gray-700":"bg-white border-gray-200"])},[a("div",Dr,[a("label",{for:"fee_name_"+p,class:s(["block text-xs font-medium mb-1",e.darkMode?"text-gray-300":"text-gray-700"])}," Fee Name ",10,Pr),R(a("input",{type:"text",id:"fee_name_"+p,"onUpdate:modelValue":j=>n.fee_name=j,class:s(["w-full text-sm py-2 px-3 rounded-md border focus:ring-2 focus:ring-green-500 focus:border-green-500 outline-none shadow-sm",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200":"bg-white border-gray-300 text-gray-900"])},null,10,Sr),[[X,n.fee_name]])]),a("div",Ar,[a("label",{for:"fee_amount_"+p,class:s(["block text-xs font-medium mb-1",e.darkMode?"text-gray-300":"text-gray-700"])}," Amount ",10,Tr),R(a("input",{type:"number",id:"fee_amount_"+p,"onUpdate:modelValue":j=>n.amount=j,class:s(["w-full text-sm py-2 px-3 rounded-md border focus:ring-2 focus:ring-green-500 focus:border-green-500 outline-none shadow-sm",e.darkMode?"bg-gray-700 border-gray-600 text-gray-200":"bg-white border-gray-300 text-gray-900"])},null,10,Lr),[[X,n.amount]])]),a("button",{onClick:j=>e.removeDetailFee(p),class:"px-3 py-2 text-xs text-red-500 bg-red-50 border border-red-500 rounded-md hover:bg-red-600 hover:text-white transition-all duration-200",title:"Remove Fee"},[...r[6]||(r[6]=[a("i",{class:"fa fa-trash"},null,-1)])],8,Fr)],2))),128)),a("button",{onClick:r[1]||(r[1]=(...n)=>e.addDetailFee&&e.addDetailFee(...n)),class:"block mx-auto mt-3 px-4 py-2 text-sm bg-green-600 text-white rounded-md hover:bg-green-700 transition-all"}," + Add Fee ")]),a("div",Rr,[a("button",{onClick:r[2]||(r[2]=n=>e.sendEmailDetailFee(e.currentItem)),disabled:e.hasEmptyFeeName||e.isSendingPayment,class:"w-full py-2 font-semibold rounded-md border border-green-600 bg-green-600 text-white hover:bg-white hover:text-green-600 transition-all disabled:opacity-60 disabled:cursor-not-allowed"},[e.isSendingPayment?(l(),i(O,{key:0},[r[7]||(r[7]=a("svg",{class:"animate-spin h-4 w-4 inline-block mr-2 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[a("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),a("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})],-1)),r[8]||(r[8]=D(" Sending... ",-1))],64)):(l(),i(O,{key:1},[D("Send Payment")],64))],8,jr)]),e.showSuccessMessage?(l(),i("div",{key:0,class:s(["mt-4 text-center text-sm border px-4 py-2 rounded-md animate-pulse",e.darkMode?"bg-green-900/50 text-green-300 border-green-700":"bg-green-100 text-green-800 border-green-400"])}," â
Payment details sent successfully! ",2)):h("",!0)],2)],2)])):h("",!0)}},Br={class:"pt-4"},Vr=["disabled"],Ur={key:0,class:"flex items-center gap-2"},Nr={key:1},Or={__name:"DocumentPreparationModal",props:{showPrepDocModal:Boolean,currentItem:Object,darkMode:Boolean,isConfirming:Boolean},emits:["closePrepDocModal","confirmPrepDoc"],setup(e,{emit:S}){return(g,r)=>e.showPrepDocModal?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm transition-opacity duration-300",onClick:r[3]||(r[3]=n=>g.$emit("closePrepDocModal"))},[a("div",{class:s(["rounded-xl shadow-3xl p-6 w-full max-w-sm mx-4 transform transition-all duration-300 ease-out",[{"scale-100 opacity-100":e.showPrepDocModal,"scale-95 opacity-0":!e.showPrepDocModal},e.darkMode?"bg-gray-800":"bg-white"]]),onClick:r[2]||(r[2]=Y(()=>{},["stop"]))},[a("div",{class:s(["flex items-center justify-between pb-4 mb-4 border-b",e.darkMode?"border-gray-700":"border-gray-200"])},[a("h2",{class:s(["text-xl font-bold",e.darkMode?"text-gray-100":"text-gray-800"])}," Verify & Prepare Documents ",2),a("button",{onClick:r[0]||(r[0]=n=>g.$emit("closePrepDocModal")),class:s(["transition-colors duration-200 p-1 rounded-full",e.darkMode?"text-gray-400 hover:text-gray-200 hover:bg-gray-700":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"])},[...r[4]||(r[4]=[a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor",class:"w-6 h-6"},[a("path",{"fill-rule":"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})],-1)])],2)],2),a("div",Br,[a("button",{onClick:r[1]||(r[1]=n=>g.$emit("confirmPrepDoc",e.currentItem)),class:s(["w-full flex items-center justify-center gap-2 px-4 py-0.5 text-base font-semibold rounded-lg transition-all duration-250 ease-in-out",{"bg-green-600 hover:bg-white hover:text-green-600 text-white hover:border hover:border-green-600 shadow-md hover:shadow-lg":!e.isConfirming,"bg-gray-400 text-white cursor-not-allowed":e.isConfirming}]),disabled:e.isConfirming},[e.isConfirming?(l(),i("span",Ur,[...r[5]||(r[5]=[a("svg",{class:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[a("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),a("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),D(" Notifying... ",-1)])])):(l(),i("span",Nr,"Notify"))],10,Vr)])],2)])):h("",!0)}},Yr={key:0},qr={key:1},zr={__name:"ReleasingDocumentsModal",props:{showReleasingDocModal:Boolean,currentItem:Object,darkMode:Boolean,isConfirming:Boolean},emits:["closeReleasingDocModal","confirmReleasingDoc"],setup(e,{emit:S}){return(g,r)=>e.showReleasingDocModal?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm transition-opacity duration-300",onClick:r[3]||(r[3]=n=>g.$emit("closeReleasingDocModal"))},[a("div",{class:s(["rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 transform transition-transform duration-300",[{"scale-100 opacity-100":e.showReleasingDocModal,"scale-95 opacity-0":!e.showReleasingDocModal},e.darkMode?"bg-gray-800":"bg-white"]]),onClick:r[2]||(r[2]=Y(()=>{},["stop"]))},[a("div",{class:s(["flex justify-between items-center mb-4 border-b pb-3",e.darkMode?"border-gray-700":"border-gray-200"])},[a("h3",{class:s(["text-lg font-medium",e.darkMode?"text-gray-200":"text-gray-900"])}," Releasing Documents ",2),a("button",{onClick:r[0]||(r[0]=n=>g.$emit("closeReleasingDocModal")),class:s(["hover:text-gray-500",(e.darkMode,"text-gray-400")])},[...r[4]||(r[4]=[a("i",{class:"fa fa-times"},null,-1)])],2)],2),a("div",{onClick:r[1]||(r[1]=n=>g.$emit("confirmReleasingDoc",e.currentItem)),class:s(["w-full text-center px-2 py-1 font-bold bg-green-600 text-white rounded-md mt-2 cursor-pointer hover:bg-white border hover:border-green-600 transition-colors",[{"opacity-75 cursor-not-allowed":e.isConfirming},e.darkMode?"hover:text-green-400":"hover:text-green-600"]])},[e.isConfirming?(l(),i("span",Yr,[...r[5]||(r[5]=[a("i",{class:"fa fa-spinner fa-spin mr-1"},null,-1),D(" Confirming... ",-1)])])):(l(),i("span",qr,"Confirm"))],2)],2)])):h("",!0)}},Qr={key:0},Hr={key:1},Gr={__name:"TransactionClosedModal",props:{showTransactionClosedModal:Boolean,currentItem:Object,darkMode:Boolean,isConfirming:Boolean},emits:["closeTransactionClosedModal","confirmTransactionClosed"],setup(e,{emit:S}){return(g,r)=>e.showTransactionClosedModal?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm transition-opacity duration-300",onClick:r[3]||(r[3]=n=>g.$emit("closeTransactionClosedModal"))},[a("div",{class:s(["rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 transform transition-transform duration-300",[{"scale-100 opacity-100":e.showTransactionClosedModal,"scale-95 opacity-0":!e.showTransactionClosedModal},e.darkMode?"bg-gray-800":"bg-white"]]),onClick:r[2]||(r[2]=Y(()=>{},["stop"]))},[a("div",{class:s(["flex justify-between items-center mb-4 border-b pb-3",e.darkMode?"border-gray-700":"border-gray-200"])},[a("h3",{class:s(["text-lg font-medium",e.darkMode?"text-gray-200":"text-gray-900"])}," Transaction Closed ",2),a("button",{onClick:r[0]||(r[0]=n=>g.$emit("closeTransactionClosedModal")),class:s(["hover:text-gray-500",(e.darkMode,"text-gray-400")])},[...r[4]||(r[4]=[a("i",{class:"fa fa-times"},null,-1)])],2)],2),a("div",{onClick:r[1]||(r[1]=n=>g.$emit("confirmTransactionClosed",e.currentItem)),class:s(["w-full text-center px-2 py-1 font-bold bg-green-600 text-white rounded-md mt-2 cursor-pointer hover:bg-white border hover:border-green-600 transition-colors",[{"opacity-75 curs
1or-not-allowed":e.isConfirming},e.darkMode?"hover:text-green-400":"hover:text-green-600"]])},[e.isConfirming?(l(),i("span",Qr,[...r[5]||(r[5]=[a("i",{class:"fa fa-spinner fa-spin mr-1"},null,-1),D(" Confirming... ",-1)])])):(l(),i("span",Hr,"Confirm"))],2)],2)])):h("",!0)}},Kr=["src"],Jr={__name:"ShowImageModal",props:{showImageModal:Boolean,getCleanUrl:Function,currentModalImage:String},emits:["closeImageModal"],setup(e,{emit:S}){return(g,r)=>e.showImageModal?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-emerald-900/70 backdrop-blur-md",onClick:r[2]||(r[2]=n=>g.$emit("closeImageModal"))},[a("div",{class:"relative max-w-4xl max-h-[90vh] overflow-auto bg-white p-2 rounded-lg",onClick:r[1]||(r[1]=Y(()=>{},["stop"]))},[a("button",{onClick:r[0]||(r[0]=n=>g.$emit("closeImageModal")),class:"absolute top-2 right-2 text-gray-700 hover:text-red-500 bg-white rounded-full w-8 h-8 flex items-center justify-center shadow-md"},[...r[3]||(r[3]=[a("i",{class:"fa fa-close"},null,-1)])]),a("img",{src:e.getCleanUrl(e.currentModalImage),class:"max-w-full max-h-[85vh] object-contain"},null,8,Kr)])])):h("",!0)}},Wr={class:"text-center"},Zr={class:"text-sm text-gray-500 mb-6"},Xr={class:"flex justify-center gap-4"},_r=["disabled"],es={key:0,class:"fa fa-spinner fa-spin mr-2"},ts=["disabled"],as={__name:"DeleteConfirmationModal",props:{toggleConfirmDelete:Boolean,selectedItems:Array,isDeleting:Boolean},emits:["deleteItems","cancelDelete"],setup(e,{emit:S}){return(g,r)=>e.toggleConfirmDelete?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-emerald-900/60 backdrop-blur-sm transition-opacity duration-300",onClick:r[3]||(r[3]=n=>g.$emit("cancelDelete"))},[a("div",{class:s(["bg-white rounded-xl shadow-2xl p-6 w-full max-w-md mx-4 transform transition-transform duration-300",{"scale-100 opacity-100":e.toggleConfirmDelete,"scale-95 opacity-0":!e.toggleConfirmDelete}]),onClick:r[2]||(r[2]=Y(()=>{},["stop"]))},[a("div",Wr,[r[4]||(r[4]=a("div",{class:"mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-red-100 mb-4"},[a("i",{class:"fa fa-exclamation-triangle text-red-600 text-xl"})],-1)),r[5]||(r[5]=a("h3",{class:"text-lg font-medium text-gray-900 mb-2"}," Confirm Deletion ",-1)),a("p",Zr," Are you sure you want to delete "+v(e.selectedItems.length===1?"this record":"these "+e.selectedItems.length+" records")+"? This action cannot be undone. ",1)]),a("div",Xr,[a("button",{onClick:r[0]||(r[0]=n=>g.$emit("deleteItems")),class:"inline-flex justify-center rounded-md border border-transparent bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 transition-colors duration-200",disabled:e.isDeleting},[e.isDeleting?(l(),i("i",es)):h("",!0),D(" "+v(e.isDeleting?"Deleting...":"Delete"),1)],8,_r),a("button",{onClick:r[1]||(r[1]=n=>g.$emit("cancelDelete")),class:"inline-flex justify-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 transition-colors duration-200",disabled:e.isDeleting}," Cancel ",8,ts)])],2)])):h("",!0)}},rs={class:"text-lg font-medium"},ss={class:"mb-6 max-h-[40vh] overflow-y-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-thumb]:bg-green-600 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-green-700"},os={key:1,class:"space-y-3"},ls={class:"flex items-center justify-between capitalize gap-x-3"},ns={class:"w-3/12 text-center"},is={__name:"StatusLogsModal",props:{showLogsModal:Boolean,currentItem:Object,darkMode:Boolean,sortedLogs:Array},emits:["closeLogsModal"],setup(e,{emit:S}){return(g,r)=>e.showLogsModal?(l(),i("div",{key:0,class:s(["fixed inset-0 z-50 flex items-center justify-center transition-opacity duration-300",e.darkMode?"bg-black/70 backdrop-blur-sm":"bg-black/50 backdrop-blur-xs"]),onClick:r[2]||(r[2]=n=>
1g.$emit("closeLogsModal"))},[a("div",{class:s(["rounded-lg p-6 max-w-2xl w-full mx-4 transform transition-transform duration-300 max-h-[90vh] overflow-auto",[e.darkMode?"bg-gray-900 text-gray-200":"bg-white text-gray-900",e.showLogsModal?"scale-100 opacity-100":"scale-95 opacity-0"]]),onClick:r[1]||(r[1]=Y(()=>{},["stop"]))},[a("div",{class:s(["flex justify-between items-center mb-4 border-b pb-3",e.darkMode?"border-gray-700":"border-gray-300"])},[a("h3",rs," Status Logs - "+v(e.currentItem?.tracking_id||"N/A"),1),a("button",{onClick:r[0]||(r[0]=n=>g.$emit("closeLogsModal")),class:s(e.darkMode?"text-gray-400 hover:text-gray-200":"text-gray-400 hover:text-gray-500")},[...r[3]||(r[3]=[a("i",{class:"fa fa-times"},null,-1)])],2)],2),a("div",ss,[!e.currentItem?.logs||e.currentItem.logs.length===0?(l(),i("div",{key:0,class:s([e.darkMode?"text-gray-400":"text-gray-500","text-center py-4"])}," No logs available ",2)):(l(),i("div",os,[(l(!0),i(O,null,K(e.sortedLogs,(n,p)=>(l(),i("div",{key:p,class:s(["border-l-4 rounded-r text-[10px]",[p===e.sortedLogs.length-1?e.darkMode?"border-green-500 bg-green-800/20 py-3":"border-green-500 bg-green-50 py-3":e.darkMode?"border-gray-600 bg-gray-800/30":"border-gray-300 bg-gray-50"]])},[a("div",ls,[a("div",{class:s(["font-medium w-9/12",p===e.sortedLogs.length-1?e.darkMode?"text-green-400 text-sm":"text-green-800 text-sm":e.darkMode?"text-gray-300":"text-gray-500"])},[a("div",{class:s(["w-full bg-transparent focus:outline-none px-1",p===e.sortedLogs.length-1?e.darkMode?"border-green-600 focus:border-green-400":"border-green-300 focus:border-green-500":e.darkMode?"border-gray-600 focus:border-gray-400":"border-gray-300 focus:border-gray-500"])},v(n.status_remarks),3)],2),a("div",ns,[a("div",{class:s(["whitespace-nowrap bg-transparent -mb-0.5 focus:outline-none px-1 pb-0.5",p===e.sortedLogs.length-1?e.darkMode?"border-green-600 focus:border-green-400":"border-green-300 focus:border-green-500":e.darkMode?"border-gray-600 focus:border-gray-400":"border-gray-300 focus:border-gray-500"])}
1,v(n.timestamp),3)])])],2))),128))]))])],2)],2)):h("",!0)}},ds={class:"flex justify-center my-4"},us=["disabled"],gs=["onClick"],cs=["disabled"],ms={__name:"Pagination",props:{currentPage:Number,totalPages:Number,visiblePages:Array,darkMode:Boolean},emits:["update:currentPage"],setup(e,{emit:S}){return(g,r)=>(l(),i("div",ds,[a("button",{disabled:e.currentPage===1,onClick:r[0]||(r[0]=n=>g.$emit("update:currentPage",e.currentPage-1)),class:s(["px-2 py-2 mx-1 rounded transition-colors duration-200",e.darkMode?e.currentPage===1?"bg-gray-700 text-gray-400 cursor-not-allowed":"bg-gray-800 text-gray-200 hover:bg-gray-600 hover:text-white":e.currentPage===1?"bg-gray-200 text-gray-400 cursor-not-allowed":"bg-gray-200 text-gray-900 hover:bg-gray-500 hover:text-white"])}," Prev ",10,us),(l(!0),i(O,null,K(e.visiblePages,n=>(l(),i("button",{key:n,onClick:p=>g.$emit("update:currentPage",n),class:s(["px-4 py-2 mx-1 rounded transition-colors duration-200",e.currentPage===n?e.darkMode?"bg-green-700 text-white":"bg-green-800 text-white":e.darkMode?"bg-gray-800 text-gray-200 hover:bg-gray-600 hover:text-white":"bg-gray-200 text-gray-900 hover:bg-green-500 hover:text-white"])},v(n),11,gs))),128)),a("button",{disabled:e.currentPage===e.totalPages,onClick:r[1]||(r[1]=n=>g.$emit("update:currentPage",e.currentPage+1)),class:s(["px-2 py-2 mx-1 rounded transition-colors duration-200",e.darkMode?e.currentPage===e.totalPages?"bg-gray-700 text-gray-400 cursor-not-allowed":"bg-gray-800 text-gray-200 hover:bg-gray-600 hover:text-white":e.currentPage===e.totalPages?"bg-gray-200 text-gray-400 cursor-not-allowed":"bg-gray-200 text-gray-900 hover:bg-gray-500 hover:text-white"])}," Next ",10,cs)]))}},fs={class:"min-h-screen flex"},ys={class:"w-full"},bs={class:"w-full px-2"},vs={class:"relative"},xs={class:""},hs={class:"appointment-lists mx-auto text-xs"},ws={key:1},Ms={class:"gap-4"},ks={key:0,class:"w-fit flex px-2"},ps={class:""},Cs=["value"],$s={key:2,class:"text-center py-12"},Is=1e3,Ue=500,Me=4,js={__name:"index",props:{darkMode:Boolean},setup(e){const S=e,{user:g}=la(),r=c([]);let n=c(!0),p=c(!1);const j=aa(),C=c(j.public.apiUrl);let w=c(null);const I=c("all"),E=c(!1),fe=c(""),q=c(!1),ne=c(null),z=c(!1),Q=c(!1),k=c(!1),m=c(!1),y=c(!1),B=c(!1),J=c(!1),M=c(null),dt=c(""),W=c(""),P=c(""),$=c(""),_=c(!1),V=c(!1),Ne=t=>{fe.value=t,E.value=!0,A.value=!0},ke=()=>{E.value=!1,A.value=U()},Oe=t=>{if(!t)return"";const o=t.match(/^(.*?\.(?:jpg|jpeg|png))/i);return o?o[1]:t},ie=(t,o={})=>({id:t.id,tracking_id:t.tracking_id,firstname:t.firstname,middlename:t.middlename,lastname:t.lastname,email:t.email,contact_number:t.contact_number,college:t.college,course:t.course,year_level:t.year_level,student_id_number:t.student_id_number,date_of_birth:t.date_of_birth,mother_maiden_name:t.mother_maiden_name,year_graduated:t.year_graduated,purpose:t.purpose,type_document_requests:t.type_document_requests||[],detail_fees_type_document_requests:t.detail_fees_type_document_requests||[],grand_total_payment:t.grand_total_payment,additional_documents:t.additional_documents||[],additional_response_details:t.additional_response_details||[],logs:t.logs||[],latest_status:t.latest_status||"",...o}),ut=async t=>{const o="Reviewed and Verified";if($.value="",P.value="",t.latest_status===o)return!1;try{const d={timestamp:N().format("MMMM DD, YYYY h:mm:ss A"),status_remarks:o},u=t.logs?[...t.logs]:[];u.unshift(d);const f=ie(t,{logs:u,latest_status:o});await $fetch(`${C.value}/api/registrar/v3/${t.id}/edit/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:f}),t.logs=u,t.latest_status=o;const b=r.value.findIndex(x=>x.id===t.id);return b!==-1&&(r.value[b].logs=u,r.value[b].latest_status=o),P.value="â
Status updated successfully!",setTimeout(()=>P.value="",3e3),!0}catch(d){return console.error("Error updating status:",d),$.value="â Failed to update record.",setTimeout(()=>$.value="",3e3),!1}},Ye=async t=>{const o="Reviewed and Verified";if(t.latest_status!==o){$.value="â ï¸ Please update the status first before notifying.";return}if(t.notified){$.value="â ï¸ Email has already been sent for this verified status.";return}$.value="",P.value="",_.value=!0;try{await $fetch(`${C.value}/api/registrar/v3/status/update/`,{method:"POST",headers:{"Content-Type":"application/json"},body:{id:t.id,latest_status:o}}),t.notified=!0,await oe(),P.value="â
Email notification sent successfully!",setTimeout(()=>P.value="",3e3)}catch(d){console.error("Error sending email notification:",d),$.value="â Failed to send email notification.",setTimeout(()=>$.value="",3e3)}finally{_.value=!1}},qe=async t=>{(await ut(t)||t.latest_status==="Reviewed and Verified")&&await Ye(t)},ze=async t=>{if(W.value.trim())try{const o={sender:"Registrar",message:W.value.trim(),timestamp:N().format("MMMM DD, YYYY h:mm:ss A")},u=[...Array.isArray(t.additional_response_details)?t.additional_response_details.filter(x=>x.message!=="N/A"):[],o],f={...t,additional_response_details:u};await $fetch(`${C.value}/api/registrar/v3/${t.id}/edit/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:f}),await $fetch(`${C.value}/api/registrar/v3/status/update/`,{method:"POST",headers:{"Content-Type":"application/json"},body:{id:t.id,latest_status:t.latest_status||""}}),t.additional_response_details=u;const b=r.value.findIndex(x=>x.id===t.id);b!==-1&&(r.value[b].additional_response_details=u),W.value="",P.value="â
Follow-up message sent successfully!",setTimeout(()=>P.value="",3e3)}catch(o){console.error("Error sending follow-up message:",o),$.value="â Failed to send follow-up message.",setTimeout(()=>$.value="",3e3)}},Qe=async t=>{P.value="",$.value="",V.value=!0;const o="Preparing Documents";try{const d={timestamp:N().format("MMMM DD, YYYY h:mm:ss A"),status_remarks:o},u=t.logs?[...t.logs]:[];u.unshift(d),w.value=t.id;const f=ie(t,{logs:u});await $fetch(`${C.value}/api/registrar/v3/${w.value}/edit/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:f}),t.logs=u;const b=r.value.findIndex(x=>x.id===t.id);b!==-1&&(r.value[b].logs=u),Ie.value[t.id]=!0,await $fetch(`${C.value}/api/registrar/v3/status/update/`,{method:"POST",headers:{"Content-Type":"application/json"},body:{id:t.id,latest_status:o}}),await oe(),P.value="â
Confirm and email sent successfully!",setTimeout(()=>{P.value=""},3e3)}catch(d){console.error("Error verifying and sending email:",d),$.value="â Failed to verify and send email.",setTimeout(()=>{$.value=""},3e3)}finally{V.value=!1,y.value=!1}},He=async t=>{P.value="",$.value="",V.value=!0;const o="Releasing Documents";try{const d={timestamp:N().format("MMMM DD, YYYY h:mm:ss A"),status_remarks:o},u=t.logs?[...t.logs]:[];u.unshift(d),w.value=t.id;const f=ie(t,{logs:u});await $fetch(`${C.value}/api/registrar/v3/${w.value}/edit/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:f}),t.logs=u;const b=r.value.findIndex(x=>x.id===t.id);b!==-1&&(r.value[b].logs=u),De.value[t.id]=!0,await $fetch(`${C.value}/api/registrar/v3/status/update/`,{method:"POST",headers:{"Content-Type":"application/json"},body:{id:t.id,latest_status:o}}),await oe(),P.value="â
Confirm and email sent successfully!",setTimeout(()=>{P.value=""},3e3)}catch(d){console.error("Error verifying and sending email:",d),$.value="â Failed to verify and send email.",setTimeout(()=>{$.value=""},3e3)}finally{V.value=!1,B.value=!1}},gt=async t=>{P.value="",$.value="",V.value=!0;const o="Transaction Closed";
1try{const d={timestamp:N().format("MMMM DD, YYYY h:mm:ss A"),status_remarks:o},u=t.logs?[...t.logs]:[];u.unshift(d),w.value=t.id;const f=ie(t,{logs:u});await $fetch(`${C.value}/api/registrar/v3/${w.value}/edit/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:f}),t.logs=u;const b=r.value.findIndex(x=>x.id===t.id);b!==-1&&(r.value[b].logs=u),Pe.value[t.id]=!0,await $fetch(`${C.value}/api/registrar/v3/status/transaction-closed/`,{method:"POST",headers:{"Content-Type":"application/json"},body:{id:t.id,latest_status:o}}),await oe(),P.value="â
Confirm and email sent successfully!",setTimeout(()=>{P.value=""},3e3)}catch(d){console.error("Error verifying and sending email:",d),$.value="â Failed to verify and send email.",setTimeout(()=>{$.value=""},3e3)}finally{V.value=!1,J.value=!1}},ct=async t=>{Be.value=!0,t.follow_up_remarks="Kindly upload the receipt to this page: https://lsu.edu.ph/registrar/track";const o={...T.value,date_graduated_last_attended:N(T.value.date_graduated_last_attended).format("LL")};try{await $fetch(C.value+"/api/registrar/v3/payment/fees/",{method:"POST",headers:{"Content-Type":"application/json"},body:o}),Ee.value=!0,setTimeout(()=>{Ee.value=!1},3e3)}catch(d){console.error("Error sending email:",d)}finally{Be.value=!1,mt(t)}},mt=async t=>{P.value="",$.value="",_.value=!0;const o="Assessment";try{const d={timestamp:N().format("MMMM DD, YYYY h:mm:ss A"),status_remarks:o},u=t.logs?[...t.logs]:[];u.unshift(d),w.value=t.id;const f=ie(t,{logs:u});await $fetch(`${C.value}/api/registrar/v3/${w.value}/edit/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:f}),t.logs=u;const b=r.value.findIndex(x=>x.id===t.id);b!==-1&&(r.value[b].logs=u),$e.value[t.id]=!0,await $fetch(`${C.value}/api/registrar/v3/status/update/`,{method:"POST",headers:{"Content-Type":"application/json"},body:{id:t.id,latest_status:o}}),await oe(),P.value="â
Confirm and email sent successfully!",setTimeout(()=>{P.value=""},3e3)}catch(d){console.error("Error verifying and sending email:",d),$.value="â Failed to verify and send email.",setTimeout(()=>{$.value=""},3e3)}finally{_.value=!1}},ee=()=>{q.value=!1,Q.value=!1,y.value=!1,B.value=!1,J.value=!1,z.value=!1,m.value=!1,M.value=null,ne.value=null},ft=t=>{ee(),M.value=t,z.value=!0,A.value=!0,dt.value=""},Ge=()=>{z.value=!1,A.value=U()},yt=t=>{ee(),M.value=t,Q.value=!0,A.value=!0,T.value.fullname=`${t.firstname} ${t.middlename} ${t.lastname}`,T.value.email=t.email,T.value.course=t.course,T.value.tracking_id=t.tracking_id,T.value.college=t.college,T.value.date_graduated_last_attended=N(t.date_graduated_last_attended).format("YYYY-MM-DD"),t.detail_fees_type_document_requests&&Array.isArray(t.detail_fees_type_document_requests)&&t.detail_fees_type_document_requests.length>0?T.value.detail_fees_type_document_requests=JSON.parse(JSON.stringify(t.detail_fees_type_document_requests)):T.value.detail_fees_type_document_requests=[],he()},Ke=()=>{Q.value=!1,M.value=null,A.value=U()},bt=t=>{ee(),ne.value=t,M.value=t,q.value=!0,A.value=!0,W.value=""},Je=()=>{q.value=!1,ne.value=null,A.value=U()},vt=t=>{ee(),M.value=t,m.value=!0,A.value=!0,W.value=""},We=()=>{m.value=!1,M.value=null,A.value=U()},Ze=()=>{P.value=""},Xe=()=>{$.value=""},xt=async t=>{ee(),M.value=t,y.value=!0,A.value=!0},_e=()=>{y.value=!1,M.value=null,A.value=U()},ht=t=>{ee(),M.value=t,B.value=!0,A.value=!0},et=()=>{B.value=!1,M.value=null,A.value=U()},wt=t=>{ee(),M.value=t,J.value=!0,A.value=!0},Mt=()=>{J.value=!1,M.value=null,A.value=U()},U=()=>Q.value||y.value||B.value||J.value||z.value||E.value||q.value||k.value||p.value,te=c(""),tt=c([{value:"Arts and Sciences, Engineering, Architecture, Computer Studies",label:"Arts and Sciences, Engineering, Architecture, Computer Studies"},{value:"Business, Commerce, Accountancy",label:"Business, Commerce, Accountancy"},{value:"Education / Graduate Studies",label:"Education / Graduate Studies"},{value:"Nursing / Tourism and Hospitality Management",label:"Nursing / Tourism and Hospitality Management"},{value:"Criminology / BS Psychology",label:"Criminology / BS Psychology"}]),ye=c(!1);_t(async()=>{const t=g.value?.email,o={"[email protected]":"Arts and Sciences, Engineering, Architecture, Computer Studies","[email protected]":"Business, Commerce, Accountancy","[email protected]":"Education / Graduate Studies","[email protected]":"Nursing / Tourism and Hospital
1ity Management","[email protected]":"Criminology / BS Psychology"},d=["[email protected]","[email protected]"],u=[...d,...Object.keys(o)];window.addEventListener("keydown",f=>{f.key==="Escape"&&E.value&&ke()}),t&&u.includes(t)&&(d.includes(t)?ye.value=!0:te.value=o[t]||"",await Re(),Ce())});let se=null,A=c(!1),pe=c(!1);const be=c(!1),Ce=()=>{se&&clearInterval(se),se=na(async()=>{!U()&&!pe.value&&!V.value&&!_.value&&!be.value&&(await oe(),await kt())},Is)};me(()=>A.value,t=>{if(typeof window<"u"){const o=document.documentElement.classList;t?o.add("overflow-hidden"):o.remove("overflow-hidden")}});const ve=()=>{se&&(clearInterval(se),se=null)},kt=async()=>{ve();try{const t=r.value;if(!t||!Array.isArray(t)||t.length===0)return;const o={},d=[],u=f=>{const b=f.additional_response_details;return!b||!Array.isArray(b)||b.length===0?!1:b.some(x=>x.message&&x.message!=="N/A")};t.forEach(f=>{if(f.tracking_id)if(o[f.tracking_id]){const b=o[f.tracking_id],x=u(b),we=u(f);let ae;x&&!we?ae=f.id:!x&&we?(ae=b.id,o[f.tracking_id]=f):(ae=new Date(b.created_at)>new Date(f.created_at)?f.id:b.id,ae===b.id&&(o[f.tracking_id]=f)),d.push(ae)}else o[f.tracking_id]=f});for(const f of d)await $fetch(C.value+"/api/registrar/v3/"+f+"/delete/",{method:"DELETE",headers:{"Content-Type":"application/json"}});d.length>0&&await Re()}catch(t){console.error("Error checking for duplicates:",t)}finally{Ce()}},at=c({}),$e=c({}),Ie=c({}),De=c({}),Pe=c({}),Se=()=>{!r.value||!Array.isArray(r.value)||r.value.forEach(t=>{t&&t.id&&(at.value[t.id]=pt(t))})},Ae=()=>{!r.value||!Array.isArray(r.value)||r.value.forEach(t=>{t&&t.id&&($e.value[t.id]=Ct(t))})},Te=()=>{!r.value||!Array.isArray(r.value)||r.value.forEach(t=>{t&&t.id&&(Ie.value[t.id]=$t(t))})},Le=()=>{!r.value||!Array.isArray(r.value)||r.value.forEach(t=>{t&&t.id&&(De.value[t.id]=It(t))})},Fe=()=>{!r.value||!Array.isArray(r.value)||r.value.forEach(t=>{t&&t.id&&(Pe.value[t.id]=Dt(t))})},pt=t=>!t||!t.logs||!Array.isArray(t.logs)||t.logs.length===0?!1:t.logs.some(o=>o.status_remarks&&o.status_remarks.includes("Reviewed and Verified")),Ct=t=>!t||!t.logs||!Array.isArray(t.logs)||t.logs.length===0?!1:t.logs.some(o=>o.status_remarks&&o.status_remarks.includes("Assessment")),$t=t=>!t||!t.logs||!Array.isArray(t.logs)||t.logs.length===0?!1:t.logs.some(o=>o.status_remarks&&o.status_remarks.includes("Preparing Documents")),It=t=>!t||!t.logs||!Array.isArray(t.logs)||t.logs.length===0?!1:t.logs.some(o=>o.status_remarks&&o.status_remarks.includes("Releasing Documents")),Dt=t=>!t||!t.logs||!Array.isArray(t.logs)||t.logs.length===0?!1:t.logs.some(o=>o.status_remarks&&o.status_remarks.includes("Transaction Closed"));me(()=>r.value,()=>{Se(),Ae(),Te(),Le(),Fe()},{deep:!0});const oe=async()=>{if(!be.value){be.value=!0;try{const t=await $fetch(C.value+"/api/registrar/v3/list").catch(()=>[])||[],o=(d,u)=>{const f=new Map((d||[]).map(x=>[x.id,x])),b=[];for(const x of u||[])x&&f.has(x.id)?(Object.assign(f.get(x.id),x),b.push(f.get(x.id))):x&&b.push(x);return b};if(Array.isArray(t)&&(Z.value.length>0?(Z.value=o(Z.value,t),ot()):r.value.length===0?r.value=t:r.value=o(r.value,t),Se(),Ae(),Te(),Le(),Fe(),M.value)){const d=t.find(u=>u.id===M.value.id);d&&Object.assign(M.value,d)}}catch(t){console.error("Error fetching list items quietly:",t)}finally{be.value=!1}}},Re=async()=>{de.value=!0;try{const t=await $fetch(C.value+"/api/registrar/v3/list").catch(o=>(console.error("Fetch error:",o),[]));r.value=Array.isArray(t)?t:[],Z.value=[],xe.value="",Se(),Ae(),Te(),Le(),Fe()}catch(t){console.error("Error fetching list items:",t),r.value=[]}finally{de.value=!1}};it(()=>{ve()});const L=c([]),je=c(!1),rt=G(()=>L.value.length===ce.value.length&&ce.value.length>0),Pt=()=>{ve(),pe.value=!0,rt.value?L.value=[]:L.value=ce.value.map(t=>t.tracking_id).filter(Boolean),Ce(),pe.value=!1},St=()=>{L.value.length!==0&&(p.value=!0,A.value=!0)},At=()=>{p.value=!1,A.value=U()},Tt=async()=>{if(L.value.length!==0)try{je.value=!0;for(const t of L.value)t&&await $fetch(C.value+"/api/registrar/v3/delete/"+t+"/",{method:"DELETE",headers:{"Content-Type":"application/json"}});L.value=[],await Re(),p.value=!1,A.value=U()}catch(t){console.error("Error deleting items:",t)}finally{je.value=!1}},le=G(()=>{let t=[...r.value];return I.value==="done"?t=t.filter(o=>o.logs?.some(d=>(d?.status_remarks?.toLowerCase()||"").includes("transaction closed"))):I.value==="pending"&&(t=t.filter(o=>o.logs?.every(d=>!(d?.status_remarks?.toLowerCase()||"").includes("transaction closed")))),oa.orderBy(t,"created_at","asc")}),Lt=t=>le.value.filter(o=>o.college===t&&o.logs?.some(d=>(d?.status_remarks?.toLowerCase()||"").includes("transaction closed"))).length,Ft=t=>le.value.filter(o=>o.college===t&&o.logs?.every(d=>!(d?.status_remarks?.toLowerCase()||"").includes("transaction closed"))).length,Rt=t=>le.value.filter(o=>o.college===t).length,jt=t=>{const o={"[email protected]":"Arts and Sciences, Engineering, Architecture, Computer Studies","[email protected]":"Business, Commerce, Accountancy","[email protected]":"Education / Graduate Studies","[email protected]":"Nursing / Tourism and Hospital
1ity Management","[email protected]":"Criminology / BS Psychology"};return Object.keys(o).filter(d=>o[d]===t)},de=c(!0),ue=c(1),xe=c(""),Z=c([]),Ee=c(!1),Be=c(!1),st=G(()=>Math.ceil(le.value.length/Ue)),ge=G(()=>{const t=(ue.value-1)*Ue,o=t+Ue;return le.value.slice(t,o)}),ce=G(()=>!te.value||!te.value?ge.value:ge.value.filter(o=>o.college===te.value)),Et=G(()=>{const t=[];let o=Math.max(1,ue.value-Math.floor(Me/2)),d=Math.min(st.value,o+Me-1);d-o+1<Me&&(o=Math.max(1,d-Me+1));for(let u=o;u<=d;u++)t.push(u);return t});it(()=>{window.removeEventListener("keydown",t=>{t.key==="Escape"&&E.value&&ke()}),ve()});const ot=()=>{ue.value=1,Z.value.length===0&&r.value.length>0&&(Z.value=[...r.value]);const t=xe.value.toLowerCase().trim(),o=Z.value.length>0?Z.value:r.value;r.value=o.filter(d=>d?Object.keys(d).some(u=>typeof d[u]=="string"?d[u].toLowerCase().includes(t):!1):!1),L.value=[]},Bt=G(()=>!M.value?.logs||!Array.isArray(M.value.logs)?[]:[...M.value.logs].sort((t,o)=>{const d=N(t.timestamp,"MMMM DD, YYYY h:mm:ss A"),u=N(o.timestamp,"MMMM DD, YYYY h:mm:ss A");return d.valueOf()-u.valueOf()}));me(te,()=>{L.value=[]}),me(I,()=>{L.value=[]});const T=c({payment_id:"PID"+N().valueOf(),fullname:"",email:"",course:"",college:"",date_graduated_last_attended:"",total:"0",tracking_id:"",receipt_image_url:[],detail_fees_type_document_requests:[]}),Vt=()=>{T.value.detail_fees_type_document_requests.push({fee_name:"",amount:0}),he()},Ut=t=>{T.value.detail_fees_type_document_requests.splice(t,1),he()},he=()=>{let t=0;T.value.detail_fees_type_document_requests.forEach(d=>{t+=Number((d.amount||0).toString())});const o=t.toFixed(2);T.value.total=o};me(()=>T.value.detail_fees_type_document_requests,()=>he(),{deep:!0});const Nt=G(()=>T.value?.detail_fees_type_document_requests?.some(t=>!t.fee_name||t.fee_name.trim()===""));return(t,o)=>{const d=ua,u=ma,f=ya,b=$a,x=ra,we=Ra,ae=sr,Ot=Cr,Yt=Er,qt=Or,zt=zr,Qt=Gr,Ht=Jr,Gt=as,Kt=is,Jt=ms;return l(),i("div",null,[a("div",fs,[a("div",ys,[H(d,{darkMode:e.darkMode,pendingCount:Ft,doneCount:Lt,totalCount:Rt,colleges:tt.value,getEmailsForCollege:jt},null,8,["darkMode","colleges"]),H(u,{darkMode:e.darkMode,verifySuccessMessage:P.value,closeSuccessToast:Ze},null,8,["darkMode","verifySuccessMessage"]),H(f,{darkMode:e.darkMode,verifyErrorMessage:$.value,closeErrorMessage:Xe},null,8,["darkMode","verifyErrorMessage"]),H(b,{darkMode:e.darkMode,colleges:tt.value,selectedCollege:te.value,"onUpdate:selectedCollege":o[0]||(o[0]=F=>te.value=F),searchQuery:xe.value,"onUpdate:searchQuery":o[1]||(o[1]=F=>xe.value=F),statusFilter:I.value,"onUpdate:statusFilter":o[2]||(o[2]=F=>I.value=F),selectedItems:L.value,allSelected:rt.value,collegeFilterList:ye.value,isLoading:de.value,onPerformSearch:ot,onSelectAllItems:Pt,onToggleDeleteMultiple:St},null,8,["darkMode","colleges","selectedCollege","searchQuery","statusFilter","selectedItems","allSelected","collegeFilterList","isLoading"]),a("div",null,[a("div",bs,[R(a("div",vs,[a("div",{class:s(["w-full shadow font-bold px-2 text-center mb-1 py-1 text-xs uppercase",S.darkMode?"bg-gray-800 text-white":"bg-gray-100 text-green-900"])}," All Request Lists ",2),a("div",xs,[a("div",hs,[de.value?(l(),re(x,{key:0})):ge.value.length>0?(l(),i("div",ws,[a("div",Ms,[(l(!0),i(O,null,K(ce.value,(F,lt)=>(l(),i("div",{class:"flex items-center h-auto shadow lg:mb-0 mb-3 border-gray-200",key:lt},[ye.value?(l(),i("div",ks,[a("div",ps,[R(a("input",{type:"checkbox",value:F.tracking_id,"onUpdate:modelValue":o[3]||(o[3]=Wt=>L.value=Wt),class:"accent-[#6f0000] cursor-pointer w-4 h-4"},null,8,Cs),[[ta,L.value]])])])):h("",!0),H(we,{b:F,i:lt,darkMode:e.darkMode,verificationStatuses:at.value,paymentStatuses:$e.value,prepDocStatuses:Ie.value,releasingDocStatuses:De.value,transactionClosedStatuses:Pe.value,selectedItems:L.value,statusFilter:I.value,paginatedListItems:ge.value,filteredByCollege:ce.value,collegeFilterList:ye.value,isLoading:de.value,showChatCommunicationModal:m.value,showPersonalInfoModal:q.value,showPaymentModal:Q.value,showPrepDocModal:y.value,showReleasingDocModal:B.value,showLogsModal:z.value,currentItem:M.value,isConfirming:V.value,onOpenChatCommunication:vt,onOpenPersonalInfoModal:bt,onOpenPaymentModal:yt,onOpenPrepDocModal:xt,onOpenReleasingDocModal:ht,onCloseChatCommunicationModal:We,onClosePersonalInfoModal:Je,onClosePaymentModal:Ke,onClosePrepDocModal:_e,onCloseReleasingDocModal:et,onClose
1LogsModal:Ge,onConfirmPrepDoc:Qe,onConfirmReleasingDoc:He,onOpenTransactionClosedModal:wt,onOpenLogsModal:ft},null,8,["b","i","darkMode","verificationStatuses","paymentStatuses","prepDocStatuses","releasingDocStatuses","transactionClosedStatuses","selectedItems","statusFilter","paginatedListItems","filteredByCollege","collegeFilterList","isLoading","showChatCommunicationModal","showPersonalInfoModal","showPaymentModal","showPrepDocModal","showReleasingDocModal","showLogsModal","currentItem","isConfirming"])]))),128))])])):(l(),i("div",$s,[a("p",{class:s(["text-lg font-medium",S.darkMode?"text-gray-400":"text-gray-600"])}," No items found! ",2)])),m.value?(l(),re(ae,{key:3,currentItem:M.value,showChatModal:m.value,onCloseChatModal:We,modelValue:W.value,"onUpdate:modelValue":o[4]||(o[4]=F=>W.value=F),darkMode:e.darkMode,onSendFollowUpMessage:ze,getCleanUrl:Oe,onOpenImageModal:Ne},null,8,["currentItem","showChatModal","modelValue","darkMode"])):h("",!0),H(Ot,{showPersonalInfoModal:q.value,currentItem:M.value,darkMode:e.darkMode,isVerifying:_.value,onVerifiedConfirm:qe,onClosePersonalInfoModal:Je},null,8,["showPersonalInfoModal","currentItem","darkMode","isVerifying"]),Q.value?(l(),re(Yt,{key:4,showPaymentModal:Q.value,currentItemInfo:T.value,currentItem:M.value,darkMode:e.darkMode,onClosePaymentModal:Ke,addDetailFee:Vt,removeDetailFee:Ut,sendEmailDetailFee:ct,hasEmptyFeeName:Nt.value,isSendingPayment:Be.value,showSuccessMessage:Ee.value,closeSuccessToast:Ze,closeErrorMessage:Xe,verifyErrorMessage:$.value,verifySuccessMessage:P.value,isVerifying:_.value,sendEmailConfirmationVerified:Ye,verifiedConfirm:qe,sendFollowUpMessage:ze,newFollowUpMessage:W.value},null,8,["showPaymentModal","currentItemInfo","currentItem","darkMode","hasEmptyFeeName","
1isSendingPayment","showSuccessMessage","verifyErrorMessage","verifySuccessMessage","isVerifying","newFollowUpMessage"])):h("",!0),H(qt,{showPrepDocModal:y.value,currentItem:M.value,darkMode:e.darkMode,onClosePrepDocModal:_e,onConfirmPrepDoc:Qe,isConfirming:V.value},null,8,["showPrepDocModal","currentItem","darkMode","isConfirming"]),H(zt,{showReleasingDocModal:B.value,currentItem:M.value,darkMode:e.darkMode,onCloseReleasingDocModal:et,onConfirmReleasingDoc:He,isConfirming:V.value},null,8,["showReleasingDocModal","currentItem","darkMode","isConfirming"]),H(Qt,{showTransactionClosedModal:J.value,currentItem:M.value,darkMode:e.darkMode,onCloseTransactionClosedModal:Mt,onConfirmTransactionClosed:gt,isConfirming:V.value},null,8,["showTransactionClosedModal","currentItem","darkMode","isConfirming"]),E.value?(l(),re(Ht,{key:5,currentItem:M.value,showImageModal:E.value,onCloseImageModal:ke,onOpenImageModal:Ne,getCleanUrl:Oe,currentModalImage:fe.value},null,8,["currentItem","showImageModal","currentModalImage"])):h("",!0),Ve(p)?(l(),re(Gt,{key:6,toggleConfirmDelete:Ve(p),selectedItems:L.value,isDeleting:je.value,onDeleteItems:Tt,onCancelDelete:At},null,8,["toggleConfirmDelete","selectedItems","isDeleting"])):h("",!0),z.value?(l(),re(Kt,{key:7,showLogsModal:z.value,currentItem:M.value,darkMode:e.darkMode,onCloseLogsModal:Ge,sortedLogs:Bt.value},null,8,["showLogsModal","currentItem","darkMode","sortedLogs"])):h("",!0),le.value.length>0?(l(),re(Jt,{key:8,currentPage:ue.value,"onUpdate:currentPage":o[5]||(o[5]=F=>ue.value=F),totalPages:st.value,visiblePages:Et.value,darkMode:e.darkMode},null,8,["currentPage","totalPages","visiblePages","darkMode"])):h("",!0)])])],512),[[ea,Ve(n)]])])])])])])}}};export{js 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.