italanta/elewa

๐Ÿ’พ ๐Ÿ“Œ Save Location Input Block Result As a Variable

Closed this issue ยท 1 comments

User stories

As a user/org, I want to be able to save my users' responses when they're prompted for their location as a variable. I should also be able to validate their response to ensure it matches my expectations.


Summary

Process user responses on the location input block as a variable, select the variable type, add unique validation and add a validation message that will be shown to the user if it doesn't match.

Description:

At the moment variables as saved within their respective blocks, This also includes their type, unique validation and their validation message. The requirement to satisfy this issue is to continue on the same for the location Input Block.

To achieve this you will need to do the following:

  • Add nested form groups for the variable and the validation fields to the form group used in the creation of the location Input block.
  • Set a checkbox in the location Input Edit field that will be used to set validation to either True or False.
  • Pass location Block's FormGroup to the reusable variable Input component.
  • Set and manage the processing of the location Input variable validation fields in their own reusable component.

Resources

Check how this has been done on the name Block. Implementation should be similar.
Only one validation field is required for this block at the moment: A regex field

The reusable component responsible for processing Inputs can be found here: libs\features\convs-mgr\stories\blocks\process-inputs\src\lib\components\variable-input\variable-input.component.html

The expected design for the location Input Block is shown below. (minus the max and min fields)

Name Block validation

Acceptance Criteria

  1. A clean UI that makes it easy to set and update variables and changes reflected in the DB
  2. Variables are saved in the block.

Please also note:
2. If a conversation about the issue Iโ€™m working on is happening,
the outcomes should be documented within that issue (not in the comments).

Working on this