From ae4647d1c211775e43660bc9507de55ff577cd7a Mon Sep 17 00:00:00 2001 From: Rodribm10 Date: Wed, 15 Apr 2026 10:57:56 -0300 Subject: [PATCH] feat(lifecycle): history tab with paginated list and preview modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements Task 13 — replaces the stub History.vue with a real paginated table filtered by status, and adds DeliveryPreviewModal to show rendered_body. Also extends i18n keys (TOTAL, PAGINATION, MODAL labels) in en + pt_BR. --- .../dashboard/i18n/locale/en/captain.json | 15 +- .../dashboard/i18n/locale/pt_BR/captain.json | 15 +- .../dashboard/captain/lifecycle/History.vue | 129 +++++++++++++++++- .../components/DeliveryPreviewModal.vue | 67 +++++++++ 4 files changed, 220 insertions(+), 6 deletions(-) create mode 100644 app/javascript/dashboard/routes/dashboard/captain/lifecycle/components/DeliveryPreviewModal.vue diff --git a/app/javascript/dashboard/i18n/locale/en/captain.json b/app/javascript/dashboard/i18n/locale/en/captain.json index 524e65137..9c97d5ca0 100644 --- a/app/javascript/dashboard/i18n/locale/en/captain.json +++ b/app/javascript/dashboard/i18n/locale/en/captain.json @@ -690,9 +690,22 @@ "ALL": "All" }, "PREVIEW": "Preview", + "TOTAL": "total", + "PAGINATION": { + "PREV": "Prev", + "NEXT": "Next" + }, "MODAL": { "TITLE": "Message preview", - "CLOSE": "Close" + "CLOSE": "Close", + "RULE": "Rule", + "STATUS": "Status", + "REASON": "Reason", + "ERROR": "Error", + "FIRE_AT": "Fire at", + "SENT_AT": "Sent at", + "RENDERED": "Rendered", + "RESERVATION_ID": "Reservation #" } } } diff --git a/app/javascript/dashboard/i18n/locale/pt_BR/captain.json b/app/javascript/dashboard/i18n/locale/pt_BR/captain.json index eb596de01..6f0b85160 100644 --- a/app/javascript/dashboard/i18n/locale/pt_BR/captain.json +++ b/app/javascript/dashboard/i18n/locale/pt_BR/captain.json @@ -692,9 +692,22 @@ "ALL": "Todas" }, "PREVIEW": "Preview", + "TOTAL": "total", + "PAGINATION": { + "PREV": "Anterior", + "NEXT": "Próxima" + }, "MODAL": { "TITLE": "Preview da mensagem", - "CLOSE": "Fechar" + "CLOSE": "Fechar", + "RULE": "Regra", + "STATUS": "Status", + "REASON": "Motivo", + "ERROR": "Erro", + "FIRE_AT": "Fire at", + "SENT_AT": "Sent at", + "RENDERED": "Rendered", + "RESERVATION_ID": "Reserva #" } } } diff --git a/app/javascript/dashboard/routes/dashboard/captain/lifecycle/History.vue b/app/javascript/dashboard/routes/dashboard/captain/lifecycle/History.vue index 9a522b601..fe8477b44 100644 --- a/app/javascript/dashboard/routes/dashboard/captain/lifecycle/History.vue +++ b/app/javascript/dashboard/routes/dashboard/captain/lifecycle/History.vue @@ -1,14 +1,135 @@ diff --git a/app/javascript/dashboard/routes/dashboard/captain/lifecycle/components/DeliveryPreviewModal.vue b/app/javascript/dashboard/routes/dashboard/captain/lifecycle/components/DeliveryPreviewModal.vue new file mode 100644 index 000000000..e1351f032 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/captain/lifecycle/components/DeliveryPreviewModal.vue @@ -0,0 +1,67 @@ + + +