File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/apiUtils.383f63f4.js
Back
import{a as e}from"./index.3a0d1437.js";import{C as c}from"./CompanyService.335c4e27.js";import{D as s}from"./DealershipService.65dee167.js";import{D as n}from"./DepartmentService.b6e0d2c2.js";import{D as i}from"./DivisionService.849bf539.js";import{E as d}from"./EmployeeService.0d36c049.js";import{E as l}from"./EmploymentTypeService.ba01c8db.js";import{G as h}from"./GroupService.8a431bdb.js";import{J as f}from"./JobClassficationService.4b92c33f.js";import{J as p}from"./JobTitleService.e1202c4d.js";import{S as u}from"./SectionService.70d2587b.js";import{S as m}from"./SupportingDocumentService.fafc9fc6.js";import{U as w}from"./UnitService.d6432c35.js";import{C as y}from"./CitizenshipService.960d3008.js";import{C as E}from"./CivilStatusService.ff01e4ed.js";import{R as g}from"./ReligionService.45dd14d1.js";const a="https://staging-ahg-hr-api.autohub.ph/api/v1/locality",R={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="https://staging-ahg-hr-api.autohub.ph/api/v1/office",$={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 f.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 h.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 $.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 R.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 g.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{$ 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.01 |
proxy
|
phpinfo
|
Settings