File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/index.e7bc21ff.js
Back
import{w as L,L as j}from"./index.09b28a7f.js";import{C as U}from"./index.5a868516.js";import{B as M}from"./index.95db1698.js";import{B as z}from"./index.ae1bb6da.js";import{I as V}from"./index.163ce270.js";import{I as G}from"./index.fd1302f6.js";import{l as N}from"./lodash.7ba26c92.js";import{_ as S,r as a,o as n,c as g,w as p,j as f,d as i,b as u,t as h,k as q,e as r,f as C,m as O,h as I,F as T}from"./index.3a0d1437.js";import{E as W}from"./EmployeeOvertimeService.8eeead39.js";import{T as B}from"./TimeAdjustmentApprovalService.e2cf30c6.js";import{C as P}from"./CloseButton.f9c39bb8.js";import{E as Y}from"./EditButton.f8156944.js";/* empty css */import{S as E}from"./SubmitButton.53a3866c.js";import{V as Q}from"./ViewButton.dc0ba0bc.js";import"./jspdf.es.min.a68db437.js";/* empty css *//* empty css */import"./vue-cleave.min.da4c1c61.js";import{V as F}from"./array.057dff5d.js";import{L as D}from"./Loading.2fa16091.js";import"./vue-quill.snow.08c5baab.js";/* empty css */import{F as H}from"./index.5338216a.js";import{F as $}from"./index.4888d65f.js";import{T as J}from"./index.53519759.js";import{T as K}from"./index.e6d15a49.js";import{D as X}from"./DenyButton.b86f5692.js";import{U as Z}from"./UpdateButton.161928d8.js";import{A as ee}from"./ApproverService.c958b637.js";import{F as te}from"./FileService.9a8ade8c.js";import{M as oe}from"./Multiselect.4d70245a.js";import{F as se}from"./index.b440e312.js";import{C as ie}from"./index.30a24c9f.js";import{f as re}from"./apiUtils.383f63f4.js";import{p as ne,j as ae}from"./scr-1.d9aaecca.js";import{P as le}from"./index.ceaa4080.js";import{A as de}from"./main.esm.51ee4e77.js";import{A as ce}from"./ActionCellRendererApprover.a30e06c8.js";import"./logo-black.7c15feb3.js";import"./logo-white.b04c5a89.js";import"./transition.eb053693.js";import"./EmployeeService.0d36c049.js";import"./es.string.replace.6e729815.js";import"./Loading.vue_vue_type_style_index_0_scoped_cbded5a2_lang.717f943d.js";import"./index.57af9821.js";import"./ck-white.4bf441fa.js";import"./CompanyService.335c4e27.js";import"./DealershipService.65dee167.js";import"./DepartmentService.b6e0d2c2.js";import"./DivisionService.849bf539.js";import"./EmploymentTypeService.ba01c8db.js";import"./GroupService.8a431bdb.js";import"./JobClassficationService.4b92c33f.js";import"./JobTitleService.e1202c4d.js";import"./SectionService.70d2587b.js";import"./SupportingDocumentService.fafc9fc6.js";import"./UnitService.d6432c35.js";import"./CitizenshipService.960d3008.js";import"./CivilStatusService.ff01e4ed.js";import"./ReligionService.45dd14d1.js";const me={components:{FileType:se,DenyButton:X,FormModal:$,FormGroup:H,TextInput:J,Textarea:K,SubmitButton:E,UpdateButton:Z,CloseButton:P,Loading:D,Multiselect:oe,Icon:V,Checkbox:ie},data(){return{inOutOptions:[{value:0,label:"IN"},{value:1,label:"OUT"}],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:"",in_out:"",time:"",description:"",attachment:"",recommending_id:"",approver_id:""},errors:{},state:{isEdit:!1,isSaving:!1,isLoading:!1,isCompanyLoading:!1},fileIcons:{pdf:ne,jpg:ae,default:""}}},methods:{getFileTypeImage(e){if(typeof e=="string"){if(!e)return this.fileIcons.default;const t=e.substring(e.lastIndexOf(".")+1).toLowerCase();return this.fileIcons[t]||this.fileIcons.default}},async viewAttachment(e){if(this.state.isDownloading)return;this.state.isDownloading=!0;let t=await te.Reader2("employee-overtime",e),s;if(e.endsWith(".pdf"))s="application/pdf";else if(e.endsWith(".png"))s="image/png";else if(e.endsWith(".jpg")||e.endsWith(".jpeg"))s="image/jpeg";else if(e.endsWith(".svg"))s="image/svg+xml";else throw new Error("Unsupported file type");const c=atob(t),o=new Array(c.length);for(let l=0;l<c.length;l++)o[l]=c.charCodeAt(l);const m=new Uint8Array(o),v=new Blob([m],{type:s}),_=URL.createObjectURL(v);window.open(_),this.state.isLoadingPDF=!1},async fetchCompanyRecords(){try{this.state.isCompanyLoading=!0,this.companyOptions=await re()}catch(e){console.error("Failed to fetch company data:",e)}finally{this.state.isCompanyLoading=!1}},handleMainImageUpload(){const e=event.target.files[0];this.form.attachment=e;const t=new FileReader;t.onload=()=>{e.type.startsWith("image/")?this.form.imageView=t.result:e.type==="application/pdf"?this.form.imageView=this.pdf_file_view:e.type==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"&&(this.form.imageView=this.excel_file_view)},t.readAsDataURL(e)},async loadRecord(e){this.resetForm(),this.form=e,this.form.meal=!!this.form.meal,this.form.transportation=!!this.form.transportation,this.currentRecommendingId=e.recommending?e.recommending[0].employee_id:"",this.currentApprovingId=e.approving?e.approving[0].employee_id:"",this.recommending=e.recommending?e.recommending[0].firstname+" "+e.recommending[0].lastname:"",this.approving=e.approving?e.approving[0].firstname+" "+e.approving[0].lastname:"",this.currentApprovingId==this.currentEmployeeId&&this.form.approver_id==this.currentEmployeeId?this.btnTitle="Approve":this.currentRecommendingId==this.currentEmployeeId&&this.form.status<1&&(this.btnTitle="Submit For Approval"),this.currentClassificationId>=3&&await ee.fetchEmployeeApprover(e.employee_id).then(t=>{if(t.status==200)this.recommendingOptions=t.data.map((s,c)=>({value:s.employee_id,label:s.firstname+" "+s.lastname})),this.approvingOptions=t.data.filter(s=>s.classification_id>=3).map((s,c)=>({value:s.employee_id,label:s.firstname+" "+s.lastname}));else throw new Error("Failed to fetch employee approvers")})},closeModal(){this.state.showModal=!1},resetForm(){this.state.isEdit=!1,this.form={date:"",in_out:"",time:"",description:"",attachment:"",recommending_id:"",approver_id:""}},reload(){return this.$emit("reload")},async updateApproverRecord(){this.state.isSaving=!0;const e=this.form.id;this.state.isSaving=!1;let t={recommending_id:this.form.recommending_id,approver_id:this.form.approver_id};await B.updateApprover(e,t).then(s=>{s.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(s=>{s.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:s.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 e=this.form.id;await B.update(e,this.status).then(t=>{t.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(t=>{t.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:t.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3})})},async submitForm(){this.form.recommending_id==this.currentEmployeeId&&(this.status={status:1}),this.form.approver_id==this.currentEmployeeId&&(this.status={status:2});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(e=>{e.value&&this.saveRecord()})}catch(e){if(e instanceof F){const t={};e.inner.forEach(s=>{t[s.path]=s.message}),this.errors=t}}},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(e=>{e.value&&this.updateApproverRecord()})}catch(e){if(e instanceof F){const t={};e.inner.forEach(s=>{t[s.path]=s.message}),this.errors=t}}},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 e=document.getElementById("swal-input").value;return e?this.denied_reason=e:(this.$swal.showValidationMessage("The reason field is required"),!1)}}).then(e=>{this.status={status:99,denied_reason:this.denied_reason},e.value&&this.saveRecord()})}catch(e){if(e instanceof F){const t={};e.inner.forEach(s=>{t[s.path]=s.message}),this.errors=t}}}},mounted(){this.fetchCompanyRecords()},watch:{}},pe={class:"text-slate-600 dark:text-slate-400 text-sm font-normal"},ue={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"},fe={class:"text-red-600 dark:text-red-400 text-sm"},he={key:0,class:"text-[#ec4899]"},ge={class:"relative"},ve={class:"grid grid-cols-1"},ye={class:"grid grid-cols-1"},_e={class:"col-span-6"},xe={key:1},we={class:"grid grid-cols-12 justify-center items-center"},be={class:"col-span-8 flex justify-between items-center gap-4"},Ce={class:"col-span-6 flex justify-center items-center gap-4"},Ae={class:"font-bold"},ke={class:"col-span-6 flex justify-center items-center gap-4"},Re={class:"font-bold"},Fe={key:2},Ie={class:"grid grid-cols-12 gap-4"},Be={class:"col-span-6"},Oe={class:"relative"},Te={class:"col-span-6"},Ve={class:"relative"},Se={class:"flex gap-1 justify-end pt-8"},Pe={key:0,class:"flex gap-1 justify-end"},Ee={key:1,class:"flex gap-1 justify-end"};function De(e,t,s,c,o,m){const v=a("Loading"),_=a("flat-pickr"),l=a("FormGroup"),x=a("Multiselect"),A=a("Textarea"),k=a("FileType"),b=a("UpdateButton"),y=a("DenyButton"),R=a("CloseButton"),w=a("FormModal");return n(),g(w,{title:"View Record",active:o.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:e.confirmSubmit,onClose:m.closeModal,themeClass:"bg-gray-800",sizeClass:"lg:w-3/4"},{default:p(()=>[o.state.isEdit&&o.state.isLoading?(n(),g(v,{key:0,text:"Fetching record"})):f("",!0),i("div",pe,[this.form.status==2&&this.form.validated==99?(n(),u("div",ue,[t[8]||(t[8]=i("h3",{class:"text-red-700 dark:text-red-300 font-semibold mb-1 text-sm"}," Denied Reason : ",-1)),i("p",fe,h(this.form.deferred_reason),1)])):f("",!0),i("form",{onSubmit:t[7]||(t[7]=q((...d)=>e.confirmSubmit&&e.confirmSubmit(...d),["prevent"])),class:"space-y-4",enctype:"multipart/form-data"},[o.state.isSaving?(n(),g(v,{key:0,text:"Saving record"})):f("",!0),i("div",null,[r(l,{label:"Date",isRequired:!0},{default:p(()=>[r(_,{modelValue:o.form.date,"onUpdate:modelValue":t[0]||(t[0]=d=>o.form.date=d),class:"form-control h-12",id:"date",placeholder:"yyyy, dd M"},null,8,["modelValue"]),o.errors.date?(n(),u("div",he,h(o.errors.date),1)):f("",!0)]),_:1})]),r(l,{label:"Int / Out"},{default:p(()=>[i("div",ge,[r(x,{modelValue:o.form.in_out,"onUpdate:modelValue":t[1]||(t[1]=d=>o.form.in_out=d),"close-on-select":!0,searchable:!0,id:"in_out",options:o.inOutOptions},null,8,["modelValue","options"])])]),_:1}),i("div",null,[r(l,{label:"Time"},{default:p(()=>[r(_,{modelValue:o.form.time,"onUpdate:modelValue":t[2]||(t[2]=d=>o.form.time=d),class:"form-control h-12",placeholder:"time",config:{enableTime:!0,noCalendar:!0,dateFormat:"H:i"}},null,8,["modelValue"])]),_:1})]),i("div",ve,[i("div",ye,[r(l,{label:"Remarks"},{default:p(()=>[r(A,{placeholder:"Remarks",modelValue:o.form.description,"onUpdate:modelValue":t[3]||(t[3]=d=>o.form.description=d)},null,8,["modelValue"])]),_:1})]),i("div",_e,[r(l,{label:"Attachment"},{default:p(()=>[typeof o.form.attachment=="string"?(n(),u("div",{key:0,class:"flex items-center gap-2 mt-2 cursor-pointer",onClick:t[4]||(t[4]=d=>m.viewAttachment(o.form.attachment))},[r(k,{image:m.getFileTypeImage(o.form.attachment)},null,8,["image"]),C(" "+h(o.form.attachment),1)])):f("",!0)]),_:1})])]),o.currentClassificationId<=2?(n(),u("div",xe,[i("div",we,[i("div",be,[i("div",Ce,[t[9]||(t[9]=C(" Recommending: ")),i("p",Ae,h(o.recommending),1)]),i("div",ke,[t[10]||(t[10]=C(" Approving: ")),i("p",Re,h(o.approving),1)])])])])):(n(),u("div",Fe,[i("div",Ie,[i("div",Be,[r(l,{label:"Recommending"},{default:p(()=>[i("div",Oe,[r(x,{modelValue:o.form.recommending_id,"onUpdate:modelValue":t[5]||(t[5]=d=>o.form.recommending_id=d),"close-on-select":!0,searchable:!0,id:"recommending_id",options:o.recommendingOptions},null,8,["modelValue","options"])])]),_:1})]),i("div",Te,[r(l,{label:"Approver"},{default:p(()=>[i("div",Ve,[r(x,{modelValue:o.form.approver_id,"onUpdate:modelValue":t[6]||(t[6]=d=>o.form.approver_id=d),"close-on-select":!0,searchable:!0,id:"approver_id",options:o.approvingOptions},null,8,["modelValue","options"])])]),_:1})])])])),i("div",Se,[this.form.status==0&&o.currentRecommendingId==o.currentEmployeeId||o.currentApprovingId==o.currentEmployeeId&&this.form.status==1&&o.currentApprovingId==this.form.approver_id||this.form.approver_id==this.form.recommending_id&&o.currentApprovingId==this.form.approver_id&&o.currentEmployeeId==this.form.approver_id?(n(),u("div",Pe,[this.form.status<=1?(n(),g(b,{key:0,onClick:m.submitForm,text:o.btnTitle},null,8,["onClick","text"])):f("",!0),this.form.status<=1?(n(),g(y,{key:1,onClick:m.denyForm,text:"Deny"},null,8,["onClick"])):f("",!0)])):this.form.status==0&&o.currentApprovingId==o.currentEmployeeId||o.currentApprovingId!=this.form.approver_id?(n(),u("div",Ee,[this.form.status<=1?(n(),g(b,{key:0,onClick:m.updateApproverForm,text:"Update Approver"},null,8,["onClick"])):f("",!0)])):f("",!0),r(R,{onClick:m.closeModal},null,8,["onClick"])])],32)])]),_:1},8,["active","sideTitle","badgeColor","onSubmit","onClose"])}const Le=S(me,[["render",De],["__scopeId","data-v-aefc19a1"]]);const je={mixins:[L],components:{ActionCellRendererApprover:ce,AgGridVue:de,Pagination:le,Card:U,Button:M,Badge:z,Layout:j,Icon:V,SubmitButton:E,CloseButton:P,EditButton:Y,ViewButton:Q,View:Le,InputGroup:G,Loading:D},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 & time",filter:!0,floatingFilter:!0,flex:2},{field:"in/out",filter:!0,floatingFilter:!0,flex:2},{field:"date created",filter:!0,floatingFilter:!0},{headerName:"Status",field:"status",filter:!0,floatingFilter:!0,valueGetter:e=>{switch(e.data.status){case 0:return"For Recommendation";case 1:return"For Approval";case 2:return e.data.validated==1?"Validated":e.data.validated==99?"Denied":"For Validation";case 99:return"Denied";default:return""}},cellRenderer:e=>{switch(e.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"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"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":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/time-adjustment"},{text:"Time Adjustment Application",active:!0}],statistics:[{title:"Pending",count:[{total:0}],bg:"bg-primary-500",text:"text-primary-500",percent:"1.67% ",icon:"heroicons-outline:clock"},{title:"Approved",count:[{total:0}],bg:"bg-info-500",text:"text-info-500",percent:"25.67% ",icon:"heroicons-outline:menu-alt-1"},{title:"Denied",count:[{total:0}],bg:"bg-warning-500",text:"text-warning-500",percent:"8.67%",icon:"heroicons-outline:chart-pie"}],items:[],statuses:[{count:1,status:"Pending"},{count:2,status:"Approved"},{count:1,status:"Denied"}],columns:[{label:"#",field:"#"},{label:"Employee ID",field:"employee_id"},{label:"Name",field:"fullname"},{label:"Date",field:"date"},{label:"Time",field:"time"},{label:"IN / OUT",field:"in_out"},{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:"status",sortType:"asc"},state:{isLoading:!1,isEdit:!1,isDeleting:!1}}},watch:{serverOptions:{handler(){console.log(`perPage: ${this.serverOptions.rowsPerPage}`),this.fetchRecords()},deep:!0},searchQuery:N.debounce(function(){this.fetchRecords()},800)},computed:{perPage:function(){return this.serverOptions.rowsPerPage}},methods:{formatTime(e){let[t,s]=e.split(":");t=parseInt(t);const c=t>=12;return t=t%12||12,`${t}:${s} ${c?"PM":"AM"}`},async fetchRecords(){this.state.isLoading=!0,await B.fetchRecords({keyword:this.searchQuery,page:this.serverOptions.page,per_page:this.serverOptions.rowsPerPage,sortBy:this.serverOptions.sortBy,sortType:this.serverOptions.sortType}).then(e=>{console.log("response");let t=e.data;this.items=t.map((s,c)=>(this.statistics[0].count[0].total=s.pending,this.statistics[1].count[0].total=s.approved,this.statistics[2].count[0].total=s.denied,{...s,"#":c+1,"employee id":s.employee_id,name:s.employee.firstname+" "+s.employee.lastname,"date & time":this.$formatDate(s.date)+" - "+this.$formatTime(s.time),"in/out":s.in_out==1?"OUT":"IN","date created":this.$formatDate(s.created_at),status:s.status}))}).finally(()=>{this.state.isLoading=!1})},reload(){this.$emit("reload")},handlePageChange(e){console.log(e),console.log(this.serverOptions.page),this.serverOptions.page!=e&&(this.serverOptions.page=e)},handlePerPageChange(e){this.serverOptions.page=1,this.serverOptions.rowsPerPage=e},onSortChange(e){console.log(e),e[0].type!="none"&&(this.serverOptions.sortBy=e[0].field,this.serverOptions.sortType=e[0].type)},async deleteRecord(e){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(t=>{console.log(t.value),t.value&&(this.state.isDeleting=!0,W.remove(e).then(s=>{s.status==200&&(this.$swal.fire({title:"Yaaay!",text:"Record has been deleted successfully.",type:"success",icon:"success",timer:2e3}),this.fetchRecords())}))}).catch(t=>{t.response&&t.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})},viewRecord(e){console.log(e),this.$refs.view.resetForm(),this.$refs.view.loadRecord(e),this.$refs.view.state.showModal=!0},handlePageChange(e){console.log(e),console.log(this.serverOptions.page),this.serverOptions.page!=e&&(this.serverOptions.page=e)},handlePerPageChange(e){this.serverOptions.page=1,this.serverOptions.rowsPerPage=e}},mounted(){this.fetchRecords()}},Ue={class:"space-y-4 mt-4"},Me={class:"flex items-center justify-between mb-4"},ze={class:"text-lg font-semibold"},Ge={class:"grid grid-cols-1 gap-4 pb-4 md:grid-cols-3"},Ne={class:I("h-14 w-14 flex items-center justify-center rounded-md text-4xl mb-4 shadow-lg bg-white")},qe={class:"text-md font-semibold text-slate-700 dark:text-white mb-2"},We={class:"flex justify-center gap-4"},Ye={class:"text-xs font-medium text-slate-500 dark:text-white mb-1"},Qe={class:"text-2xl text-slate-900 dark:text-white font-semibold"},He={class:"ag-grid-toolbar flex items-center justify-between px-4 py-2 bg-gray-100 border-b rounded-t-xl border-gray-200"},$e={class:"flex items-center gap-4"},Je={class:"relative z-10 flex items-center transition-colors duration-300 group-hover:text-white"};function Ke(e,t,s,c,o,m){const v=a("Icon"),_=a("Button"),l=a("ag-grid-vue"),x=a("Card"),A=a("Loading"),k=a("View"),b=a("Layout");return n(),g(b,{breadcrumbs:o.breadcrumbs},{default:p(()=>[i("div",Ue,[r(x,{title:"Time Adjustment Approval"},{default:p(()=>[i("div",Me,[i("h6",ze,h(e.title),1)]),i("div",Ge,[(n(!0),u(T,null,O(o.statistics,(y,R)=>(n(),u("div",{key:R,class:I([y.bg,"flex flex-col items-center rounded-lg p-2 bg-opacity-[0.15] dark:bg-opacity-50 text-center shadow-md hover:shadow-xl transition-transform transform hover:scale-101 w-full"])},[i("div",Ne,[r(v,{icon:y.icon,class:I(["text-2xl",y.text])},null,8,["icon","class"])]),i("div",qe,h(y.title),1),i("div",We,[(n(!0),u(T,null,O(y.count,w=>(n(),u("div",{key:w.type},[i("div",Ye,h(w.type),1),i("div",Qe,h(w.total),1)]))),128))])],2))),128))]),i("div",He,[t[2]||(t[2]=i("div",{class:"flex items-center justify-center gap-4 text-gray-900"}," Time Adjustment Approval List ",-1)),i("div",$e,[r(_,{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:e.exportToCsv},{default:p(()=>[t[1]||(t[1]=i("span",{class:"absolute inset-0 bg-green-500 transition-transform duration-300 transform -translate-x-full group-hover:translate-x-0"},null,-1)),i("span",Je,[r(v,{icon:"mdi:microsoft-excel",class:"text-2xl mr-2"}),t[0]||(t[0]=C(" Export to CSV "))])]),_:1},8,["onClick"])])]),r(l,{ref:"agGrid",rowData:o.items,columnDefs:o.colDefs,style:{height:"500px"},class:"ag-theme-quartz",pagination:!0,paginationPageSize:o.paginationPageSize,paginationPageSizeSelector:o.paginationPageSizeSelector,onGridReady:e.onGridReady},null,8,["rowData","columnDefs","paginationPageSize","paginationPageSizeSelector","onGridReady"])]),_:1}),o.state.isLoading?(n(),g(A,{key:0,text:"Fetching records"})):f("",!0),r(k,{ref:"view",onReload:m.fetchRecords},null,8,["onReload"])])]),_:1},8,["breadcrumbs"])}const ro=S(je,[["render",Ke],["__scopeId","data-v-6cd90ce3"]]);export{ro as default};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings