Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m14s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m14s
This commit is contained in:
commit
33ebaa12b7
3 changed files with 20 additions and 12 deletions
|
|
@ -3,6 +3,7 @@ import { reactive, ref, watch, computed } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { getColumnLabel } from "@/utils/functions";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -29,7 +30,7 @@ const props = defineProps({
|
||||||
const rejectName = computed(() =>
|
const rejectName = computed(() =>
|
||||||
props.sysName && ["SYS_RESIGN", "SYS_RESIGN_EMP"].includes(props.sysName)
|
props.sysName && ["SYS_RESIGN", "SYS_RESIGN_EMP"].includes(props.sysName)
|
||||||
? "ยับยั้ง"
|
? "ยับยั้ง"
|
||||||
: "ไม่อนุมัติ"
|
: "ไม่อนุมัติ",
|
||||||
);
|
);
|
||||||
|
|
||||||
/** table*/
|
/** table*/
|
||||||
|
|
@ -66,15 +67,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "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>({
|
const pagination = ref<PropsTable.Pagination>({
|
||||||
sortBy: "",
|
sortBy: "",
|
||||||
|
|
@ -240,7 +232,9 @@ watch(modal, (val) => {
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{
|
||||||
|
getColumnLabel(col, formDataQuery.isAct)
|
||||||
|
}}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useLeaveStore } from "@/modules/05_leave/store";
|
import { useLeaveStore } from "@/modules/05_leave/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
|
import { getColumnLabel } from "@/utils/functions";
|
||||||
|
|
||||||
import type { PropsTable } from "@/interface/PropsTable";
|
import type { PropsTable } from "@/interface/PropsTable";
|
||||||
import type { DataCommander } from "@/modules/05_leave/interface/response/main";
|
import type { DataCommander } from "@/modules/05_leave/interface/response/main";
|
||||||
|
|
@ -401,7 +402,7 @@ function getSearch() {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ getColumnLabel(col, isAct) }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,16 @@ export function calculateFiscalYear(date: Date) {
|
||||||
const month = date.getMonth() + 1;
|
const month = date.getMonth() + 1;
|
||||||
return month >= 10 ? date.getFullYear() + 1 : date.getFullYear();
|
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;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue