@@ -152,7 +152,7 @@ def perform_qc_params
152152 index do
153153 selectable_column
154154 column :public
155- tag_column :status
155+ tag_column :status , & :detailed_status
156156 column :id
157157 column I18n . t ( "activerecord.models.country.one" ) do |od |
158158 od . required_operator_document . country
@@ -196,6 +196,8 @@ def perform_qc_params
196196 column I18n . t ( "active_admin.operator_documents_page.attachment" ) do |od |
197197 if od &.document_file &.attachment
198198 link_to od . document_file . attachment . identifier , od . document_file . attachment . url
199+ elsif od . reason . present?
200+ I18n . t ( "active_admin.operator_documents_page.non_applicable" )
199201 end
200202 end
201203 column I18n . t ( "active_admin.operator_documents_page.annexes" ) do |od |
@@ -271,15 +273,19 @@ def perform_qc_params
271273 show title : proc { "#{ resource . operator . name } - #{ resource . required_operator_document . name } " } do
272274 attributes_table do
273275 row :public
274- tag_row :status
276+ tag_row :status , & :detailed_status
275277 row ( I18n . t ( "active_admin.operator_documents_page.reason_label" ) , &:reason ) if resource . reason . present?
276278 row :admin_comment if resource . admin_comment . present?
277279 row :required_operator_document
278280 row :operator
279281 row :fmu , unless : resource . is_a? ( OperatorDocumentCountry )
280282 row :uploaded_by
281283 row I18n . t ( "active_admin.operator_documents_page.attachment" ) do |r |
282- link_to r . document_file &.attachment &.identifier , r . document_file &.attachment &.url , target : "_blank" , rel : "noopener" if r . document_file &.attachment &.present?
284+ if r . document_file &.attachment &.present?
285+ link_to r . document_file &.attachment &.identifier , r . document_file &.attachment &.url , target : "_blank" , rel : "noopener"
286+ elsif r . reason . present?
287+ I18n . t ( "active_admin.operator_documents_page.non_applicable" )
288+ end
283289 end
284290 row :start_date
285291 row :expire_date
0 commit comments