diff --git a/src/stores/address/index.ts b/src/stores/address/index.ts index c2b1f654..975ca773 100644 --- a/src/stores/address/index.ts +++ b/src/stores/address/index.ts @@ -55,6 +55,12 @@ const useAddressStore = defineStore('api-address', () => { if (res.status >= 400) return null; return res.data; } + async function fetchOfficeById(id: string) { + const res = await api.get(`/employment-office/${id}`); + + if (res.status >= 400) return null; + return res.data; + } async function fetchProvince() { if (province.value) return province.value; @@ -98,6 +104,7 @@ const useAddressStore = defineStore('api-address', () => { return { fetchOffice, + fetchOfficeById, fetchProvince, fetchDistrictByProvinceId, fetchSubDistrictByProvinceId,