File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/index.cfe1e212.js
Back
import{_ as D,r as l,o as n,c as v,w as m,j as _,d as r,b as h,t as y,k as I,e as i,m as E,F as V,f as k,h as A}from"./index.d09cba45.js";import{E as L}from"./EmployeeMonthlyScheduleService.7840ec76.js";import{w as $,L as T}from"./index.f5fec97e.js";import{B as U}from"./index.b36b35c2.js";import{C as M}from"./CloseButton.ad974e55.js";import{C as z}from"./CreateButton.cdb3dab6.js";import{D as q}from"./DeleteButton.f830e860.js";/* empty css */import{S as O}from"./SubmitButton.8e326bc2.js";import{V as G}from"./ViewButton.6bb26f2f.js";import{I as j}from"./index.7c87e136.js";import"./jspdf.es.min.41d1f521.js";/* empty css */import{B as N}from"./index.84e315d2.js";/* empty css */import"./vue-cleave.min.3d6c67b7.js";import{V as R}from"./array.41230547.js";import{L as P}from"./Loading.10020070.js";import"./vue-quill.snow.4fe86b91.js";/* empty css */import{I as H}from"./index.44224e48.js";import{F as Y}from"./index.97ec51ba.js";import{F as Q}from"./index.55a245df.js";import{D as W}from"./DenyButton.d9171afd.js";import{U as J}from"./UpdateButton.6d6860a3.js";import{A as K}from"./ApproverService.76f54c21.js";import{D as X}from"./DepartmentService.8eb06cda.js";import{E as Z}from"./EmployeeService.b43eb678.js";import{M as F}from"./MonthlyScheduleApprovalService.25489501.js";import{S as ee}from"./ScheduleShiftService.f12b62d0.js";import{M as te}from"./Multiselect.a5040e09.js";import{l as oe}from"./lodash.8c8ef874.js";import{P as se}from"./index.bb81dc90.js";import{h as re}from"./meeting-office.7e6e2274.js";import{C as ie}from"./index.2ecb62fe.js";import{A as ae}from"./main.esm.9a8e7f98.js";import{A as ne}from"./ActionCellRendererApprover.d4cfb1a4.js";import{F as le}from"./index.1a164470.js";import"./logo-black.7c15feb3.js";import"./logo-white.b04c5a89.js";import"./transition.979a347a.js";import"./es.string.replace.f405e891.js";import"./Loading.vue_vue_type_style_index_0_scoped_cbded5a2_lang.0b8030ab.js";import"./index.a8395b59.js";import"./index.43f4db3f.js";const de={components:{FormModal:Q,FormGroup:Y,SubmitButton:O,UpdateButton:J,CloseButton:M,DenyButton:W,Loading:P,Multiselect:te},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:"",recommending:"",approving:"",departmentOptions:[],employeeOptions:[],scheduleOptions:[],currentRecommendingId:"",currentApprovingId:"",recommendingOptions:[],approvingOptions:[],status:[],form:{department:[],entries:[{employee:[],schedule_id:"",date_from:"",date_to:""}],recommending_id:"",approver_id:""},errors:{},state:{isEdit:!1,isSaving:!1,isLoading:!1,isEmployeeLoading:!1}}},methods:{async loadRecord(t){if(console.log("full data",t),this.resetForm(),this.state.isEdit=!0,this.form=t,this.form.department=t.department_ids,this.currentRecommendingId=t.recommending?t.recommending[0].employee_id:"",this.currentApprovingId=t.approving?t.approving[0].employee_id:"",console.log(this.currentRecommendingId),console.log(this.currentApprovingId),this.recommending=t.recommending?t.recommending[0].firstname+" "+t.recommending[0].lastname:"",this.approving=t.approving?t.approving[0].firstname+" "+t.approving[0].lastname:"",console.log(this.recommending),console.log(this.approving),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){console.log(this.currentClassificationId),console.log("requested",t);try{const e=await K.fetchEmployeeApprover(t.requested_by);if(e.status===200)this.recommendingOptions=e.data.map(o=>({value:o.employee_id,label:o.firstname+" "+o.lastname})),this.approvingOptions=e.data.filter(o=>o.classification_id>=3).map(o=>({value:o.employee_id,label:o.firstname+" "+o.lastname}));else throw new Error("Failed to fetch employee approvers")}catch(e){e.response?console.error("Error fetching employee approvers:",e.response):console.error("An unexpected error occurred:",e.message)}}},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};console.log(e),await LeaveApproval.updateApprover(t,e).then(o=>{o.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(o=>{o.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:o.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3})})},resetForm(){this.state.isEdit=!1,this.form={department:[],entries:[{employee:[],schedule_id:"",date_from:"",date_to:""}],recommending_id:this.form.recommending_id,approver_id:this.form.approver_id}},addEntry(){this.form.entries.push({employee:[],schedule_id:"",date_from:"",date_to:""})},removeEntry(t){this.form.entries.splice(t,1)},async fetchDepartmentRecords(){await X.fetchRecords().then(t=>{t.status===200&&(this.departmentOptions=t.data.data.map(e=>({value:e.id,label:e.name})))}).catch(t=>{console.log(t)})},async fetchEmployeeRecords(){this.state.isEmployeeLoading=!0,await Z.fetchEmployeeBaseOnDepartment(this.form.department).then(t=>{t.status===200&&(this.employeeOptions=t.data.map(e=>({value:e.employee_id,label:`${e.employee_id} - ${e.firstname} ${e.lastname}`}))),this.state.isEmployeeLoading=!1}).catch(t=>{console.log(t)})},async fetchScheduleShiftRecords(){await ee.fetchRecords().then(t=>{t.status===200&&(this.scheduleOptions=t.data.data.map(e=>({value:e.id,label:e.name})))}).catch(t=>{console.log(t)})},async saveRecord(){this.state.isSaving=!0,await F.update(this.form.id,this.status).then(e=>{e.status===201&&(this.$swal.fire({title:"Great!",text:`Record successfully ${this.state.isEdit?"updated":"saved"}.`,icon:"success",timer:2e3}),this.closeModal(),this.resetForm(),this.reload())}).catch(e=>{this.$swal.fire({title:"Oops! Something is wrong.",text:e.response.data.message||"Please contact the system administrator.",icon:"error",timer:2e3})}).finally(()=>{this.state.isSaving=!1})},closeModal(){this.state.showModal=!1},reload(){return this.state.isSaving=!1,this.state.showModal=!1,this.$emit("reload")},async submitForm(){this.form.approver_id==this.currentEmployeeId?this.status={status:2}:this.form.recommending_id==this.currentEmployeeId&&(this.status={status:1});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 R){const e={};t.inner.forEach(o=>{e[o.path]=o.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 R){const e={};t.inner.forEach(o=>{e[o.path]=o.message}),this.errors=e}}},async denyForm(){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 R){const e={};t.inner.forEach(o=>{e[o.path]=o.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 denial"},showCancelButton:!0,confirmButtonColor:"#34c38f",cancelButtonColor:"#f46a6a",confirmButtonText:"Submit",cancelButtonText:"Cancel",preConfirm:o=>o||(this.$swal.showValidationMessage("Reason is required!"),!1)});e.isConfirmed&&e.value&&(console.log("Reason for denial:",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 R){const o={};e.inner.forEach(p=>{o[p.path]=p.message}),this.errors=o}}},async updateRecordByHR(t,e=null){this.state.isSaving=!0;const o=this.form.id;let s={status:t,reason:e,meal:this.form.meal,meal_amount:this.form.meal_amount,transportation:this.form.transportation,transportation_amount:this.form.transportation_amount};await F.hrValidation(o,s).then(d=>{d.status==201?(console.log("response"),console.log(d),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(d=>{d.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:d.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})}},watch:{"form.department":{handler:"fetchEmployeeRecords",immediate:!0}},mounted(){this.fetchDepartmentRecords(),this.fetchScheduleShiftRecords()}},ce={class:"text-slate-600 dark:text-slate-400 text-sm font-normal"},me={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"},pe={class:"text-red-600 dark:text-red-400 text-sm"},ue={class:"grid grid-cols-2 gap-2"},fe={class:"grid grid-cols-2 gap-2"},he={key:1},ge={class:"grid grid-cols-12 justify-center items-center"},ve={class:"col-span-8 flex justify-between items-center gap-4"},ye={class:"col-span-6 flex justify-center items-center gap-4"},_e={class:"font-bold"},xe={class:"col-span-6 flex justify-center items-center gap-4"},be={class:"font-bold"},we={key:2},Re={class:"grid grid-cols-12 gap-4"},Ce={class:"col-span-6"},Be={class:"relative"},Se={class:"col-span-6"},Ee={class:"relative"},Ve={class:"flex gap-1 justify-end pt-8"};function ke(t,e,o,p,s,d){const x=l("Loading"),g=l("Multiselect"),u=l("FormGroup"),b=l("flat-pickr"),w=l("UpdateButton"),C=l("CloseButton"),B=l("FormModal");return n(),v(B,{title:"View Work Arrangement",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:d.closeModal,themeClass:"bg-gray-800",sizeClass:"lg:w-3/4"},{default:m(()=>[s.state.isEdit&&s.state.isLoading?(n(),v(x,{key:0,text:"Fetching record"})):_("",!0),r("div",ce,[this.form.status==2&&this.form.validated==99?(n(),h("div",me,[e[6]||(e[6]=r("h3",{class:"text-red-700 dark:text-red-300 font-semibold mb-1 text-sm"}," Denied Reason : ",-1)),r("p",pe,y(this.form.deferred_reason),1)])):_("",!0),r("form",{onSubmit:e[5]||(e[5]=I((...a)=>t.confirmSubmit&&t.confirmSubmit(...a),["prevent"])),class:"space-y-4"},[s.state.isSaving?(n(),v(x,{key:0,text:"Saving record"})):_("",!0),i(u,{label:"Department",isRequired:!0},{default:m(()=>[i(g,{placeholder:"",modelValue:s.form.department,"onUpdate:modelValue":e[0]||(e[0]=a=>s.form.department=a),error:s.errors.department,options:s.departmentOptions,mode:"tags",searchable:!0},null,8,["modelValue","error","options"])]),_:1}),(n(!0),h(V,null,E(s.form.entries,(a,c)=>(n(),h("div",{key:c,class:"border p-4 mb-4 rounded"},[r("div",ue,[i(u,{label:"Employee",isRequired:!0},{default:m(()=>[i(g,{placeholder:"",modelValue:a.employee,"onUpdate:modelValue":f=>a.employee=f,error:s.errors[`employee_${c}`],options:s.employeeOptions,mode:"tags",searchable:!0,loading:s.state.isEmployeeLoading},null,8,["modelValue","onUpdate:modelValue","error","options","loading"])]),_:2},1024),i(u,{label:"Employee Schedule",isRequired:!0},{default:m(()=>[i(g,{type:"text",placeholder:"",modelValue:a.schedule_id,"onUpdate:modelValue":f=>a.schedule_id=f,error:s.errors[`schedule_id_${c}`],options:s.scheduleOptions,searchable:!0},null,8,["modelValue","onUpdate:modelValue","error","options"])]),_:2},1024)]),r("div",fe,[i(u,{label:"Date From",isRequired:!0},{default:m(()=>[i(b,{type:"text",placeholder:"",modelValue:a.date_from,"onUpdate:modelValue":f=>a.date_from=f,error:s.errors[`date_from_${c}`],class:"form-control"},null,8,["modelValue","onUpdate:modelValue","error"])]),_:2},1024),i(u,{label:"Date To"},{default:m(()=>[i(b,{type:"text",placeholder:"",modelValue:a.date_to,"onUpdate:modelValue":f=>a.date_to=f,error:s.errors[`date_to_${c}`],class:"form-control"},null,8,["modelValue","onUpdate:modelValue","error"])]),_:2},1024)])]))),128)),s.currentClassificationId<=2?(n(),h("div",he,[r("div",ge,[r("div",ve,[r("div",ye,[e[7]||(e[7]=k(" Recommending: ")),r("p",_e,y(s.recommending),1)]),r("div",xe,[e[8]||(e[8]=k(" Approving: ")),r("p",be,y(s.approving),1)])])])])):(n(),h("div",we,[r("div",Re,[r("div",Ce,[i(u,{label:"Recommending"},{default:m(()=>[r("div",Be,[i(g,{modelValue:s.form.recommending_id,"onUpdate:modelValue":e[1]||(e[1]=a=>s.form.recommending_id=a),"close-on-select":!0,searchable:!0,id:"recommending_id",options:s.recommendingOptions},null,8,["modelValue","options"])])]),_:1})]),r("div",Se,[i(u,{label:"Approver"},{default:m(()=>[r("div",Ee,[i(g,{modelValue:s.form.approver_id,"onUpdate:modelValue":e[2]||(e[2]=a=>s.form.approver_id=a),"close-on-select":!0,searchable:!0,id:"approver_id",options:s.approvingOptions},null,8,["modelValue","options"])])]),_:1})])])])),r("div",Ve,[this.form.status===2&&this.form.validated==0?(n(),v(w,{key:0,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[3]||(e[3]=a=>d.ReceiveByHr(1)),text:"Receive"})):_("",!0),this.form.status===2&&this.form.validated==0?(n(),v(w,{key:1,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[4]||(e[4]=a=>d.ReceiveByHr(99)),text:"Deny"})):_("",!0),i(C,{onClick:d.closeModal},null,8,["onClick"])])],32)])]),_:1},8,["active","sideTitle","badgeColor","onSubmit","onClose"])}const Ae=D(de,[["render",ke]]);const Fe={mixins:[$],setup(){},components:{FilterTimekeeping:le,ActionCellRendererApprover:ne,AgGridVue:ae,Badge:N,Layout:T,CreateButton:z,Loading:P,InputGroup:H,SubmitButton:O,CloseButton:M,ViewButton:G,DeleteButton:q,Button:U,Form:Ae,Pagination:se,Card:ie,Icon:j},data(){return{paginationPageSize:10,paginationPageSizeSelector:[10,25,50],colDefs:[{field:"#",flex:0},{field:"department name",filter:!0,floatingFilter:!0,flex:2},{field:"requested name",filter:!0,floatingFilter:!0,flex:2},{field:"date created",filter:!0,floatingFilter:!0},{headerName:"Status",field:"status",filter:!0,floatingFilter:!0,cellRenderer:t=>{const e=t.value,o=t.data.validated;return e===0?'<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>':e===1?'<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>':o===1&&e===2?'<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>':o===99&&e===2?'<div class="inline-block rounded-full text-xs capitalize whitespace-nowrap text-center py-1 bg-gray-100 text-orange-600 px-4">Denied </div>':e===2?'<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>':e===99?'<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>':""}},{headerName:"Actions",cellRenderer:"ActionCellRendererApprover",flex:1,cellRendererParams:{context:{componentParent:this}}}],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"}],scheduleData:[],headerImage:re,breadcrumbs:[{text:"Home",href:"/"},{text:"Employee Management",href:"/employee-management/employee-schedule"},{text:"Employee Schedule",active:!0}],perPageOptions:[{value:"10",label:"10"},{value:"50",label:"50"},{value:"100",label:"100"}],state:{isLoading:!1,isMounted:!1,showModal:!1,isDeleting:!1},items:[],totalItems:0,error:[],searchQuery:"",serverOptions:{page:1,rowsPerPage:10,sortBy:"created_at",sortType:"asc"}}},watch:{serverOptions:{handler(){console.log(`perPage: ${this.serverOptions.rowsPerPage}`),this.fetchRecords()},deep:!0},searchQuery:oe.debounce(function(){this.fetchRecords()},800)},computed:{perPage:function(){return this.serverOptions.rowsPerPage}},methods:{applyFilters(t){this.fetchRecordList(t)},formatTime(t){let[e,o]=t.split(":");e=parseInt(e);const p=e>=12;return e=e%12||12,`${e}:${o} ${p?"PM":"AM"}`},async fetchRecordList(t={}){this.state.isLoading=!0,this.state.isMounted=!1,await L.fetchRecordList({dealership:this.$store.userSettings.activeDealership,...t}).then(e=>{console.log("response",e),this.scheduleData=e.data.data.map((o,p)=>({...o,"#":p+1,"department name":o.department_name,"date created":this.$formatDate(o.created_at),status:o.status,"requested name":o.requested_name}))}).finally(()=>{this.state.isLoading=!1,this.state.isMounted=!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},onSortChange(t){console.log(t),t[0].type!="none"&&(this.serverOptions.sortBy=t[0].field,this.serverOptions.sortType=t[0].type)},viewRecord(t){this.$refs.form.resetForm(),this.$refs.form.loadRecord(t),this.$refs.form.state.showModal=!0},closeModal(){this.state.showModal=!1,this.resetData(),this.fetchRecordList()},resetData(){this.state={isLoading:!1,isMounted:!1,isResetError:!1,isSubmitted:!1,showModal:!1},this.categoryData={category_code:"",category_desc:""},this.error=[]}},mounted(){this.fetchRecordList()}},De={class:"space-y-4 mt-4"},Me={class:"flex-1 md:mb-0 mb-3"},Oe={class:"grid grid-cols-1 gap-4 pb-4 md:grid-cols-3"},Pe={class:A("h-14 w-14 flex items-center justify-center rounded-md text-4xl mb-4 shadow-lg bg-white")},Ie={class:"text-md font-semibold text-slate-700 dark:text-white mb-2"},Le={class:"flex justify-center gap-4"},$e={class:"text-xs font-medium text-slate-500 dark:text-white mb-1"},Te={class:"text-2xl text-slate-900 dark:text-white font-semibold"},Ue={class:"relative"},ze={class:"ag-grid-toolbar flex items-center justify-between px-4 py-2 bg-gray-100 border-b rounded-t-xl border-gray-200"},qe={class:"flex items-center gap-4"},Ge={class:"relative z-10 flex items-center transition-colors duration-300 group-hover:text-white"};function je(t,e,o,p,s,d){const x=l("Icon"),g=l("FilterTimekeeping"),u=l("Button"),b=l("ag-grid-vue"),w=l("Card"),C=l("Loading"),B=l("Form"),a=l("Layout");return n(),v(a,{breadcrumbs:s.breadcrumbs},{default:m(()=>[r("div",De,[i(w,{title:"Employee Work Arrangement"},{default:m(()=>[r("h6",Me,y(t.title),1),r("div",Oe,[(n(!0),h(V,null,E(s.statistics,(c,f)=>(n(),h("div",{key:f,class:A([c.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"])},[r("div",Pe,[i(x,{icon:c.icon,class:A(["text-2xl",c.text])},null,8,["icon","class"])]),r("div",Ie,y(c.title),1),r("div",Le,[(n(!0),h(V,null,E(c.count,S=>(n(),h("div",{key:S.type},[r("div",$e,y(S.type),1),r("div",Te,y(S.total),1)]))),128))])],2))),128))]),r("div",Ue,[r("div",ze,[e[3]||(e[3]=r("div",{class:"flex items-center justify-center gap-4 text-gray-900"}," Employee schedule lists ",-1)),r("div",qe,[i(g,{onFilterChanged:d.applyFilters},null,8,["onFilterChanged"]),i(u,{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:t.exportToCsv},{default:m(()=>[e[2]||(e[2]=r("span",{class:"absolute inset-0 bg-green-500 transition-transform duration-300 transform -translate-x-full group-hover:translate-x-0"},null,-1)),r("span",Ge,[i(x,{icon:"mdi:microsoft-excel",class:"text-2xl mr-2"}),e[1]||(e[1]=k(" Export to CSV "))])]),_:1},8,["onClick"])])])]),i(b,{ref:"agGrid",rowData:s.scheduleData,columnDefs:s.colDefs,style:{height:"500px"},class:"ag-theme-quartz",pagination:!0,paginationPageSize:s.paginationPageSize,paginationPageSizeSelector:s.paginationPageSizeSelector,onGridReady:t.onGridReady},null,8,["rowData","columnDefs","paginationPageSize","paginationPageSizeSelector","onGridReady"])]),_:1}),s.state.isLoading?(n(),v(C,{key:0,text:"Fetching records"})):_("",!0),i(B,{onCloseModal:e[0]||(e[0]=c=>s.state.showModal=!1),ref:"form",onReload:t.fetchRecords},null,8,["onReload"])])]),_:1},8,["breadcrumbs"])}const It=D(Fe,[["render",je],["__scopeId","data-v-19a77b0e"]]);export{It as default};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings