pledge4future/WePledge

Include enum endpoints in the frontend.

Opened this issue · 2 comments

Extracted from #234

The enum endpoints include:

  • Heating Fuel Types
  • Units

@codingfabi, I'm not sure what you mean here, can you please specify

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.