From 459629666137f050212ef65ca3240659ea5a9909 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 19 Mar 2021 11:16:48 -0700 Subject: [PATCH] IO-787 Delete bill confirmation. --- bodyshop_translations.babel | 21 +++++++++++++++++++ .../bill-delete-button.component.jsx | 18 ++++++++++++---- client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 81ac10113..74c41de5e 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -2076,6 +2076,27 @@ + + deleteconfirm + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + discrepancy false diff --git a/client/src/components/bill-delete-button/bill-delete-button.component.jsx b/client/src/components/bill-delete-button/bill-delete-button.component.jsx index 4629c29c3..723f6e4ca 100644 --- a/client/src/components/bill-delete-button/bill-delete-button.component.jsx +++ b/client/src/components/bill-delete-button/bill-delete-button.component.jsx @@ -1,5 +1,5 @@ import { useMutation } from "@apollo/client"; -import { Button, notification } from "antd"; +import { Button, notification, Popconfirm } from "antd"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { DELETE_BILL } from "../../graphql/bills.queries"; @@ -47,9 +47,19 @@ export default function BillDeleteButton({ bill }) { return ( }> - + + + ); } diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index eb2c10880..f1b5f4069 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -142,6 +142,7 @@ "billcmtotal": "Retail Total of Credit Memos", "bills": "Bills", "dedfromlbr": "Deducted from Labor", + "deleteconfirm": "Are you sure you want to delete this bill? It cannot be undone.", "discrepancy": "Discrepancy", "discrepwithcms": "Discrepancy including Credit Memos", "discrepwithlbradj": "Discrepancy including Lbr. Adj.", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index f23591572..7b9b58d0f 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -142,6 +142,7 @@ "billcmtotal": "", "bills": "", "dedfromlbr": "", + "deleteconfirm": "", "discrepancy": "", "discrepwithcms": "", "discrepwithlbradj": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 33ea8081a..fc223467f 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -142,6 +142,7 @@ "billcmtotal": "", "bills": "", "dedfromlbr": "", + "deleteconfirm": "", "discrepancy": "", "discrepwithcms": "", "discrepwithlbradj": "",