Compare commits

..

No commits in common. "33ebaa12b7b16c0742a4e4ddbba98ca38a8d2ece" and "af14a65c34d60827c5ad7c9c569f60a146cf1d33" have entirely different histories.

3 changed files with 12 additions and 20 deletions

View file

@ -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<QTableProps["columns"]>([
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<PropsTable.Pagination>({
sortBy: "",
@ -232,9 +240,7 @@ watch(modal, (val) => {
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{
getColumnLabel(col, formDataQuery.isAct)
}}</span>
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>

View file

@ -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"
>
<span class="text-weight-medium">{{ getColumnLabel(col, isAct) }}</span>
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>

View file

@ -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;
}