IO-787 Delete bill confirmation.
This commit is contained in:
@@ -2076,6 +2076,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>deleteconfirm</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>discrepancy</name>
|
<name>discrepancy</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, notification } from "antd";
|
import { Button, notification, Popconfirm } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { DELETE_BILL } from "../../graphql/bills.queries";
|
import { DELETE_BILL } from "../../graphql/bills.queries";
|
||||||
@@ -47,9 +47,19 @@ export default function BillDeleteButton({ bill }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<RbacWrapper action="bills:delete" noauth={<></>}>
|
<RbacWrapper action="bills:delete" noauth={<></>}>
|
||||||
<Button disabled={bill.exported} onClick={handleDelete} loading={loading}>
|
<Popconfirm
|
||||||
{t("general.actions.delete")}
|
disabled={bill.exported}
|
||||||
</Button>
|
onConfirm={handleDelete}
|
||||||
|
title={t("bills.labels.deleteconfirm")}
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
disabled={bill.exported}
|
||||||
|
// onClick={handleDelete}
|
||||||
|
loading={loading}
|
||||||
|
>
|
||||||
|
{t("general.actions.delete")}
|
||||||
|
</Button>
|
||||||
|
</Popconfirm>
|
||||||
</RbacWrapper>
|
</RbacWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,6 +142,7 @@
|
|||||||
"billcmtotal": "Retail Total of Credit Memos",
|
"billcmtotal": "Retail Total of Credit Memos",
|
||||||
"bills": "Bills",
|
"bills": "Bills",
|
||||||
"dedfromlbr": "Deducted from Labor",
|
"dedfromlbr": "Deducted from Labor",
|
||||||
|
"deleteconfirm": "Are you sure you want to delete this bill? It cannot be undone.",
|
||||||
"discrepancy": "Discrepancy",
|
"discrepancy": "Discrepancy",
|
||||||
"discrepwithcms": "Discrepancy including Credit Memos",
|
"discrepwithcms": "Discrepancy including Credit Memos",
|
||||||
"discrepwithlbradj": "Discrepancy including Lbr. Adj.",
|
"discrepwithlbradj": "Discrepancy including Lbr. Adj.",
|
||||||
|
|||||||
@@ -142,6 +142,7 @@
|
|||||||
"billcmtotal": "",
|
"billcmtotal": "",
|
||||||
"bills": "",
|
"bills": "",
|
||||||
"dedfromlbr": "",
|
"dedfromlbr": "",
|
||||||
|
"deleteconfirm": "",
|
||||||
"discrepancy": "",
|
"discrepancy": "",
|
||||||
"discrepwithcms": "",
|
"discrepwithcms": "",
|
||||||
"discrepwithlbradj": "",
|
"discrepwithlbradj": "",
|
||||||
|
|||||||
@@ -142,6 +142,7 @@
|
|||||||
"billcmtotal": "",
|
"billcmtotal": "",
|
||||||
"bills": "",
|
"bills": "",
|
||||||
"dedfromlbr": "",
|
"dedfromlbr": "",
|
||||||
|
"deleteconfirm": "",
|
||||||
"discrepancy": "",
|
"discrepancy": "",
|
||||||
"discrepwithcms": "",
|
"discrepwithcms": "",
|
||||||
"discrepwithlbradj": "",
|
"discrepwithlbradj": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user