fix: condition upload image +get when submit +responsive card

This commit is contained in:
oat_dev 2024-06-10 11:11:19 +07:00
parent a484d8f3ea
commit 2c189779fb

View file

@ -285,9 +285,14 @@ async function onSubmit() {
...formData.value,
customerType:
customerType.value === 'customerLegalEntity' ? 'CORP' : 'PERS',
image: (profileFile.value ?? new File([''], 'dummy.jpg')) as File,
image: (profileSubmit.value
? profileFile.value ?? new File([''], 'dummy.jpg')
: new File([''], 'dummy.jpg')) as File,
});
clearForm();
const resultList = await fetchList({ includeBranch: true });
if (resultList) listCustomer.value = resultList.result;
}
async function onSubmitEdit(id: string) {
@ -439,7 +444,7 @@ onMounted(async () => {
<template v-if="listCustomer && selectorLabel === 'EMPLOYER'">
<div
class="row full-width customer-row"
:style="`grid-template-columns: repeat(${$q.screen.lt.sm ? '1' : '4'}, 1fr)`"
:style="`grid-template-columns: repeat(${$q.screen.lt.sm ? '1' : $q.screen.lt.md ? '2 ' : '4'}, 1fr)`"
>
<UsersDetailCardComponent
v-for="i in listCustomer"