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

@ -1,11 +1,9 @@
<script setup lang="ts">
import { ref } from 'vue';
const telephoneNo = defineModel<string>('telephoneNo');
const contact = defineModel<string>('contact');
const email = defineModel<string>('email');
const contactName = defineModel<string>('contactName');
const operatingHours = defineModel<string>('operatingHours');
// const operatingHours = defineModel<string>('operatingHours');
const lineId = defineModel<string>('lineId');
defineProps<{

View file

@ -1,6 +1,4 @@
<script setup lang="ts">
import { Icon } from '@iconify/vue';
const image = defineModel<string | null>('image');
defineProps<{

View file

@ -3,7 +3,6 @@ import useUserStore from 'src/stores/user';
import { UserAttachmentDelete } from 'src/stores/user/types';
import { dialog } from 'src/stores/utils';
import { dateFormat } from 'src/utils/datetime';
import { watch } from 'vue';
const userStore = useUserStore();

View file

@ -1,5 +1,4 @@
<script setup lang="ts">
import { storeToRefs } from 'pinia';
import useUserStore from 'src/stores/user';
const userStore = useUserStore();

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { ref } from 'vue';
defineProps<{
title: string;
@ -25,15 +25,6 @@ function reset() {
myForm.value.resetValidation();
}
}
// watch(
// () => window.screen.width,
// (v) => {
// console.log(v);
// drawerWidth.value = v;
// },
// );
</script>
<template>
<q-drawer

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"