This commit is contained in:
parent
011c65dcf8
commit
dd09a8cb23
8 changed files with 51 additions and 39 deletions
|
|
@ -79,7 +79,6 @@ const useCustomerStore = defineStore('api-customer', () => {
|
|||
customerId?: string;
|
||||
company?: boolean;
|
||||
includeCustomer?: boolean;
|
||||
activeRegisBranchOnly?: boolean;
|
||||
registeredBranchId?: string;
|
||||
status?: 'CREATED' | 'ACTIVE' | 'INACTIVE';
|
||||
query?: string;
|
||||
|
|
@ -281,18 +280,21 @@ const useCustomerStore = defineStore('api-customer', () => {
|
|||
|
||||
if (tempValue) {
|
||||
tempValue.file?.forEach(async ({ group, _meta, file }) => {
|
||||
if (file !== undefined) {
|
||||
if (!file) return;
|
||||
|
||||
if (group === 'citizen') {
|
||||
await metaManager.postMeta({
|
||||
parentId: v.id,
|
||||
group: group as
|
||||
| 'citizen'
|
||||
| 'house-registration'
|
||||
| 'commercial-registration'
|
||||
| 'vat-registration'
|
||||
| 'power-of-attorney',
|
||||
group: 'citizen',
|
||||
meta: _meta,
|
||||
file,
|
||||
});
|
||||
} else {
|
||||
await attachmentManager.putAttachment({
|
||||
parentId: v.id || '',
|
||||
name: file.name,
|
||||
file: file,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,10 @@ const useEmployeeStore = defineStore('api-employee', () => {
|
|||
|
||||
if (group === undefined) return;
|
||||
|
||||
if (group !== 'attachment' && _meta !== undefined) {
|
||||
if (
|
||||
(group === 'passport' || group === 'visa') &&
|
||||
_meta !== undefined
|
||||
) {
|
||||
metaManager.postMeta({
|
||||
parentId: res.data.id,
|
||||
group: group as 'passport' | 'visa',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue