fix: clean for remove warning console

This commit is contained in:
puriphatt 2024-07-01 08:40:37 +00:00
parent d1e6239a1f
commit 20e12b407a
6 changed files with 346 additions and 347 deletions

View file

@ -274,8 +274,6 @@ async function triggerEdit(
openDialog();
}
if (openFormType === 'drawer') {
console.log(code);
formType.value = 'view';
openDrawer();
}

View file

@ -128,7 +128,17 @@ const formDataEmployeeSameAddr = ref(true);
const formDataEmployeeTab = ref('personalInfo');
const infoDrawerEmployee = ref(false);
const infoDrawerEmployeeEdit = ref(false);
const infoEmployeePersonCard = ref();
const infoEmployeePersonCard = ref<
{
id: string;
img: string;
name: string;
male: boolean;
female: boolean;
badge: string;
disabled: boolean;
}[]
>();
const statsEmployee = ref(0);
const statsEmployeeGender = ref<{ male: number; female: number }>();
const formDataEmployeeOwner = ref<{
@ -272,8 +282,8 @@ const inputFile = (() => {
if (infoDrawerEdit.value && currentCustomer.value)
currentCustomer.value.imageUrl = profileUrl.value as string;
if (infoDrawerEmployeeEdit.value)
infoEmployeePersonCard.value[0].img = profileUrl.value;
if (infoDrawerEmployeeEdit.value && infoEmployeePersonCard.value)
infoEmployeePersonCard.value[0].img = profileUrl.value as string;
});
element.addEventListener('change', () => {
@ -1855,7 +1865,6 @@ watch([inputSearch, currentStatus], async () => {
"
dense
outlined
bordered
separator
/>
</template>
@ -1998,7 +2007,6 @@ watch([inputSearch, currentStatus], async () => {
v-if="formDataEmployeeTab === 'personalInfo'"
dense
outlined
employee
separator
v-model:passport-type="formDataEmployee.passportType"
v-model:passport-number="formDataEmployee.passportNumber"
@ -2020,7 +2028,6 @@ watch([inputSearch, currentStatus], async () => {
v-if="formDataEmployeeTab === 'personalInfo'"
dense
outlined
employee
v-model:visa-type="formDataEmployee.visaType"
v-model:visa-number="formDataEmployee.visaNumber"
v-model:visa-issue-date="formDataEmployee.visaIssueDate"
@ -2131,7 +2138,6 @@ watch([inputSearch, currentStatus], async () => {
"
dense
outlined
bordered
separator
/>
</template>
@ -2263,7 +2269,6 @@ watch([inputSearch, currentStatus], async () => {
"
dense
outlined
bordered
separator
/>
</template>
@ -2465,7 +2470,6 @@ watch([inputSearch, currentStatus], async () => {
"
dense
outlined
bordered
separator
:readonly="!infoDrawerEdit"
/>
@ -2677,7 +2681,6 @@ watch([inputSearch, currentStatus], async () => {
"
dense
outlined
bordered
separator
:readonly="!infoDrawerEdit"
/>
@ -2771,7 +2774,7 @@ watch([inputSearch, currentStatus], async () => {
no-action
no-detail
no-bg
:list="infoEmployeePersonCard"
:list="infoEmployeePersonCard ? infoEmployeePersonCard : []"
:gridColumns="1"
@edit-profile="
() => {
@ -2860,7 +2863,6 @@ watch([inputSearch, currentStatus], async () => {
v-if="formDataEmployeeTab === 'personalInfo'"
dense
outlined
employee
separator
:readonly="!infoDrawerEmployeeEdit"
v-model:passport-type="formDataEmployee.passportType"
@ -2883,7 +2885,6 @@ watch([inputSearch, currentStatus], async () => {
v-if="formDataEmployeeTab === 'personalInfo'"
dense
outlined
employee
:readonly="!infoDrawerEmployeeEdit"
v-model:visa-type="formDataEmployee.visaType"
v-model:visa-number="formDataEmployee.visaNumber"

View file

@ -2018,21 +2018,17 @@ watch(inputSearchProductAndService, async () => {
/>
</template>
<div v-if="currentServiceTab === 'serviceInformation'" class="col-10">
<div
v-if="currentServiceTab === 'serviceInformation'"
class="col-md-10 col-sm-12"
>
<div class="surface-1 rounded bordered q-pa-lg full-width row">
<BasicInformation
dense
service
@service-properties="
() => {
tempValueProperties = formDataProductService.attributes;
openPropertiesDialog('service');
}
"
v-model:service-code="formDataProductService.code"
v-model:service-description="formDataProductService.detail"
v-model:service-name-th="formDataProductService.name"
@input-file="inputFile.click()"
/>
</div>
<div class="surface-1 rounded bordered q-mt-md q-pa-lg row">
@ -2050,7 +2046,7 @@ watch(inputSearchProductAndService, async () => {
<div
v-if="currentServiceTab === 'workInformation'"
class="surface-1 rounded bordered col-10 q-pa-lg"
class="surface-1 rounded bordered col-md-10 col-sm-12 q-pa-lg"
>
<FormServiceWork
v-model:work-items="workItems"