refactor: handle attachment customer
This commit is contained in:
parent
5be282b8d0
commit
ae83a574e0
1 changed files with 3 additions and 5 deletions
|
|
@ -13,11 +13,12 @@ import {
|
|||
CitizenPayload,
|
||||
} from './types';
|
||||
import { Employee } from '../employee/types';
|
||||
import { baseUrl, manageFile, manageMeta } from '../utils';
|
||||
import { baseUrl, manageAttachment, manageFile, manageMeta } from '../utils';
|
||||
|
||||
const useCustomerStore = defineStore('api-customer', () => {
|
||||
const data = ref<Pagination<Customer[]>>();
|
||||
|
||||
const attachmentManager = manageAttachment(api, 'customer-branch');
|
||||
const fileManager = manageFile<
|
||||
| 'citizen'
|
||||
| 'house-registration'
|
||||
|
|
@ -490,11 +491,8 @@ const useCustomerStore = defineStore('api-customer', () => {
|
|||
|
||||
fetchBranchEmployee,
|
||||
|
||||
listAttachment,
|
||||
getAttachment,
|
||||
putAttachment,
|
||||
deleteAttachment,
|
||||
|
||||
...attachmentManager,
|
||||
...fileManager,
|
||||
...metaManager,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue