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
|
||||
const pageState = reactive({
|
||||
hideStat: false,
|
||||
statusFilter: RequestDataStatus.Pending,
|
||||
statusFilter: 'None' as 'None' | RequestDataStatus.Pending,
|
||||
inputSearch: '',
|
||||
fieldSelected: [...column.map((v) => v.name)],
|
||||
gridView: false,
|
||||
|
|
@ -45,7 +45,8 @@ async function fetchList(opts?: { rotateFlowId?: boolean }) {
|
|||
query: pageState.inputSearch,
|
||||
page: page.value,
|
||||
pageSize: pageSize.value,
|
||||
requestDataStatus: pageState.statusFilter,
|
||||
requestDataStatus:
|
||||
pageState.statusFilter === 'None' ? undefined : pageState.statusFilter,
|
||||
});
|
||||
|
||||
if (ret) {
|
||||
|
|
@ -95,7 +96,7 @@ watch([() => pageState.inputSearch, () => pageState.statusFilter], () =>
|
|||
color: hsl(var(--info-bg));
|
||||
"
|
||||
>
|
||||
{{ 0 }}
|
||||
{{ Object.values(stats).reduce((a, c) => a + c, 0) }}
|
||||
</q-badge>
|
||||
<q-btn
|
||||
class="q-ml-sm"
|
||||
|
|
@ -129,7 +130,6 @@ watch([() => pageState.inputSearch, () => pageState.statusFilter], () =>
|
|||
label: 'requestList.status.InProgress',
|
||||
color: 'blue',
|
||||
},
|
||||
|
||||
{
|
||||
icon: 'mdi-check-decagram-outline',
|
||||
count: stats[RequestDataStatus.Completed],
|
||||
|
|
@ -184,6 +184,10 @@ watch([() => pageState.inputSearch, () => pageState.statusFilter], () =>
|
|||
:for="'field-select-status'"
|
||||
:hide-dropdown-icon="$q.screen.lt.sm"
|
||||
:options="[
|
||||
{
|
||||
label: $t('general.all'),
|
||||
value: 'None',
|
||||
},
|
||||
{
|
||||
label: $t('requestList.status.Pending'),
|
||||
value: RequestDataStatus.Pending,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue