File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
projects/packages/forms/src/dashboard/inbox/dataviews Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import { defaultView } from './views';
1818/**
1919 * Types
2020 */
21- import type { Action , QueryParams } from './types' ;
21+ import type { Action , QueryParams , Registry } from './types' ;
2222
2323/**
2424 * Helper function to extract count-relevant query params from the current query.
@@ -57,11 +57,11 @@ const getCountQueryParams = ( currentQuery: QueryParams ): QueryParams => {
5757 * @param {string } statusBeingRemovedFrom - The status items are being removed from ('trash', 'spam', or 'inbox').
5858 */
5959const invalidateCacheAndNavigate = (
60- registry ,
61- currentQuery ,
62- queryParams ,
63- statusBeingRemovedFrom
64- ) => {
60+ registry : Registry ,
61+ currentQuery : QueryParams ,
62+ queryParams : QueryParams ,
63+ statusBeingRemovedFrom : string
64+ ) : void => {
6565 // Invalidate counts to ensure accurate totals
6666 registry . dispatch ( dashboardStore ) . invalidateCounts ( ) ;
6767
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ export type QueryParams = {
1010 before ?: string ;
1111 after ?: string ;
1212 is_unread ?: boolean ;
13+ per_page ?: number ;
14+ page ?: number ;
1315} ;
1416
1517/**
@@ -58,10 +60,14 @@ export type Registry = {
5860 invalidateFilters : ( ) => void ;
5961 invalidateCounts : ( ) => void ;
6062 markRecordsAsInvalid : ( ids : number [ ] ) => void ;
63+ setCurrentQuery : ( queryParams : QueryParams ) => void ;
6164 } ;
6265 select : ( store : StoreDescriptor ) => {
6366 // Dashboard store select actions
6467 getCurrentQuery : ( ) => QueryParams ;
68+ getTrashCount : ( queryParams : QueryParams ) => number ;
69+ getSpamCount : ( queryParams : QueryParams ) => number ;
70+ getInboxCount : ( queryParams : QueryParams ) => number ;
6571
6672 // Core store select actions
6773 getEntityRecord : (
You can’t perform that action at this time.
0 commit comments