File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/form.d9c1cf9d.js
Back
import{_ as v,c,w as h,r as d,o as a,d as u,e as s,t as g,h as I,b as l,j as y}from"./index.3a0d1437.js";import{S as x}from"./SssTableService.646f1c03.js";import{w as k,L as U}from"./index.09b28a7f.js";import{B as R}from"./index.95db1698.js";import{C as P}from"./CreateButton.83988a87.js";import{D as S}from"./DeleteButton.3eb26d6c.js";import{E as L}from"./EditButton.f8156944.js";/* empty css */import{I as B}from"./index.163ce270.js";import"./jspdf.es.min.a68db437.js";/* empty css *//* empty css */import{T as $}from"./index.53519759.js";import"./array.057dff5d.js";import{L as O}from"./Loading.2fa16091.js";import"./vue-quill.snow.08c5baab.js";/* empty css */import{I as E}from"./index.fd1302f6.js";import{l as T}from"./lodash.7ba26c92.js";import{P as M}from"./index.ceaa4080.js";import{h as D}from"./meeting-office.7e6e2274.js";import{C as N}from"./index.5a868516.js";import"./logo-black.7c15feb3.js";import"./logo-white.b04c5a89.js";import"./transition.eb053693.js";import"./EmployeeService.0d36c049.js";import"./vue-cleave.min.da4c1c61.js";import"./es.string.replace.6e729815.js";import"./Loading.vue_vue_type_style_index_0_scoped_cbded5a2_lang.717f943d.js";const Q={mixins:[k],setup(){},components:{TextInput:$,Layout:U,CreateButton:P,Loading:O,InputGroup:E,EditButton:L,DeleteButton:S,Button:R,Pagination:M,Card:N,Icon:B},data(){return{headerImage:D,title:"SSS Table",breadcrumbs:[{text:"Home",href:"/"},{text:"Payroll",href:"/payroll/sss-table"},{text:"SSS Table",href:"/payroll/sss-table"},{text:"Edit Record",active:!0}],columns:[{label:"#",field:"#",thClass:"text-center"},{label:"Compensation From",field:"compensation_from",width:"250px",thClass:"text-center"},{label:"Compensation To",field:"compensation_to",width:"250px",thClass:"text-center"},{label:"ec",field:"ec",width:"250px",thClass:"text-center"},{label:"Wisp",field:"monthly_salary_wisp",width:"250px",thClass:"text-center"},{label:"Regular SS",field:"regular_ss_er",width:"250px",thClass:"text-center"},{label:"Regular SS",field:"regular_ss_ee",width:"250px",thClass:"text-center"},{label:"EC ER",field:"ec_er",width:"250px",thClass:"text-center"},{label:"EC EE",field:"ec_ee",width:"250px",thClass:"text-center"},{label:"Wisp ER",field:"wisp_er",width:"250px",thClass:"text-center"},{label:"Wisp EE",field:"wisp_ee",width:"250px",thClass:"text-center"},{label:"Action",field:"action",thClass:"text-center"}],state:{isLoading:!1,isUpdatingLoading:!1,isMounted:!1,showModal:!1,isDeleting:!1},items:[],totalItems:0,error:[],searchQuery:"",serverOptions:{page:1,rowsPerPage:100,sortBy:"id",sortType:"asc"}}},watch:{serverOptions:{handler(){console.log(`perPage: ${this.serverOptions.rowsPerPage}`),this.fetchRecords()},deep:!0},searchQuery:T.debounce(function(){this.fetchRecords()},800)},computed:{perPage:function(){return this.serverOptions.rowsPerPage}},methods:{async fetchRecords(){this.state.isLoading=!0,this.state.isMounted=!1,await x.fetchRecords({keyword:this.searchQuery,page:this.serverOptions.page,per_page:this.serverOptions.rowsPerPage,sortBy:this.serverOptions.sortBy,sortType:this.serverOptions.sortType}).then(o=>{console.log(o);let m=o.data.data;this.items=m,this.items=m.map((i,p)=>({...i,"#":(this.serverOptions.page-1)*this.serverOptions.rowsPerPage+(p+1)})),this.totalItems=o.data.total}).finally(()=>{this.state.isLoading=!1,this.state.isMounted=!0})},reload(){this.$emit("reload")},async editRecord(o){const m=o.id;this.state.isUpdatingLoading=!0,await x.update(m,o).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})}).catch(i=>{console.log(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})}).finally(()=>{this.state.isUpdatingLoading=!1,this.state.isSaving=!1,this.reload()})},back(){this.$router.push({name:"tax-table"})}},mounted(){this.fetchRecords()}},W={class:"my-5"},F={class:"md:flex pb-6 items-center"},G={class:"flex-1 md:mb-0 mb-3"},j={key:0},z={key:1},A={key:2},H={key:3},q={key:4},J={key:5},K={key:6},X={key:7},Y={key:8},Z={key:9},ee={key:10},te={key:11};function oe(o,m,i,p,r,_){const f=d("Button"),n=d("TextInput"),b=d("vue-good-table"),V=d("Card"),w=d("Loading"),C=d("Layout");return a(),c(C,{breadcrumbs:r.breadcrumbs},{default:h(()=>[u("div",W,[s(V,{noborder:""},{default:h(()=>[u("div",F,[u("h6",G,g(r.title),1),u("div",{class:I(["md:flex md:space-x-3 items-center flex-none rtl:space-x-reverse my-3 float-right",o.window.width<768?"space-x-rb":""])},[s(f,{text:"Back",btnClass:" bg-slate-200 text-slate-600 dark:border-slate-700 dark:text-slate-300 font-normal btn-sm ",iconClass:"text-lg",onClick:_.back},null,8,["onClick"])],2)]),s(b,{styleClass:"vgt-table striped",columns:r.columns,rows:r.items,search:!0,"fixed-header":!1,"sort-options":{enabled:!1},"pagination-options":{enabled:!1},onSortChange:o.onSortChange,"max-height":"600px"},{"table-row":h(e=>[e.column.field==="compensation_from"?(a(),l("td",j,[s(n,{type:"text",modelValue:e.row.compensation_from,"onUpdate:modelValue":t=>e.row.compensation_from=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="compensation_to"?(a(),l("td",z,[s(n,{type:"text",modelValue:e.row.compensation_to,"onUpdate:modelValue":t=>e.row.compensation_to=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="ec"?(a(),l("td",A,[s(n,{type:"text",modelValue:e.row.ec,"onUpdate:modelValue":t=>e.row.ec=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="monthly_salary_wisp"?(a(),l("td",H,[s(n,{type:"text",modelValue:e.row.monthly_salary_wisp,"onUpdate:modelValue":t=>e.row.monthly_salary_wisp=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="regular_ss_er"?(a(),l("td",q,[s(n,{type:"text",modelValue:e.row.regular_ss_er,"onUpdate:modelValue":t=>e.row.regular_ss_er=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="regular_ss_ee"?(a(),l("td",J,[s(n,{type:"text",modelValue:e.row.regular_ss_ee,"onUpdate:modelValue":t=>e.row.regular_ss_ee=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="ec_er"?(a(),l("td",K,[s(n,{type:"text",modelValue:e.row.ec_er,"onUpdate:modelValue":t=>e.row.ec_er=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="ec_ee"?(a(),l("td",X,[s(n,{type:"text",modelValue:e.row.ec_ee,"onUpdate:modelValue":t=>e.row.ec_ee=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="wisp_er"?(a(),l("td",Y,[s(n,{type:"text",modelValue:e.row.wisp_er,"onUpdate:modelValue":t=>e.row.wisp_er=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="wisp_ee"?(a(),l("td",Z,[s(n,{type:"text",modelValue:e.row.wisp_ee,"onUpdate:modelValue":t=>e.row.wisp_ee=t,onInput:t=>o.updateRow(e.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])):e.column.field==="action"?(a(),l("td",ee,[s(f,{text:"Update",btnClass:"btn-primary p-2",onClick:t=>_.editRecord(e.row)},null,8,["onClick"])])):(a(),l("td",te,g(e.formattedRow[e.column.field]),1))]),_:1},8,["columns","rows","onSortChange"])]),_:1}),r.state.isLoading?(a(),c(w,{key:0,text:"Fetching records"})):y("",!0),r.state.isUpdatingLoading?(a(),c(w,{key:1,text:"Updating record"})):y("",!0)])]),_:1},8,["breadcrumbs"])}const Be=v(Q,[["render",oe],["__scopeId","data-v-f5e6fac6"]]);export{Be as default};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings