7 changed files with 102 additions and 0 deletions
@ -0,0 +1,22 @@ |
|||||||
|
<%= form_with model: @filter_form, url: filters_lettings_logs_path(search: @search_term, codes_only: @codes_only) do |f| %> |
||||||
|
<%= render partial: "filters/radio_filter", |
||||||
|
locals: { |
||||||
|
f:, |
||||||
|
options: { |
||||||
|
"all": { label: "Any user" }, |
||||||
|
"you": { label: "You" }, |
||||||
|
"specific_user": { |
||||||
|
label: "Specific user", |
||||||
|
conditional_filter: { |
||||||
|
type: "select", |
||||||
|
label: "User", |
||||||
|
category: "user", |
||||||
|
options: assigned_to_filter_options(current_user), |
||||||
|
}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
label: "Assigned to", |
||||||
|
category: "assigned_to", |
||||||
|
} %> |
||||||
|
<%= f.govuk_submit "Save changes", class: "govuk-!-margin-bottom-0" %> |
||||||
|
<% end %> |
||||||
@ -0,0 +1,20 @@ |
|||||||
|
<%= form_with model: @filter_form, url: filters_lettings_logs_path(search: @search_term, codes_only: @codes_only) do |f| %> |
||||||
|
<%= render partial: "filters/radio_filter", locals: { |
||||||
|
f:, |
||||||
|
options: { |
||||||
|
"all": { label: "Any managing organisation" }, |
||||||
|
"specific_org": { |
||||||
|
label: "Specific managing organisation", |
||||||
|
conditional_filter: { |
||||||
|
type: "select", |
||||||
|
label: user_or_org_lettings_path? ? "Managed by" : "Reported by", |
||||||
|
category: "managing_organisation", |
||||||
|
options: managing_organisation_filter_options(current_user), |
||||||
|
}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
label: user_or_org_lettings_path? ? "Managed by" : "Reported by", |
||||||
|
category: "managing_organisation_select", |
||||||
|
} %> |
||||||
|
<%= f.govuk_submit "Save changes", class: "govuk-!-margin-bottom-0" %> |
||||||
|
<% end %> |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
<%= form_with model: @filter_form, url: filters_lettings_logs_path(search: @search_term, codes_only: @codes_only) do |f| %> |
||||||
|
<%= render partial: "filters/checkbox_filter", |
||||||
|
locals: { |
||||||
|
f:, |
||||||
|
options: needstype_filters, |
||||||
|
label: "Needs type", |
||||||
|
category: "needstypes", |
||||||
|
} %> |
||||||
|
<%= f.govuk_submit "Save changes", class: "govuk-!-margin-bottom-0" %> |
||||||
|
<% end %> |
||||||
@ -0,0 +1,20 @@ |
|||||||
|
<%= form_with model: @filter_form, url: filters_lettings_logs_path(search: @search_term, codes_only: @codes_only) do |f| %> |
||||||
|
<%= render partial: "filters/radio_filter", locals: { |
||||||
|
f:, |
||||||
|
options: { |
||||||
|
"all": { label: "Any owning organisation" }, |
||||||
|
"specific_org": { |
||||||
|
label: "Specific owning organisation", |
||||||
|
conditional_filter: { |
||||||
|
type: "select", |
||||||
|
label: "Owning Organisation", |
||||||
|
category: "owning_organisation", |
||||||
|
options: owning_organisation_filter_options(current_user), |
||||||
|
}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
label: "Owned by", |
||||||
|
category: "owning_organisation_select", |
||||||
|
} %> |
||||||
|
<%= f.govuk_submit "Save changes", class: "govuk-!-margin-bottom-0" %> |
||||||
|
<% end %> |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
<%= form_with model: @filter_form, url: filters_lettings_logs_path(search: @search_term, codes_only: @codes_only) do |f| %> |
||||||
|
<%= render partial: "filters/checkbox_filter", |
||||||
|
locals: { |
||||||
|
f:, |
||||||
|
options: status_filters, |
||||||
|
label: "Status", |
||||||
|
category: "status", |
||||||
|
} %> |
||||||
|
<%= f.govuk_submit "Save changes", class: "govuk-!-margin-bottom-0" %> |
||||||
|
<% end %> |
||||||
Loading…
Reference in new issue