-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/events multiselect bulk actions #640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
ec4350a
Multi-select and bulk actions on the events list
Dobrunia 42287da
chore: add tests
Dobrunia 40ca14d
fix: lint
Dobrunia 0593ed3
feat(events): extend bulk toggle functionality to support starred marks
Dobrunia dd309a5
feat(events): update bulkToggleEventMark to return updatedEventIds
Dobrunia 9a0fc08
Bump version up to 1.5.1
github-actions[bot] 7ed3481
remove
Dobrunia d497afd
feat(events): add bulkUpdateAssignee functionality to manage event as…
Dobrunia dd84f03
refactor(events): streamline bulk event ID validation and enhance err…
Dobrunia ace53d0
refactor(events): remove unsupported mark validation from bulkToggleE…
Dobrunia 530adaa
feat(events): implement bulkVisitEvents functionality to mark multipl…
Dobrunia c212292
refactor(events): consolidate bulk event ID resolution into a new met…
Dobrunia 049bace
fix: lint
Dobrunia f250de5
fix: lint
Dobrunia ccd4a7e
Bump version up to 1.5.2
github-actions[bot] 6535527
fix: notif
Dobrunia 93fd728
Bump version up to 1.5.3
github-actions[bot] 94d4e84
chore: optimize assignee notification handling with chunked processing
Dobrunia f2ab338
Update src/typeDefs/event.ts
Dobrunia 81a682f
refactor(events): rename bulkVisitEvent to bulkVisitEvents for consis…
Dobrunia c271563
refactor(events): simplify bulk event operations by removing updatedC…
Dobrunia 57582bd
refactor(events): rename response types for bulk event operations to …
Dobrunia 1e13972
fix: lint
Dobrunia 2e9fba0
fix
Dobrunia 0ee4684
Bump version up to 1.5.1
github-actions[bot] c4963c4
fix
Dobrunia bf64ade
refactor(events): update bulk event operations to return success stat…
Dobrunia ae8d3dc
test(events): add test to ensure no notifications are sent when no ch…
Dobrunia 9d77538
refactor(events): rename bulk toggle event mark methods to bulk set e…
Dobrunia 5663900
Merge branch 'master' into feat/events-multiselect-bulk-actions
Dobrunia 83cf665
fix
Dobrunia dafbd74
refactor(events): update assignee notification parameters for clarity…
Dobrunia fcd6fd3
refactor(tests): consolidate event ID validation tests using paramete…
Dobrunia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,52 @@ | ||
| import { UserInputError } from 'apollo-server-express'; | ||
| import { ObjectId } from 'mongodb'; | ||
| import sendPersonalNotification from '../../utils/personalNotifications'; | ||
| import { SenderWorkerTaskType } from '../../types/userNotifications/task-type'; | ||
| import type { EnqueueAssigneeNotificationParams } from '../../types/userNotifications/assignee'; | ||
|
|
||
| /** | ||
| * Validate and normalize bulk event ids from resolver input. | ||
| * | ||
| * @param {string[]} eventIds - raw event ids from GraphQL input | ||
| * @returns {string[]} unique valid event ids | ||
| */ | ||
| export function parseBulkEventIds(eventIds: string[]): string[] { | ||
| if (!eventIds || !eventIds.length) { | ||
| throw new UserInputError('eventIds must contain at least one id'); | ||
| } | ||
|
|
||
| const uniqueEventIds = [ ...new Set(eventIds.map(id => String(id))) ]; | ||
|
|
||
| if (!uniqueEventIds.every((id) => ObjectId.isValid(id))) { | ||
| throw new UserInputError('eventIds must contain only valid ids'); | ||
| } | ||
|
|
||
| return uniqueEventIds; | ||
| } | ||
|
|
||
| /** | ||
| * Enqueue one assignee notification without blocking resolver response. | ||
| */ | ||
| export function enqueueAssigneeNotification({ | ||
| assigneeData, | ||
| assigneeId, | ||
| projectId, | ||
| whoAssignedId, | ||
| eventId, | ||
| }: EnqueueAssigneeNotificationParams): void { | ||
| if (!assigneeData) { | ||
| return; | ||
| } | ||
|
|
||
| sendPersonalNotification(assigneeData, { | ||
| type: SenderWorkerTaskType.Assignee, | ||
| payload: { | ||
| assigneeId, | ||
| projectId, | ||
| whoAssignedId, | ||
| eventId, | ||
| }, | ||
| }).catch((error: unknown) => { | ||
| console.error('Failed to enqueue assignee notification', error); | ||
| }); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.