Merge pull request #8902 from demarches-simplifiees/bug-disable-select-all-actions-multiples

[bug] actions multiples > désactiver la checkbox select_all quand action en cours
This commit is contained in:
github-merge-queue[bot] 2023-04-18 21:52:21 +00:00 committed by GitHub
commit c439a286a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -89,6 +89,7 @@ module Instructeurs
.per(ITEMS_PER_PAGE)
@projected_dossiers = DossierProjectionService.project(@filtered_sorted_paginated_ids, procedure_presentation.displayed_fields)
@disable_checkbox_all = @projected_dossiers.all? { _1.batch_operation_id.present? }
assign_exports
@batch_operations = BatchOperation.joins(:groupe_instructeurs)

View file

@ -109,7 +109,7 @@
%tr
- if batch_operation_component.render?
%th.text-center
%input{ type: "checkbox", data: { action: "batch-operation#onCheckAll" }, id: dom_id(BatchOperation.new, :checkbox_all), aria: { label: t('views.instructeurs.dossiers.select_all') } }
%input{ type: "checkbox", disabled: @disable_checkbox_all, checked: @disable_checkbox_all, data: { action: "batch-operation#onCheckAll" }, id: dom_id(BatchOperation.new, :checkbox_all), aria: { label: t('views.instructeurs.dossiers.select_all') } }
- else
- if @statut.in? %w(suivis traites tous)
= render partial: "header_field", locals: { field: { "label" => "●", "table" => "notifications", "column" => "notifications" }, classname: "notification-col text-center" }