diff --git a/src/api/org/api.org.ts b/src/api/org/api.org.ts index 40cf317..ae33413 100644 --- a/src/api/org/api.org.ts +++ b/src/api/org/api.org.ts @@ -175,6 +175,7 @@ export default { changePassword: `${org}/keycloak/user/change-password`, orgAssistance: (id: string) => `${profileOrg}/assistance/${id}`, + orgIssues: `${env.API_URI}/org/issues`, // ตรวจสอบข้อมูลตำแหน่งและเงินเดือน profileSalaryTemp: `${profileOrg}/salaryTemp`, diff --git a/src/components/DialogDebug.vue b/src/components/DialogDebug.vue new file mode 100644 index 0000000..77d5642 --- /dev/null +++ b/src/components/DialogDebug.vue @@ -0,0 +1,373 @@ + + + + + diff --git a/src/modules/01_dashboard/views/Dashboard.vue b/src/modules/01_dashboard/views/Dashboard.vue index b1298d8..cfb19c2 100644 --- a/src/modules/01_dashboard/views/Dashboard.vue +++ b/src/modules/01_dashboard/views/Dashboard.vue @@ -8,6 +8,7 @@ import http from "@/plugins/http"; import { tokenParsed } from "@/plugins/auth"; import { useCounterMixin } from "@/stores/mixin"; import { useDataStore } from "@/stores/data"; +import { usePositionKeycloakStore } from "@/stores/positionKeycloak"; import type { InboxDetail, @@ -20,6 +21,7 @@ import PopupDetailInbox from "@/components/PopupDetailInbox.vue"; const $q = useQuasar(); const dataStore = useDataStore(); +const positionKeycloakStore = usePositionKeycloakStore(); const mixin = useCounterMixin(); const { showLoader, hideLoader, date2Thai, messageError } = mixin; @@ -28,123 +30,6 @@ const inboxList = ref([]); // รายการกล่อง const idInboxActive = ref(); // Id ข้อความที่เลือก const isLoadingInbox = ref(true); // สถานะการโหลดกล่องข้อความ -// รายการเมนูหลักของระบบ -const filteredItems = computed(() => { - const isOfficer = dataStore.officerType === "OFFICER"; - const conditions: Record = { - ทดลองปฏิบัติหน้าที่ราชการ: dataStore.isProbation, - ประเมินบุคคล: isOfficer, - ผลงาน: isOfficer, - ขอโอน: isOfficer, - "ผู้ขอรับการประเมิน (KPI)": isOfficer, - "ผู้ประเมิน (KPI)": isOfficer, - "ทุนการศึกษา/ฝึกอบรม": isOfficer, - การพัฒนารายบุคคล: isOfficer, - }; - - return items.value.filter((item) => conditions[item.title] ?? true); -}); - -const items = ref([ - { - icon: "mdi-account-group-outline", - title: "แผนผังองค์กร", - sub: "ดูแผนผังองค์กร", - // color: "blue-3", - color: "grey-3", - path: "/organization-chart", - active: false, - }, - { - icon: "mdi-clipboard-account-outline", - title: "ทะเบียนประวัติ", - sub: "ข้อมูลทะเบียนประวัติ", - color: "blue-4", - path: "/registry", - active: false, - }, - { - icon: "mdi-clipboard-account-outline", - title: "ประเมินบุคคล", - sub: "ข้อมูลการประเมินบุคคล", - color: "lime-4", - path: "/evaluate", - active: false, - }, - { - icon: "mdi-calendar-account-outline", - title: "การลา", - sub: "ดู/ลงเวลา ทำเรื่องลา", - color: "cyan-3", - path: "/leave", - active: false, - }, - { - icon: "mdi-folder-account-outline", - title: "ผลงาน", - sub: "ดูผลงาน", - color: "light-green-3", - path: "/portfolio", - active: false, - }, - { - icon: "mdi-account-arrow-right-outline", - title: "ขอโอน", - sub: "ทำเรื่องขอโอนย้าย", - color: "deep-purple-3", - path: "/transfer", - active: false, - }, - { - icon: "mdi-scale-balance", - title: "อุทธรณ์/ร้องทุกข์", - sub: "ทำเรื่องขออุทธรณ์ หรือร้องทุกข์", - color: "green-3", - path: "/appeal-complain", - active: false, - }, - { - icon: "mdi-account-box-outline", - title: "ผู้ขอรับการประเมิน (KPI)", - sub: "ประเมินผลการปฏิบัติหน้าที่ราชการ", - color: "red-2", - path: "/KPI", - active: false, - }, - { - icon: "mdi-elevator", - title: "ผู้ประเมิน (KPI)", - sub: "ประเมินผลการปฏิบัติหน้าที่ราชการ", - color: "red-2", - path: "/KPI-evaluator", - active: false, - }, - { - icon: "mdi-school", - title: "ทุนการศึกษา/ฝึกอบรม", - sub: "รายการทุนการศึกษา/ฝึกอบรม", - color: "teal-2", - path: "/scholarship", - active: false, - }, - { - icon: "mdi-human-handsup", - title: "การพัฒนารายบุคคล", - sub: "Individual Development Plan", - color: "orange-3", - path: "/IDP", - active: false, - }, - { - icon: "mdi-poll", - title: "ทดลองปฏิบัติหน้าที่ราชการ", - sub: "ผลการทดลองปฏิบัติหน้าที่ราชการและแบบสำรวจความคิดเห็น", - color: "yellow-3", - path: "/probation-report", - active: false, - }, -]); - /** * ฟังก์ชั่นดึงข้อมูลกล่องข้อความ * @param index หน้าที่โหลดข้อมูล @@ -292,7 +177,7 @@ onMounted(async () => {
diff --git a/src/modules/10_registry/01_Information/01_Information.vue b/src/modules/10_registry/01_Information/01_Information.vue index 9e30df3..89372f8 100644 --- a/src/modules/10_registry/01_Information/01_Information.vue +++ b/src/modules/10_registry/01_Information/01_Information.vue @@ -351,7 +351,7 @@ async function onSavePhone() { getData(); }); }, - "ยืนยันการแก้ไขเบอร์โทร" + "ยืนยันการแก้ไขเบอร์โทร", ); } } @@ -381,7 +381,7 @@ async function onSaveEmail() { }) .finally(() => {}); }, - "ยืนยันการแก้ไขอีเมล" + "ยืนยันการแก้ไขอีเมล", ); } } @@ -588,7 +588,18 @@ onMounted(async () => {
-
อีเมล
+
+ อีเมล + + + รอยืนยันอีเมล + +
@@ -606,62 +617,50 @@ onMounted(async () => { @change="isValidEmail = true" />
-
-
- - แก้ไขข้อมูล - -
-
- - บันทึก - - - ยกเลิก - -
-
-
- --> +
+ - รอยืนยันอีเมล - + แก้ไขข้อมูล +
+
+ + บันทึก + + + ยกเลิก + +
+
diff --git a/src/stores/data.ts b/src/stores/data.ts index f24c77e..fbd4e61 100644 --- a/src/stores/data.ts +++ b/src/stores/data.ts @@ -7,6 +7,7 @@ import { useQuasar } from "quasar"; import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry"; import { useCounterMixin } from "./mixin"; import type { ProfileData, DataProfile } from "@/interface/Main"; +import type { MenuMainList } from "@/modules/01_dashboard/interface/Main"; export const useDataStore = defineStore("dataMain", () => { const isLoadingMenu = ref(false); @@ -154,6 +155,127 @@ export const useDataStore = defineStore("dataMain", () => { return convertEmType(officerType.value); } + // รายการเมนูหลักของระบบ + const menuDataMain = ref([ + { + icon: "mdi-account-group-outline", + title: "แผนผังองค์กร", + sub: "ดูแผนผังองค์กร", + // color: "blue-3", + color: "grey-3", + path: "/organization-chart", + active: false, + }, + { + icon: "mdi-clipboard-account-outline", + title: "ทะเบียนประวัติ", + sub: "ข้อมูลทะเบียนประวัติ", + color: "blue-4", + path: "/registry", + active: false, + }, + { + icon: "mdi-clipboard-account-outline", + title: "ประเมินบุคคล", + sub: "ข้อมูลการประเมินบุคคล", + color: "lime-4", + path: "/evaluate", + active: false, + }, + { + icon: "mdi-calendar-account-outline", + title: "การลา", + sub: "ดู/ลงเวลา ทำเรื่องลา", + color: "cyan-3", + path: "/leave", + active: false, + }, + { + icon: "mdi-folder-account-outline", + title: "ผลงาน", + sub: "ดูผลงาน", + color: "light-green-3", + path: "/portfolio", + active: false, + }, + { + icon: "mdi-account-arrow-right-outline", + title: "ขอโอน", + sub: "ทำเรื่องขอโอนย้าย", + color: "deep-purple-3", + path: "/transfer", + active: false, + }, + { + icon: "mdi-scale-balance", + title: "อุทธรณ์/ร้องทุกข์", + sub: "ทำเรื่องขออุทธรณ์ หรือร้องทุกข์", + color: "green-3", + path: "/appeal-complain", + active: false, + }, + { + icon: "mdi-account-box-outline", + title: "ผู้ขอรับการประเมิน (KPI)", + sub: "ประเมินผลการปฏิบัติหน้าที่ราชการ", + color: "red-2", + path: "/KPI", + active: false, + }, + { + icon: "mdi-elevator", + title: "ผู้ประเมิน (KPI)", + sub: "ประเมินผลการปฏิบัติหน้าที่ราชการ", + color: "red-2", + path: "/KPI-evaluator", + active: false, + }, + { + icon: "mdi-school", + title: "ทุนการศึกษา/ฝึกอบรม", + sub: "รายการทุนการศึกษา/ฝึกอบรม", + color: "teal-2", + path: "/scholarship", + active: false, + }, + { + icon: "mdi-human-handsup", + title: "การพัฒนารายบุคคล", + sub: "Individual Development Plan", + color: "orange-3", + path: "/IDP", + active: false, + }, + { + icon: "mdi-poll", + title: "ทดลองปฏิบัติหน้าที่ราชการ", + sub: "ผลการทดลองปฏิบัติหน้าที่ราชการและแบบสำรวจความคิดเห็น", + color: "yellow-3", + path: "/probation-report", + active: false, + }, + ]); + + // กรองเมนู ตามประเภทบุคลากร + const menuList = computed(() => { + const isOfficer = officerType.value === "OFFICER"; + const conditions: Record = { + ทดลองปฏิบัติหน้าที่ราชการ: isProbation.value, + ประเมินบุคคล: isOfficer, + ผลงาน: isOfficer, + ขอโอน: isOfficer, + "ผู้ขอรับการประเมิน (KPI)": isOfficer, + "ผู้ประเมิน (KPI)": isOfficer, + "ทุนการศึกษา/ฝึกอบรม": isOfficer, + การพัฒนารายบุคคล: isOfficer, + }; + + const data = menuDataMain.value.filter( + (item: MenuMainList) => conditions[item.title] ?? true, + ); + return data; + }); + return { count, doubleCount, @@ -181,6 +303,8 @@ export const useDataStore = defineStore("dataMain", () => { dataprofilePosition, isLoadingMenu, isLoadingProfile, + + menuList, }; }); diff --git a/src/stores/positionKeycloak.ts b/src/stores/positionKeycloak.ts new file mode 100644 index 0000000..a4c4464 --- /dev/null +++ b/src/stores/positionKeycloak.ts @@ -0,0 +1,53 @@ +import { defineStore } from "pinia"; + +export const usePositionKeycloakStore = defineStore("positionKeycloak", () => { + function findOrgName(obj: any) { + if (obj) { + let name = + obj.child4 != null && + obj.child4 !== "" && + obj.child3 != null && + obj.child3 !== "" + ? obj.child4 + (obj.child3 ? "/" : "") + : obj.child4 != null && obj.child4 !== "" + ? obj.child4 + : ""; + + name += + obj.child3 != null && + obj.child3 !== "" && + obj.child2 != null && + obj.child2 !== "" + ? obj.child3 + (obj.child2 ? "/" : "") + : obj.child3 != null && obj.child3 !== "" + ? obj.child3 + : ""; + + name += + obj.child2 != null && + obj.child2 !== "" && + obj.child1 != null && + obj.child1 !== "" + ? obj.child2 + (obj.child1 ? "/" : "") + : obj.child2 != null && obj.child2 !== "" + ? obj.child2 + : ""; + + name += + obj.child1 != null && + obj.child1 !== "" && + obj.root != null && + obj.root !== "" + ? obj.child1 + (obj.root ? "/" : "") + : obj.child1 != null && obj.child1 !== "" + ? obj.child1 + : ""; + name += obj.root != null && obj.root !== "" ? obj.root : ""; + return name == "" ? "-" : name; + } else { + return ""; + } + } + + return { findOrgName }; +}); diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 57f2fae..3251ecb 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -19,6 +19,7 @@ import { useDataStore } from "@/stores/data"; import { useKpiDataStore } from "@/modules/08_KPI/store"; import DialogResetPass from "@/components/DialogResetPass.vue"; +import DialogDebug from "@/components/DialogDebug.vue"; // landing page config url const configParam = { @@ -50,6 +51,7 @@ const currentRouteName = router.currentRoute.value.name; const tab = ref(currentRouteName); const isSsoToken = ref(false); const modalResetPass = ref(false); // ตัวแปรควบคุมการเปิดปิด Dialog เปลี่ยนรหัสผ่าน +const modalDebug = ref(false); // ตัวแปรควบคุมการเปิดปิด Dialog แจ้งปัญหา /** * เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้ @@ -165,7 +167,7 @@ const doLogout = () => { logoutSSO(); }, "ยืนยันการออกจากระบบ", - "ต้องการออกจากระบบใช่หรือไม่" + "ต้องการออกจากระบบใช่หรือไม่", ); }; @@ -216,7 +218,7 @@ watch( notiList.value = updatedNotifications; fetchTotolNotificate(); } - } + }, ); const thaiOptions: Intl.DateTimeFormatOptions = { @@ -260,7 +262,7 @@ watch( () => route.name, (newVal) => { tab.value = newVal; - } + }, ); @@ -416,7 +418,7 @@ watch( {{ new Date(item.receiveDate).toLocaleTimeString( "th-TH", - thaiOptions + thaiOptions, ) }} น. Landing Page + + + + + แจ้งปัญหาการใช้งานระบบ + + @@ -592,6 +604,20 @@ watch( Landing Page + + + + + แจ้งปัญหาการใช้งานระบบ + + +