diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index bf46a425b..02fe2edda 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -3434,6 +3434,27 @@ bills + + delete + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + enter 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 729eff9ed..5baf4b839 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 @@ -3,6 +3,7 @@ import { Button, notification } from "antd"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { DELETE_BILL } from "../../graphql/bills.queries"; +import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component"; export default function BillDeleteButton({ bill }) { const [loading, setLoading] = useState(false); @@ -45,8 +46,10 @@ export default function BillDeleteButton({ bill }) { }; return ( - + }> + + ); } diff --git a/client/src/components/rbac-wrapper/rbac-defaults.js b/client/src/components/rbac-wrapper/rbac-defaults.js index 6a229a4f8..3ffa6169a 100644 --- a/client/src/components/rbac-wrapper/rbac-defaults.js +++ b/client/src/components/rbac-wrapper/rbac-defaults.js @@ -27,6 +27,7 @@ const ret = { "bills:enter": 2, "bills:view": 2, "bills:list": 2, + "bills:delete": 3, "employees:page": 5, diff --git a/client/src/components/shop-info/shop-info.rbac.component.jsx b/client/src/components/shop-info/shop-info.rbac.component.jsx index 369c34dc9..3922fcb83 100644 --- a/client/src/components/shop-info/shop-info.rbac.component.jsx +++ b/client/src/components/shop-info/shop-info.rbac.component.jsx @@ -272,6 +272,18 @@ export default function ShopInfoRbacComponent({ form }) { > + + + Receivables" }, "bills": { + "delete": "Bills -> Delete", "enter": "Bills -> Enter", "list": "Bills -> List", "view": "Bills -> View" diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index db73a6b2c..88140e8af 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -226,6 +226,7 @@ "receivables": "" }, "bills": { + "delete": "", "enter": "", "list": "", "view": "" diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index f7c7096ca..b6e77f306 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -226,6 +226,7 @@ "receivables": "" }, "bills": { + "delete": "", "enter": "", "list": "", "view": ""