dossier: refactor piece_justificative export helpers
This commit is contained in:
parent
b83a76a0a1
commit
84149218db
2 changed files with 3 additions and 2 deletions
|
@ -701,7 +701,8 @@ class Dossier < ApplicationRecord
|
|||
end
|
||||
|
||||
def attachments_downloadable?
|
||||
!PiecesJustificativesService.liste_pieces_justificatives(self).empty? && PiecesJustificativesService.pieces_justificatives_total_size(self) < Dossier::TAILLE_MAX_ZIP
|
||||
PiecesJustificativesService.liste_pieces_justificatives(self).present? \
|
||||
&& PiecesJustificativesService.pieces_justificatives_total_size(self) < Dossier::TAILLE_MAX_ZIP
|
||||
end
|
||||
|
||||
def linked_dossiers_for(instructeur)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
%li
|
||||
= link_to "Export GeoJSON", geo_data_instructeur_dossier_path(dossier.procedure, dossier), target: "_blank", rel: "noopener", class: "menu-item menu-link"
|
||||
|
||||
- if !PiecesJustificativesService.liste_pieces_justificatives(dossier).empty?
|
||||
- if PiecesJustificativesService.liste_pieces_justificatives(dossier).present?
|
||||
%span.dropdown.print-menu-opener
|
||||
%button.button.dropdown-button.icon-only
|
||||
%span.icon.attached
|
||||
|
|
Loading…
Reference in a new issue