feat: employee stats
This commit is contained in:
parent
0728f0a3ff
commit
be92fd509a
2 changed files with 40 additions and 15 deletions
|
|
@ -204,6 +204,29 @@ const useEmployeeStore = defineStore('api-employee', () => {
|
|||
}
|
||||
}
|
||||
|
||||
async function getStatsEmployee(
|
||||
customerBranchId?: string,
|
||||
flow?: {
|
||||
sessionId: string;
|
||||
refTransactionId: string;
|
||||
transactionId: string;
|
||||
},
|
||||
) {
|
||||
const res = await api.get(
|
||||
`/employee/stats${customerBranchId ? '?customerBranchId=' + customerBranchId : ''}/`,
|
||||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
},
|
||||
);
|
||||
if (res && res.status === 200) {
|
||||
return res.data;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
data,
|
||||
globalOption,
|
||||
|
|
@ -216,6 +239,7 @@ const useEmployeeStore = defineStore('api-employee', () => {
|
|||
fetchCheckup,
|
||||
fetchWork,
|
||||
fetchOther,
|
||||
getStatsEmployee,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue