Skip to content

feat(feature:client): add address fields to create client form #2380

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
merged 1 commit into from
May 25, 2025

Conversation

biplab1
Copy link
Contributor

@biplab1 biplab1 commented May 19, 2025

Fixes - Jira-#445

  • With enable-address = true (Global configuration)
create_client_enable_address_true_success.mp4
  • With enable-address = false (Global configuration)
create_client_enable_address_false.mp4

I would like to thank @itsPronay, @HekmatullahAmin and @niyajali for their valuable input and discussions at each stage of progress in resolving the issue.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • [ X] Run the static analysis check ./gradlew check or ci-prepush.sh to make sure you didn't break anything

  • [ X] If you have multiple commits please combine them into one commit by squashing them.

@biplab1 biplab1 marked this pull request as ready for review May 23, 2025 17:56
@biplab1 biplab1 changed the title feat(feature:client): add address fields to client creation form feat(feature:client): add address fields to create client form May 23, 2025
@biplab1 biplab1 force-pushed the MIFOSAC-445-client-address branch from 649f13a to 5b92e21 Compare May 23, 2025 21:41
@biplab1 biplab1 force-pushed the MIFOSAC-445-client-address branch from 2188833 to 472035b Compare May 24, 2025 00:36
@niyajali
Copy link
Collaborator

@biplab1 Show all address fields only when the user checked the address active checkbox. And rename the field name to "Enable/Provide/Use Address" instead of Address active.

@biplab1
Copy link
Contributor Author

biplab1 commented May 24, 2025

@biplab1 Show all address fields only when the user checked the address active checkbox. And rename the field name to "Enable/Provide/Use Address" instead of Address active.

@niyajali I looked at the web-app implementation which the android-client follows. It handles the steps for the address field in the create client form in the following way:

  1. The address field shows up only when the admin enables address by toggling the enable-address button in Global Configuration.
  2. When the enable-address is enabled (enable-address = true), the address fields are shown and the server won't accept the create client form without the address.
  3. If the enable-address is disabled (enable-address = false), the address form/section do not show in the create client form.

The web-app has a option for adding multiple addresses for a single client, however, as @therajanmaurya pointed out that we can go for a single address in the android-client implementation for now.

Regarding the "Address Active" checkbox name, it actually represents the "Active Status" of the address whether the client currently uses that address. It can be marked true or false from the web-app by the filed officer or the admin. Instead of mentioning just "Active Status" immediately below the address fields, I mentioned it to be "Address Active" to remove any ambiguity with the "Client Active" checkbox which is actually "Active?" in web-app create client form.

Below, I have attached screenshots of web-app, where it shows how the create client form looks with enable-address (true and false), a address form and the "Active Status" (address field) in the web-app:

  1. Create client form for enable-address = false (by admin) in Configuration Wizard -> System Setup -> Configurations -> enable-address -> disable. Address section is absent.

create_client_form_enable_address_false

  1. Create client form for enable-address = true (by admin) in Configuration Wizard -> System Setup -> Configurations -> enable-address -> enable. Address section present as can be seen in the top right corner.

create_client_form_enable_address_true

  1. An address form is displayed on pressing "+Add":

address_form

  1. Address form "Active Status" after adding address fields in the form:

Address_form_Active_Status

@biplab1
Copy link
Contributor Author

biplab1 commented May 24, 2025

Just to clarify, a field officer doesn't have admin rights. He cannot (and shouldn't) change the Global Configurations settings.

@niyajali niyajali merged commit b00bfe1 into openMF:development May 25, 2025
2 checks passed
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