feat: enhance full page functionality with updated translations, improved pagination handling, and new bulk action components
This commit is contained in:
@@ -10,10 +10,11 @@ export interface NestJSPaginationMeta {
|
||||
}
|
||||
|
||||
export interface StandardPaginationMeta {
|
||||
page: number;
|
||||
limit: number;
|
||||
total: number;
|
||||
totalPages: number;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
total?: number;
|
||||
totalPages?: number;
|
||||
countPerPage?: number;
|
||||
}
|
||||
|
||||
export interface PaginatedResponse<T> {
|
||||
@@ -21,7 +22,7 @@ export interface PaginatedResponse<T> {
|
||||
meta: StandardPaginationMeta;
|
||||
}
|
||||
|
||||
export function defaultTransformPaginationMeta(meta: any): StandardPaginationMeta {
|
||||
export function defaultTransformPaginationMeta(meta: NestJSPaginationMeta): StandardPaginationMeta {
|
||||
if (!meta) {
|
||||
return { page: 1, limit: 10, total: 0, totalPages: 0 };
|
||||
}
|
||||
@@ -30,6 +31,7 @@ export function defaultTransformPaginationMeta(meta: any): StandardPaginationMet
|
||||
limit: meta.itemsPerPage ?? meta.limit ?? 10,
|
||||
total: meta.totalItems ?? meta.total ?? 0,
|
||||
totalPages: meta.totalPages ?? 0,
|
||||
countPerPage: meta?.itemCount ?? 0,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user