Skip to content
Snippets Groups Projects
Commit e10e74db authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

refactor/fix: fetch rrules from steering and derive description from rulesets

Up until now the dashboard used a hardcoded list of rrules that matched
a long-gone fixture set of rrules in steering. Additionally, rrules were
translated in the dashboard using the the ID of the rrules in steering.
This means that any change to the fixture set, removing an rrule or not
importing the fixture set at all would mix up the translations and
therefore the actual schedules that people would create.

A few months ago the rrules were reworked and an API endpoint was
introduced that exposes the rrules defined in steering. No appropriate
change was made in the dashboard and so the rrule definitions got
out-of-sync.

This change implements a rrule store that fetches data from the API.
Additionally we’ve also implemented a custom rrule to natural language
mechanism [1]. This is because the scope of the rulesets we use in the
AURA radio context is well-known and not to complex and because rrule.js
built-in `toText` function, which might have been an option, is limited:

* bysetpos seems to be entirely unsupported
* internationalization will produce gramatically questionable
  output for languages like German, because the translation
  interface is somewhat lacking.

[1] #226 (comment 13669)
parent f1e037dc
No related branches found
No related tags found
No related merge requests found
Pipeline #7188 failed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment