fix: uploand error
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s

This commit is contained in:
Thanaphon Frappet 2025-07-04 15:15:06 +07:00
parent 011c65dcf8
commit dd09a8cb23
8 changed files with 51 additions and 39 deletions

View file

@ -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,
});
}
});
}

View 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',