diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index e1a2e6915..d12fdcb90 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -211,7 +211,11 @@ function onSubmit() { ); } -/** เช็คข้อมูลจาก props*/ +/** + * เช็คข้อมูลจาก props + * เมื่อมีข้อมูล + * เก็บข้อมูลลง formData + */ watch(props.data, async () => { formData.complainantType = props.data.complainantType; formData.complainant = props.data.complainant; diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue index 293549aac..00a3f1378 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue @@ -1,11 +1,11 @@ +
{
+
{
+
{ ]" />
+
{ keep-color />
+
+
{
+
{ type="textarea" />
+
{
+
{ type="textarea" />
+
{
+
(""); const filterRef = ref(null); const resetFilter = () => { @@ -34,6 +34,8 @@ const resetFilter = () => { }; const attrs = ref(useAttrs()); + +/** แสดงจำนวนในตาราง */ const pagination = ref({ // sortBy: "desc", descending: false, @@ -41,9 +43,22 @@ const pagination = ref({ rowsPerPage: 10, }); +/**ไปยังหน้าเพิ่มข้อมูล */ const clickAdd = () => { router.push(`/discipline/investigatefacts/add`); }; + +/** + * ไปหน้าแก้ไข + * @param id ไอดีเฉพาะ รายบุคคล + */ +function editPage(id: string) { + router.push(`/discipline/investigatefacts/${id}`); +} + +/**เมื่อเริ่มโหลดหน้า + * ส่งข้อมูลจำลองไปยัง store + */ onMounted(async () => { await fecthList([ { @@ -80,9 +95,6 @@ onMounted(async () => { }, ]); }); -function editPage(id: string) { - router.push(`/discipline/investigatefacts/${id}`); -}