feat: people infinite scroll (#11326)
* feat: people infinite scroll * add infinite scroll to show & hide modal * update unit tests * show total people count instead of currently loaded * update personsearchdto
This commit is contained in:
@@ -3824,6 +3824,29 @@
|
||||
"get": {
|
||||
"operationId": "getAllPeople",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "page",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Page number for pagination",
|
||||
"schema": {
|
||||
"minimum": 1,
|
||||
"default": 1,
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Number of items per page",
|
||||
"schema": {
|
||||
"minimum": 1,
|
||||
"maximum": 1000,
|
||||
"default": 500,
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "withHidden",
|
||||
"required": false,
|
||||
@@ -9531,6 +9554,10 @@
|
||||
},
|
||||
"PeopleResponseDto": {
|
||||
"properties": {
|
||||
"hasNextPage": {
|
||||
"description": "This property was added in v1.110.0",
|
||||
"type": "boolean"
|
||||
},
|
||||
"hidden": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
||||
@@ -607,6 +607,8 @@ export type UpdatePartnerDto = {
|
||||
inTimeline: boolean;
|
||||
};
|
||||
export type PeopleResponseDto = {
|
||||
/** This property was added in v1.110.0 */
|
||||
hasNextPage?: boolean;
|
||||
hidden: number;
|
||||
people: PersonResponseDto[];
|
||||
total: number;
|
||||
@@ -2173,13 +2175,17 @@ export function updatePartner({ id, updatePartnerDto }: {
|
||||
body: updatePartnerDto
|
||||
})));
|
||||
}
|
||||
export function getAllPeople({ withHidden }: {
|
||||
export function getAllPeople({ page, size, withHidden }: {
|
||||
page?: number;
|
||||
size?: number;
|
||||
withHidden?: boolean;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: PeopleResponseDto;
|
||||
}>(`/people${QS.query(QS.explode({
|
||||
page,
|
||||
size,
|
||||
withHidden
|
||||
}))}`, {
|
||||
...opts
|
||||
|
||||
Reference in New Issue
Block a user