File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/apiUtils.c9d55e6b.js
Back
import{a as e}from"./index.6f826883.js";import{C as c}from"./CompanyService.1b97fd33.js";import{D as s}from"./DealershipService.5b263c9d.js";import{D as n}from"./DepartmentService.b2fb95e4.js";import{D as i}from"./DivisionService.8915c98c.js";import{E as d}from"./EmployeeService.b8be485c.js";import{E as l}from"./EmploymentTypeService.ceebba18.js";import{G as f}from"./GroupService.f006f84b.js";import{J as h}from"./JobClassficationService.2ba440de.js";import{J as p}from"./JobTitleService.bab1c32f.js";import{S as u}from"./SectionService.274b84ab.js";import{S as m}from"./SupportingDocumentService.234d6f89.js";import{U as w}from"./UnitService.d49084c2.js";import{C as y}from"./CitizenshipService.1dbb0db7.js";import{C as E}from"./CivilStatusService.4ad3e9ec.js";import{R}from"./ReligionService.ac7b7e5b.js";const a="http://127.0.0.1:8005/api/v1/locality",$={fetchRecords(r={}){return e.get(`${a}`,{params:r})},fetchRecord(r){return e.get(`${a}/${r}`)},async create(r){return e.post(`${a}`,r)},async update(r,t){return e.put(`${a}/${r}`,t)},async remove(r){return e.delete(`${a}/${r}`)}},o="http://127.0.0.1:8005/api/v1/office",g={fetchRecords(r={}){return e.get(`${o}`,{params:r})},fetchRecord(r){return e.get(`${o}/${r}`)},async create(r){return e.post(`${o}`,r)},async update(r){return e.post(`${o}/update`,r)},async remove(r){return e.delete(`${o}/${r}`)}};async function k(){try{const r=await d.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.employee_id,label:`${t.employee_id} - ${t.firstname} ${t.lastname}`}));throw new Error("Failed to fetch employee data")}catch(r){throw console.error("Error fetching employee data:",r),r}}async function q(){try{const r=await u.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.code} - ${t.name}`}));throw new Error("Failed to fetch section data")}catch(r){throw console.error("Error fetching section data:",r),r}}async function A(){try{const r=await p.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.name}`}));throw new Error("Failed to fetch job title data")}catch(r){throw console.error("Error fetching job title data:",r),r}}async function B(){try{const r=await c.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.code} - ${t.name}`}));throw new Error("Failed to fetch company data")}catch(r){throw console.error("Error fetching company data:",r),r}}async function H(){try{const r=await h.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.name}`}));throw new Error("Failed to fetch job classification data")}catch(r){throw console.error("Error fetching job classification data:",r),r}}async function I(){try{const r=await s.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.code} - ${t.name}`}));throw new Error("Failed to fetch dealership data")}catch(r){throw console.error("Error fetching dealership data:",r),r}}async function K(){try{const r=await l.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.name}`}));throw new Error("Failed to fetch employment type data")}catch(r){throw console.error("Error fetching employment type data:",r),r}}async function M(){try{const r=await f.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.code} - ${t.name}`}));throw new Error("Failed to fetch group data")}catch(r){throw console.error("Error fetching group data:",r),r}}async function N(){try{const r=await i.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.code} - ${t.name}`}));throw new Error("Failed to fetch division data")}catch(r){throw console.error("Error fetching division data:",r),r}}async function P(){try{const r=await n.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.name}`}));throw new Error("Failed to fetch department data")}catch(r){throw console.error("Error fetching department data:",r),r}}async function Q(){try{const r=await w.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.name}`}));throw new Error("Failed to fetch unit data")}catch(r){throw console.error("Error fetching unit data:",r),r}}async function V(){try{const r=await g.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:`${t.name}`}));throw new Error("Failed to fetch office data")}catch(r){throw console.error("Error fetching office data:",r),r}}async function W(){try{const r=await $.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:t.province+" - "+t.locality}));throw new Error("Failed to fetch locality data")}catch(r){throw console.error("Error fetching locality data:",r),r}}async function X(){try{const r=await m.fetchRecords();if(r.status===200)return r.data.data.filter(t=>t.document_id==3).map(t=>({value:t.id,label:t.module_name}));throw new Error("Failed to fetch supporting document data")}catch(r){throw console.error("Error fetching supporting document data:",r),r}}async function Y(){try{const r=await y.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:t.name}));throw new Error("Failed to fetch citizenship data")}catch(r){throw console.error("Error fetching citizenship data:",r),r}}async function Z(){try{const r=await E.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:t.name}));throw new Error("Failed to fetch civil status data")}catch(r){throw console.error("Error fetching civil status data:",r),r}}async function rr(){try{const r=await R.fetchRecords();if(r.status===200)return r.data.data.map(t=>({value:t.id,label:t.name}));throw new Error("Failed to religion status data")}catch(r){throw console.error("Error fetching religion data:",r),r}}export{g as O,k as a,X as b,q as c,A as d,H as e,B as f,I as g,K as h,M as i,N as j,P as k,Q as l,W as m,V as n,Y as o,Z as p,rr as q};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.07 |
proxy
|
phpinfo
|
Settings