Quick date ranges – system description
The quick range master, the rule parameters (unit, offset, span, alignment), whitelisted saving and how filter panels are served.
Master of the quick range buttons of filter panels: code, name, order, status and an optional rule. The master stores a rule, never a date; date arithmetic lives in the quick range library.
Data model
Table names carry the installation's own prefix in the database.
| Table | Main fields |
|---|---|
quickrange | code, name, order, status (0/1/9), period_unit (year/quarter/month/day), period_offset, period_span, period_align (calendar/today) |
Known codes (examples): ty, tm, tq, q1–q4, py, pm, pq1–pq4, l30d, l10d, l3y.
Process
- List: filter by name/status; per row a preview resolved for today (
resolveRow) and the rule description; unknown codes flagged; the trash only with the right to see deleted items. - Save: the code must be a known rule code (
isCode) and unique (codeTaken); the model normalises unit and alignment against a whitelist (unknown unit → empty = built-in rule). - Delete: physical with
delete,status = 9withstatusdeleteonly. - Serving:
getFilterPresets()supplies the buttons of the filter panels.
Permissions
- Function rights:
list; form/savecanSave(); statusedit;delete;statusdelete;debug. The keys have a catalogue seed. - No content scope.