fix: แก้ไข type status

This commit is contained in:
Net 2024-04-18 18:07:38 +07:00
parent 3741d7d5e5
commit 095a2bb268
2 changed files with 4 additions and 3 deletions

View file

@ -153,6 +153,7 @@ const defaultFormData = {
}; };
const formDialogRef = ref(); const formDialogRef = ref();
const formType = ref<'create' | 'edit' | 'delete' | 'view'>('create'); const formType = ref<'create' | 'edit' | 'delete' | 'view'>('create');
const formTypeBranch = ref<'headOffice' | 'subBranch'>('headOffice'); const formTypeBranch = ref<'headOffice' | 'subBranch'>('headOffice');
const codeHq = ref<{ id: string; code: string }>({ id: '', code: '' }); const codeHq = ref<{ id: string; code: string }>({ id: '', code: '' });
@ -168,8 +169,6 @@ async function fetchBranchById(id: string) {
const res = await branchStore.fetchById(id); const res = await branchStore.fetchById(id);
if (res) { if (res) {
console.log(res);
qrCodeimageUrl.value = res.qrCodeImageUrl; qrCodeimageUrl.value = res.qrCodeImageUrl;
imageUrl.value = res.imageUrl; imageUrl.value = res.imageUrl;
formData.value = { formData.value = {
@ -190,6 +189,7 @@ async function fetchBranchById(id: string) {
districtId: res.districtId, districtId: res.districtId,
provinceId: res.provinceId, provinceId: res.provinceId,
lineId: res.lineId, lineId: res.lineId,
status: res.status,
}; };
} }
} }
@ -766,6 +766,7 @@ watch(locale, () => {
v-model:taxNo="formData.taxNo" v-model:taxNo="formData.taxNo"
v-model:name="formData.name" v-model:name="formData.name"
v-model:nameEN="formData.nameEN" v-model:nameEN="formData.nameEN"
v-model:type-branch="formTypeBranch"
:separator="true" :separator="true"
:dense="true" :dense="true"
:outlined="true" :outlined="true"

View file

@ -164,7 +164,7 @@ const useBranchStore = defineStore('api-branch', () => {
async function editById( async function editById(
id: string, id: string,
data: Partial<BranchCreate & { status: 'ACTIVE' | 'INACTIVE' }>, data: Partial<BranchCreate & { status: 'ACTIVE' | 'INACTIVE' | 'CREATED' }>,
qrCodeImage?: File | undefined, qrCodeImage?: File | undefined,
imageHq?: File | undefined, imageHq?: File | undefined,
flow?: { flow?: {