-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add infinite scroll and pagination to notificationspopover gf-4…
…58 (#490) * feat: added pagination for notifications to enable use of infinite scroll gf-455 * fix: adjusted css and imports in notifications-popover gf-455 * fix: adjusted misspelling and removed comments gf-455 * fix: notification action type correction gf-455 * fix: adjusted backend to reflect current project style better gf-455 * fix: adjusted merge conflict gf-458 * fix: adjusted notification title to be sticky gf-458 * fix: added separate file for constant, adjusted use of enum gf-458 * fix: adjusted swagger to reflect backend code gf-458 * fix: adjusted naming and default value gf-248 * fix: adjusted controller to use proper type and removed variable gf-458 --------- Co-authored-by: Vitalii Stefaniv <[email protected]>
- Loading branch information
1 parent
47d8620
commit 9daf38b
Showing
18 changed files
with
147 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
.../libs/components/header/libs/components/notifications-popover/libs/constants/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { NOTIFICATIONS_PAGE_SIZE } from "./notifications-page-size.constant.js"; |
3 changes: 3 additions & 0 deletions
3
.../libs/components/notifications-popover/libs/constants/notifications-page-size.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const NOTIFICATIONS_PAGE_SIZE = 10; | ||
|
||
export { NOTIFICATIONS_PAGE_SIZE }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ontend/src/libs/components/header/libs/components/notifications-popover/styles.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { | ||
type NotificationGetAllItemResponseDto, | ||
type NotificationGetAllRequestDto, | ||
type NotificationGetAllResponseDto, | ||
} from "@git-fit/shared"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
import { createAsyncThunk } from "@reduxjs/toolkit"; | ||
|
||
import { type AsyncThunkConfig } from "~/libs/types/types.js"; | ||
import { | ||
type AsyncThunkConfig, | ||
type PaginationQueryParameters, | ||
} from "~/libs/types/types.js"; | ||
|
||
import { type NotificationGetAllResponseDto } from "../libs/types/types.js"; | ||
import { name as sliceName } from "./notification.slice.js"; | ||
|
||
const loadAll = createAsyncThunk< | ||
NotificationGetAllResponseDto, | ||
undefined, | ||
PaginationQueryParameters, | ||
AsyncThunkConfig | ||
>(`${sliceName}/load-all`, async (_, { extra }) => { | ||
>(`${sliceName}/load-all`, async (query, { extra }) => { | ||
const { notificationApi } = extra; | ||
|
||
return await notificationApi.getAll(); | ||
return await notificationApi.getAll(query); | ||
}); | ||
|
||
export { loadAll }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.