diff --git a/src/modules/04_registry/components/Education.vue b/src/modules/04_registry/components/Education.vue index e9bfe895d..fd3b477fc 100644 --- a/src/modules/04_registry/components/Education.vue +++ b/src/modules/04_registry/components/Education.vue @@ -598,7 +598,20 @@ /> +
+ +
+ (false); //validate data ผ่านหรื const profileId = ref( route.params.id ? route.params.id.toString() : "" ); +const note = ref() const rows = ref([]); const filter = ref(""); //search data table const visibleColumns = ref([]); @@ -780,6 +794,7 @@ profileData.education.columns.length == 0 "finishDate", "startDate", "endDate", + "note", ]) : (visibleColumns.value = profileData.education.columns); const columns = ref([ @@ -937,6 +952,17 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "note", + align: "left", + label: "หมายเหตุ", + sortable: true, + field: "note", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); const columnsHistory = ref([ { @@ -1248,6 +1274,7 @@ const fetchData = async () => { endDate2: e.endDate ? new Date(e.endDate) : null, createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), + note: e.note, }); }); console.log(data); @@ -1304,6 +1331,7 @@ const getData = () => { startDate.value = row.startDate; endDate.value = row.endDate; startDate2.value = row.startDate2; + note.value = row.note; inputStartDate.value = row.startDate ? (Number(row.startDate) + 543).toLocaleString() : ""; @@ -1437,6 +1465,7 @@ const saveData = async () => { ? dateToISO(endDate2.value as Date) : null : new Date(`${endDate.value}-01-01`), + note:note.value }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -1487,6 +1516,7 @@ const editData = async () => { isDate.value == "true" ? dateToISO(endDate2.value as Date) : new Date(`${endDate.value}-01-01`), + note:note.value }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -1583,6 +1613,7 @@ const selectData = async (_props: DataProps) => { startDate2.value = _props.row.startDate2; endDate2.value = _props.row.endDate2; id.value = _props.row.id; + note.value = _props.row.note; inputStartDate.value = _props.row.startDate ? (Number(_props.row.startDate) + 543).toLocaleString() : ""; @@ -1630,6 +1661,7 @@ const addData = () => { inputStartDate.value = ""; inputEndDate.value = ""; finishDateInput.value = ""; + note.value = ""; dayChecked2.value = false; dayEndChecked2.value = false; @@ -1695,6 +1727,7 @@ const clickHistory = async (row: RequestItemsObject) => { durationYear: e.durationYear, other: e.other, fundName: e.fundName, + note: e.note, isDate: e.isDate, finishDate: e.finishDate ? new Date(e.finishDate) : null, startDate: new Date(e.startDate).getFullYear(), diff --git a/src/modules/04_registry/components/Other.vue b/src/modules/04_registry/components/Other.vue index cdb337dd3..8cf5944c1 100644 --- a/src/modules/04_registry/components/Other.vue +++ b/src/modules/04_registry/components/Other.vue @@ -64,9 +64,6 @@ :label="`${'วันที่'}`" mask="##/##/####" dense - :rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]" - :error="dayChecked" - error-message="กรุณากรอกวันที่" />