feat: add "dispatch button" for uscr integration [CHI-3226]#2859
Merged
stephenhand merged 20 commits intomasterfrom Mar 18, 2025
Merged
feat: add "dispatch button" for uscr integration [CHI-3226]#2859stephenhand merged 20 commits intomasterfrom
stephenhand merged 20 commits intomasterfrom
Conversation
stephenhand
approved these changes
Mar 13, 2025
Collaborator
stephenhand
left a comment
There was a problem hiding this comment.
Couple of nits, but LGTM
| const { trigger } = useFormContext(); | ||
| const dispatch = useDispatch(); | ||
|
|
||
| const [dispatching, setDispatching] = React.useState(false); |
Collaborator
There was a problem hiding this comment.
Could probably infer this from the redux state? Not a big deal though
Collaborator
Author
There was a problem hiding this comment.
It could be lifted to Redux state, if that's what you mean, but that means introducing the notion of "custom arbitrary state" which I'm not sure we want to introduce now. I don't see how it could be "derived" from the existing state.
Collaborator
There was a problem hiding this comment.
I'm not sure what you mean by 'custom arbitrary state' - we have plenty of transient redux state which is only used to drive UI transitions if that's what you mean?
But also doesn't the dispatch case section indicate the status of the request?
| * along with this program. If not, see https://www.gnu.org/licenses/. | ||
| */ | ||
|
|
||
| export const dispatchAttachmentSectionType = 'dispatchAttempt'; |
CHI-3226-redux
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR
useCaseSectionshook to load and access case sections state.components/customIntegrations/uscr/DispatchIncidentButton.dispatchAttemptcase sections to compute if the contact has been dispatched or not.hideAddToNewCaseButtonto hide "Add to New Case" portions of the UI.Checklist
Other Related Issues
None
Verification steps
AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P