diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index 6e899e2af..3146c96b2 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -71,7 +71,6 @@ v-model="monthSelect" :label="`ระยะเวลากี่เดือน`" /> -
{{ monthSelect }} เดือน
(null); -const dateExam2 = ref(null); + const checkValidate = ref(false); const myForm = ref(null); @@ -1263,8 +1261,8 @@ const personal_id = ref(); const fullname = ref(); const knowledge_skill_map_no = ref([]); const round_no = ref(); -const date_start = ref(); -const date_finish = ref(); +const date_start = ref(null); +const date_finish = ref(null); const behavior_desc = ref(); const other_desc = ref({}); const other4_desc = ref(); @@ -1275,13 +1273,13 @@ const createdAt = ref(); const updatedAt = ref(); const clearDateExam = () => { - dateExam.value = null; + date_start.value = null; }; const clearDateExam2 = () => { - dateExam2.value = null; + date_finish.value = null; }; const isDatePicker2Readonly = computed(() => { - return dateExam.value === null; + return date_start.value === null; }); const routeName = router.currentRoute.value.name; const name = ref(""); @@ -1303,7 +1301,7 @@ const monthOp = [{ value: "6", label: "6 เดือน" }]; const activityCount = ref(2); const activity_desc = ref(Array(activityCount.value).fill("")); const goal_desc = ref(Array(activityCount.value).fill("")); - + const activityDataArray = ref([]); const addActivity = () => { activityCount.value++; }; @@ -1331,6 +1329,7 @@ const addKnowledge = () => { knowledgeCount.value++; } }; + const knowledgeArray = computed(() => { return Array(knowledgeCount.value).fill(""); }); @@ -1539,6 +1538,21 @@ interface CheckboxItem { // const caregiverRef2 = ref() // const workInfopRef = ref() +const putData = () =>{ + const data = { + fullname:fullname.value, + position:position.value, + monthSelect:monthSelect.value, + date_start:date_start.value, + date_finish:date_finish.value, + caretaker1:caretaker1.value, + caretaker2:caretaker2.value, + activity_desc:activity_desc.value, + goal_desc:goal_desc.value, + knowledge:knowledge.value, + } + console.log("test",data) +} const saveData = async () => { // myForm.value.resetValidation(); @@ -1551,7 +1565,6 @@ const saveData = async () => { // workInfopRef.value.validate(); myForm.value.validate().then(async (result: boolean) => { if (result) { - // showLoader(); // แสดงข้อมูลใน Console @@ -1576,6 +1589,17 @@ const saveData = async () => { .onCancel(() => {}) .onDismiss(() => {}); } else { + putData() + // ลองดูlog + activityDataArray.value = activity_desc.value.map((activity, index) => ({ + id: index + 1, + activity_desc: activity, + goal_desc: goal_desc.value[index], + })); + // showLoader(); + console.log("activity_desc:", activity_desc.value); + console.log("goal_desc:", goal_desc.value); + console.log(activityDataArray.value); // Validation ไม่ผ่าน notifyError($q, "กรุณากรอกข้อมูลให้ครบ"); } @@ -1600,7 +1624,7 @@ const OPmain = [""]; const group = ref(""); const group2 = ref(""); const group3 = ref(""); -const OPgroup = [""]; +const OPgroup = ["test"]; const Other = ref(""); diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index edd6bba6f..7f1bba964 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -1354,8 +1354,8 @@ const clickAdd = () => { }; // ดูรายการแก้ไขรายชื่อ -const redirectToPage = (profileId?: string) => { - router.push(`/registryEmployee/edit/${profileId}`); +const redirectToPage = (id?: string) => { + router.push(`/registry/${id}`); }; const editDetail = async (row: any) => { await getPosition(row.id);