Skip to content

Add user type selector on login to load type-specific UISchema#100

Draft
Copilot wants to merge 4 commits intotf_nira_devfrom
copilot/add-dropdown-for-otp-box
Draft

Add user type selector on login to load type-specific UISchema#100
Copilot wants to merge 4 commits intotf_nira_devfrom
copilot/add-dropdown-for-otp-box

Conversation

Copy link

Copilot AI commented Jan 19, 2026

Login flow now captures user type (Citizen/Alien) to load appropriate UISchema. The selection is persisted and passed to backend as a query parameter.

Changes

Login UI

  • Added user type dropdown between OTP input and Verify button
  • Dropdown only visible when OTP field is shown
  • Default selection: Citizen
  • Includes ARIA labels for accessibility

State Management

  • Selected type stored in localStorage on verification
  • Retrieved by all components loading UISchema

API Integration

  • Modified DataStorageService.getIdentityJson() to accept optional userType parameter
  • URL encoding applied for security
  • Backend receives: GET /uispec/latest?userType=<Citizen|Alien>

Components Updated
Updated these components to pass user type when loading schema:

  • DemographicComponent
  • DashboardComponent
  • PreviewComponent
  • CenterSelectionComponent
  • FileUploadComponent

Internationalization
Added translations for 6 languages: English, French, Arabic, Kannada, Hindi, Tamil

// Before
getIdentityJson() {
  let url = this.BASE_URL + this.PRE_REG_URL + `uispec/latest`;
  return this.httpClient.get(url);
}

// After
getIdentityJson(userType?: string) {
  let url = this.BASE_URL + this.PRE_REG_URL + `uispec/latest`;
  if (userType) {
    url = url + `?userType=${encodeURIComponent(userType)}`;
  }
  return this.httpClient.get(url);
}

Backend Requirements

Backend must handle the userType query parameter and return appropriate UISchema. Parameter is optional for backward compatibility.

Original prompt
  1. Add drop down after Enter OTP text box.
  2. Drop Down values should be 'Alien' and 'Citizen'.
  3. On clicking on 'Verify Button', based on the drop down values UISchema should load

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 19, 2026 01:09
Co-authored-by: Nagarjunakuchi88 <64436505+Nagarjunakuchi88@users.noreply.github.com>
Co-authored-by: Nagarjunakuchi88 <64436505+Nagarjunakuchi88@users.noreply.github.com>
Co-authored-by: Nagarjunakuchi88 <64436505+Nagarjunakuchi88@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dropdown after Enter OTP text box Add user type selector on login to load type-specific UISchema Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants