diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index 7cd01cc8f..8b766b25f 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -18,6 +18,16 @@ class SubmissionsController < ApplicationController 'payment' => 'credit_card', 'verification' => 'id', 'kba' => 'user_scan' }.freeze + STATUS_BADGES = { + 'awaiting' => 'badge-info', 'sent' => 'badge-info', 'completed' => 'badge-success', + 'opened' => 'badge-warning', 'declined' => 'badge-error' + }.freeze + + STATUS_ICONS = { + 'awaiting' => 'clock', 'sent' => 'send', 'completed' => 'circle_check', + 'opened' => 'mail_opened', 'declined' => 'x_circle' + }.freeze + def show @submission = Submissions.preload_with_pages(@submission) diff --git a/app/views/shared/_classes.html.erb b/app/views/shared/_classes.html.erb index e36c5fe5b..ce41dd0c4 100644 --- a/app/views/shared/_classes.html.erb +++ b/app/views/shared/_classes.html.erb @@ -1 +1 @@ -<% 'stats stat stat-figure stat-title stat-value text-accent w-fit hover:bg-white dropdown-open border-base-content/30 before:border-base-content/30 order-1 order-2 order-3 order-4 order-5 lg:inline lg:hidden' %> +<% 'stats stat stat-figure stat-title stat-value text-accent w-fit hover:bg-white dropdown-open border-base-content/30 before:border-base-content/30 order-1 order-2 order-3 order-4 order-5 lg:inline lg:hidden badge-info badge-success badge-warning badge-error' %> diff --git a/app/views/templates/_submission.html.erb b/app/views/templates/_submission.html.erb index 228e09053..9262b14e7 100644 --- a/app/views/templates/_submission.html.erb +++ b/app/views/templates/_submission.html.erb @@ -1,8 +1,7 @@ -<% status_badges = { 'awaiting' => 'badge-info', 'sent' => 'badge-info', 'completed' => 'badge-success', 'opened' => 'badge-warning', 'declined' => 'badge-error' } %>