refactor: ปรับ ui เปลี่ยนหน้า
This commit is contained in:
parent
8316d61201
commit
7fd7df5a1b
1 changed files with 132 additions and 34 deletions
|
|
@ -1403,9 +1403,38 @@ watch(inputSearchProductAndService, async () => {
|
|||
<template v-else>
|
||||
<div
|
||||
v-if="productMode === 'group'"
|
||||
class="flex justify-between q-pt-xl"
|
||||
class="flex items-center justify-between q-pt-xl"
|
||||
>
|
||||
<div class="app-text-muted">
|
||||
<div class="col-4">
|
||||
<div class="row items-center">
|
||||
<div class="app-text-muted" style="width: 80px">
|
||||
{{ $t('showing') }}
|
||||
</div>
|
||||
<div>
|
||||
<q-btn-dropdown dense unelevated :label="pageSizeGroup">
|
||||
<q-list>
|
||||
<q-item
|
||||
v-for="v in [10, 30, 50, 100, 500, 1000]"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
async () => {
|
||||
pageSizeGroup = v;
|
||||
await fetchListGroups();
|
||||
}
|
||||
"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ v }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 row justify-center app-text-muted">
|
||||
{{
|
||||
$t('recordsPage', {
|
||||
resultcurrentPage: productGroup?.length,
|
||||
|
|
@ -1413,23 +1442,55 @@ watch(inputSearchProductAndService, async () => {
|
|||
})
|
||||
}}
|
||||
</div>
|
||||
<PaginationComponent
|
||||
v-model:current-page="currentPageGroup"
|
||||
v-model:max-page="maxPageGroup"
|
||||
:fetch-data="
|
||||
async () => {
|
||||
await fetchListGroups();
|
||||
flowStore.rotate();
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
||||
<div class="col-4 row justify-end">
|
||||
<PaginationComponent
|
||||
v-model:current-page="currentPageGroup"
|
||||
v-model:max-page="maxPageGroup"
|
||||
:fetch-data="
|
||||
async () => {
|
||||
await fetchListGroups();
|
||||
flowStore.rotate();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="productMode === 'type'"
|
||||
class="flex justify-between q-pt-xl"
|
||||
>
|
||||
<div class="app-text-muted">
|
||||
<div class="col-4">
|
||||
<div class="row items-center">
|
||||
<div class="app-text-muted" style="width: 80px">
|
||||
{{ $t('showing') }}
|
||||
</div>
|
||||
<div>
|
||||
<q-btn-dropdown dense unelevated :label="pageSizeType">
|
||||
<q-list>
|
||||
<q-item
|
||||
v-for="v in [10, 30, 50, 100, 500, 1000]"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
async () => {
|
||||
pageSizeType = v;
|
||||
await fetchListType();
|
||||
}
|
||||
"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ v }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 row justify-center app-text-muted">
|
||||
{{
|
||||
$t('recordsPage', {
|
||||
resultcurrentPage: productType?.length,
|
||||
|
|
@ -1437,16 +1498,18 @@ watch(inputSearchProductAndService, async () => {
|
|||
})
|
||||
}}
|
||||
</div>
|
||||
<PaginationComponent
|
||||
v-model:current-page="currentPageType"
|
||||
v-model:max-page="maxPageType"
|
||||
:fetch-data="
|
||||
async () => {
|
||||
await fetchListType();
|
||||
flowStore.rotate();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<div class="col-4 row justify-end">
|
||||
<PaginationComponent
|
||||
v-model:current-page="currentPageType"
|
||||
v-model:max-page="maxPageType"
|
||||
:fetch-data="
|
||||
async () => {
|
||||
await fetchListType();
|
||||
flowStore.rotate();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
|
@ -1706,7 +1769,40 @@ watch(inputSearchProductAndService, async () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="row justify-between q-pb-md q-px-lg">
|
||||
<div class="app-text-muted">
|
||||
<div class="col-4">
|
||||
<div class="row items-center">
|
||||
<div class="app-text-muted" style="width: 80px">
|
||||
{{ $t('showing') }}
|
||||
</div>
|
||||
<div>
|
||||
<q-btn-dropdown
|
||||
dense
|
||||
unelevated
|
||||
:label="pageSizeServiceAndProduct"
|
||||
>
|
||||
<q-list>
|
||||
<q-item
|
||||
v-for="v in [10, 30, 50, 100, 500, 1000]"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
async () => {
|
||||
pageSizeServiceAndProduct = v;
|
||||
await fetchListOfProductAndService();
|
||||
}
|
||||
"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ v }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 row justify-center app-text-muted">
|
||||
{{
|
||||
$t('recordsPage', {
|
||||
resultcurrentPage:
|
||||
|
|
@ -1719,16 +1815,18 @@ watch(inputSearchProductAndService, async () => {
|
|||
})
|
||||
}}
|
||||
</div>
|
||||
<PaginationComponent
|
||||
v-model:current-page="currentPageServiceAndProduct"
|
||||
v-model:max-page="maxPageServiceAndProduct"
|
||||
:fetch-data="
|
||||
async () => {
|
||||
await alternativeFetch();
|
||||
flowStore.rotate();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<div class="col-4 row justify-end">
|
||||
<PaginationComponent
|
||||
v-model:current-page="currentPageServiceAndProduct"
|
||||
v-model:max-page="maxPageServiceAndProduct"
|
||||
:fetch-data="
|
||||
async () => {
|
||||
await alternativeFetch();
|
||||
flowStore.rotate();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue