{# Shared period filter for the WFBO finance pages: Today / Yesterday / This Month / Last Month plus a From–To custom range. Include with: {% include 'wfbo/_period_filter.html.twig' with { route: 'app_wfbo_dashboard', period: period, fromValue: fromValue, toValue: toValue, rangeError: rangeError, refresh: true, } only %} #} {% set presets = [ {key: 'today', label: 'Today'}, {key: 'yesterday', label: 'Yesterday'}, {key: 'this_month', label: 'This Month'}, {key: 'last_month', label: 'Last Month'}, ] %} {% set isCustom = period == 'custom' %} {% set refreshParams = isCustom ? {from: fromValue, to: toValue} : {period: period|default('today')} %}
{% if rangeError is defined and rangeError %}{{ rangeError }}
{% endif %}