[#2750] Move fields from Procedure to ProcedurePresentation
This commit is contained in:
parent
efcac5192a
commit
0e9b40ccf6
5 changed files with 47 additions and 44 deletions
|
@ -296,10 +296,6 @@ class Procedure < ApplicationRecord
|
|||
without_continuation_mail || Mails::WithoutContinuationMail.default_for_procedure(self)
|
||||
end
|
||||
|
||||
def fields
|
||||
DossierFieldService.new.fields(self)
|
||||
end
|
||||
|
||||
def self.default_sort
|
||||
{
|
||||
'table' => 'self',
|
||||
|
|
|
@ -42,8 +42,12 @@ class ProcedurePresentation < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def fields
|
||||
dossier_field_service.fields(procedure)
|
||||
end
|
||||
|
||||
def fields_for_select
|
||||
procedure.fields.map do |field|
|
||||
fields.map do |field|
|
||||
[field['label'], "#{field['table']}/#{field['column']}"]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue