diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue
index 994877eed..6adb6fe83 100644
--- a/src/modules/05_placement/components/probation/FormAssign.vue
+++ b/src/modules/05_placement/components/probation/FormAssign.vue
@@ -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" />
-