medic / cht-user-management

GNU Affero General Public License v3.0
3 stars 1 forks source link

Autogenerate VHT Area Name, CHP Area Name, and VHT's Village #108

Closed kennsippell closed 3 months ago

kennsippell commented 3 months ago

47

A few notes about trying to get rid of this line in gross.ts:

I attempted to implement this with config interface like { "type": "name", "template": "{{ contact.name }} Area" } so we can do something like prompt for a CHU name AND consistently append something to the end. I added {{ this }} to the templates. This worked fine and I really liked how it separated "generation code" from "validation code" - our validation library is poorly name as it is far from just validation.

This created some place resolution issues which I didn't debug, but also resulted in a new problem where the username was CHU_community_health_unit. I didn't like that and also didn't know how to resolve it, so I backed off and went with the approach you see in this PR.