Skip to content

feat(station-login): phone number input disable logic in profile mode#613

Open
bhabalan wants to merge 1 commit intowebex:nextfrom
bhabalan:disable-profile-phone-number
Open

feat(station-login): phone number input disable logic in profile mode#613
bhabalan wants to merge 1 commit intowebex:nextfrom
bhabalan:disable-profile-phone-number

Conversation

@bhabalan
Copy link
Contributor

@bhabalan bhabalan commented Feb 5, 2026

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link
    < ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Cursor
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

@bhabalan bhabalan added the validated Indicates that the PR is ready for actions label Feb 5, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +63 to +69
// 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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-613.d1b38q61t1z947.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated Indicates that the PR is ready for actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant