PageSourceSearch

https://phcglobal.org/build/assets/Show-B2c48PDY.js

js phcglobal.org collected 2026-10-05 00:44:46 UTC 7,824 bytes, 1 lines download raw bytes

1import{e as v,i as h,o as n,w as k,b as t,p,t as l,c as d,F as x,r as y,l as u,W as f}from"./app-DtSb0lwl.js";import w from"./Layout-Bp-yBuet.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";const N={components:{Layout:w},props:{application:{type:Object,required:!0}},setup(c){return{documents:[{key:"cnic_front_path",label:"CNIC Front"},{key:"cnic_back_path",label:"CNIC Back"},{key:"pnc_front_path",label:"PNC Front"},{key:"pnc_back_path",label:"PNC Back"},{key:"degree_path",label:"Degree"},{key:"cv_path",label:"CV"},{key:"photo_path",label:"Photo"},{key:"experience_letter_path",label:"Experience Letter"}],goBack:()=>{f.visit("/admin/health-inspector")},deleteApplication:async()=>{if(confirm("Are you sure you want to delete this application?"))try{await u.delete(`/admin/health-inspector/${c.application.id}`),alert("Application deleted successfully!"),f.visit("/admin/health-inspector")}catch{alert("Failed to delete application.")}},downloadPdf:async()=>{try{const i=await u.get(`/admin/health-inspector/${c.application.id}/pdf`,{responseType:"blob"}),m=window.URL.createObjectURL(new Blob([i.data],{type:"application/pdf"})),r=document.createElement("a");r.href=m,r.setAttribute("download",`health_inspector_application_${c.application.id}.pdf`),document.body.appendChild(r),r.click(),r.remove()}catch{alert("Failed to generate PDF.")}},formatCNIC:i=>i?i.replace(/\D/g,"").replace(/(\d{5})(\d{7})(\d{1})/,"$1-$2-$3"):"",formatMobile:i=>i?i.replace(/\D/g,"").replace(/(\d{4})(\d{7})/,"$1-$2"):"",formatDate:i=>i?new Date(i).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):""}}},D={class:"p-6 mx-auto"},A={class:"flex justify-between items-center mb-6"},P={class:"flex space-x-3"},B={class:"bg-white rounded-lg shadow-sm border p-6"},L={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},F={class:"space-y-4"},I={class:"text-gray-900"},E={class:"text-gray-900"},M={class:"text-gray-900"},S={class:"text-gray-900"},V={class:"text-gray-900"},j={class:"text-gray-900"},O={class:"text-gray-900"},R={class:"space-y-4"},T={class:"text-gray-900"},U={class:"text-gray-900"},z={class:"text-gray-900"},W={class:"text-gray-900"},q={class:"mt-6"},H={key:0,class:"space-y-6"},G={class:"text-md font-medium text-gray-800 mb-2"},J={class:"space-y-2"},K={class:"text-gray-900"},Q={class:"text-gray-900"},X={class:"text-gray-900"},Y={class:"text-gray-900"},Z={key:1,class:"text-gray-500"},$={class:"mt-6"},tt={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},et={class:"text-gray-900"},st={class:"text-gray-900"},lt={class:"mt-6"},at={class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-4"},it={class:"text-sm font-medium text-gray-500 block mb-2"},ot={key:0,class:"mt-2"},nt=["href"],dt={key:1,class:"text-gray-500"},rt={class:"mt-8"},ct={class:"bg-gray-50 p-4 rounded-lg"},mt={class:"flex space-x-3"};function pt(c,e,s,o,b,_){const g=v("Layout");return n(),h(g,null,{default:k(()=>[t("div",D,[t("div",A,[e[4]||(e[4]=t("div",null,[t("h1",{class:"text-2xl font-bold text-gray-900"},"Application Details"),t("p",{class:"text-gray-600"},"Detailed view of the health inspector application")],-1)),t("div",P,[t("button",{onClick:e[0]||(e[0]=(...a)=>o.goBack&&o.goBack(...a)),class:"px-4 py-2 bg-gray-600 text-white rounded-lg hover:bg-gray-700 flex items-center"},e[3]||(e[3]=[t("i",{class:"fas fa-arrow-left mr-2"},null,-1),p(" Back to Applications ")]))])]),t("div",B,[t("div",L,[t("div",null,[e[12]||(e[12]=t("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Personal Information",-1)),t("div",F,[t("div",null,[e[5]||(e[5]=t("label",{class:"text-sm font-medium text-gray-500"},"Name",-1)),t("p",I,l(s.application.name),1)]),t("div",null,[e[6]||(e[6]=t("label",{class:"text-sm font-medium text-gray-500"},"Father/Husband Name",-1)),t("p",E,l(s.application.father_husband_name),1)]),t("div",null,[e[7]||(e[7]=t("label",{class:"text-sm font-medium text-gray-500"},"CNIC",-1)),t("p",M,l(o.formatCNIC(s.application.cnic)),1)]),t("div",null,[e[8]||(e[8]=t("label",{class:"text-sm font-medium text-gray-500"},"Marital Status",-1)),t("p",S,l(s.application.marital_status),1)]),t("div",null,[e[9]||(e[9]=t("label",{class:"text-sm font-medium text-gray-500"},"Mobile",-1)),t("p",V,l(o.formatMobile(s.application.mobile)),1)]),t("div",null,[e[10]||(e[10]=t("label",{class:"text-sm font-medium text-gray-500"},"Email",-1)),t("p",j,l(s.application.email||"N/A"),1)]),t("div",null,[e[11]||(e[11]=t("label",{class:"text-sm font-medium text-gray-500"},"Address",-1)),t("p",O,l(s.application.address),1)])])]),t("div",null,[e[17]||(e[17]=t("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Professional Information",-1)),t("div",R,[t("div",null,[e[13]||(e[13]=t("label",{class:"text-sm font-medium text-gray-500"},"PNC Number",-1)),t("p",T,l(s.application.pnc_number),1)]),t("div",null,[e[14]||(e[14]=t("label",{class:"text-sm font-medium text-gray-500"},"PNC Expiry Date",-1)),t("p",U,l(o.formatDate(s.application.pnc_expiry_date)||"N/A"),1)]),t("div",null,[e[15]||(e[15]=t("label",{class:"text-sm font-medium text-gray-500"},"Last Degree",-1)),t("p",z,l(s.application.last_degree),1)]),t("div",null,[e[16]||(e[16]=t("label",{class:"text-sm font-medium text-gray-500"},"Experience",-1)),t("p",W,l(s.application.experience||"0")+" years",1)])])])]),t("div",q,[e[22]||(e[22]=t("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Experience Details",-1)),s.application.experience_details&&s.application.experience_details.length>0?(n(),d("div",H,[(n(!0),d(x,null,y(s.application.experience_details,(a,i)=>(n(),d("div",{key:i,class:"bg-gray-50 p-4 rounded-lg shadow-sm"},[t("h3",G,"Experience #"+l(i+1),1),t("div",J,[t("div",null,[e[18]||(e[18]=t("label",{class:"text-sm font-medium text-gray-500"},"Organization",-1)),t("p",K,l(a.organization||"N/A"),1)]),t("div",null,[e[19]||(e[19]=t("label",{class:"text-sm font-medium text-gray-500"},"Role",-1)),t("p",Q,l(a.role||"N/A"),1)]),t("div",null,[e[20]||(e[20]=t("label",{class:"text-sm font-medium text-gray-500"},"Location",-1)),t("p",X,l(a.location||"N/A"),1)]),t("div",null,[e[21]||(e[21]=t("label",{class:"text-sm font-medium text-gray-500"},"Description",-1)),t("p",Y,l(a.description||"N/A"),1)])])]))),128))])):(n(),d("p",Z,"No experience details provided"))]),t("div",$,[e[25]||(e[25]=t("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Location",-1)),t("div",tt,[t("div",null,[e[23]||(e[23]=t("label",{class:"text-sm font-medium text-gray-500"},"District",-1)),t("p",et,l(s.application.district),1)]),t("div",null,[e[24]||(e[24]=t("label",{class:"text-sm font-medium text-gray-500"},"Tehsil",-1)),t("p",st,l(s.application.tehsil),1)])])]),t("div",lt,[e[27]||(e[27]=t("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Documents",-1)),t("div",at,[(n(!0),d(x,null,y(o.documents,a=>(n(),d("div",{key:a.key,class:"bg-gray-50 p-4 rounded-lg shadow-sm"},[t("label",it,l(a.label),1),s.application[a.key]?(n(),d("div",ot,[t("a",{href:"/storage/"+s.application[a.key],target:"_blank",class:"text-blue-600 hover:underline flex items-center"},e[26]||(e[26]=[t("i",{class:"fas fa-file mr-2"},null,-1),p(" View ")]),8,nt)])):(n(),d("p",dt,"Not provided"))]))),128))])]),t("div",rt,[e[29]||(e[29]=t("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Manage Application",-1)),t("div",ct,[t("div",mt,[t("button",{onClick:e[1]||(e[1]=(...a)=>o.downloadPdf&&o.downloadPdf(...a)),class:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 flex items-center"},e[28]||(e[28]=[t("i",{class:"fas fa-file-pdf mr-2"},null,-1),p(" Download PDF ")])),t("button",{onClick:e[2]||(e[2]=(...a)=>o.deleteApplication&&o.deleteApplication(...a)),class:"px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700"}," Delete Application ")])])])])])]),_:1})}const ut=C(N,[["render",pt],["__scopeId","data-v-e9525d3e"]]);export{ut 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.