style(registry-temp):display columns isPosition

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-06 14:41:55 +07:00
parent a65e6645bc
commit 7a833e0ee5

View file

@ -58,15 +58,6 @@ const expanded = ref<string[]>([]);
const filters = ref<string>(""); //
const rowsPosition = ref<Position[]>([]); //
const columns = ref<QTableProps["columns"]>([
{
name: "isPosition",
align: "left",
label: "",
sortable: true,
field: "isPosition",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "no",
align: "left",
@ -203,7 +194,6 @@ const columnsPostition = ref<QTableProps["columns"]>([
// },
]);
const visibleColumns = ref<string[]>([
"isPosition",
"no",
"posMasterNo",
"positionName",
@ -661,6 +651,7 @@ onBeforeMount(async () => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th
v-for="col in props.cols"
:key="col.name"
@ -674,6 +665,17 @@ onBeforeMount(async () => {
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<div v-if="props.row.isPosition">
<q-icon
name="done"
color="primary"
size="24px"
>
<q-tooltip>ตรงตามตำแหน </q-tooltip>
</q-icon>
</div>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -700,17 +702,6 @@ onBeforeMount(async () => {
<q-tooltip>อำนวยการ/วหน</q-tooltip>
</q-icon>
</div>
<div v-else-if="col.name === 'isPosition'">
<div v-if="col.value">
<q-icon
name="done"
color="primary"
size="24px"
>
<q-tooltip>ตรงตามตำแหน </q-tooltip>
</q-icon>
</div>
</div>
<div v-else>
{{ col.value ? col.value : "-" }}