-
Notifications
You must be signed in to change notification settings - Fork 12
fix: call order is not persistent for user officers #1294
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
ellen-wright
merged 14 commits into
develop
from
1473-fix-call-ordering-persistence-bug
Feb 13, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1212750
fix: call order is not persistent for user officers
ellen-wright 6497a54
Merge branch 'develop' into 1473-fix-call-ordering-persistence-bug
ellen-wright 151785b
Merge branch 'develop' of https://github.com/UserOfficeProject/user-o…
ellen-wright 0b8295c
Merge branch 'develop' of https://github.com/UserOfficeProject/user-o…
ellen-wright debbed9
Merge branch 'develop' into 1473-fix-call-ordering-persistence-bug
mutambaraf 41325e8
Merge branch '1473-fix-call-ordering-persistence-bug' of https://gith…
ellen-wright 50eb83a
Order calls in getcalls query
ellen-wright 0808d7d
Merge branch 'develop' into 1473-fix-call-ordering-persistence-bug
ellen-wright 819c3f4
Merge branch 'develop' into 1473-fix-call-ordering-persistence-bug
ellen-wright be11c06
Remove where statement
ellen-wright 53b90c7
Merge branch '1473-fix-call-ordering-persistence-bug' of https://gith…
ellen-wright e2ed5a5
consolidate internal User check for call filter
ellen-wright 462fdff
Add e2e test
ellen-wright fd3c00c
Fix test
ellen-wright 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
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 |
|---|---|---|
|
|
@@ -349,7 +349,11 @@ const CallsTable = ({ confirm, isArchivedTab }: CallTableProps) => { | |
| result.source.index, | ||
| result.destination.index | ||
| ); | ||
| setCalls(callsWithUpdatedOrder); | ||
| setCalls( | ||
| callsWithUpdatedOrder.sort((a, b) => | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: do you know why
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean do we even need to call |
||
| a.sort_order > b.sort_order ? -1 : 1 | ||
| ) | ||
| ); | ||
| const callOrderList = callsWithUpdatedOrder.map((item, index) => ({ | ||
| callId: item.id, | ||
| sort_order: index, | ||
|
|
@@ -360,6 +364,13 @@ const CallsTable = ({ confirm, isArchivedTab }: CallTableProps) => { | |
| }); | ||
| }; | ||
|
|
||
| const getCallOrder = (): void => { | ||
| setCallsFilter(() => ({ | ||
| ...getFilterStatus(callStatus as CallStatusFilters, isArchivedTab), | ||
| isOrdered: true, | ||
| })); | ||
| }; | ||
|
|
||
| return ( | ||
| <div data-cy="calls-table"> | ||
| <Grid container spacing={2}> | ||
|
|
@@ -381,7 +392,12 @@ const CallsTable = ({ confirm, isArchivedTab }: CallTableProps) => { | |
| control={ | ||
| <Switch | ||
| checked={isCallReorderMode} | ||
| onChange={(): void => setIsCallReorderMode(!isCallReorderMode)} | ||
| onChange={(): void => { | ||
| if (!isCallReorderMode) { | ||
| getCallOrder(); | ||
| } | ||
| setIsCallReorderMode(!isCallReorderMode); | ||
| }} | ||
| /> | ||
| } | ||
| label="Order calls mode" | ||
|
|
@@ -395,12 +411,7 @@ const CallsTable = ({ confirm, isArchivedTab }: CallTableProps) => { | |
| Drag to order calls | ||
| </Typography> | ||
| <Paper> | ||
| <CallReorder | ||
| items={calls.sort((a, b) => | ||
| a.sort_order > b.sort_order ? 1 : -1 | ||
| )} | ||
| onDragEnd={onDragEnd} | ||
| /> | ||
| <CallReorder items={calls} onDragEnd={onDragEnd} /> | ||
| </Paper> | ||
| </div> | ||
| )} | ||
|
|
||
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
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.