feat(station-login): phone number input disable logic in profile mode#613
feat(station-login): phone number input disable logic in profile mode#613bhabalan wants to merge 1 commit intowebex:nextfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9b7a33b39
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Disable phone number input if device type and team haven't changed in profile mode | ||
| const isPhoneNumberDisabled = | ||
| profileMode && | ||
| isAgentLoggedIn && | ||
| selectedDeviceType !== DESKTOP && | ||
| selectedDeviceType === originalLoginOptions.deviceType && | ||
| selectedTeamId === originalLoginOptions.teamId; |
There was a problem hiding this comment.
Block dial-number-only changes after team toggle
This disable check only looks at the current team/device, so a user can still change the dial number by temporarily changing the team (which enables the input), editing the number, and then switching the team back. When the team returns to the original value, the input becomes disabled, but currentLoginOptions.dialNumber remains changed and isLoginOptionsChanged (computed in packages/contact-center/station-login/src/helper.ts) will still allow saving, effectively permitting a dial-number-only update. If the intent is to forbid dial-number-only changes, the logic needs to also reset/validate the dial number when team/device return to the original selection or block saving when only dial number differs.
Useful? React with 👍 / 👎.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7460
This pull request addresses
It is not allowed to change just the phone number in the station login profile mode switch without changing either the team or the device type
by making the following changes
Added condition to enforce this behavior
Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.