chore: cleanup

This commit is contained in:
Methapon2001 2024-04-19 14:22:23 +07:00
parent cec7db9388
commit 550ded4f63
6 changed files with 12 additions and 24 deletions

View file

@ -349,7 +349,6 @@ function triggerDelete(id: string) {
async function onSubmit() {
if (formType.value === 'edit') {
if (modalDrawer.value) {
const { status, ...payload } = formData.value;
dialog({
color: 'primary',
icon: 'mdi-pencil-outline',
@ -358,11 +357,11 @@ async function onSubmit() {
persistent: true,
message: 'คุณต้องการแก้ไขข้อมูล ใช่หรือไม่',
action: async () => {
const { status, ...payload } = formData.value;
await branchStore.editById(
codeHq.value.id,
{
...payload,
...formData.value,
status: undefined,
},
profileFile.value,
profileFileImg.value,
@ -373,12 +372,11 @@ async function onSubmit() {
cancel: () => {},
});
} else {
const { status, ...payload } = formData.value;
await branchStore.editById(
codeHq.value.id,
{
...payload,
...formData.value,
status: undefined,
},
profileFile.value,
profileFileImg.value,
@ -463,7 +461,12 @@ watch(locale, () => {
<StatCard :branch="stats" :dark="$q.dark.isActive" />
</AppBox>
<AppBox class="column" no-padding bordered style="min-height: 70vh">
<AppBox
class="column"
:no-padding="!!branchData.total"
bordered
style="min-height: 70vh"
>
<template v-if="!branchData.total">
<TooltipComponent
class="self-end"