fix Snap Display

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-06 11:30:16 +07:00
parent f08fb6d886
commit 9d907a71c6
8 changed files with 38 additions and 6 deletions

View file

@ -34,6 +34,7 @@ const props = defineProps({
rootId: { type: String, require: true }, rootId: { type: String, require: true },
periodId: { type: String, require: true }, periodId: { type: String, require: true },
roundFilter: { type: Object, require: true }, roundFilter: { type: Object, require: true },
snapShot: { type: String, require: true },
}); });
const total = ref<number>(); const total = ref<number>();
@ -632,6 +633,7 @@ const updateIsShowRetire = async () => {
v-model:formFilter="formFilter" v-model:formFilter="formFilter"
:fetchDataTable="fetchDataPeriodNew" :fetchDataTable="fetchDataPeriodNew"
:total="total" :total="total"
:snap-shot="props?.snapShot"
/> />
<TableTabType2 <TableTabType2
v-else v-else
@ -641,6 +643,7 @@ const updateIsShowRetire = async () => {
:fetchDataTable="fetchDataPeriodNew" :fetchDataTable="fetchDataPeriodNew"
:total="total" :total="total"
:type="item.type" :type="item.type"
:snap-shot="props?.snapShot"
/> />
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>

View file

@ -29,6 +29,8 @@ const { dialogRemove, messageError, showLoader, hideLoader, success } =
/** props*/ /** props*/
const formFilter = defineModel<DataFilter>("formFilter", { required: true }); const formFilter = defineModel<DataFilter>("formFilter", { required: true });
const maxPage = defineModel<Number>("maxPage", { required: true }); const maxPage = defineModel<Number>("maxPage", { required: true });
const snapShot = defineModel<string>("snapShot");
const props = defineProps({ const props = defineProps({
rows: { type: Array }, rows: { type: Array },
fetchDataTable: { fetchDataTable: {
@ -295,7 +297,11 @@ watch(
<template> <template>
<q-toolbar class="text-primary" style="padding: 0px"> <q-toolbar class="text-primary" style="padding: 0px">
<q-btn <q-btn
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate" v-if="
!store.isClosedRound &&
checkPermission($route)?.attrIsCreate &&
snapShot === 'SNAP1'
"
flat flat
round round
dense dense
@ -308,7 +314,6 @@ watch(
<q-input <q-input
borderless borderless
dense dense
outlined outlined
v-model="formFilter.keyword" v-model="formFilter.keyword"
placeholder="ค้นหา" placeholder="ค้นหา"
@ -336,7 +341,6 @@ watch(
: [] : []
" "
option-value="name" option-value="name"
style="min-width: 140px" style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm" class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
/> />
@ -375,6 +379,7 @@ watch(
<q-btn <q-btn
v-if=" v-if="
!store.isClosedRound && !store.isClosedRound &&
snapShot === 'SNAP1' &&
(checkPermission($route)?.attrIsUpdate || (checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete) checkPermission($route)?.attrIsDelete)
" "

View file

@ -31,6 +31,7 @@ const { dialogRemove, messageError, showLoader, hideLoader, success } =
/** Props*/ /** Props*/
const formFilter = defineModel<DataFilter>("formFilter", { required: true }); const formFilter = defineModel<DataFilter>("formFilter", { required: true });
const maxPage = defineModel<Number>("maxPage", { required: true }); const maxPage = defineModel<Number>("maxPage", { required: true });
const snapShot = defineModel<string>("snapShot");
const props = defineProps({ const props = defineProps({
rows: { type: Array }, rows: { type: Array },
fetchDataTable: { fetchDataTable: {
@ -321,7 +322,11 @@ function onClickViewInfo(type: string, id: string) {
<template> <template>
<q-toolbar class="text-primary" style="padding: 0px"> <q-toolbar class="text-primary" style="padding: 0px">
<q-btn <q-btn
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate" v-if="
!store.isClosedRound &&
checkPermission($route)?.attrIsCreate &&
snapShot === 'SNAP1'
"
flat flat
round round
dense dense
@ -386,6 +391,7 @@ function onClickViewInfo(type: string, id: string) {
<q-btn <q-btn
v-if=" v-if="
!store.isClosedRound && !store.isClosedRound &&
snapShot === 'SNAP1' &&
(checkPermission($route)?.attrIsUpdate || (checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete) checkPermission($route)?.attrIsDelete)
" "

View file

@ -34,6 +34,7 @@ const props = defineProps({
rootId: { type: String, require: true }, rootId: { type: String, require: true },
periodId: { type: String, require: true }, periodId: { type: String, require: true },
roundFilter: { type: Object, require: true }, roundFilter: { type: Object, require: true },
snapShot: { type: String, require: true },
}); });
const splitterModel = ref<number>(13); const splitterModel = ref<number>(13);
@ -509,6 +510,7 @@ onMounted(() => {
:fetch-data-table="fetchDataPeriodNew" :fetch-data-table="fetchDataPeriodNew"
:rows="rows" :rows="rows"
:total="total" :total="total"
:snap-shot="props?.snapShot"
/> />
<TableTabType2 <TableTabType2
v-else v-else
@ -518,6 +520,7 @@ onMounted(() => {
:fetch-data-table="fetchDataPeriodNew" :fetch-data-table="fetchDataPeriodNew"
:total="total" :total="total"
:type="item.type" :type="item.type"
:snap-shot="props?.snapShot"
/> />
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>

View file

@ -28,6 +28,7 @@ const { dialogRemove, messageError, showLoader, hideLoader, success } =
/** props*/ /** props*/
const formFilter = defineModel<DataFilter>("formFilter", { required: true }); const formFilter = defineModel<DataFilter>("formFilter", { required: true });
const maxPage = defineModel<Number>("maxPage", { required: true }); const maxPage = defineModel<Number>("maxPage", { required: true });
const snapShot = defineModel<string>("snapShot");
const props = defineProps({ const props = defineProps({
rows: { type: Array }, rows: { type: Array },
fetchDataTable: { fetchDataTable: {
@ -307,7 +308,11 @@ watch(
<template> <template>
<q-toolbar class="text-primary" style="padding: 0px"> <q-toolbar class="text-primary" style="padding: 0px">
<q-btn <q-btn
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate" v-if="
!store.isClosedRound &&
checkPermission($route)?.attrIsCreate &&
snapShot === 'SNAP1'
"
flat flat
round round
dense dense
@ -385,6 +390,7 @@ watch(
<q-btn <q-btn
v-if=" v-if="
!store.isClosedRound && !store.isClosedRound &&
snapShot === 'SNAP1' &&
(checkPermission($route)?.attrIsUpdate || (checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete) checkPermission($route)?.attrIsDelete)
" "

View file

@ -30,6 +30,8 @@ const { dialogRemove, messageError, showLoader, hideLoader, success } =
/** Props*/ /** Props*/
const formFilter = defineModel<DataFilter>("formFilter", { required: true }); const formFilter = defineModel<DataFilter>("formFilter", { required: true });
const maxPage = defineModel<Number>("maxPage", { required: true }); const maxPage = defineModel<Number>("maxPage", { required: true });
const snapShot = defineModel<string>("snapShot");
const props = defineProps({ const props = defineProps({
rows: { type: Array }, rows: { type: Array },
fetchDataTable: { fetchDataTable: {
@ -335,7 +337,11 @@ watch(
<template> <template>
<q-toolbar class="text-primary" style="padding: 0px"> <q-toolbar class="text-primary" style="padding: 0px">
<q-btn <q-btn
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate" v-if="
!store.isClosedRound &&
checkPermission($route)?.attrIsCreate &&
snapShot === 'SNAP1'
"
flat flat
round round
dense dense
@ -404,6 +410,7 @@ watch(
<q-btn <q-btn
v-if=" v-if="
!store.isClosedRound && !store.isClosedRound &&
snapShot === 'SNAP1' &&
(checkPermission($route)?.attrIsUpdate || (checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete) checkPermission($route)?.attrIsDelete)
" "

View file

@ -529,6 +529,7 @@ onMounted(async () => {
:period-id="roundFilter.id" :period-id="roundFilter.id"
:root-id="agencyFilter" :root-id="agencyFilter"
:round-filter="roundFilter" :round-filter="roundFilter"
:snap-shot="snapFilter"
/> />
<q-card v-else class="q-pa-sm"> <q-card v-else class="q-pa-sm">
<div class="q-pa-sm"> <div class="q-pa-sm">

View file

@ -530,6 +530,7 @@ onMounted(async () => {
:period-id="roundFilter.id" :period-id="roundFilter.id"
:root-id="agencyFilter" :root-id="agencyFilter"
:round-filter="roundFilter" :round-filter="roundFilter"
:snap-shot="snapFilter"
/> />
<q-card v-else class="q-pa-sm"> <q-card v-else class="q-pa-sm">
<div class="q-pa-sm"> <div class="q-pa-sm">