Include enum endpoints in the frontend.
Opened this issue · 2 comments
codingfabi commented
sami1riaz commented
@codingfabi, I'm not sure what you mean here, can you please specify
codingfabi commented
Sure, the dropdown selection options in the forms are currently hardcoded in the frontend. However, selection options are dependent on the co2calculator package and change from time to time. There already are some endpoints we can query that return the co2calculator enums (e.g. https://github.com/pledge4future/WePledge/wiki/Backend:-GraphQL-Queries#query-dropdown-options-for-fuel_type-and-unit-attribute). This would avoid out-of-sync issues between frontend and backend.