diff --git a/src/components/Workflow/DialogSelectPerson.vue b/src/components/Workflow/DialogSelectPerson.vue index 27a359b..d2fc964 100644 --- a/src/components/Workflow/DialogSelectPerson.vue +++ b/src/components/Workflow/DialogSelectPerson.vue @@ -3,7 +3,6 @@ import { reactive, ref, watch, computed } from "vue"; import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; -import { getColumnLabel } from "@/utils/functions"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -30,7 +29,7 @@ const props = defineProps({ const rejectName = computed(() => props.sysName && ["SYS_RESIGN", "SYS_RESIGN_EMP"].includes(props.sysName) ? "ยับยั้ง" - : "ไม่อนุมัติ", + : "ไม่อนุมัติ" ); /** table*/ @@ -67,6 +66,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 pagination = ref({ sortBy: "", @@ -232,9 +240,7 @@ watch(modal, (val) => { - {{ - getColumnLabel(col, formDataQuery.isAct) - }} + {{ col.label }} diff --git a/src/modules/05_leave/components/FormLeave/Form.vue b/src/modules/05_leave/components/FormLeave/Form.vue index d9c37f8..f1824e8 100644 --- a/src/modules/05_leave/components/FormLeave/Form.vue +++ b/src/modules/05_leave/components/FormLeave/Form.vue @@ -7,7 +7,6 @@ import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useLeaveStore } from "@/modules/05_leave/store"; import { useDataStore } from "@/stores/data"; -import { getColumnLabel } from "@/utils/functions"; import type { PropsTable } from "@/interface/PropsTable"; import type { DataCommander } from "@/modules/05_leave/interface/response/main"; @@ -402,7 +401,7 @@ function getSearch() { :key="col.name" :props="props" > - {{ getColumnLabel(col, isAct) }} + {{ col.label }} diff --git a/src/utils/functions.ts b/src/utils/functions.ts index c43aa95..837f83d 100644 --- a/src/utils/functions.ts +++ b/src/utils/functions.ts @@ -8,16 +8,3 @@ export function calculateFiscalYear(date: Date) { const month = date.getMonth() + 1; return month >= 10 ? date.getFullYear() + 1 : date.getFullYear(); } - -/** - * คืนค่าชื่อคอลัมน์ตามเงื่อนไข - * @param col คอลัมน์ - * @param isAct สถานะรักษาการแทน - * @returns ชื่อคอลัมน์ - */ -export function getColumnLabel(col: any, isAct: boolean) { - if (col.name === "posNo" && isAct) { - return `${col.label} (รักษาการแทน)`; - } - return col.label; -}