Skip to content

Solved the issue with a simple CheckBox button solution, added spanish...

El Jacoby requested to merge Issue-486 into main

License and Copyright Notice

By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).

Branch Name

Issue-486

Related Issues

Closes #486

Description

Solved the issue with a simple CheckBox button solution, added spanish translations for this segment of the code (that involving the manual fragment under Guest Visit), added onResume state to achieve consistent accurate results. Added support for updating the values of barcode, phone, and household number of occupants.

Steps to Test

  1. Start the NEST program
  2. Click the GUEST REGISTRATION button and create a sham identity.
  3. To do so quickly, you may make your first and last name "E" or something, your phone number "1111111111", then advance to the next fragment. Keep advancing, put in "Prefer not to say" and "No address" and "Other" instead of "Student" so you don't have to waste time with the NCCID. You may want to say you have kids for testing purposes. Try 2 adults and 4 kids of each age group (the age groups are under or exactly at 1, 2-5, 6-12, and 13-18, making four in total). Remember either the phone number or manually-submitted barcode, and advance to summary fragment, keep advancing till you go back to the home page of the app.
  4. Click the GUEST VISIT CHECK-IN button
  5. Press MANUAL SIGN-IN
  6. You should see a checkbox that reads, "I have no bar code!" or its Spanish equivalent.
  7. This checkbox, when clicked on, should make a new option to submit a phone number appear. Any time you type, whether or not you have also added in a bar code, it will read as though you have only entered the phone number since the box states that you have no bar code. This ensures user-comprehensible controls.
  8. When you move ahead to the next fragment by clicking SUBMIT then click the android back button, the state of your checkbox should be preserved if you left it checked, as well as its contents.
  9. You can then advance to manual sign-in once again and repeat, and note that the values you have given should now be there on the questionnaire: the bar code, phone number, and number of occupants should be given as default values. Currently you cannot edit the number of kids you have since they would not be able to be sorted into the appropriate age group, meaning since the only way to sort kids is by age group we do not save the specific number of kids when you change it on the form. However, the number of kids from registration should be there. The number of old people who are senior citizens cannot change, but adults from 18 to their sixties is a value that can be saved. Furthermore, look at the logs. Whenever you change the amount of people in your home, it will log a new value for the amount of people you have. Note that any time you change a value such as the phone or barcode it is saved and states it was updated in the logs. Remember any changes to phone or barcode, or remember at least one of them.
  10. If you have changed any value, you can advance now by pressing confirm. Then repeat the process by typing either a phone number or barcode, remembered from your previous trial. You should see the changes you have made saved, at least the ones that I mentioned can be saved such as adults (non-senior-citizens), the phone number, and the barcode. All of these can be switched.

Relevant Screenshots

checkbox

Relevant Logs

You should see logs like this after making changes and confirming:

2024-05-16 21:26:09.212 30284-30284 QuestionnaireFragment   edu.ncc.nest.nestapp                 D  Updated field "householdNum" for guest ID 2 to 7
---------------------------- PROCESS ENDED (30284) for package edu.ncc.nest.nestapp ----------------------------
---------------------------- PROCESS STARTED (30707) for package edu.ncc.nest.nestapp ----------------------------
2024-05-16 21:42:56.581 30707-30707 QuestionnaireFragment   edu.ncc.nest.nestapp                 D  Updated field "phone" for guest ID 2 to 2222222221
2024-05-16 21:42:56.582 30707-30707 QuestionnaireFragment   edu.ncc.nest.nestapp                 D  Updated field "householdNum" for guest ID 2 to 7

Developer Notes

(List any notes you have about what you did here using bullets, for ex:)

  • I went to the fragment_guest_database_registration_manual_entry.xml file in the layout folder and replaced a Text view reading "OR" with a checkbox reading "I have no bar code!" (and also added its Spanish equivalent to the translation strings, along with pertinent Spanish translations for my fragment). By default, the checkbox is unchecked and the phone detail submission options are in a "gone" state.
  • I added code so for an onClick() that, when the checkbox is highlighted, makes the phone submission options appear and when unhighlighted, it makes them disappear again. Added code to assess the results of the phone and barcode submissions, setting one of them to a blank ("") string when the other is chosen based on the checkbox's status.
  • I added code for an onResume() that keeps the fragment's state so that, when clicked, it makes sure that our phone submission option-related views are visible.
Edited by Darci Burdge

Merge request reports