feat: add all status display filter
This commit is contained in:
parent
5f5716fd2a
commit
18a533de34
1 changed files with 8 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ const { data, stats, page, pageMax, pageSize } = storeToRefs(requestListStore);
|
||||||
// NOTE: Variable
|
// NOTE: Variable
|
||||||
const pageState = reactive({
|
const pageState = reactive({
|
||||||
hideStat: false,
|
hideStat: false,
|
||||||
statusFilter: RequestDataStatus.Pending,
|
statusFilter: 'None' as 'None' | RequestDataStatus.Pending,
|
||||||
inputSearch: '',
|
inputSearch: '',
|
||||||
fieldSelected: [...column.map((v) => v.name)],
|
fieldSelected: [...column.map((v) => v.name)],
|
||||||
gridView: false,
|
gridView: false,
|
||||||
|
|
@ -45,7 +45,8 @@ async function fetchList(opts?: { rotateFlowId?: boolean }) {
|
||||||
query: pageState.inputSearch,
|
query: pageState.inputSearch,
|
||||||
page: page.value,
|
page: page.value,
|
||||||
pageSize: pageSize.value,
|
pageSize: pageSize.value,
|
||||||
requestDataStatus: pageState.statusFilter,
|
requestDataStatus:
|
||||||
|
pageState.statusFilter === 'None' ? undefined : pageState.statusFilter,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
@ -95,7 +96,7 @@ watch([() => pageState.inputSearch, () => pageState.statusFilter], () =>
|
||||||
color: hsl(var(--info-bg));
|
color: hsl(var(--info-bg));
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ 0 }}
|
{{ Object.values(stats).reduce((a, c) => a + c, 0) }}
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<q-btn
|
<q-btn
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
|
|
@ -129,7 +130,6 @@ watch([() => pageState.inputSearch, () => pageState.statusFilter], () =>
|
||||||
label: 'requestList.status.InProgress',
|
label: 'requestList.status.InProgress',
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
icon: 'mdi-check-decagram-outline',
|
icon: 'mdi-check-decagram-outline',
|
||||||
count: stats[RequestDataStatus.Completed],
|
count: stats[RequestDataStatus.Completed],
|
||||||
|
|
@ -184,6 +184,10 @@ watch([() => pageState.inputSearch, () => pageState.statusFilter], () =>
|
||||||
:for="'field-select-status'"
|
:for="'field-select-status'"
|
||||||
:hide-dropdown-icon="$q.screen.lt.sm"
|
:hide-dropdown-icon="$q.screen.lt.sm"
|
||||||
:options="[
|
:options="[
|
||||||
|
{
|
||||||
|
label: $t('general.all'),
|
||||||
|
value: 'None',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: $t('requestList.status.Pending'),
|
label: $t('requestList.status.Pending'),
|
||||||
value: RequestDataStatus.Pending,
|
value: RequestDataStatus.Pending,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue