File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/view.301c446d.js
Back
import{F as M}from"./index.87425b49.js";import{S as P}from"./SubmitButton.f654365f.js";import{U as N}from"./UpdateButton.07cc80b7.js";import{D as k}from"./DenyButton.0cc61df4.js";import{C as q}from"./CloseButton.6961055e.js";import{F as H}from"./index.a76a1867.js";import{T as j}from"./index.f10fd84a.js";import{T as G}from"./index.9a705aa9.js";import{L as J}from"./Loading.311fadfe.js";/* empty css */import{B as z}from"./index.bdcc6190.js";import{M as Y}from"./Multiselect.a8e1703e.js";import{R as Q}from"./index.2d85ad15.js";import{F as K}from"./index.03e5c851.js";import"./index.c6b20525.js";import{a as u,_ as W,r as p,o as m,c as b,w as n,j as y,d as i,k as X,e as r,b as h,m as I,F as A,t as v,f as E}from"./index.15cec131.js";import{T as Z}from"./index.1cc0a20b.js";import"./vue-cleave.min.64bb37b7.js";import{V as O}from"./array.8551fbb7.js";import{A as L}from"./ApproverService.98a90a32.js";import{B as $}from"./BenefitsTypeService.de6e67c8.js";import{C as ee}from"./CompanyService.25d90d2f.js";import{E as w}from"./EmployeeService.402d7e1b.js";import{J as te}from"./JobTitleService.804faa8a.js";import{S as oe}from"./SupportingDocumentService.b0db4b8c.js";import{U as se}from"./UnitService.dd3e3198.js";const g="https://staging-ahg-hr-api.autohub.ph/api/v1/paf",re={fetchRecords(t={}){return u.get(`${g}`,{params:t})},fetchRecord(t){return u.get(`${g}/${t}`)},async create(t){return u.post(`${g}`,t)},async update(t){return u.post(`${g}/update`,t)},async remove(t){return u.delete(`${g}/${t}`)},async updateStatus(t,e){return u.put(`${g}/${t}/update-paf-status`,e)}},V="https://staging-ahg-hr-api.autohub.ph/api/v1/type-of-movement",ie={fetchRecords(t={}){return u.get(`${V}`,{params:t})},fetchRecord(t){return u.get(`${V}/${t}`)},async create(t){return u.post(`${V}`,t)},async update(t,e){return u.put(`${V}/${t}`,e)},async remove(t){return u.delete(`${V}/${t}`)}},le={components:{DenyButton:k,FormModal:M,FormGroup:H,TextInput:j,Textarea:G,SubmitButton:P,CloseButton:q,UpdateButton:N,Loading:J,Multiselect:Y,Button:z,Radio:Q,FileInput:K,TextArea:Z},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:"",companyOption:[],typeOfMovementOption:[],jobTitleOption:[],unitOptions:[],benefitsOption:[],salaryGradeOption:[],employeeOption:[],supportingDocumentPAFOption:[],requestor:"",recommender:"",endorser:"",approver_name:"",recommended_by:"",approved_by:"",form:{company_id:"",employee_id:"",employment_status_id:"",position_id:"",unit_id:"",jg_step:"",present_salary:"",allowance:"",nature_of_request_id:"",position:"",unit:"",salary_increase_to:"",salary_increment:"",honorarium:"",peso:"",incentive:"",commission:"",benefitsArr:[],supporting_documentsArr:[],effectivity:"",inclusive_period:"",immediate_head:"",justification_request:"",requested_by:this.$store.userSettings.getActiveUser.employee_id,concurred_by:"",endorsed_by:"",employment_status_name:"",position_name:"",unit_name:"",status:this.currentClassificationId==3?1:0},immediateHeadLoadData:{position_name:""},errors:{},state:{isEdit:!1,isSaving:!1,isLoading:!1,isEmployeeLoading:!1,isCompanyLoading:!1,isNatureLoading:!1,isPositionLoading:!1,isUnitLoading:!1,isSupportingDocumentLoading:!1,isBenefitsLoading:!1}}},methods:{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 O){const e={};t.inner.forEach(a=>{e[a.path]=a.message}),this.errors=e}}},async fetchApprover(){try{const t=await L.fetchApproverRecords();t.status===200&&t.data.map(e=>{let a=this.currentClassificationId;a==2&&e.classification_id==3?(this.recommended_by=e.employee_id,this.recommender=e.firstname+" "+e.lastname):a==2&&e.classification_id==4&&(this.form.recommended_by=e.employee_id,this.recommender=e.firstname+" "+e.lastname),e.classification_id==4&&(this.approved_by=e.employee_id,this.approver_name=e.firstname+" "+e.lastname)})}catch(t){console.log(t)}finally{this.state.isCompanyLoading=!1}},handleMainImageUpload(t,e){const a=t.target.files;this.form.supporting_documentsArr[e].files=[];for(let _=0;_<a.length;_++){const o=a[_];this.form.supporting_documentsArr[e].files.push(o)}},async fetchCompany(){try{const t=await ee.fetchRecords();t.status===200&&(this.companyOption=t.data.data.map(e=>({value:e.id,label:e.code+" - "+e.name})))}catch{}finally{this.state.isLoading=!1}},async fetchBenefits(){this.state.isBenefitsLoading=!0;try{const t=await $.fetchRecords();t.status===200&&(this.benefitsOption=t.data.data.map(e=>({value:e.id,label:e.name})))}catch{}finally{this.state.isBenefitsLoading=!1}},async fetchEmployee(){this.state.isEmployeeLoading=!0;try{const t=await w.fetchRecords();t.status===200&&(this.employeeOption=t.data.data.map(e=>({value:e.employee_id,label:e.employee_id+" - "+e.firstname+" "+e.lastname})))}catch{}finally{this.state.isEmployeeLoading=!1}},async fetchImmediateHead(){await L.fetchEmployeeApprover(this.form.recommended_by).then(t=>{if(t.status==200)this.employeeHeadOption=t.data.filter(e=>e.classification_id>=3).map((e,a)=>({value:e.employee_id,label:e.firstname+" "+e.lastname}));else throw new Error("Failed to fetch employee approvers")})},async fetchEmployeeData(t){this.state.isLoading=!0;try{const e=await w.fetchRecord(t);e.status==200&&(console.log(e.data.salary_and_wages?e.data.salary_and_wages:"try"),this.form.employment_status_id=e.data.employment_status_id,this.form.position_id=e.data.position_id,this.form.employment_status_name=e.data.employment_type?e.data.employment_type.name:"",this.form.position_name=e.data.position?e.data.position.name:"",this.form.date_hired=e.data.date_hired)}catch(e){console.log(e)}finally{this.state.isLoading=!1}},async fetchEmployeeHeadData(t){try{const e=await w.fetchRecord(t);e.status===200&&(this.form.immediate_head=e.data.employee_id,this.immediateHeadLoadData.position=e.data.position.name)}catch{}finally{this.state.isLoading=!1}},async fetchTypeOfMovement(){this.state.isNatureLoading=!0;try{const t=await ie.fetchRecords();t.status==200&&(this.typeOfMovementOption=t.data.data.map(e=>({value:e.id,label:e.name})))}catch{}finally{this.state.isNatureLoading=!1}},async fetchJobTitle(){this.state.isPositionLoading=!0;try{const t=await te.fetchRecords();t.status==200&&(this.jobTitleOption=t.data.data.map(e=>({value:e.id,label:e.name})))}catch{}finally{this.state.isPositionLoading=!1}},async fetchUnit(){this.state.isUnitLoading=!0;try{const t=await se.fetchRecords();t.status==200&&(this.unitOptions=t.data.data.map(e=>({value:e.id,label:e.name})))}catch{}finally{this.state.isUnitLoading=!1}},async fetchSupportingDocument(){this.state.isSupportingDocumentLoading=!0,await oe.fetchRecords().then(t=>{t.status==200&&(this.supportingDocumentPAFOption=t.data.data.filter(e=>e.plantilla==null).filter(e=>e.name=="PAF").map(e=>({value:e.id,label:e.module_name})))}).catch(t=>{console.log(t)}).finally(()=>{this.state.isSupportingDocumentLoading=!1})},closeModal(){this.state.showModal=!1},resetForm(){this.state.isEdit=!1,this.form={company_id:"",employee_id:"",employment_status_id:"",position_id:"",unit_id:"",jg_step:"",present_salary:"",allowance:"",nature_of_request_id:"",position:"",unit:"",salary_increase_to:"",salary_increment:"",honorarium:"",peso:"",incentive:"",commission:"",benefitsArr:[],supporting_documentsArr:[],effectivity:"",inclusive_period:"",immediate_head:"",justification_request:"",requested_by:this.$store.userSettings.getActiveUser.employee_id,recommended_by:"",concurred_by:"",endorsed_by:"",approved_by:"",status:this.currentClassificationId==3?1:0}},reload(){return this.$emit("reload")},async submitForm(){try{this.state.isSaving=!0,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(t=>{t.value&&this.saveRecord()})}catch(t){if(t instanceof O){const e={};t.inner.forEach(a=>{e[a.path]=a.message}),this.errors=e}this.state.isSaving=!1}},async saveRecord(){const t=this.form.id;this.state.isSaving=!1,new FormData;let e=[];this.status?e={status:this.status.status,denied_reason:this.status.denied_reason}:this.form.recommended_by==this.currentEmployeeId?e={status:1}:this.form.endorsed_by==this.currentEmployeeId?e={status:2}:this.form.approved_by==this.currentEmployeeId&&(e={status:3}),await re.updateStatus(t,e).then(a=>{a.status==201?(this.$swal.fire({title:"Great!",text:"Record successfully submitted.",icon:"success",timer:2e3}),this.state.showModal=!1,this.reload()):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3}),this.reload()}).catch(a=>{a.response.status==422?this.$swal.fire({title:"Ooops! something is wrong.",text:a.response.data.message,icon:"warning"}):this.$swal.fire({title:"Ooops! something is wrong.",text:"Please contact system administrator",icon:"error",timer:2e3})})},loadRecord(t){this.resetForm(),this.state.isEdit=!0,this.form=t,console.log(this.form),this.requestor=t.requestor.firstname+" "+t.requestor.lastname,this.recommender=t.recommendor[0]?t.recommendor[0].firstname+" "+t.recommendor[0].lastname:"",this.endorser=t.endorser[0]?t.endorser[0].firstname+" "+t.endorser[0].lastname:"",this.approver_name=t.approver[0]?t.approver[0].firstname+" "+t.approver[0].lastname:"",this.form.benefitsArr=JSON.parse(this.form.benefits||"[]"),this.form.supporting_documentsArr=[];const e=JSON.parse(this.form.supporting_documents||"[]"),a=JSON.parse(this.form.supporting_documents_id||"[]");e.forEach((_,o)=>{this.form.supporting_documentsArr.push({supporting_documents_id:a[o]||"",files:[_]})})},addBenefit(){this.form.benefitsArr.push({benefits_id:"",amount:""})},removeBenefit(t){this.form.benefitsArr.splice(t,1)},addSupportingDocuments(){this.form.supporting_documentsArr.push({supporting_documents_id:"",files:[]})},removeSupportingDocuments(t){this.form.supporting_documentsArr.splice(t,1)},async fetchEmployeeApproverRecord(){await L.fetchEmployeeApprover(data.employee_id).then(t=>{if(t.status==200)this.recommendingOptions=t.data.map((e,a)=>({value:e.employee_id,label:e.firstname+" "+e.lastname})),this.approvingOptions=t.data.filter(e=>e.classification_id>=3).map((e,a)=>({value:e.employee_id,label:e.firstname+" "+e.lastname}));else throw new Error("Failed to fetch employee approvers")})}},watch:{async"form.company_id"(t){console.log(t);try{const e=await w.fetchHrManagerRecord(t);console.log(e.data),e.status===200&&(this.endorser=e.data.full_name,this.form.endorsed_by=e.data.employee_id)}catch(e){console.log(e)}},"form.employee_id":function(t){t&&this.fetchEmployeeData(t)},"form.immediate_head":function(t){t&&this.fetchEmployeeHeadData(t)}},mounted(){this.fetchSupportingDocument(),this.fetchCompany(),this.fetchEmployee(),this.fetchTypeOfMovement(),this.fetchJobTitle(),this.fetchBenefits(),this.fetchUnit(),this.fetchApprover(),this.fetchImmediateHead()}},ne={class:"text-slate-600 dark:text-slate-400 text-sm font-normal shadow-md p-10 px-5"},ae={class:"grid grid-cols-1 gap-2"},de={class:"grid grid-cols-1 gap-2"},me={class:"grid grid-cols-2 gap-4"},ue={class:"grid grid-cols-2 gap-4"},pe={class:"grid grid-cols-2 gap-4"},ce={class:"grid grid-cols-2 gap-4"},fe={class:"grid grid-cols-2 gap-4"},he={class:"grid grid-cols-1 gap-2 mb-4"},_e={class:"grid grid-cols-2 gap-2"},ye={class:"grid grid-cols-1 gap-2 mb-4"},ge={class:"grid grid-cols-2 gap-2 mb-4"},be={class:"grid grid-cols-2 gap-2 mb-4"},ve={class:"grid grid-cols-2 gap-2 mb-4"},Ve={class:"grid grid-cols-1 gap-2 mb-2"},xe={class:"grid grid-cols-1 gap-2 mb-4"},Ee={key:0},we={class:"grid grid-cols-2 gap-2"},Ue={class:"grid grid-cols-2 gap-2"},Ie={class:"grid grid-cols-1 gap-2"},Ae={class:"grid grid-cols-4"},Le={class:"flex justify-center items-center gap-4 mt-4"},Se={class:"font-bold"},Oe={key:0,class:"flex justify-center items-center gap-4"},Ce={class:"font-bold"},Te={class:"flex justify-center items-center gap-4"},Be={class:"font-bold"},Re={class:"flex justify-center items-center gap-4 mb-4"},De={class:"font-bold"},Fe={class:"flex gap-1 justify-end"};function Me(t,e,a,_,o,x){const S=p("Loading"),c=p("Multiselect"),l=p("FormGroup"),d=p("TextInput"),C=p("flat-pickr"),T=p("TextArea"),B=p("UpdateButton"),R=p("DenyButton"),D=p("CloseButton"),F=p("FormModal");return m(),b(F,{title:"View Record",active:o.state.showModal,sideTitle:this.form.status==0?"for recommendation":this.form.status==1?"for endorsement":this.form.status==2?"for approval":this.form.status==3?"approved":this.form.status==99?"denied":"",badgeColor:this.form.status==0?"warning":this.form.status==1||this.form.status==2?"info":this.form.status==3?"success":this.form.status==99?"danger":"",onSubmit:t.confirmSubmit,onClose:x.closeModal,themeClass:"bg-gray-800",sizeClass:"lg:w-3/4"},{default:n(()=>[o.state.isEdit&&o.state.isLoading?(m(),b(S,{key:0,text:"Fetching record"})):y("",!0),i("div",ne,[i("form",{onSubmit:e[25]||(e[25]=X((...s)=>t.onSubmit&&t.onSubmit(...s),["prevent"])),enctype:"multipart/form-data"},[i("div",ae,[r(l,{label:"REQUESTING UNIT/DEALERSHIP/COMPANY",isRequired:!0},{default:n(()=>[r(c,{modelValue:o.form.company_id,"onUpdate:modelValue":e[0]||(e[0]=s=>o.form.company_id=s),"close-on-select":!0,searchable:!0,id:"company_id",options:o.companyOption,loading:o.state.isCompanyLoading,disabled:!0},null,8,["modelValue","options","loading"])]),_:1})]),i("div",de,[r(l,{label:"EMPLOYEE'S PROFILE"})]),i("div",me,[i("div",null,[r(l,{label:"Name: "},{default:n(()=>[r(c,{modelValue:o.form.employee_id,"onUpdate:modelValue":e[1]||(e[1]=s=>o.form.employee_id=s),"close-on-select":!0,searchable:!0,id:"employee_id",options:o.employeeOption,loading:o.state.isEmployeeLoading,disabled:!0},null,8,["modelValue","options","loading"])]),_:1})]),i("div",null,[r(l,{label:"Employment Status"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.employment_status_name,"onUpdate:modelValue":e[2]||(e[2]=s=>o.form.employment_status_name=s),error:o.errors.employment_status_id,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})])]),i("div",ue,[i("div",null,[r(l,{label:"Position Title"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.position_name,"onUpdate:modelValue":e[3]||(e[3]=s=>o.form.position_name=s),error:o.errors.code,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})]),i("div",null,[r(l,{label:"Organizational Unit"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.organization_unit,"onUpdate:modelValue":e[4]||(e[4]=s=>o.form.organization_unit=s),error:o.errors.organization_unit,classInput:"h-[48px]",value:t.dummydata,disabled:""},null,8,["modelValue","error","value"])]),_:1})])]),i("div",pe,[i("div",null,[r(l,{label:"Present Salary"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.present_salary,"onUpdate:modelValue":e[5]||(e[5]=s=>o.form.present_salary=s),error:o.errors.present_salary,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})]),i("div",null,[r(l,{label:"Allowance"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.allowance,"onUpdate:modelValue":e[6]||(e[6]=s=>o.form.allowance=s),error:o.errors.allowance,classInput:"h-[48px]",value:t.dummydata,disabled:""},null,8,["modelValue","error","value"])]),_:1})])]),i("div",ce,[i("div",null,[r(l,{label:"Date: Last salary increase"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.last_salary_date_increase,"onUpdate:modelValue":e[7]||(e[7]=s=>o.form.last_salary_date_increase=s),error:o.errors.last_salary_date_increase,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})]),i("div",null,[r(l,{label:"Last Promotion"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.last_promotion,"onUpdate:modelValue":e[8]||(e[8]=s=>o.form.last_promotion=s),error:o.errors.last_promotion,classInput:"h-[48px]",value:t.dummydata,disabled:""},null,8,["modelValue","error","value"])]),_:1})])]),i("div",fe,[i("div",null,[r(l,{label:"Date Hired"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.date_hired,"onUpdate:modelValue":e[9]||(e[9]=s=>o.form.date_hired=s),error:o.errors.date_hired,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})]),i("div",null,[r(l,{label:"Length of Service"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.service_length,"onUpdate:modelValue":e[10]||(e[10]=s=>o.form.service_length=s),error:o.errors.service_length,classInput:"h-[48px]",value:t.dummydata,disabled:""},null,8,["modelValue","error","value"])]),_:1})])]),i("div",he,[r(l,{label:"NATURE OF REQUEST"},{default:n(()=>[r(c,{modelValue:o.form.nature_of_request_id,"onUpdate:modelValue":e[11]||(e[11]=s=>o.form.nature_of_request_id=s),"close-on-select":!0,searchable:!0,id:"nature_of_request_id",options:o.typeOfMovementOption,loading:o.state.isNatureLoading,disabled:!0},null,8,["modelValue","options","loading"])]),_:1})]),i("div",_e,[r(l,{label:"Position"},{default:n(()=>[r(c,{modelValue:o.form.position,"onUpdate:modelValue":e[12]||(e[12]=s=>o.form.position=s),"close-on-select":!0,searchable:!0,options:o.jobTitleOption,loading:o.state.isPositionLoading,disabled:!0},null,8,["modelValue","options","loading"])]),_:1}),r(l,{label:"Unit"},{default:n(()=>[r(c,{modelValue:o.form.unit,"onUpdate:modelValue":e[13]||(e[13]=s=>o.form.unit=s),"close-on-select":!0,searchable:!0,options:o.unitOptions,loading:o.state.isUnitLoading,disabled:!0},null,8,["modelValue","options","loading"])]),_:1})]),i("div",ye,[r(l,{label:"PROPOSED COMPENSATION/INCENTIVES AND CHARGING (To be accomplished in cosultation with HRD)"})]),i("div",ge,[r(l,{label:"Monthly Salary: Increase To"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.salary_increase_to,"onUpdate:modelValue":e[14]||(e[14]=s=>o.form.salary_increase_to=s),error:o.errors.salary_increase_to,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1}),r(l,{label:"Increment"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.salary_increment,"onUpdate:modelValue":e[15]||(e[15]=s=>o.form.salary_increment=s),error:o.errors.salary_increment,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})]),i("div",be,[r(l,{label:"Honorarium % of current monthly salary"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.honorarium,"onUpdate:modelValue":e[16]||(e[16]=s=>o.form.honorarium=s),error:o.errors.honorarium,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1}),r(l,{label:"P"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.peso,"onUpdate:modelValue":e[17]||(e[17]=s=>o.form.peso=s),error:o.errors.peso,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})]),i("div",ve,[r(l,{label:"Incentive"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.incentive,"onUpdate:modelValue":e[18]||(e[18]=s=>o.form.incentive=s),error:o.errors.incentive,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1}),r(l,{label:"Commission"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.form.commission,"onUpdate:modelValue":e[19]||(e[19]=s=>o.form.commission=s),error:o.errors.commission,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})]),i("div",Ve,[r(l,{label:"Benefits"},{default:n(()=>[(m(!0),h(A,null,I(o.form.benefitsArr,(s,U)=>(m(),h("div",{key:U,class:"grid grid-cols-2 mb-2 gap-2"},[i("div",null,[r(c,{modelValue:s.benefits_id,"onUpdate:modelValue":f=>s.benefits_id=f,"close-on-select":!0,searchable:!0,options:o.benefitsOption,loading:o.state.isBenefitsLoading,disabled:!0},null,8,["modelValue","onUpdate:modelValue","options","loading"])]),i("div",null,[r(d,{type:"text",modelValue:s.amount,"onUpdate:modelValue":f=>s.amount=f,error:o.errors.benefit_amount,classInput:"h-[48px]",placeholder:"Amount",disabled:""},null,8,["modelValue","onUpdate:modelValue","error"])])]))),128))]),_:1})]),i("div",xe,[r(l,{label:"Supporting Documents"},{default:n(()=>[(m(!0),h(A,null,I(o.form.supporting_documentsArr,(s,U)=>(m(),h("div",{key:U,class:"grid grid-cols-2 mb-2 gap-2"},[i("div",null,[r(c,{modelValue:s.supporting_documents_id,"onUpdate:modelValue":f=>s.supporting_documents_id=f,"close-on-select":!0,searchable:!0,options:o.supportingDocumentPAFOption,loading:o.state.isSupportingDocumentLoading,disabled:!0},null,8,["modelValue","onUpdate:modelValue","options","loading"])]),i("div",null,[s.files.length?(m(),h("div",Ee,[i("ul",null,[(m(!0),h(A,null,I(s.files,f=>(m(),h("li",{key:f},v(f),1))),128))])])):y("",!0)])]))),128))]),_:1})]),i("div",we,[r(l,{label:"Effectivity"},{default:n(()=>[r(C,{placeholder:"",type:"date",modelValue:o.form.effectivity,"onUpdate:modelValue":e[20]||(e[20]=s=>o.form.effectivity=s),error:o.errors.effectivity,class:"form-control h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1}),r(l,{label:"Inclusive Period"},{default:n(()=>[r(d,{type:"text",modelValue:o.form.inclusive_period,"onUpdate:modelValue":e[21]||(e[21]=s=>o.form.inclusive_period=s),error:o.errors.inclusive_period,classInput:"h-[48px]",disabled:""},null,8,["modelValue","error"])]),_:1})]),i("div",Ue,[r(l,{label:"Immediate Head: "},{default:n(()=>[r(c,{modelValue:o.form.immediate_head,"onUpdate:modelValue":e[22]||(e[22]=s=>o.form.immediate_head=s),"close-on-select":!0,searchable:!0,id:"immediate_head",options:t.employeeHeadOption,disabled:!0},null,8,["modelValue","options"])]),_:1}),r(l,{label:"Position"},{default:n(()=>[r(d,{placeholder:"",type:"text",modelValue:o.immediateHeadLoadData.position,"onUpdate:modelValue":e[23]||(e[23]=s=>o.immediateHeadLoadData.position=s),classInput:"h-[48px]",disabled:""},null,8,["modelValue"])]),_:1})]),i("div",Ie,[r(l,{label:"JUSTIFICATION FOR THE REQUEST"},{default:n(()=>[r(T,{rows:"4",cols:"15",modelValue:t.justification_request,"onUpdate:modelValue":e[24]||(e[24]=s=>t.justification_request=s),disabled:""},null,8,["modelValue"])]),_:1})]),i("div",Ae,[i("div",Le,[e[26]||(e[26]=E(" Requested By: ")),i("p",Se,v(o.requestor),1)]),o.recommender!=""?(m(),h("div",Oe,[e[27]||(e[27]=E(" Recommender: ")),i("p",Ce,v(o.recommender),1)])):y("",!0),i("div",Te,[e[28]||(e[28]=E(" Endorser: ")),i("p",Be,v(o.endorser),1)]),i("div",Re,[e[29]||(e[29]=E(" Approver: ")),i("p",De,v(o.approver_name),1)])]),i("div",Fe,[this.form.recommended_by==o.currentEmployeeId&&this.form.status==0||this.form.endorsed_by==o.currentEmployeeId&&this.form.status==1||this.form.approved_by==o.currentEmployeeId&&this.form.status==2?(m(),b(B,{key:0,onClick:x.submitForm,text:o.form.status==0?"Submit for Endorsement":o.form.status==1?"Submit for Approval":o.form.status==2?"Approve":""},null,8,["onClick","text"])):y("",!0),this.form.recommended_by==o.currentEmployeeId&&this.form.status==0||this.form.endorsed_by==o.currentEmployeeId&&this.form.status==1||this.form.approved_by==o.currentEmployeeId&&this.form.status==2?(m(),b(R,{key:1,onClick:x.denyForm,text:"Deny"},null,8,["onClick"])):y("",!0),r(D,{onClick:x.closeModal},null,8,["onClick"])])],32),o.state.isLoading?(m(),b(S,{key:0,text:"Fetching records"})):y("",!0)])]),_:1},8,["active","sideTitle","badgeColor","onSubmit","onClose"])}const mt=W(le,[["render",Me]]);export{re as P,ie as T,mt as V};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings