-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11350 from demarches-simplifiees/add-accuse-lectu…
…re-in-exports-ldu ETQ instructeur je peux voir la date d'accuse de lecture dans les exports et je peux filtrer sur sa présence ou non
- Loading branch information
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
class Columns::ReadAgreementColumn < Columns::DossierColumn | ||
def initialize(procedure_id:) | ||
super( | ||
procedure_id:, | ||
table: nil, | ||
column: nil, | ||
label: "Décision vue par l'usager ?", | ||
type: :boolean, | ||
displayable: false, | ||
options_for_select: [[I18n.t('activerecord.attributes.type_de_champ.type_champs.yes_no_true'), true], [I18n.t('activerecord.attributes.type_de_champ.type_champs.yes_no_false'), false]] | ||
) | ||
end | ||
|
||
def value(dossier) = dossier.accuse_lecture_agreement_at | ||
|
||
def filtered_ids(dossiers, values) | ||
return dossiers.ids if values.include?("true") && values.include?("false") | ||
if values == ["true"] | ||
dossiers.where.not(accuse_lecture_agreement_at: nil).ids | ||
else | ||
dossiers.where(accuse_lecture_agreement_at: nil).ids | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters