fix: แก้ fetchList ให้รับ opts status employee

This commit is contained in:
Net 2024-06-17 10:04:05 +07:00
parent 22f673da08
commit 3aa99f2ede

View file

@ -23,6 +23,7 @@ const useEmployeeStore = defineStore('api-employee', () => {
pageSize?: number;
query?: string;
gender?: string;
status?: 'CREATED' | 'ACTIVE' | 'INACTIVE';
},
flow?: {
sessionId: string;
@ -38,6 +39,7 @@ const useEmployeeStore = defineStore('api-employee', () => {
if (opts?.page && opts.page > 0) params.append('page', `${opts.page}`);
if (opts?.query) params.append('query', opts.query);
if (opts?.gender) params.append('gender', opts.gender);
if (opts?.status !== undefined) params.append('status', opts.status);
const query = params.toString();