IO-1927 Export Button as Primary
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -44,7 +44,7 @@ export function PaymentsExportAllButton({
|
||||
|
||||
const handleQbxml = async () => {
|
||||
setLoading(true);
|
||||
if (!!loadingCallback) loadingCallback(true);
|
||||
if (loadingCallback) loadingCallback(true);
|
||||
let PartnerResponse;
|
||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||
PartnerResponse = await axios.post(`/qbo/payments`, {
|
||||
@@ -76,7 +76,7 @@ export function PaymentsExportAllButton({
|
||||
notification["error"]({
|
||||
message: t("payments.errors.exporting-partner")
|
||||
});
|
||||
if (!!loadingCallback) loadingCallback(false);
|
||||
if (loadingCallback) loadingCallback(false);
|
||||
setLoading(false);
|
||||
return;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ export function PaymentsExportAllButton({
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!!!paymentUpdateResponse.errors) {
|
||||
if (!paymentUpdateResponse.errors) {
|
||||
notification.open({
|
||||
type: "success",
|
||||
key: "paymentsuccessexport",
|
||||
@@ -174,13 +174,13 @@ export function PaymentsExportAllButton({
|
||||
);
|
||||
});
|
||||
await Promise.all(proms);
|
||||
if (!!completedCallback) completedCallback([]);
|
||||
if (!!loadingCallback) loadingCallback(false);
|
||||
if (completedCallback) completedCallback([]);
|
||||
if (loadingCallback) loadingCallback(false);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<Button onClick={handleQbxml} loading={loading} disabled={disabled || paymentIds?.length > 10}>
|
||||
<Button onClick={handleQbxml} loading={loading} disabled={disabled || paymentIds?.length > 10} type="primary">
|
||||
{t("jobs.actions.exportselected")}
|
||||
</Button>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user