From 9db326570458b68ca1aa991b714dd3aaef822b64 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Thu, 27 Jul 2023 17:45:14 +0700 Subject: [PATCH 1/3] no message --- .../components/probation/FormAssign.vue | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index 6e899e2af..f1a0062d8 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -96,7 +96,7 @@ hide-bottom-space class="full-width datepicker q-mb-md" :model-value=" - dateExam != null ? date2Thai(dateExam) : null + date_start != null ? date2Thai(date_start) : null " :label="`${'ตั้งเเต่วันที่'}`" clearable @@ -129,7 +129,7 @@ readonly class="full-width datepicker q-mb-md" :model-value=" - dateExam2 != null ? date2Thai(dateExam2) : null + date_finish != null ? date2Thai(date_finish) : null " :label="`${'ถึงวันที่'}`" clearable @@ -1253,8 +1253,7 @@ const val1 = ref([ const router = useRouter(); const mixin = useCounterMixin(); const { date2Thai, notifyError } = mixin; -const dateExam = ref(null); -const dateExam2 = ref(null); + const checkValidate = ref(false); const myForm = ref(null); @@ -1263,8 +1262,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 +1274,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 +1302,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 +1330,7 @@ const addKnowledge = () => { knowledgeCount.value++; } }; + const knowledgeArray = computed(() => { return Array(knowledgeCount.value).fill(""); }); @@ -1551,7 +1551,6 @@ const saveData = async () => { // workInfopRef.value.validate(); myForm.value.validate().then(async (result: boolean) => { if (result) { - // showLoader(); // แสดงข้อมูลใน Console @@ -1576,6 +1575,16 @@ const saveData = async () => { .onCancel(() => {}) .onDismiss(() => {}); } else { + // ลองดู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 +1609,7 @@ const OPmain = [""]; const group = ref(""); const group2 = ref(""); const group3 = ref(""); -const OPgroup = [""]; +const OPgroup = ["test"]; const Other = ref(""); From b6bde021689e9cda44d005c9cd230eba4666c695 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 28 Jul 2023 09:09:47 +0700 Subject: [PATCH 2/3] no message --- .../components/probation/FormAssign.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index f1a0062d8..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 }} เดือน
{ + 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(); @@ -1575,6 +1589,7 @@ const saveData = async () => { .onCancel(() => {}) .onDismiss(() => {}); } else { + putData() // ลองดูlog activityDataArray.value = activity_desc.value.map((activity, index) => ({ id: index + 1, From eb5f4d35f647db1958a97aa4dc179fbcaaed3517 Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 28 Jul 2023 09:42:50 +0700 Subject: [PATCH 3/3] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20router=20?= =?UTF-8?q?=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B9=84=E0=B8=9B=E0=B8=94=E0=B8=B6?= =?UTF-8?q?=E0=B8=87=E0=B8=97=E0=B8=B5=E0=B9=88=20registry=20=E0=B8=81?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/08_registryEmployee/views/Main.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);