From d053e682d74a7efa88ba2602c58a8c9e62f21ce0 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 16 Mar 2023 17:58:12 -0700 Subject: [PATCH] IO-2193 Delete Owner & Vehicle Pass error message on deleting to translation --- .../owner-detail-form/owner-detail-form.container.jsx | 4 +++- .../vehicle-detail-form/vehicle-detail-form.container.jsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/components/owner-detail-form/owner-detail-form.container.jsx b/client/src/components/owner-detail-form/owner-detail-form.container.jsx index 381436d34..fc1ae6bd1 100644 --- a/client/src/components/owner-detail-form/owner-detail-form.container.jsx +++ b/client/src/components/owner-detail-form/owner-detail-form.container.jsx @@ -22,7 +22,9 @@ function OwnerDetailFormContainer({ owner, refetch }) { console.log(result); if (result.errors) { notification["error"]({ - message: t("owners.errors.deleting"), + message: t("owners.errors.deleting", { + error: JSON.stringify(result.errors), + }), }); setLoading(false); } else { diff --git a/client/src/components/vehicle-detail-form/vehicle-detail-form.container.jsx b/client/src/components/vehicle-detail-form/vehicle-detail-form.container.jsx index 592d65c13..9fbe45ed7 100644 --- a/client/src/components/vehicle-detail-form/vehicle-detail-form.container.jsx +++ b/client/src/components/vehicle-detail-form/vehicle-detail-form.container.jsx @@ -23,7 +23,9 @@ function VehicleDetailFormContainer({ vehicle, refetch }) { console.log(result); if (result.errors) { notification["error"]({ - message: t("vehicles.errors.deleting"), + message: t("vehicles.errors.deleting", { + error: JSON.stringify(result.errors), + }), }); setLoading(false); } else {