From c0fd7574ca579ebe3b07919b83ed2861484a520a Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 8 Sep 2023 13:20:57 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87?= =?UTF-8?q?=E0=B8=9C=E0=B8=A5=E0=B8=A3=E0=B8=B0=E0=B8=9A=E0=B8=9A=E0=B8=97?= =?UTF-8?q?=E0=B8=94=E0=B8=A5=E0=B8=AD=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_placement/components/probation/MainProbation.vue | 6 +++--- .../05_placement/components/probation/ProbationDetail.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/05_placement/components/probation/MainProbation.vue b/src/modules/05_placement/components/probation/MainProbation.vue index a53f176b6..458cb4532 100644 --- a/src/modules/05_placement/components/probation/MainProbation.vue +++ b/src/modules/05_placement/components/probation/MainProbation.vue @@ -153,7 +153,7 @@ const columns2 = ref([ { name: "status", align: "left", - label: "สถานะ", + label: "ทดลองปฏิบัติหน้าที่ราชการ", sortable: true, field: "status", headerStyle: "font-size: 14px", @@ -474,8 +474,8 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
{{ props.rowIndex + 1 }}
-
- +
+
{{ col.value }} diff --git a/src/modules/05_placement/components/probation/ProbationDetail.vue b/src/modules/05_placement/components/probation/ProbationDetail.vue index 1dd3cdcb5..46408bc4d 100644 --- a/src/modules/05_placement/components/probation/ProbationDetail.vue +++ b/src/modules/05_placement/components/probation/ProbationDetail.vue @@ -27,7 +27,7 @@ const name = ref(""); const position_line = ref(""); const position_level = ref(""); const organization = ref(""); -const probation_status = ref(); +const probation_status = ref(); const probation_statusold = ref(""); const avatarprofile = ref(""); From 2c5fb8e93c84ca82afaa431041db4d004e07317d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 8 Sep 2023 13:21:07 +0700 Subject: [PATCH 2/2] API inbox noti --- .../07_insignia/components/2_Manage/Tab1.vue | 17 ++++--- .../07_insignia/components/2_Manage/Tab2.vue | 8 ++-- .../07_insignia/components/2_Manage/Tab3.vue | 10 ++--- .../components/2_Manage/listManage.vue | 45 +++++++------------ 4 files changed, 32 insertions(+), 48 deletions(-) diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 26a57b105..115574033 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -4,6 +4,7 @@ import { useCounterMixin } from "@/stores/mixin"; import { useQuasar } from "quasar"; import type { QTableProps } from "quasar"; import { useInsigniaDataStore } from "@/modules/07_insignia/store"; +import { useroleUserDataStore } from "@/stores/roleUser"; import http from "@/plugins/http"; import config from "@/app.config"; import { useRouter } from "vue-router"; @@ -22,6 +23,7 @@ const { } = mixin; const $q = useQuasar(); const DataStore = useInsigniaDataStore(); +const roleDataStore = useroleUserDataStore(); const modalNote = ref(false); const modelPopupReject = ref(false); @@ -201,9 +203,6 @@ const props = defineProps({ fecthInsigniaByOc: { type: Function, }, - roleUser: { - type: String, - }, roundName: { type: String, }, @@ -231,7 +230,7 @@ onMounted(async () => { }); const checkStatus = computed(() => { if ( - DataStore.roleUser === "insignia1" && + roleDataStore.insignia1Role && (DataStore.requestStatus == "st1" || DataStore.requestStatus == "st4") ) { return true; @@ -574,7 +573,7 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
{ v-if=" (DataStore.isLock == false && DataStore.requestStatus == 'st5' && - DataStore.roleUser == 'admin') || + roleDataStore.adminRole) || checkStatus == true " > @@ -804,14 +803,14 @@ const paginationLabel2 = (start: number, end: number, total: number) => { v-if=" (DataStore.isLock == false && DataStore.requestStatus == 'st5' && - DataStore.roleUser == 'admin') || + roleDataStore.adminRole) || checkStatus == true " > ("1"); @@ -213,7 +213,7 @@ const closeReson = () => {
("1"); @@ -143,7 +144,6 @@ const columns = ref([ }, ]); onMounted(async () => { - organizationOptions.value = DataStore.optionsTypeOc; organization.value = await (DataStore.agency != null ? DataStore.agency @@ -211,7 +211,7 @@ const closeReson = () => {
("admin"); +const roleDataStore = useroleUserDataStore(); const DataStore = useInsigniaDataStore(); const mixin = useCounterMixin(); const { messageError, dialogConfirm, showLoader, hideLoader, success } = mixin; @@ -40,25 +42,9 @@ const stat = ref({ onMounted(async () => { tab.value = DataStore.mainTab; - await checkRole(); await fecthlistRound(); }); -const checkRole = async () => { - if (keycloak.tokenParsed != null) { - const insignia1 = await keycloak.tokenParsed.role.includes("insignia1"); - const insignia2 = await keycloak.tokenParsed.role.includes("insignia2"); - if (insignia1) { - roleUser.value = "insignia1"; - } else if (insignia2) { - roleUser.value = "insignia2"; - } else { - roleUser.value = "admin"; - } - DataStore.roleUser = roleUser.value; - } -}; - const fecthlistRound = async () => { await http .get(config.API.listRoundInsignia()) @@ -104,7 +90,7 @@ const fecthAgency = async () => { .then(async (res) => { DataStore.agency = res.data.result; loadview.value = true; - if (roleUser.value == "admin") { + if (roleDataStore.adminRole) { await fecthType(); } }) @@ -331,7 +317,9 @@ const requestSendNote = async () => { {
-
+
{
{ @@ -420,7 +408,6 @@ const requestSendNote = async () => { :roundId="round" :roundName="roundName" :fecthInsigniaByOc="fecthInsigniaByOc" - :role-user="roleUser" :request-status="requestStatus" /> @@ -429,7 +416,6 @@ const requestSendNote = async () => { :tab="tab" :roundId="round" :fecthInsigniaByOc="fecthInsigniaByOc" - :role-user="roleUser" /> @@ -437,23 +423,22 @@ const requestSendNote = async () => { :tab="tab" :roundId="round" :fecthInsigniaByOc="fecthInsigniaByOc" - :role-user="roleUser" /> - + - + { @click="sendToDirector" /> { @click="popupBackToEdit" />