chore: cleanup
This commit is contained in:
parent
cec7db9388
commit
550ded4f63
6 changed files with 12 additions and 24 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue