feat: employee address (same with employer)

This commit is contained in:
puriphatt 2024-06-13 10:07:20 +00:00
parent c72f44d50a
commit 39118cc227
5 changed files with 204 additions and 40 deletions

View file

@ -420,6 +420,29 @@ const useCustomerStore = defineStore('api-customer', () => {
);
}
async function fetchListBranchById(
branchId: string,
flow?: {
sessionId: string;
refTransactionId: string;
transactionId: string;
},
) {
const res = await api.get(`/customer-branch/${branchId}`, {
headers: {
'X-Session-Id': flow?.sessionId,
'X-Rtid': flow?.refTransactionId,
'X-Tid': flow?.transactionId,
},
});
if (res && res.status === 200) {
return res.data;
}
return false;
}
return {
data,
@ -434,6 +457,7 @@ const useCustomerStore = defineStore('api-customer', () => {
createBranch,
editBranchById,
deleteBranchById,
fetchListBranchById,
};
});