diff --git a/src/api/org/api.org.ts b/src/api/org/api.org.ts index 3c14fee..1c2fcb7 100644 --- a/src/api/org/api.org.ts +++ b/src/api/org/api.org.ts @@ -126,7 +126,7 @@ export default { dataUserCertificateHistoryByType: ( emType: string, type: string, - id: string + id: string, ) => `${org}/profile${emType}/${type}/history/${id}`, dataUserHonorHistory: (type: string, emType: string, id: string) => `${profileOrg}${emType}/${type}/history/${id}`, @@ -176,4 +176,5 @@ export default { changePassword: `${org}/keycloak/user/change-password`, orgAssistance: (id: string) => `${profileOrg}/assistance/${id}`, + orgIssues: `${env.API_URI}/org/issues`, }; diff --git a/src/components/DialogDebug.vue b/src/components/DialogDebug.vue new file mode 100644 index 0000000..04c2d1e --- /dev/null +++ b/src/components/DialogDebug.vue @@ -0,0 +1,333 @@ + + + + + + + + + + + + + filterSelector(inputValue, doneFn, + )" + /> + + + + + + + + + + + + + ลบทั้งหมด + + + ลบไฟล์ที่อัปโหลด + + + + + {{ "[ไฟล์ jpg,png,pdf,csv,doc ขนาดไม่เกิน 5MB]" }} + + + {{ scope.uploadSizeLabel }} + / + {{ scope.uploadProgressLabel }} + + + + + เลือกไฟล์ + + + ยกเลิกการอัปโหลด + + + + + + + + + + + + บันทึกข้อมูล + + + + + + + + diff --git a/src/modules/01_dashboard/views/Dashboard.vue b/src/modules/01_dashboard/views/Dashboard.vue index c1b5d02..12dad21 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; @@ -42,7 +44,9 @@ const filteredItems = computed(() => { การพัฒนารายบุคคล: isOfficer, }; - return items.value.filter((item) => conditions[item.title] ?? true); + const data = items.value.filter((item) => conditions[item.title] ?? true); + positionKeycloakStore.menuData = data; + return data; }); const items = ref([ @@ -220,7 +224,7 @@ async function onClickOpenPopupDetail(data: InboxDetail) { .get(config.API.msgInboxRead(data.no)) .then(() => { const filterDate = inboxList.value.filter( - (r: InboxDetail) => r.no == data.no + (r: InboxDetail) => r.no == data.no, ); for (const item of filterDate) { item.isOpen = true; diff --git a/src/stores/positionKeycloak.ts b/src/stores/positionKeycloak.ts new file mode 100644 index 0000000..d839378 --- /dev/null +++ b/src/stores/positionKeycloak.ts @@ -0,0 +1,56 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; + +export const usePositionKeycloakStore = defineStore("positionKeycloak", () => { + const menuData = ref(null); + + 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, menuData }; +}); diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 57f2fae..bc2d4a6 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 + + + + + แจ้งปัญหาการใช้งานระบบ + + +