go-frontend
go-frontend copied to clipboard
Remove hardcoded enum values from the frontend
Problem
Currently we have to maintain the enum values such as Disaster types, Organization types, ERU types, etc, in both frontend and backend. We should only have one source of truth and one place to maintain such values. eg: for translation
Solution
We should fetch all of these enums from the server in the initialization phase.
The hardcoded enum values are defined in the following files
I think this is a duplicate of https://github.com/IFRCGo/go-frontend/issues/940 can you please check and confirm? @batpad maybe you have advice on best way to split the tickets if needed!
Noting that there are also several other separate tickets about specific enums (e.g. geospatial related ones) that have been (or are in) the process of being addressed
Depends on: https://github.com/IFRCGo/go-api/issues/889
@nanometrenat It's similar to the issue you mentioned above, but not exactly, https://github.com/IFRCGo/go-frontend/issues/940 is about the model fields and this issue is specifically about the ENUM / constant fields
@frozenhelium @batpad @tovari did this get addressed in the GO rewrite or is it still an open thing for build? Cheers