diff --git a/src/components/Workflow/DialogSelectPerson.vue b/src/components/Workflow/DialogSelectPerson.vue index f3a0dd922..c262ae89c 100644 --- a/src/components/Workflow/DialogSelectPerson.vue +++ b/src/components/Workflow/DialogSelectPerson.vue @@ -5,7 +5,6 @@ import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; -import { getColumnLabel } from "@/utils/function"; import type { QTableProps } from "quasar"; @@ -66,6 +65,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "actFullName", + align: "left", + label: "รักษาการแทน", + field: "actFullName", + sortable: true, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); const total = ref(0); @@ -250,9 +258,7 @@ watch(modal, (val) => { - - {{ getColumnLabel(col, isAct) }} - + {{ col.label }} diff --git a/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue b/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue index 08de2bb3a..d64ccb033 100644 --- a/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue +++ b/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue @@ -184,7 +184,7 @@ const columns = ref([ }, ]); -const baseColumnsMember = ref([ +const columnsMember = ref([ { name: "no", align: "left", @@ -236,20 +236,17 @@ const baseColumnsMember = ref([ }`; }, }, + { + name: "actFullName", + align: "left", + label: "รักษาการแทน", + sortable: true, + field: "actFullName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); -const columnsMember = computed(() => { - if (isAct.value) { - const actColumns = JSON.parse(JSON.stringify(baseColumnsMember.value)); - const posNoCol = actColumns.find((col: any) => col.name === "posNo"); - if (posNoCol) { - posNoCol.label = "เลขที่ตำแหน่ง (รักษาการแทน)"; - } - return actColumns; - } - return baseColumnsMember.value; -}); - /** เพิ่ม คณะกรรมการ */ function onAdd() { modal.value = true; @@ -318,6 +315,11 @@ async function getPerson() { .then(async (res) => { const data = await res.data.result.data; const dataTotal = await res.data.result.total; + + // rowsDirector.value = data.filter( + // (item: MemBerType, index: number, self: any[]) => + // index === self.findIndex((t: any) => t.id === item.id) + // ); rowsDirector.value = data.filter( (item: MemBerType) => !rows.value.some((i: PersonsAppointData) => i.profileId == item.id) @@ -441,7 +443,6 @@ async function onDirector() { await getPerson(); selected.value = []; } - async function onAct() { pagination.value.page = 1; isDirector.value = false; @@ -724,8 +725,22 @@ onMounted(async () => { :rows-per-page-options="[10, 25, 50, 100]" @update:pagination="updatePagination" > - + + - - diff --git a/src/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue b/src/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue index f0d1cb636..64791591d 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue @@ -6,7 +6,6 @@ import { useRoute } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; -import { getColumnLabel } from "@/utils/function"; import type { QTableProps } from "quasar"; @@ -84,6 +83,16 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + + { + name: "actFullName", + align: "left", + label: "รักษาการแทน", + sortable: true, + field: "actFullName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); function onCloseDialog() { @@ -223,9 +232,7 @@ watch(modal, (val) => { :key="col.name" :props="props" > - - {{ getColumnLabel(col, isAct) }} + {{ col.label }} diff --git a/src/modules/06_retirement/components/DialogAddCommander.vue b/src/modules/06_retirement/components/DialogAddCommander.vue index f988f3345..ce753a5ac 100644 --- a/src/modules/06_retirement/components/DialogAddCommander.vue +++ b/src/modules/06_retirement/components/DialogAddCommander.vue @@ -4,7 +4,7 @@ import { useQuasar, type QTableProps } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; -import { getColumnLabel } from "@/utils/function"; + import { useCounterMixin } from "@/stores/mixin"; import DialogHeader from "@/components/DialogHeader.vue"; @@ -78,6 +78,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "actFullName", + align: "left", + label: "รักษาการแทน", + field: "actFullName", + sortable: true, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); function onSearchData() { @@ -306,9 +315,7 @@ watch( :key="col.name" :props="props" > - {{ - getColumnLabel(col, isAct) - }} + {{ col.label }} diff --git a/src/modules/09_leave/components/05_Leave/Dialog/DialogAddCommander.vue b/src/modules/09_leave/components/05_Leave/Dialog/DialogAddCommander.vue index 1382174e9..42bb546f4 100644 --- a/src/modules/09_leave/components/05_Leave/Dialog/DialogAddCommander.vue +++ b/src/modules/09_leave/components/05_Leave/Dialog/DialogAddCommander.vue @@ -4,7 +4,7 @@ import { useQuasar, type QTableProps } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; -import { getColumnLabel } from "@/utils/function"; + import { useCounterMixin } from "@/stores/mixin"; import DialogHeader from "@/components/DialogHeader.vue"; @@ -81,6 +81,15 @@ const columns = ref([ }, style: "font-size: 14px", }, + { + name: "actFullName", + align: "left", + label: "รักษาการแทน", + field: "actFullName", + sortable: true, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); function onSearchData() { @@ -98,6 +107,10 @@ function getSearch() { } async function getData() { + // const url = + // props.type == "COMMANDER" + // ? config.API.workflowCommanderOperate + // : config.API.workflowCommanderSign; showLoader(); await http .put(config.API.workflowCommanderOperate, { @@ -311,9 +324,7 @@ watch( :key="col.name" :props="props" > - {{ - getColumnLabel(col, isAct) - }} + {{ col.label }} diff --git a/src/modules/15_development/components/scholarship/DetailView.vue b/src/modules/15_development/components/scholarship/DetailView.vue index c2c8a6866..7f9e59d08 100644 --- a/src/modules/15_development/components/scholarship/DetailView.vue +++ b/src/modules/15_development/components/scholarship/DetailView.vue @@ -55,10 +55,9 @@ const modalDialogGov = ref(false); // popup เลือกข้าร const budgetSourceOp = ref([ { id: "BKK", name: "งบประมาณ กทม." }, - { id: "OFFFUND", name: "เงินนอกงบประมาณ" }, + { id: "HOSPITAL", name: "เงินนอกงบประมาณ" }, { id: "FUND", name: "เงินกองทุน" }, { id: "SUBSIDY", name: "เงินอุดหนุน" }, - { id: "HOSPITAL", name: "เงินบำรุงโรงพยาบาล" }, { id: "OTHER", name: "เงินอื่น ๆ" }, ]); diff --git a/src/modules/15_development/views/Scholarship.vue b/src/modules/15_development/views/Scholarship.vue index b9e1626a0..f68b131d0 100644 --- a/src/modules/15_development/views/Scholarship.vue +++ b/src/modules/15_development/views/Scholarship.vue @@ -191,8 +191,6 @@ function conventStatus(val: string) { switch (val) { case "PENDING": return "กำลังศึกษา"; - case "REPORTED": - return "รายงานตัวกลับเข้าปฏิบัติราชการแล้ว"; case "GRADUATE": return "เรียนจบ"; case "NOTGRADUATE": diff --git a/src/modules/18_command/components/Step/Dialog1_AddOperetor.vue b/src/modules/18_command/components/Step/Dialog1_AddOperetor.vue index 07dda6246..71ce96260 100644 --- a/src/modules/18_command/components/Step/Dialog1_AddOperetor.vue +++ b/src/modules/18_command/components/Step/Dialog1_AddOperetor.vue @@ -4,7 +4,6 @@ import { useQuasar, type QTableProps } from "quasar"; import { usePagination } from "@/composables/usePagination"; import { useCounterMixin } from "@/stores/mixin"; -import { getColumnLabel } from "@/utils/function"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -65,6 +64,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "actFullName", + align: "left", + label: "รักษาการแทน", + field: "actFullName", + sortable: true, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); const roleName = ref(""); @@ -274,7 +282,7 @@ watch(modal, (newVal) => { :key="col.name" :props="props" > - {{ getColumnLabel(col, isAct) }} + {{ col.label }} diff --git a/src/modules/18_command/components/Step/View0_Digital.vue b/src/modules/18_command/components/Step/View0_Digital.vue index 42e00356f..fbff4569c 100644 --- a/src/modules/18_command/components/Step/View0_Digital.vue +++ b/src/modules/18_command/components/Step/View0_Digital.vue @@ -7,7 +7,6 @@ import { useRoute, useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import { useCommandDetail } from "@/modules/18_command/store/DetailStore"; import { usePagination } from "@/composables/usePagination"; -import { getColumnLabel } from "@/utils/function"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -112,6 +111,16 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + + { + name: "actFullName", + align: "left", + label: "รักษาการแทน", + sortable: true, + field: "actFullName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); //รอผู้มีอำนาจลงนามอนุมัติ @@ -767,9 +776,7 @@ onMounted(async () => { :key="col.name" :props="props" > - {{ - getColumnLabel(col, isAct) - }} + {{ col.label }} diff --git a/src/utils/function.ts b/src/utils/function.ts index fb0320f5b..d24194346 100644 --- a/src/utils/function.ts +++ b/src/utils/function.ts @@ -60,16 +60,3 @@ export function calculateAge(birthDate: Date | null) { return `${years} ปี ${months} เดือน ${days} วัน`; } - -/** - * คืนค่าชื่อคอลัมน์ตามเงื่อนไข - * @param col คอลัมน์ - * @param isAct สถานะรักษาการแทน - * @returns ชื่อคอลัมน์ - */ -export function getColumnLabel(col: any, isAct: boolean) { - if (col.name === "posNo" && isAct) { - return `${col.label} (รักษาการแทน)`; - } - return col.label; -}