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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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