You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The request type strings we're displaying in the UI don't always match the requesttype field in the database. For example, we're using 'Dead Animal' in the UI, but the actual string in the database is 'Dead Animal Removal'. As a result, when you search for that request type, you don't get back any data.
These are all the cases where the strings are different:
UI string / DB string
Dead Animal / Dead Animal Removal
Single Streetlight / Single Streetlight Issue
Multiple Streetlight / Multiple Streetlight Issue
E-Waste / Electronic Waste
Graffiti / Graffiti Removal
Illegal Dumping / Illegal Dumping Pickup
The easy way to handle this would be just to change the strings we're displaying in the UI to match the DB strings.
But if we want to preserve the different strings in the UI, we could modify the REQUEST_TYPES constant so that it distinguishes between the UI string and the DB string.
export const REQUEST_TYPES = [
{
type: 'Dead Animal Removal', // the DB string
display: 'Dead Animal', // the UI string
...
}
...
}
Then we could modify the components that use the request types (the RequestTypeSelector, Legend, and a bunch of the charts) to use the display string for presentation, and the type for requesting data from the backend.
P.S. the database also includes 'Report Water Waste'. Are we using that on the frontend?
The text was updated successfully, but these errors were encountered:
We could serve this blob from the backend too
Or we could also do a one-off select distinct but if we pull it from the backend it will adapt to changes
Reason being....we only have access to 13 types of requests but it rumored that there are a ton of different types we just dont have access to yet
Oh yeah, that could be good. Like a metadata endpoint we could hit when the app loads up. Could include the list of NCs as well, which are currently hard-coded into the frontend.
The request type strings we're displaying in the UI don't always match the
requesttype
field in the database. For example, we're using 'Dead Animal' in the UI, but the actual string in the database is 'Dead Animal Removal'. As a result, when you search for that request type, you don't get back any data.These are all the cases where the strings are different:
UI string / DB string
Dead Animal / Dead Animal Removal
Single Streetlight / Single Streetlight Issue
Multiple Streetlight / Multiple Streetlight Issue
E-Waste / Electronic Waste
Graffiti / Graffiti Removal
Illegal Dumping / Illegal Dumping Pickup
The easy way to handle this would be just to change the strings we're displaying in the UI to match the DB strings.
But if we want to preserve the different strings in the UI, we could modify the REQUEST_TYPES constant so that it distinguishes between the UI string and the DB string.
Then we could modify the components that use the request types (the RequestTypeSelector, Legend, and a bunch of the charts) to use the display string for presentation, and the type for requesting data from the backend.
P.S. the database also includes 'Report Water Waste'. Are we using that on the frontend?
The text was updated successfully, but these errors were encountered: