feat: filter assignments by assignment status
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-yellow-500">
|
||||
<circle cx="3" cy="3" r="2" />
|
||||
</svg>
|
||||
{% elseif assignment.inProgress %}
|
||||
{% elseif assignment.staffing %}
|
||||
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-blue-500">
|
||||
<circle cx="3" cy="3" r="2" />
|
||||
</svg>
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(filterForm, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
|
||||
<div class="flex flex-col space-y-2 pb-2">
|
||||
{{ form_row(filterForm.status) }}
|
||||
<div class="flex flex-col space-y-2 pb-4">
|
||||
{% if form.status is defined %}
|
||||
{{ form_row(filterForm.status) }}
|
||||
{% endif %}
|
||||
{{ form_row(filterForm.dateFrom) }}
|
||||
{{ form_row(filterForm.dateTo) }}
|
||||
{{ form_row(filterForm.jobProfile) }}
|
||||
|
||||
@@ -166,17 +166,16 @@
|
||||
{%- if errors|length -%}
|
||||
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' ring-red-500 placeholder:red-500 focus:ring-red-500' }) -%}
|
||||
{% else %}
|
||||
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-gray-400 focus:ring-primary' }) -%}
|
||||
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-gray-900 focus:ring-primary' }) -%}
|
||||
{%- endif -%}
|
||||
{%- if disabled is defined and disabled == true -%}
|
||||
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' cursor-not-allowed' }) -%}
|
||||
{%- endif -%}
|
||||
<div {{ stimulus_controller('datepicker', { 'minDate': minDate, 'maxDate': maxDate, 'disableWeekends': form.vars.disable_weekends }) }}>
|
||||
<input type="text" name="{{ form.vars.full_name }}" value="{{ value }}" {{ block('widget_attributes') }}
|
||||
{{ stimulus_target('datepicker', 'field') }} />
|
||||
<input type="text" name="{{ form.vars.full_name }}" value="{{ value }}" {{ block('widget_attributes') }} {{ stimulus_target('datepicker', 'field') }} />
|
||||
</div>
|
||||
{%- if disabled is defined and disabled == true -%}
|
||||
<input type="hidden" name="{{ form.vars.full_name }}" value="{{ form.vars.value }}">
|
||||
<input type="hidden" name="{{ form.vars.full_name }}" value="{{ value }}">
|
||||
{%- endif -%}
|
||||
{%- endblock datepicker_widget %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user