updated registry
This commit is contained in:
parent
fd1f6a93d2
commit
64a9971665
26 changed files with 125 additions and 116 deletions
|
|
@ -26,9 +26,7 @@ const route = useRoute();
|
|||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
|
||||
const store = useSalaryDataStore();
|
||||
const {
|
||||
date2Thai,
|
||||
|
|
@ -37,8 +35,11 @@ const {
|
|||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
pathRegistryEmp,
|
||||
} = useCounterMixin();
|
||||
|
||||
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||
|
||||
const baseColumns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "date",
|
||||
|
|
@ -609,9 +610,8 @@ const classInput = (val: boolean) => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width v-if="checkPermission($route)?.attrIsUpdate" />
|
||||
<q-th auto-width v-if="checkPermission($route)?.attrIsUpdate" />
|
||||
<q-th auto-width />
|
||||
<q-th v-if="checkPermission($route)?.attrIsUpdate" auto-width />
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
|
|
@ -619,31 +619,7 @@ const classInput = (val: boolean) => {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width v-if="checkPermission($route)?.attrIsUpdate">
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
|
||||
:disable="props.rowIndex + 1 == 1"
|
||||
icon="mdi-arrow-up-bold"
|
||||
@click="onSwapUp(props.row.id)"
|
||||
>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td auto-width v-if="checkPermission($route)?.attrIsUpdate">
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
:color="rows.length == props.rowIndex + 1 ? 'grey' : 'red'"
|
||||
:disable="rows.length == props.rowIndex + 1"
|
||||
icon="mdi-arrow-down-bold"
|
||||
@click="onSwapDown(props.row.id)"
|
||||
>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-td>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
|
|
@ -668,6 +644,29 @@ const classInput = (val: boolean) => {
|
|||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-if="checkPermission($route)?.attrIsUpdate">
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
|
||||
:disable="props.rowIndex + 1 == 1"
|
||||
icon="mdi-arrow-up-bold"
|
||||
@click="onSwapUp(props.row.id)"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
:color="rows.length == props.rowIndex + 1 ? 'grey' : 'red'"
|
||||
:disable="rows.length == props.rowIndex + 1"
|
||||
icon="mdi-arrow-down-bold"
|
||||
@click="onSwapDown(props.row.id)"
|
||||
>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue