feat: employee address (same with employer)
This commit is contained in:
parent
c72f44d50a
commit
39118cc227
5 changed files with 204 additions and 40 deletions
|
|
@ -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,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,13 @@ import {
|
|||
EmployeeOther,
|
||||
EmployeeWork,
|
||||
} from './types';
|
||||
import { CustomerBranch } from '../customer/types';
|
||||
import axios from 'axios';
|
||||
|
||||
const useEmployeeStore = defineStore('api-employee', () => {
|
||||
const data = ref<Pagination<Employee[]>>();
|
||||
const globalOption = ref();
|
||||
const ownerOption = ref<{ label: string; value: string }[]>();
|
||||
const ownerOption = ref<CustomerBranch[]>();
|
||||
|
||||
async function fetchList(
|
||||
opts?: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue