File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/index.7e38d7bf.js
Back
import{w as $,L as ee}from"./index.2f12c00b.js";import{C as te}from"./index.73a721da.js";import{B as se}from"./index.d5f9070d.js";import{B as ie}from"./index.dd345587.js";import{I as E}from"./index.0cc90e2a.js";import{I as oe}from"./index.082b43f0.js";import{l as re}from"./lodash.73665e2b.js";import{_ as V,A as ne,r as a,o as l,c as p,w as h,j as m,d as o,f as R,t as g,k as M,e as c,b as f,p as ae,s as le}from"./index.6f826883.js";import{E as D}from"./EmployeeWfhService.ad79938e.js";import{F as ce}from"./index.c15e8af0.js";import{C as T}from"./CloseButton.d6e96b7d.js";import{C as de}from"./CreateButton.2b14c008.js";import{D as me}from"./DeleteButton.1177ae51.js";import{E as fe}from"./EditButton.234ef2e8.js";/* empty css */import{S as O}from"./SubmitButton.4efa94a6.js";import{V as he}from"./ViewButton.a34ed5c7.js";import{A as ue}from"./ActionCellRenderer.b841a599.js";/* empty css */import"./vue-cleave.min.2c699dc6.js";import{c as pe,a as L,V as F}from"./array.b1e0d30e.js";import{L as P}from"./Loading.a7caf7be.js";import"./vue-quill.snow.8a0635dc.js";/* empty css */import{F as U}from"./index.8944847c.js";import{F as j}from"./index.30a5caa1.js";import{T as W}from"./index.8e02d38d.js";import{T as H}from"./index.0885aab1.js";import{U as q}from"./UpdateButton.feaaf9dc.js";import"./jspdf.es.min.9b897a33.js";/* empty css */import{A as G}from"./ApproverService.dbafd287.js";import{F as z}from"./FileService.12c44bcb.js";import{M as Y}from"./Multiselect.30f38e61.js";import{F as ge}from"./index.da2168dc.js";import{F as N}from"./index.025ace30.js";import{C as Q}from"./index.0abb9ccc.js";import{A as _e}from"./index.e9da77bf.js";import{p as Z,j as K}from"./scr-1.d9aaecca.js";import{P as ye}from"./index.c8e81a7d.js";import{A as we}from"./main.esm.720326be.js";import{A as ve}from"./ActionCellRendererApprover.d3695303.js";import{D as xe}from"./DenyButton.8d66bccd.js";import{W as I}from"./WfhApprovalService.76fb9d37.js";import"./logo-black.7c15feb3.js";import"./logo-white.b04c5a89.js";import"./transition.75ebe11b.js";import"./EmployeeService.b8be485c.js";import"./es.string.replace.f9ff181c.js";import"./index.a538f310.js";import"./Loading.vue_vue_type_style_index_0_scoped_cbded5a2_lang.feec42bc.js";import"./index.58a64031.js";import"./ck-white.4bf441fa.js";const be={components:{Alert:_e,FileType:N,Fileinput:ge,FormModal:j,FormGroup:U,TextInput:W,Textarea:H,SubmitButton:O,UpdateButton:q,CloseButton:T,Loading:P,Multiselect:Y,Icon:E,Checkbox:Q},data(){return{isWfh:!1,wfhStatus:"",recommending:"",recommending_img:"",approving:"",approving_img:"",form:{date:new Date,hours:8,destination:"",description:"",attachment:"",recommending_id:"",allow_higher_approval:"",approver_id:""},errors:{},state:{isEdit:!1,isSaving:!1,isLoading:!1},fileIcons:{pdf:Z,jpg:K,default:""}}},methods:{deleteFile(t){this.$swal.fire({title:"Are you sure you want remove the attachment?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No"}).then(e=>{e.value&&this.deleteFileAttachment()}),console.log("wawawawa",t)},async deleteFileAttachment(){const t=this.form.id,e=this.form.attachment,i={id:t,attachment:e};await D.removeAttachment(i).then(n=>{n.status==201?(this.$swal.fire({title:"Great!",text:"Attachment successfully deleted.",icon:"success",timer:2e3}),this.state.isSaving=!1,this.form.attachment="",console.log("null dapat",this.form.attachment)):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.reload()}).catch(n=>{n.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:n.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3})})},getFileTypeImage(t){if(typeof t=="string"){if(!t)return this.fileIcons.default;const e=t.substring(t.lastIndexOf(".")+1).toLowerCase();return this.fileIcons[e]||this.fileIcons.default}},async viewAttachment(t){if(this.state.isDownloading)return;this.state.isDownloading=!0;let e=await z.Reader2("employee-overtime",t),i;if(t.endsWith(".pdf"))i="application/pdf";else if(t.endsWith(".png"))i="image/png";else if(t.endsWith(".jpg")||t.endsWith(".jpeg"))i="image/jpeg";else if(t.endsWith(".svg"))i="image/svg+xml";else throw new Error("Unsupported file type");const n=atob(e),s=new Array(n.length);for(let d=0;d<n.length;d++)s[d]=n.charCodeAt(d);const r=new Uint8Array(s),_=new Blob([r],{type:i}),w=URL.createObjectURL(_);window.open(w),this.state.isLoadingPDF=!1},handleMainImageUpload(){const t=event.target.files[0];this.form.attachment=t;const e=new FileReader;e.onload=()=>{t.type.startsWith("image/")?this.form.imageView=e.result:t.type==="application/pdf"?this.form.imageView=this.pdf_file_view:t.type==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"&&(this.form.imageView=this.excel_file_view)},console.log(t),e.readAsDataURL(t)},loadRecord(t){this.resetForm(),this.state.isEdit=!0,this.form=t,this.form.date=new Date(t.date).toLocaleDateString("en-CA").split("T")[0],this.wfhStatus=t.status,console.log(this.wfhStatus)},closeModal(){this.state.showModal=!1},resetForm(){this.wfhStatus="",this.state.isEdit=!1,this.form={date:new Date,hours:8,destination:"",description:"",attachment:"",allow_higher_approval:"",recommending_id:this.form.recommending_id,approver_id:this.form.approver_id}},async fetchApprover(){this.state.isLoading=!0,await G.fetchApproverRecords().then(t=>{this.$store.userSettings.getActiveUser.employees.classification_id==1&&t.data.map(e=>{this.form.allow_higher_approval?((e.classification_id==2||e.classification_id==1)&&(this.form.recommending_id=e.employee_id,this.recommending=e.firstname+" "+e.lastname,this.recommending_img=e.attachment||""),this.recommending==""&&e.classification_id==3&&(this.form.recommending_id=e.employee_id,this.recommending=e.firstname+" "+e.lastname,this.recommending_img=e.attachment||""),e.classification_id==3&&(this.form.approver_id=e.employee_id,this.approving=e.firstname+" "+e.lastname,this.approving_img=e.attachment||""),this.approving==""&&e.classification_id==4&&(this.form.approver_id=e.employee_id,this.approving=e.firstname+" "+e.lastname,this.approving_img=e.attachment||"")):((e.classification_id==2||e.classification_id==1)&&(this.form.recommending_id=e.employee_id,this.recommending=e.firstname+" "+e.lastname,this.recommending_img=e.attachment||"",this.form.approver_id=e.employee_id,this.approving=e.firstname+" "+e.lastname,this.approving_img=e.attachment||""),this.recommending==""&&e.classification_id==3&&(this.form.recommending_id=e.employee_id,this.recommending=e.firstname+" "+e.lastname,this.recommending_img=e.attachment||"",this.form.approver_id=e.employee_id,this.approving=e.firstname+" "+e.lastname,this.approving_img=e.attachment||""))}),this.$store.userSettings.getActiveUser.employees.classification_id==2&&t.data.map(e=>{e.classification_id==3&&(this.form.recommending_id=e.employee_id,this.recommending=e.firstname+" "+e.lastname,this.recommending_img=e.attachment||""),this.recommending==""&&e.classification_id==4&&(this.form.recommending_id=e.employee_id,this.recommending=e.firstname+" "+e.lastname,this.recommending_img=e.attachment||""),e.classification_id==4&&(this.form.approver_id=e.employee_id,this.approving=e.firstname+" "+e.lastname,this.approving_img=e.attachment||"")}),this.$store.userSettings.getActiveUser.employees.classification_id==3&&t.data.map(e=>{e.classification_id==3&&(this.form.recommending_id=e.employee_id,this.recommending=e.firstname+" "+e.lastname,this.recommending_img=e.attachment||""),this.recommending==""&&e.classification_id==4&&(this.form.recommending_id=e.employee_id,this.recommending=e.firstname+" "+e.lastname,this.recommending_img=e.attachment||""),e.classification_id==4&&(this.form.approver_id=e.employee_id,this.approving=e.firstname+" "+e.lastname,this.approving_img=e.attachment||"")}),this.state.isLoading=!1}).catch(t=>{console.log(t)})},reload(){return this.$emit("reload")},async saveRecord(){if(this.state.isSaving=!0,this.state.isEdit){this.state.isSaving=!1,this.form.id;let t=new FormData;Object.keys(this.form).forEach(e=>{t.append(e,this.form[e])}),this.wfhStatus==2&&(console.log("Appending status: 3"),t.append("status","3")),console.log(this.wfhStatus),console.log("asd",t),await D.update(t).then(e=>{e.status==201?(this.$swal.fire({title:"Great!",text:"Record successfully updated.",icon:"success",timer:2e3}),this.state.isSaving=!1,this.state.showModal=!1):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.reload()}).catch(e=>{e.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:e.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3})})}else{let t=new FormData;Object.keys(this.form).forEach(e=>{t.append(e,this.form[e])}),await D.create(t).then(e=>{e.status==201&&(this.$swal.fire({title:"Great!",text:"Record successfully saved.",icon:"success",timer:2e3}),this.state.isSaving=!1,this.state.showModal=!1,this.resetForm(),this.reload())}).catch(e=>{console.log(e),e.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:e.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3})})}},async submitForm(){try{await pe().shape({date:L().required("Date from is required"),hours:L().required("From time is required")}).validate(this.form,{abortEarly:!1}),this.$swal.fire({title:"Are you sure you want to save this record?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No"}).then(e=>{e.value&&this.saveRecord()})}catch(t){if(t instanceof F){const e={};t.inner.forEach(i=>{e[i.path]=i.message}),this.errors=e}}},async checkifWfh(){this.state.isLoading=!0;let t={start_date:this.form.date,end_date:this.form.date};try{const e=await ne.fetchRecords(t);this.scheduleList=e.data.schedule?e.data.schedule:[];const i=new Date().toISOString().split("T")[0];this.scheduleList.filter(n=>n.date===this.form.date).map(n=>{n.title.includes("WFH")?(this.isWfh=!0,this.form.status=3):(this.isWfh=!1,this.form.status=0)}),this.state.isLoading=!1}catch(e){console.log(e)}}},mounted(){this.fetchApprover()},watch:{"form.allow_higher_approval":{handler:"fetchApprover",immediate:!0}}},Ce={class:"text-slate-600 dark:text-slate-400 text-sm font-normal"},Re={class:"grid grid-cols-12 gap-4"},Se={class:"col-span-6"},Ae={class:"col-span-6"},ke={class:"col-span-12"},Be={key:0,class:"col-span-12"},Fe={key:0,class:"text-[#ec4899]"},De={key:0,class:"flex items-center gap-2 mt-2 cursor-pointer"},Ie={class:"flex justify-between w-full items-center"},Ee={key:0,class:"flex justify-end text-xl text-red-500 cursor-pointer"},Ve={class:"grid grid-cols-12 gap-4"},Te={class:"col-span-6 flex items-center p-4 bg-gray-100 rounded-lg shadow-md"},Oe={class:"flex-shrink-0 mr-4"},Pe=["src"],Le={key:1,class:"w-16 h-16 rounded-full object-cover bg-black-200 flex justify-center items-center"},Me={class:"text-left"},Ue={class:"text-sm font-semibold text-gray-600"},je={class:"text-lg font-bold text-gray-900"},We={key:0,class:"text-sm text-gray-900"},He={key:1,class:"text-sm text-gray-900"},qe={key:0,class:"col-span-6 flex items-center p-4 bg-gray-100 rounded-lg shadow-md"},Ge={class:"flex-shrink-0 mr-4"},ze=["src"],Ye={key:1,class:"w-16 h-16 rounded-full object-cover bg-black-200 flex justify-center items-center"},Ne={class:"text-left"},Qe={class:"text-lg font-bold text-gray-900"},Ze={class:"text-sm text-gray-900"},Ke={class:"flex gap-2 justify-between"},Je={class:"flex items-center cursor-pointer"},Xe=["checked"],$e={class:"flex gap-2"};function et(t,e,i,n,s,r){const _=a("Loading"),w=a("Alert"),d=a("flat-pickr"),v=a("FormGroup"),S=a("TextInput"),A=a("Textarea"),C=a("Fileinput"),x=a("Card"),k=a("FileType"),b=a("Icon"),B=a("SubmitButton"),u=a("UpdateButton"),J=a("CloseButton"),X=a("FormModal");return l(),p(X,{title:s.state.isEdit&&(s.wfhStatus==2||s.wfhStatus==0)?"Edit Wfh":s.wfhStatus==2?"Accomplishment Report Submission":"Wfh Application Form",active:s.state.showModal,onSubmit:t.confirmSubmit,onClose:r.closeModal,themeClass:s.state.isEdit&&(s.wfhStatus==2||s.wfhStatus==0)?"bg-primary-600":"bg-gray-800",sizeClass:"lg:w-2/4"},{default:h(()=>[s.state.isEdit&&s.state.isLoading?(l(),p(_,{key:0,text:"Fetching record"})):m("",!0),s.state.isLoading?(l(),p(_,{key:1,text:"Fetching record"})):m("",!0),s.form.denied_reason?(l(),p(w,{key:2,type:"danger-light",icon:"heroicons-outline:exclamation",class:"mb-4"},{default:h(()=>[e[8]||(e[8]=o("span",{class:"font-semibold"},"Denied Reason:",-1)),R(" "+g(s.form.denied_reason),1)]),_:1})):m("",!0),o("div",Ce,[o("form",{onSubmit:e[7]||(e[7]=M((...y)=>t.confirmSubmit&&t.confirmSubmit(...y),["prevent"])),class:"space-y-4",enctype:"multipart/form-data"},[s.state.isSaving?(l(),p(_,{key:0,text:"Saving record"})):m("",!0),o("div",Re,[o("div",Se,[c(v,{label:"Date",isRequired:!0},{default:h(()=>[c(d,{modelValue:s.form.date,"onUpdate:modelValue":e[0]||(e[0]=y=>s.form.date=y),class:"form-control h-[48px]",id:"date",placeholder:"yyyy, dd M",disabled:!(s.wfhStatus.length==0||s.wfhStatus==0),onChange:r.checkifWfh},null,8,["modelValue","disabled","onChange"])]),_:1})]),o("div",Ae,[c(v,{label:"Hours",isRequired:!0},{default:h(()=>[c(S,{type:"text",modelValue:s.form.hours,"onUpdate:modelValue":e[1]||(e[1]=y=>s.form.hours=y),error:s.errors.hours,classInput:"h-[48px]",disabled:!(s.wfhStatus.length==0||s.wfhStatus==2||s.wfhStatus==0)},null,8,["modelValue","error","disabled"])]),_:1})]),o("div",ke,[c(v,{label:"Remarks"},{default:h(()=>[c(A,{name:"pn4",placeholder:"Enter remarks....",modelValue:s.form.description,"onUpdate:modelValue":e[2]||(e[2]=y=>s.form.description=y),disabled:!(s.wfhStatus.length==0||s.wfhStatus==2||s.wfhStatus==0)},null,8,["modelValue","disabled"])]),_:1})]),s.isWfh&&s.wfhStatus.length==0||s.wfhStatus>=2?(l(),f("div",Be,[c(v,{label:"Attachment"},{default:h(()=>[c(x,{title:"File Input Basic"},{default:h(()=>[c(C,{modelValue:s.form.attachment,"onUpdate:modelValue":e[3]||(e[3]=y=>s.form.attachment=y),name:"basic",onChange:r.handleMainImageUpload,class:"h-[48px] w-full"},null,8,["modelValue","onChange"]),s.errors.attachment?(l(),f("div",Fe,g(s.errors.attachment),1)):m("",!0)]),_:1}),typeof s.form.attachment=="string"&&s.form.attachment?(l(),f("div",De,[o("div",Ie,[o("div",{class:"flex items-center cursor-pointer",onClick:e[4]||(e[4]=y=>r.viewAttachment(s.form.attachment))},[c(k,{image:r.getFileTypeImage(s.form.attachment)},null,8,["image"]),R(" "+g(s.form.attachment),1)]),s.form.status==0?(l(),f("div",Ee,[c(b,{icon:"mingcute:delete-2-fill",onClick:e[5]||(e[5]=y=>r.deleteFile(s.form.id))})])):m("",!0)])])):m("",!0)]),_:1})])):m("",!0)]),o("div",Ve,[o("div",Te,[o("div",Oe,[s.recommending_img?(l(),f("img",{key:0,src:s.recommending_img,alt:"Profile",class:"w-16 h-16 rounded-full object-cover"},null,8,Pe)):(l(),f("div",Le," No Image "))]),o("div",Me,[o("div",Ue,g(s.form.allow_higher_approval?"Recommending":"Approving"),1),o("div",je,g(s.recommending),1),s.form.allow_higher_approval?(l(),f("div",We,g(s.form.recommended_at?"Date: ("+this.$formatDate(s.form.recommended_at)+")":""),1)):(l(),f("div",He,g(s.form.approved_at?"Date: ("+this.$formatDate(s.form.approved_at)+")":""),1))])]),s.form.allow_higher_approval?(l(),f("div",qe,[o("div",Ge,[s.approving_img?(l(),f("img",{key:0,src:s.approving_img,alt:"Profile",class:"w-16 h-16 rounded-full object-cover"},null,8,ze)):(l(),f("div",Ye," No Image "))]),o("div",Ne,[e[9]||(e[9]=o("div",{class:"text-sm font-semibold text-gray-600"},"Approving",-1)),o("div",Qe,g(s.approving),1),o("div",Ze,g(s.form.approved_at?"Date: ("+this.$formatDate(s.form.approved_at)+")":""),1)])])):m("",!0)]),o("div",Ke,[o("div",null,[o("label",Je,[ae(o("input",{type:"checkbox",class:"peer h-6 w-6 cursor-pointer rounded-full bg-slate-100 border border-slate-300 checked:bg-blue-500 checked:border-blue-500",checked:s.form.allow_higher_approval,"onUpdate:modelValue":e[6]||(e[6]=y=>s.form.allow_higher_approval=y)},null,8,Xe),[[le,s.form.allow_higher_approval]]),e[10]||(e[10]=o("span",{class:"absolute text-white opacity-0 peer-checked:opacity-100"},[o("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor","stroke-width":"1"},[o("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})])],-1)),e[11]||(e[11]=o("span",{class:"ml-2 text-slate-500 dark:text-slate-400 text-sm"},"Allow Higher Head Approval?",-1))])]),o("div",$e,[s.state.isEdit?s.form.status===0?(l(),p(u,{key:1,onClick:r.submitForm},null,8,["onClick"])):m("",!0):(l(),p(B,{key:0,onClick:r.submitForm},null,8,["onClick"])),c(J,{onClick:r.closeModal},null,8,["onClick"])])])],32)])]),_:1},8,["title","active","onSubmit","onClose","themeClass"])}const tt=V(be,[["render",et],["__scopeId","data-v-dda81129"]]);const st={components:{FileType:N,DenyButton:xe,FormModal:j,FormGroup:U,TextInput:W,Textarea:H,SubmitButton:O,UpdateButton:q,CloseButton:T,Loading:P,Multiselect:Y,Icon:E,Checkbox:Q},data(){return{currentEmployeeId:this.$store.userSettings.getActiveUser.employees?this.$store.userSettings.getActiveUser.employees.employee_id:"",currentClassificationId:this.$store.userSettings.getActiveUser.employees?this.$store.userSettings.getActiveUser.employees.classification_id:"",currentRecommendingId:"",currentApprovingId:"",btnTitle:"",recommendingOptions:[],approvingOptions:[],recommending:"",approving:"",status:[],form:{date:"",hours:"",destination:"",description:"",attachment:"",recommending_id:"",approver_id:""},errors:{},state:{isEdit:!1,isSaving:!1,isLoading:!1,isDownloading:!1},fileIcons:{pdf:Z,jpg:K,default:""}}},methods:{getFileTypeImage(t){if(typeof t=="string"){if(!t)return this.fileIcons.default;const e=t.substring(t.lastIndexOf(".")+1).toLowerCase();return this.fileIcons[e]||this.fileIcons.default}},async viewAttachment(t){if(this.state.isDownloading)return;this.state.isDownloading=!0;let e=await z.Reader2("employee-overtime",t),i;if(t.endsWith(".pdf"))i="application/pdf";else if(t.endsWith(".png"))i="image/png";else if(t.endsWith(".jpg")||t.endsWith(".jpeg"))i="image/jpeg";else if(t.endsWith(".svg"))i="image/svg+xml";else throw new Error("Unsupported file type");const n=atob(e),s=new Array(n.length);for(let d=0;d<n.length;d++)s[d]=n.charCodeAt(d);const r=new Uint8Array(s),_=new Blob([r],{type:i}),w=URL.createObjectURL(_);window.open(w),this.state.isLoadingPDF=!1},handleMainImageUpload(){const t=event.target.files[0];this.form.attachment=t;const e=new FileReader;e.onload=()=>{t.type.startsWith("image/")?this.form.imageView=e.result:t.type==="application/pdf"?this.form.imageView=this.pdf_file_view:t.type==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"&&(this.form.imageView=this.excel_file_view)},console.log(t),e.readAsDataURL(t)},async loadRecord(t){this.resetForm(),this.form=t,this.form.date=new Date(t.date).toLocaleDateString("en-CA").split("T")[0],this.currentRecommendingId=t.recommending?t.recommending[0].employee_id:"",this.currentApprovingId=t.approving?t.approving[0].employee_id:"",this.recommending=t.recommending?t.recommending[0].firstname+" "+t.recommending[0].lastname:"",this.approving=t.approving?t.approving[0].firstname+" "+t.approving[0].lastname:"",this.currentRecommendingId==this.currentEmployeeId&&this.form.status<1||this.currentRecommendingId==this.currentEmployeeId&&this.form.status==3?this.btnTitle="Submit For Approval":this.currentApprovingId==this.currentEmployeeId&&(this.btnTitle="Approve"),this.currentClassificationId>=3&&await G.fetchEmployeeApprover(t.employee_id).then(e=>{if(e.status==200)this.recommendingOptions=e.data.map((i,n)=>({value:i.employee_id,label:i.firstname+" "+i.lastname})),this.approvingOptions=e.data.filter(i=>i.classification_id>=3).map((i,n)=>({value:i.employee_id,label:i.firstname+" "+i.lastname}));else throw new Error("Failed to fetch employee approvers")})},closeModal(){this.state.showModal=!1},resetForm(){this.state.isEdit=!1,this.form={date:"",hours:"",destination:"",description:"",attachment:"",recommending_id:"",approver_id:""}},reload(){return this.state.isSaving=!1,this.state.showModal=!1,this.$emit("reload")},async updateApproverRecord(){this.state.isSaving=!0;const t=this.form.id;this.state.isSaving=!1;let e={recommending_id:this.form.recommending_id,approver_id:this.form.approver_id};await I.updateApprover(t,e).then(i=>{i.status==201?(this.$swal.fire({title:"Great!",text:"Record successfully updated.",icon:"success",timer:2e3}),this.state.showModal=!1):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.reload()}).catch(i=>{i.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:i.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3})})},async saveRecord(){this.state.isSaving=!0;const t=this.form.id;await I.update(t,this.status).then(e=>{e.status==201?(this.$swal.fire({title:"Great!",text:"Record successfully updated.",icon:"success",timer:2e3}),this.state.isSaving=!1,this.state.showModal=!1):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.reload()}).catch(e=>{e.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:e.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3})})},async submitForm(){if(this.form.recommending_id==this.currentEmployeeId){let t="";this.form.status==3?t=4:t=1,this.status={hours:this.form.hours,status:t}}this.form.approver_id==this.currentEmployeeId&&this.form.status<=1&&(this.status={status:2}),this.form.approver_id==this.currentEmployeeId&&this.form.status>=3&&(this.status={status:5});try{this.$swal.fire({title:"Are you sure you want to save submit this record?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No"}).then(t=>{t.value&&this.saveRecord()})}catch(t){if(t instanceof F){const e={};t.inner.forEach(i=>{e[i.path]=i.message}),this.errors=e}}},async updateApproverForm(){try{this.$swal.fire({title:"Are you sure you want to update the approver of this record?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No"}).then(t=>{t.value&&this.updateApproverRecord()})}catch(t){if(t instanceof F){const e={};t.inner.forEach(i=>{e[i.path]=i.message}),this.errors=e}}},async denyForm(){this.status={status:99};try{this.$swal.fire({title:"Are you sure you want to deny this record?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No",html:` <textarea id="swal-input" style="width: 100%; height: 80px; padding: 8px; border: 1px solid #ced4da; border-radius: 4px;" placeholder="Enter reason"></textarea>`,preConfirm:()=>{const t=document.getElementById("swal-input").value;return t?this.denied_reason=t:(this.$swal.showValidationMessage("The reason field is required"),!1)}}).then(t=>{this.status={status:99,denied_reason:this.denied_reason},t.value&&this.saveRecord()})}catch(t){if(t instanceof F){const e={};t.inner.forEach(i=>{e[i.path]=i.message}),this.errors=e}}},async ReceiveByHr(t){try{if(t==99){const e=await this.$swal.fire({title:"State the Reason for Denying this Request",input:"textarea",inputPlaceholder:"Enter your reason here...",inputAttributes:{"aria-label":"Reason for deferment"},showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Submit",cancelButtonText:"Cancel",preConfirm:i=>i||(this.$swal.showValidationMessage("Reason is required!"),!1)});e.isConfirmed&&e.value&&(console.log("Reason for deferment:",e.value),this.updateRecordByHR(t,e.value))}else this.$swal.fire({title:"Are you sure you want to receive/validate this record?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No"}).then(e=>{e.value&&(console.log("recieved by HR"),this.updateRecordByHR(t))})}catch(e){if(e instanceof F){const i={};e.inner.forEach(n=>{i[n.path]=n.message}),this.errors=i}}},async updateRecordByHR(t,e=null){this.state.isSaving=!0;const i=this.form.id;let s={status:t,reason:e};await I.hrValidation(i,s).then(r=>{r.status==201?(console.log("response"),console.log(r),this.$swal.fire({title:"Great!",text:"Record successfully updated.",icon:"success",timer:2e3})):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.reload()}).catch(r=>{r.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:r.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.state.isSaving=!1})}},mounted(){}},it={class:"text-slate-600 dark:text-slate-400 text-sm font-normal"},ot={key:0,class:"bg-red-50 dark:bg-red-900 dark:bg-opacity-30 border-l-4 border-red-500 p-4 rounded-md shadow-sm"},rt={class:"text-red-600 dark:text-red-400 text-sm"},nt={class:"grid grid-cols-12 gap-4"},at={class:"col-span-6"},lt={class:"col-span-6"},ct={class:"col-span-12"},dt={key:1},mt={class:"grid grid-cols-12 justify-center items-center"},ft={class:"col-span-8 flex justify-between items-center gap-4"},ht={class:"col-span-6 flex justify-center items-center gap-4"},ut={class:"font-bold"},pt={class:"col-span-6 flex justify-center items-center gap-4"},gt={class:"font-bold"},_t={key:2},yt={class:"grid grid-cols-12 gap-4"},wt={class:"col-span-6"},vt={class:"relative"},xt={class:"col-span-6"},bt={class:"relative"},Ct={class:"flex gap-1 justify-end pt-8"},Rt={key:0,class:"flex gap-1 justify-end"},St={key:1,class:"flex gap-1 justify-end"};function At(t,e,i,n,s,r){const _=a("Loading"),w=a("flat-pickr"),d=a("FormGroup"),v=a("TextInput"),S=a("Textarea"),A=a("FileType"),C=a("Multiselect"),x=a("UpdateButton"),k=a("DenyButton"),b=a("CloseButton"),B=a("FormModal");return l(),p(B,{title:"View Record",active:s.state.showModal,sideTitle:this.form.status==0?"for recommendation":this.form.status==1?"for approval":this.form.status==2&&this.form.validated==1?"Approved & Validated":this.form.status==2&&this.form.validated==99?"Denied":this.form.status==2?"For Validation":this.form.status==99?"denied":"",badgeColor:this.form.status==0?"warning":this.form.status==1?"info":this.form.status==2&&this.form.validated==1?"success":this.form.status==2&&this.form.validated==99?"danger":this.form.status==2?"purple":this.form.status==99?"danger":"",onSubmit:t.confirmSubmit,onClose:r.closeModal,themeClass:"bg-gray-800",sizeClass:"lg:w-2/4"},{default:h(()=>[s.state.isEdit&&s.state.isLoading?(l(),p(_,{key:0,text:"Fetching record"})):m("",!0),o("div",it,[this.form.status==2&&this.form.validated==99?(l(),f("div",ot,[e[9]||(e[9]=o("h3",{class:"text-red-700 dark:text-red-300 font-semibold mb-1 text-sm"}," Denied Reason : ",-1)),o("p",rt,g(s.form.deferred_reason),1)])):m("",!0),o("form",{onSubmit:e[8]||(e[8]=M((...u)=>t.confirmSubmit&&t.confirmSubmit(...u),["prevent"])),class:"space-y-4",enctype:"multipart/form-data"},[s.state.isSaving?(l(),p(_,{key:0,text:"Saving record"})):m("",!0),o("div",nt,[o("div",at,[c(d,{label:"Date",isRequired:!0},{default:h(()=>[c(w,{modelValue:s.form.date,"onUpdate:modelValue":e[0]||(e[0]=u=>s.form.date=u),class:"form-control h-[48px]",id:"date",placeholder:"yyyy, dd M",disabled:!0},null,8,["modelValue"])]),_:1})]),o("div",lt,[c(d,{label:"Hours",isRequired:!0},{default:h(()=>[c(v,{type:"text",modelValue:s.form.hours,"onUpdate:modelValue":e[1]||(e[1]=u=>s.form.hours=u),error:s.errors.hours,classInput:"h-[48px]",disabled:!0},null,8,["modelValue","error"])]),_:1})]),o("div",ct,[c(d,{label:"Remarks"},{default:h(()=>[c(S,{name:"pn4",placeholder:"Enter remarks....",modelValue:s.form.description,"onUpdate:modelValue":e[2]||(e[2]=u=>s.form.description=u),disabled:!0},null,8,["modelValue"])]),_:1})]),c(d,{label:"Attachment"},{default:h(()=>[typeof s.form.attachment=="string"?(l(),f("div",{key:0,class:"flex items-center gap-2 mt-2 cursor-pointer",onClick:e[3]||(e[3]=u=>r.viewAttachment(s.form.attachment))},[c(A,{image:r.getFileTypeImage(s.form.attachment)},null,8,["image"]),R(" "+g(s.form.attachment),1)])):m("",!0)]),_:1})]),s.currentClassificationId<=2?(l(),f("div",dt,[o("div",mt,[o("div",ft,[o("div",ht,[e[10]||(e[10]=R(" Recommending: ")),o("p",ut,g(s.recommending),1)]),o("div",pt,[e[11]||(e[11]=R(" Approving: ")),o("p",gt,g(s.approving),1)])])])])):(l(),f("div",_t,[o("div",yt,[o("div",wt,[c(d,{label:"Recommending"},{default:h(()=>[o("div",vt,[c(C,{modelValue:s.form.recommending_id,"onUpdate:modelValue":e[4]||(e[4]=u=>s.form.recommending_id=u),"close-on-select":!0,searchable:!0,id:"recommending_id",options:s.recommendingOptions},null,8,["modelValue","options"])])]),_:1})]),o("div",xt,[c(d,{label:"Approver"},{default:h(()=>[o("div",bt,[c(C,{modelValue:s.form.approver_id,"onUpdate:modelValue":e[5]||(e[5]=u=>s.form.approver_id=u),"close-on-select":!0,searchable:!0,id:"approver_id",options:s.approvingOptions},null,8,["modelValue","options"])])]),_:1})])])])),o("div",Ct,[this.form.status==0&&s.currentRecommendingId==s.currentEmployeeId||s.currentApprovingId==s.currentEmployeeId&&this.form.status==1&&s.currentApprovingId==this.form.approver_id||this.form.approver_id==this.form.recommending_id&&s.currentApprovingId==this.form.approver_id&&s.currentEmployeeId==this.form.approver_id||this.form.status==3&&s.currentRecommendingId==s.currentEmployeeId||s.currentApprovingId==s.currentEmployeeId&&this.form.status==4&&s.currentApprovingId==this.form.approver_id?(l(),f("div",Rt,[this.form.status<=1||this.form.status>=3?(l(),p(x,{key:0,onClick:r.submitForm,text:s.btnTitle},null,8,["onClick","text"])):m("",!0),c(k,{onClick:r.denyForm,text:"Deny"},null,8,["onClick"])])):this.form.status==0&&s.currentApprovingId==s.currentEmployeeId||s.currentApprovingId!=this.form.approver_id||this.form.status==3&&s.currentApprovingId==s.currentEmployeeId||s.currentApprovingId!=this.form.approver_id?(l(),f("div",St,[this.form.status<=1||this.form.status==3?(l(),p(x,{key:0,onClick:r.updateApproverForm,text:"Update Approver"},null,8,["onClick"])):m("",!0)])):m("",!0),this.form.status===2&&this.form.validated==0?(l(),p(x,{key:2,btnClass:"text-green-600 bg-transpanent hover:ring ring-green-600 ring-offset-1 border border-green-600 transition duration-150 ease-out hover:ease-in py-2 px-3",onClick:e[6]||(e[6]=u=>r.ReceiveByHr(1)),text:"Receive"})):m("",!0),this.form.status===2&&this.form.validated==0?(l(),p(x,{key:3,btnClass:"text-red-600 bg-transparent hover:ring ring-red-600 ring-offset-1 border border-red-600 transition duration-150 ease-out hover:ease-in py-2 px-3",icon:"material-symbols:unpublished",onClick:e[7]||(e[7]=u=>r.ReceiveByHr(99)),text:"Deny"})):m("",!0),c(b,{onClick:r.closeModal},null,8,["onClick"])])],32)])]),_:1},8,["active","sideTitle","badgeColor","onSubmit","onClose"])}const kt=V(st,[["render",At],["__scopeId","data-v-3d2cb961"]]);const Bt={mixins:[$],components:{FilterTimekeeping:ce,ActionCellRenderer:ue,ActionCellRendererApprover:ve,AgGridVue:we,Pagination:ye,Card:te,Button:se,Badge:ie,Layout:ee,Icon:E,CreateButton:de,SubmitButton:O,CloseButton:T,EditButton:fe,ViewButton:he,DeleteButton:me,Form:tt,InputGroup:oe,Loading:P,View:kt},data(){return{paginationPageSize:10,paginationPageSizeSelector:[10,25,50],colDefs:[{field:"#",flex:1},{field:"employee_id",filter:!0,floatingFilter:!0,flex:2},{field:"name",filter:!0,floatingFilter:!0,flex:2},{field:"date",filter:!0,floatingFilter:!0,flex:2},{field:"hours",filter:!0,floatingFilter:!0,flex:2},{field:"date created",filter:!0,floatingFilter:!0},{headerName:"Status",field:"status",filter:!0,floatingFilter:!0,valueGetter:t=>{if(t.data.status==2&&t.data.validated==1)return"Validated";if(t.data.status==2&&t.data.validated==99)return"Denied by HR";switch(t.data.status){case 0:return"For Recommendation";case 1:return"For Approval";case 2:return"For Validation";case 99:return"Denied";default:return""}},cellRenderer:t=>{switch(t.value){case"For Recommendation":return'<span class="inline-block rounded-full text-xs capitalize whitespace-nowrap text-center py-1 text-yellow-600 bg-gray-100 px-4">For Recommendation</span>';case"For Approval":return'<span class="inline-block rounded-full text-xs capitalize whitespace-nowrap text-center py-1 text-blue-600 bg-gray-100 px-4">For Approval</span>';case"Validated":return'<div class="inline-block rounded-full text-xs capitalize whitespace-nowrap text-center py-1 bg-gray-100 text-green-600 px-4">Approved & Validated</div>';case"Denied by HR":return'<div class="inline-block rounded-full text-xs capitalize whitespace-nowrap text-center py-1 bg-gray-100 text-red-600 px-4">Denied</div>';case"For Validation":return'<div class="inline-block rounded-full text-xs capitalize whitespace-nowrap text-center py-1 bg-gray-100 text-fuchsia-600 px-4">For Validation</div>';case"Denied":return'<span class="inline-block rounded-full text-xs capitalize whitespace-nowrap text-center py-1 text-red-600 bg-gray-100 px-4">Denied</span>';default:return""}}},{headerName:"Actions",cellRenderer:"ActionCellRendererApprover",flex:1,cellRendererParams:{context:{componentParent:this}}}],breadcrumbs:[{text:"Home",href:"/"},{text:"Timekeeping",href:"/attendance/wfh"},{text:"Wfh Application",active:!0}],columns:[{label:"#",field:"#"},{label:"Date",field:"date",formatFn:t=>this.formatDate(t)},{label:"Hours",field:"hours"},{label:"Remarks",field:"description"},{label:"Status",field:"status"},{label:"Action",field:"action"}],perPageOptions:[{value:"10",label:"10"},{value:"50",label:"50"},{value:"100",label:"100"}],items:[],totalItems:0,searchQuery:null,serverOptions:{page:1,rowsPerPage:10,sortBy:"created_at",sortType:"asc"},state:{isLoading:!1,isEdit:!1,isDeleting:!1}}},watch:{serverOptions:{handler(){console.log(`perPage: ${this.serverOptions.rowsPerPage}`),this.fetchRecords()},deep:!0},searchQuery:re.debounce(function(){this.fetchRecords()},800)},computed:{perPage:function(){return this.serverOptions.rowsPerPage}},methods:{applyFilters(t){this.fetchRecords(t)},onGridReady(t){this.gridApi=t.api},exportToCsv(){this.gridApi?this.gridApi.exportDataAsCsv({onlySelected:!1,columnKeys:this.colDefs.filter(t=>t.field!=="actions").map(t=>t.field)}):console.error("Grid API is not ready.")},formatDate(t){const e=new Date(t),i=new Date(e.toLocaleString("en-US",{timeZone:"UTC"})),n=new Date(i.toLocaleString("en-US",{timeZone:"Asia/Singapore"})),s=n.getFullYear(),r=String(n.getMonth()+1).padStart(2,"0"),_=String(n.getDate()).padStart(2,"0");return`${s}-${r}-${_}`},async fetchRecords(t={}){this.state.isLoading=!0,await D.fetchRecordList({keyword:this.searchQuery,page:this.serverOptions.page,per_page:this.serverOptions.rowsPerPage,sortBy:this.serverOptions.sortBy,sortType:this.serverOptions.sortType,dealership:this.$store.userSettings.activeDealership,...t}).then(e=>{console.log("response");let i=e.data.data;console.log(i),this.items=i,this.items=i.map((n,s)=>({...n,"#":s+1,employee_id:n.employee_id,name:n.employee.lastname+", "+n.employee.firstname,date:this.$formatDate(n.date),hours:n.hours,"date created":this.$formatDate(n.created_at),status:n.status}))}).finally(()=>{this.state.isLoading=!1})},reload(){this.$emit("reload")},handlePageChange(t){console.log(t),console.log(this.serverOptions.page),this.serverOptions.page!=t&&(this.serverOptions.page=t)},handlePerPageChange(t){this.serverOptions.page=1,this.serverOptions.rowsPerPage=t},onSortChange(t){console.log(t),t[0].type!="none"&&(this.serverOptions.sortBy=t[0].field,this.serverOptions.sortType=t[0].type)},async deleteRecord(t){this.$swal.fire({title:"Are you sure?",text:"You want to delete this record?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes, delete it!",background:this.$store.themeSettingsStore.isDark?"#1e293b":"#fff"}).then(e=>{console.log(e.value),e.value&&(this.state.isDeleting=!0,D.remove(t).then(i=>{i.status==201&&(this.$swal.fire({title:"Yaaay!",text:"Record has been deleted successfully.",type:"success",icon:"success",timer:2e3}),this.fetchRecords())}))}).catch(e=>{e.response&&e.response.status==401&&this.$swal.fire({title:"Ooops! something is wrong.",text:"Error deleting record. Please contact system administrator",type:"error",icon:"error",timer:2e3})}).finally(()=>{this.reload(),this.state.isDeleting=!1})},createRecord(){this.$refs.form.resetForm(),this.$refs.form.state.showModal=!0},editRecord(t){console.log(t),this.$refs.form.resetForm(),this.$refs.form.loadRecord(t),this.$refs.form.state.showModal=!0},viewRecord(t){console.log(t),this.$refs.view.resetForm(),this.$refs.view.loadRecord(t),this.$refs.view.state.showModal=!0},handlePageChange(t){console.log(t),console.log(this.serverOptions.page),this.serverOptions.page!=t&&(this.serverOptions.page=t)},handlePerPageChange(t){this.serverOptions.page=1,this.serverOptions.rowsPerPage=t},async ReceiveByHr(t){try{if(t==99){const e=await this.$swal.fire({title:"State the Reason for Deferring this Request",input:"textarea",inputPlaceholder:"Enter your reason here...",inputAttributes:{"aria-label":"Reason for deferment"},showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Submit",cancelButtonText:"Cancel",preConfirm:i=>i||(this.$swal.showValidationMessage("Reason is required!"),!1)});e.isConfirmed&&e.value&&(console.log("Reason for deferment:",e.value),this.updateRecordByHR(t,e.value))}else this.$swal.fire({title:"Are you sure you want to receive/validate this record?",text:"",icon:"question",showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Yes",cancelButtonText:"No"}).then(e=>{e.value&&(console.log("recieved by HR"),this.updateRecordByHR(t))})}catch(e){if(e instanceof Yup.ValidationError){const i={};e.inner.forEach(n=>{i[n.path]=n.message}),this.errors=i}}},async updateRecordByHR(t,e=null){this.state.isSaving=!0;const i=this.form.id;let s={status:t,reason:e};await WfhApproval.hrValidation(i,s).then(r=>{r.status==201?(console.log("response"),console.log(r),this.$swal.fire({title:"Great!",text:"Record successfully updated.",icon:"success",timer:2e3})):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.reload()}).catch(r=>{r.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:r.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.state.isSaving=!1})}},mounted(){this.fetchRecords()}},Ft={class:"space-y-4 mt-4"},Dt={class:"flex items-center justify-between mb-4"},It={class:"text-lg font-semibold"},Et={class:"relative"},Vt={class:"ag-grid-toolbar flex items-center justify-between px-4 py-2 bg-gray-100 border-b rounded-t-xl border-gray-200"},Tt={class:"flex items-center justify-center gap-4 text-gray-900"},Ot={class:"flex items-center gap-4"},Pt={class:"relative z-10 flex items-center transition-colors duration-300 group-hover:text-white"};function Lt(t,e,i,n,s,r){const _=a("FilterTimekeeping"),w=a("Icon"),d=a("Button"),v=a("ag-grid-vue"),S=a("Card"),A=a("Loading"),C=a("View"),x=a("Form"),k=a("Layout");return l(),p(k,{breadcrumbs:s.breadcrumbs},{default:h(()=>[o("div",Ft,[c(S,{title:"Wfh Applications"},{default:h(()=>{var b;return[o("div",Dt,[o("h6",It,g(t.title),1)]),o("div",Et,[o("div",Vt,[o("div",Tt,g(((b=this.$store.userSettings.dealershipAccess.find(B=>B.id==this.$store.userSettings.activeDealership))==null?void 0:b.name)+" - REQUESTED WFH"||"REQUESTED WFH"),1),o("div",Ot,[c(_,{onFilterChanged:r.applyFilters},null,8,["onFilterChanged"]),c(d,{icon:"mdi:microsoft-excel",text:"Export to CSV",btnClass:"relative overflow-hidden font-normal px-4 py-2 rounded-lg shadow-md bg-white text-gray-900 border group transition-colors duration-300 group-hover:border-green-500",iconClass:"text-2xl",onClick:r.exportToCsv},{default:h(()=>[e[3]||(e[3]=o("span",{class:"absolute inset-0 bg-green-500 transition-transform duration-300 transform -translate-x-full group-hover:translate-x-0"},null,-1)),o("span",Pt,[c(w,{icon:"mdi:microsoft-excel",class:"text-2xl mr-2"}),e[2]||(e[2]=R(" Export to CSV "))])]),_:1},8,["onClick"])])])]),c(v,{ref:"agGrid",rowData:s.items,columnDefs:s.colDefs,style:{height:"500px"},class:"ag-theme-quartz",pagination:!0,paginationPageSize:s.paginationPageSize,paginationPageSizeSelector:s.paginationPageSizeSelector,onGridReady:r.onGridReady},null,8,["rowData","columnDefs","paginationPageSize","paginationPageSizeSelector","onGridReady"])]}),_:1}),s.state.isLoading?(l(),p(A,{key:0,text:"Fetching records"})):m("",!0),c(C,{onCloseModal:e[0]||(e[0]=b=>s.state.showModal=!1),ref:"view",onReload:r.fetchRecords},null,8,["onReload"]),c(x,{onCloseModal:e[1]||(e[1]=b=>s.state.showModal=!1),ref:"form",onReload:r.fetchRecords},null,8,["onReload"])])]),_:1},8,["breadcrumbs"])}const Ls=V(Bt,[["render",Lt],["__scopeId","data-v-f57eb47f"]]);export{Ls as default};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings