feat(export): add pays, region and departement codes
This commit is contained in:
parent
3f0f5e381f
commit
bd9fe7eb7c
7 changed files with 30 additions and 0 deletions
|
@ -21,6 +21,10 @@
|
|||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::DepartementChamp < Champs::TextChamp
|
||||
def for_export
|
||||
[name, code]
|
||||
end
|
||||
|
||||
def to_s
|
||||
formatted_value
|
||||
end
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::PaysChamp < Champs::TextChamp
|
||||
def for_export
|
||||
[formatted_value, code]
|
||||
end
|
||||
|
||||
def to_s
|
||||
formatted_value
|
||||
end
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::RegionChamp < Champs::TextChamp
|
||||
def for_export
|
||||
[name, code]
|
||||
end
|
||||
|
||||
def selected
|
||||
code
|
||||
end
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
class TypesDeChamp::DepartementTypeDeChamp < TypesDeChamp::TextTypeDeChamp
|
||||
def libelle_for_export(index)
|
||||
[libelle, "#{libelle} (Code)"][index]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
class TypesDeChamp::PaysTypeDeChamp < TypesDeChamp::TextTypeDeChamp
|
||||
def libelle_for_export(index)
|
||||
[libelle, "#{libelle} (Code)"][index]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
class TypesDeChamp::RegionTypeDeChamp < TypesDeChamp::TextTypeDeChamp
|
||||
def libelle_for_export(index)
|
||||
[libelle, "#{libelle} (Code)"][index]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -68,8 +68,11 @@ describe ProcedureExportService do
|
|||
"communes (Code insee)",
|
||||
"communes (Département)",
|
||||
"departements",
|
||||
"departements (Code)",
|
||||
"regions",
|
||||
"regions (Code)",
|
||||
"pays",
|
||||
"pays (Code)",
|
||||
"dossier_link",
|
||||
"piece_justificative",
|
||||
"rna",
|
||||
|
@ -172,8 +175,11 @@ describe ProcedureExportService do
|
|||
"communes (Code insee)",
|
||||
"communes (Département)",
|
||||
"departements",
|
||||
"departements (Code)",
|
||||
"regions",
|
||||
"regions (Code)",
|
||||
"pays",
|
||||
"pays (Code)",
|
||||
"dossier_link",
|
||||
"piece_justificative",
|
||||
"rna",
|
||||
|
@ -259,8 +265,11 @@ describe ProcedureExportService do
|
|||
"communes (Code insee)",
|
||||
"communes (Département)",
|
||||
"departements",
|
||||
"departements (Code)",
|
||||
"regions",
|
||||
"regions (Code)",
|
||||
"pays",
|
||||
"pays (Code)",
|
||||
"dossier_link",
|
||||
"piece_justificative",
|
||||
"rna",
|
||||
|
|
Loading…
Reference in a new issue