2016-06-06 17:40:32 +02:00
|
|
|
class Admin::PrevisualisationsController < AdminController
|
|
|
|
before_action :retrieve_procedure
|
|
|
|
|
|
|
|
def show
|
|
|
|
@procedure
|
|
|
|
@dossier = Dossier.new(id: 0, procedure: @procedure)
|
|
|
|
|
2017-08-29 12:20:28 +02:00
|
|
|
PrevisualisationService.delete_all_champs @dossier
|
2016-06-06 17:40:32 +02:00
|
|
|
@dossier.build_default_champs
|
|
|
|
|
|
|
|
@champs = @dossier.ordered_champs
|
2016-12-22 10:36:18 +01:00
|
|
|
|
2017-05-17 11:18:01 +02:00
|
|
|
@headers = @champs.select { |champ| champ.type_champ == 'header_section' }
|
2016-06-06 17:40:32 +02:00
|
|
|
end
|
2017-04-04 15:27:04 +02:00
|
|
|
end
|