From bfb8af0a2239208737e75a742414a2ae0c38f8b6 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 30 Mar 2020 10:37:49 -0700 Subject: [PATCH] BOD-51 Added push vehicle updates to job. --- bodyshop_translations.babel | 42 ++++++++++++++++++ .../owner-detail-update-jobs.component.jsx | 14 ++++-- .../vehicle-detail-jobs.component.jsx | 38 +++++++++++++++- .../vehicle-detail-update-jobs.component.jsx | 44 +++++++++++++++++++ client/src/translations/en_us/common.json | 4 +- client/src/translations/es/common.json | 4 +- client/src/translations/fr/common.json | 4 +- 7 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 client/src/components/vehicle-detail-update-jobs/vehicle-detail-update-jobs.component.jsx diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index d1940eaba..5b87f9c5d 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -4450,6 +4450,27 @@ + + updating + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + validation false @@ -7268,6 +7289,27 @@ + + updated + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + diff --git a/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx b/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx index 889fe702f..4bb455d3b 100644 --- a/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx +++ b/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx @@ -1,5 +1,5 @@ import React from "react"; -import { Button } from "antd"; +import { Button, notification } from "antd"; import { useTranslation } from "react-i18next"; import { useMutation } from "@apollo/react-hooks"; import { UPDATE_JOBS } from "../../graphql/jobs.queries"; @@ -31,9 +31,17 @@ export default function OwnerDetailUpdateJobsComponent({ ownr_zip: owner["ownr_zip"] } } - }); + }) + .then(response => { + notification["success"]({ message: t("jobs.successes.updated") }); + }) + .catch(error => { + notification["error"]({ + message: t("jobs.errors.updating", { error: JSON.stringify(error) }) + }); + }); }; - console.log("disabled", disabled); + return (