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,
|
CitizenPayload,
|
||||||
} from './types';
|
} from './types';
|
||||||
import { Employee } from '../employee/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 useCustomerStore = defineStore('api-customer', () => {
|
||||||
const data = ref<Pagination<Customer[]>>();
|
const data = ref<Pagination<Customer[]>>();
|
||||||
|
|
||||||
|
const attachmentManager = manageAttachment(api, 'customer-branch');
|
||||||
const fileManager = manageFile<
|
const fileManager = manageFile<
|
||||||
| 'citizen'
|
| 'citizen'
|
||||||
| 'house-registration'
|
| 'house-registration'
|
||||||
|
|
@ -490,11 +491,8 @@ const useCustomerStore = defineStore('api-customer', () => {
|
||||||
|
|
||||||
fetchBranchEmployee,
|
fetchBranchEmployee,
|
||||||
|
|
||||||
listAttachment,
|
|
||||||
getAttachment,
|
|
||||||
putAttachment,
|
|
||||||
deleteAttachment,
|
deleteAttachment,
|
||||||
|
...attachmentManager,
|
||||||
...fileManager,
|
...fileManager,
|
||||||
...metaManager,
|
...metaManager,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue