refactor: update screen.sm pagination display for various management pages

This commit is contained in:
puriphatt 2025-01-28 18:07:57 +07:00
parent 3331afaaa3
commit 5c5e9fac63
15 changed files with 181 additions and 69 deletions

View file

@ -144,6 +144,7 @@ export default {
quotationLabor: 'Used to display the list of employees',
quotationPayment: 'Used to display payment details',
orderDetail: 'To display the list of employees in that product',
ofPage: '{current} of {total}',
},
menu: {

View file

@ -146,6 +146,7 @@ export default {
quotationLabor: 'ใช้แสดงรายชื่อลูกจ้าง',
quotationPayment: 'ใช้แสดงรายละเอียดในการชำระเงิน',
orderDetail: 'เพื่อแสดงรายชื่อลูกจ้างในสินค้านั้นๆ',
ofPage: '{current} จาก {total}',
},
menu: {

View file

@ -1427,10 +1427,15 @@ watch(
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: userData?.result.length,
total: userData?.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: userData?.result.length,
total: userData?.total,
})
: $t('general.ofPage', {
current: userData?.result.length,
total: userData?.total,
})
}}
</div>
<div class="col-4 row justify-end">

View file

@ -698,10 +698,15 @@ watch(
<div class="col-4 flex justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: branch?.length,
total: totalBranch,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: branch?.length,
total: totalBranch,
})
: $t('general.ofPage', {
current: branch?.length,
total: totalBranch,
})
}}
</div>
<div class="col-4 flex justify-end">

View file

@ -1749,10 +1749,17 @@ const emptyCreateDialog = ref(false);
<div class="col-4 flex justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: listCustomer.length,
total: statsCustomerType.PERS + statsCustomerType.CORP,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: listCustomer.length,
total:
statsCustomerType.PERS + statsCustomerType.CORP,
})
: $t('general.ofPage', {
current: listCustomer.length,
total:
statsCustomerType.PERS + statsCustomerType.CORP,
})
}}
</div>
@ -1844,10 +1851,15 @@ const emptyCreateDialog = ref(false);
<div class="col-4 flex justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: listEmployee.length,
total: employeeStats,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: listEmployee.length,
total: employeeStats,
})
: $t('general.ofPage', {
current: listEmployee.length,
total: employeeStats,
})
}}
</div>

View file

@ -720,12 +720,19 @@ watch([() => pageState.inputSearch, workflowPageSize], fetchWorkflowList);
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: workflowData.length,
total: pageState.inputSearch
? workflowData.length
: pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: workflowData.length,
total: pageState.inputSearch
? workflowData.length
: pageState.total,
})
: $t('general.ofPage', {
current: workflowData.length,
total: pageState.inputSearch
? workflowData.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">

View file

@ -2482,10 +2482,15 @@ watch(
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: productGroup?.length,
total: totalGroup,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: productGroup?.length,
total: totalGroup,
})
: $t('general.ofPage', {
current: productGroup?.length,
total: totalGroup,
})
}}
</div>
@ -3186,13 +3191,21 @@ watch(
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage:
productAndServiceTab === 'product'
? product?.length
: service?.length,
total: total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage:
productAndServiceTab === 'product'
? product?.length
: service?.length,
total: total,
})
: $t('general.ofPage', {
current:
productAndServiceTab === 'product'
? product?.length
: service?.length,
total: total,
})
}}
</div>
<div class="col-4 row justify-end">

View file

@ -736,12 +736,19 @@ async function storeDataLocal(id: string) {
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: quotationData.length,
total: pageState.inputSearch
? quotationData.length
: pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: quotationData.length,
total: pageState.inputSearch
? quotationData.length
: pageState.total,
})
: $t('general.ofPage', {
current: quotationData.length,
total: pageState.inputSearch
? quotationData.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">

View file

@ -756,10 +756,19 @@ watch(
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch ? data.length : pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
: $t('general.ofPage', {
current: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">

View file

@ -357,10 +357,19 @@ watch([() => pageState.inputSearch, () => pageState.statusFilter], () =>
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch ? data.length : pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
: $t('general.ofPage', {
current: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">

View file

@ -484,12 +484,19 @@ watch(
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: taskOrderList.length,
total: pageState.inputSearch
? taskOrderList.length
: pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: taskOrderList.length,
total: pageState.inputSearch
? taskOrderList.length
: pageState.total,
})
: $t('general.ofPage', {
current: taskOrderList.length,
total: pageState.inputSearch
? taskOrderList.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">

View file

@ -413,10 +413,19 @@ watch(
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch ? data.length : pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
: $t('general.ofPage', {
current: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">

View file

@ -412,10 +412,19 @@ watch(
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch ? data.length : pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
: $t('general.ofPage', {
current: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">

View file

@ -439,10 +439,19 @@ watch(
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch ? data.length : pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
: $t('general.ofPage', {
current: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">

View file

@ -375,10 +375,19 @@ watch(
</div>
<div class="col-4 row justify-center app-text-muted">
{{
$t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch ? data.length : pageState.total,
})
$q.screen.gt.sm
? $t('general.recordsPage', {
resultcurrentPage: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
: $t('general.ofPage', {
current: data.length,
total: pageState.inputSearch
? data.length
: pageState.total,
})
}}
</div>
<nav class="col-4 row justify-end">