diff --git a/src/modules/04_registryNew/components/detail/GovernmentInformation/02_Discipline.vue b/src/modules/04_registryNew/components/detail/GovernmentInformation/02_Discipline.vue index c94a0e8f8..c56189512 100644 --- a/src/modules/04_registryNew/components/detail/GovernmentInformation/02_Discipline.vue +++ b/src/modules/04_registryNew/components/detail/GovernmentInformation/02_Discipline.vue @@ -6,7 +6,6 @@ import type { FormFilter, DataOption, DisciplineOps, - MyObjectRef, } from "@/modules/04_registryNew/interface/index/discipline"; import { useCounterMixin } from "@/stores/mixin"; import { useQuasar } from "quasar"; @@ -29,7 +28,7 @@ const { hideLoader, messageError, success, - dateToISO, + dialogRemove, } = mixin; const disciplineData = reactive({ @@ -143,24 +142,12 @@ const dateRef = ref(null); const detailRef = ref(null); const refCommandNoRef = ref(null); -const objectRef: MyObjectRef = { - date: dateRef, - detail: detailRef, - refCommandNo: refCommandNoRef, -}; - /** dialog */ const edit = ref(false); const modal = ref(false); const modalHistory = ref(false); const id = ref(""); -const date = ref(null); -const detail = ref(); -const level = ref(); -const unStigma = ref(); -const refCommandNo = ref(); -const refCommandDate = ref(null); const Ops = ref({ levelOptions: [ @@ -246,7 +233,6 @@ async function fetchData(id: string) { await http .get(config.API.profileNewDisciplineByProfileId(id)) .then(async (res) => { - console.log(res.data.result); rows.value = res.data.result; }) .catch((err) => { @@ -296,6 +282,7 @@ function deleteData(idData: string) { .delete(config.API.profileNewDisciplineByDisciplineId(idData)) .then(() => { fetchData(profileId.value); + success($q, "ลบข้อมูลสำเร็จ"); }) .catch((err) => { messageError($q, err); @@ -312,8 +299,6 @@ function deleteData(idData: string) { function openDialogEdit(props: RequestItemsObject) { modal.value = true; edit.value = true; - - console.log(props); id.value = props.id; disciplineData.date = props.date; disciplineData.detail = props.detail; @@ -339,53 +324,6 @@ async function onSubmit() { "ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?" ); } -// const data: RequestItemsObject[] = [ -// { -// level: "ภาคทัณฑ์", -// detail: "1", -// refCommandNo: "1", -// refCommandDate: null, -// date: new Date("2024-03-19T00:00:00"), -// unStigma: "1", -// id: "08dc2e0f-5631-4a7c-8ac4-0f7c99156c2e", -// createdAt: new Date("2024-02-15T17:17:38.524861"), -// createdFullName: "สาวิตรี ศรีสมัย", -// }, -// { -// level: "ภาคทัณฑ์", -// detail: "11", -// refCommandNo: "11", -// refCommandDate: new Date("2024-03-11T00:00:00"), -// date: new Date("2024-02-20T00:00:00"), -// unStigma: "", -// id: "08dc2e11-3588-44ea-8c1a-99109a4c4fe0", -// createdAt: new Date("2024-02-20T12:59:47.193103"), -// createdFullName: "สาวิตรี ศรีสมัย", -// }, -// { -// level: "ตัดเงินเดือน", -// detail: "115", -// refCommandNo: "1", -// refCommandDate: new Date("2024-03-11T00:00:00"), -// date: new Date("2024-02-20T00:00:00"), -// unStigma: "11", -// id: "08dc2e11-8054-416c-8299-81005d739a25", -// createdAt: new Date("2024-02-20T12:59:47.193103"), -// createdFullName: "สาวิตรี ศรีสมัย", -// }, -// { -// level: "", -// detail: "test", -// refCommandNo: "12", -// refCommandDate: new Date("2024-03-11T00:00:00"), -// date: new Date("2024-02-20T00:00:00"), -// unStigma: "", -// id: "08dc31d9-24a0-4870-896c-4c4ea8f7b104", -// createdAt: new Date("2024-02-20T12:59:47.193103"), -// createdFullName: "สาวิตรี ศรีสมัย", -// }, -// ]; -// rows.value = data; onMounted(async () => { await fetchData(profileId.value);