no message
This commit is contained in:
parent
ab32df6dc9
commit
dbcf1f0106
2 changed files with 69 additions and 31 deletions
|
|
@ -55,6 +55,8 @@ const {
|
|||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
dialogMessageNotify,
|
||||
modalWarning
|
||||
} = mixin;
|
||||
const filterData = (options: any[], excludedGroups: any[]) => {
|
||||
return options.filter(
|
||||
|
|
@ -545,11 +547,6 @@ const putData = (id: string) => {
|
|||
role: "mentor",
|
||||
dated: date2.value instanceof Date ? dateToISO(date2.value) : dateToISO(new Date(date2.value)),
|
||||
},
|
||||
{
|
||||
personal_id: caretaker2.value.id,
|
||||
role: "mentor",
|
||||
dated: date3.value instanceof Date ? dateToISO(date3.value) : dateToISO(new Date(date3.value)),
|
||||
},
|
||||
{
|
||||
personal_id: commander.value.id,
|
||||
role: "commander",
|
||||
|
|
@ -560,6 +557,13 @@ const putData = (id: string) => {
|
|||
role: "chairman",
|
||||
},
|
||||
];
|
||||
if (caretaker2.value) {
|
||||
assign_director.push({
|
||||
personal_id: caretaker2.value.id,
|
||||
role: "mentor",
|
||||
dated: date3.value instanceof Date ? dateToISO(date3.value) : dateToISO(new Date(date3.value)),
|
||||
});
|
||||
}
|
||||
const data = {
|
||||
personalId: GUID,
|
||||
fullname: fullname.value,
|
||||
|
|
@ -621,7 +625,7 @@ const DataSave = async (id: string) => {
|
|||
hideLoader();
|
||||
});
|
||||
} else {
|
||||
notifyError($q, "กรุณากรอกข้อมูลให้ครบ");
|
||||
dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -856,7 +860,7 @@ watch(knowledge.value, () => {
|
|||
:options="filtermantor(OPcaretaker, [caretaker2])" class="col-xs-12 col-sm-6" :readonly="status != true"
|
||||
dense hide-bottom-space borderless :outlined="status == true" v-model="caretaker1"
|
||||
:label="`ผู้ดูแลคนที่ 1`" option-label="name" />
|
||||
<q-select :rules="[(val) => !!val || 'กรุณาเลือกผู้ดูเเล']"
|
||||
<q-select clearable
|
||||
:options="filtermantor(OPcaretaker, [caretaker1])" option-value="id" option-label="name"
|
||||
hide-bottom-space class="col-xs-12 col-sm-6" :readonly="status != true" dense borderless
|
||||
:outlined="status == true" v-model="caretaker2" :label="`ผู้ดูแลคนที่ 2`" />
|
||||
|
|
@ -866,7 +870,7 @@ watch(knowledge.value, () => {
|
|||
:options="filtermantor(OPcaretaker, [caretaker2])" class="col-xs-12 col-sm-6" :readonly="status != true"
|
||||
dense hide-bottom-space borderless :outlined="status == true" v-model="caretaker1"
|
||||
:label="`ผู้ดูแลคนที่ 1`" option-label="name" />
|
||||
<q-select :rules="[(val) => !!val || 'กรุณาเลือกผู้ดูเเล']"
|
||||
<q-select clearable
|
||||
:options="filtermantor(OPcaretaker, [caretaker1])" option-value="id" option-label="name"
|
||||
hide-bottom-space class="col-xs-12 col-sm-6" :readonly="status != true" dense borderless
|
||||
:outlined="status == true" v-model="caretaker2" :label="`ผู้ดูแลคนที่ 2`" />
|
||||
|
|
@ -1598,15 +1602,15 @@ watch(knowledge.value, () => {
|
|||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<q-select v-if="status == true" :options="filtermantor(OPcaretaker, [caretaker1])" option-value="id"
|
||||
<q-select clearable v-if="status == true" :options="filtermantor(OPcaretaker, [caretaker1])" option-value="id"
|
||||
option-label="name" class="col-xs-12 col-sm-8" :readonly="status != true" dense borderless
|
||||
:outlined="status == true" v-model="caretaker2" label="ผู้ดูแลคนที่ 2" />
|
||||
<q-select v-else :options="filtermantor(OPcaretaker, [caretaker1])" option-value="id" option-label="name"
|
||||
class="col-xs-12 col-sm-8" :readonly="status != true" dense borderless :outlined="status == true"
|
||||
<q-select clearable v-else :options="filtermantor(OPcaretaker, [caretaker1])" option-value="id" option-label="name"
|
||||
class="col-xs-12 col-sm-8" :readonly="status != true " dense borderless :outlined="status == true"
|
||||
v-model="caretaker2" label="ผู้ดูแลคนที่ 2" />
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<datepicker menu-class-name="modalfix" v-model="date3" :locale="'th'" autoApply borderless
|
||||
:enableTimePicker="false" week-start="0" :readonly="status != true">
|
||||
:enableTimePicker="false" week-start="0" :readonly="status != true | !caretaker2">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
|
|
@ -1614,7 +1618,9 @@ watch(knowledge.value, () => {
|
|||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input :rules="[(val) => !!val || 'กรุณาเลือกวันที่']" hide-bottom-space
|
||||
<q-input hide-bottom-space
|
||||
|
||||
:disable="!caretaker2"
|
||||
:readonly="status != true" dense s borderless :outlined="status == true"
|
||||
class="full-width datepicker" :model-value="date3 != null ? date2Thai(date3) : null"
|
||||
label="ลงวันที่">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue