2022-07-20 18:53:40 +02:00
|
|
|
class Procedure::Card::EmailsComponent < ApplicationComponent
|
|
|
|
def initialize(procedure:)
|
|
|
|
@procedure = procedure
|
|
|
|
end
|
2022-11-02 10:03:10 +01:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def error_messages
|
|
|
|
[
|
|
|
|
@procedure.errors.messages_for(:initiated_mail),
|
|
|
|
@procedure.errors.messages_for(:received_mail),
|
|
|
|
@procedure.errors.messages_for(:closed_mail),
|
|
|
|
@procedure.errors.messages_for(:refused_mail),
|
|
|
|
@procedure.errors.messages_for(:without_continuation_mail)
|
|
|
|
].flatten.to_sentence
|
|
|
|
end
|
2022-07-20 18:53:40 +02:00
|
|
|
end
|