podemos-info/census

View on GitHub
app/views/orders/_show.arb

Summary

Maintainability
Test Coverage
# frozen_string_literal: true

context.instance_eval do
  panel title do
    changes_table_for(resource, changes: local_assigns[:changes]) do
      chrow :state, machine: :default
      chrow :id
      chrow :person, change_field: :person_id
      chrow :payment_method
      chrow :description
      chrow :full_amount
      chrow :campaign, change_field: :campaign_id
      chrow :orders_batch, change_field: :orders_batch_id
      chrow :created_at
      chrow :updated_at
    end
    show_table(context: self, resource: resource, title: t("census.orders.information"), table: resource.information) if resource.information.any?
  end
end