From 58d1859640f44e2b95a290c7102ad2970be4a0c2 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Fri, 13 Aug 2021 16:17:16 -0700
Subject: [PATCH] IO-1306 Show Export Attempts on export screens.
---
bodyshop_translations.babel | 26 +++++++++++++++++++
.../accounting-payables-table.component.jsx | 11 ++++++++
.../accounting-payments-table.component.jsx | 10 +++++++
...accounting-receivables-table.component.jsx | 12 ++++++++-
.../jobs-close-auto-allocate.component.jsx | 2 +-
client/src/graphql/accounting.queries.js | 12 +++++++++
client/src/translations/en_us/common.json | 3 +++
client/src/translations/es/common.json | 3 +++
client/src/translations/fr/common.json | 3 +++
9 files changed, 80 insertions(+), 2 deletions(-)
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index 9533a47db..d2694e8ff 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -12906,6 +12906,32 @@
+
+ labels
+
+
+ attempts
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
+
+
diff --git a/client/src/components/accounting-payables-table/accounting-payables-table.component.jsx b/client/src/components/accounting-payables-table/accounting-payables-table.component.jsx
index c28c95ca1..64e335833 100644
--- a/client/src/components/accounting-payables-table/accounting-payables-table.component.jsx
+++ b/client/src/components/accounting-payables-table/accounting-payables-table.component.jsx
@@ -109,6 +109,17 @@ export default function AccountingPayablesTableComponent({ loading, bills }) {
),
},
+ {
+ title: t("exportlogs.labels.attempts"),
+ dataIndex: "attempts",
+ key: "attempts",
+
+ render: (text, record) => {
+ const success = record.exportlogs.filter((e) => e.successful).length;
+ const attempts = record.exportlogs.length;
+ return `${success}/${attempts}`;
+ },
+ },
{
title: t("general.labels.actions"),
dataIndex: "actions",
diff --git a/client/src/components/accounting-payments-table/accounting-payments-table.component.jsx b/client/src/components/accounting-payments-table/accounting-payments-table.component.jsx
index be98297b6..2edc4a0a4 100644
--- a/client/src/components/accounting-payments-table/accounting-payments-table.component.jsx
+++ b/client/src/components/accounting-payments-table/accounting-payments-table.component.jsx
@@ -108,7 +108,17 @@ export default function AccountingPayablesTableComponent({
{record.exportedat}
),
},
+ {
+ title: t("exportlogs.labels.attempts"),
+ dataIndex: "attempts",
+ key: "attempts",
+ render: (text, record) => {
+ const success = record.exportlogs.filter((e) => e.successful).length;
+ const attempts = record.exportlogs.length;
+ return `${success}/${attempts}`;
+ },
+ },
{
title: t("general.labels.actions"),
dataIndex: "actions",
diff --git a/client/src/components/accounting-receivables-table/accounting-receivables-table.component.jsx b/client/src/components/accounting-receivables-table/accounting-receivables-table.component.jsx
index 5492e83ec..da2e4885c 100644
--- a/client/src/components/accounting-receivables-table/accounting-receivables-table.component.jsx
+++ b/client/src/components/accounting-receivables-table/accounting-receivables-table.component.jsx
@@ -114,11 +114,21 @@ export default function AccountingReceivablesTableComponent({ loading, jobs }) {
);
},
},
+ {
+ title: t("exportlogs.labels.attempts"),
+ dataIndex: "attempts",
+ key: "attempts",
+
+ render: (text, record) => {
+ const success = record.exportlogs.filter((e) => e.successful).length;
+ const attempts = record.exportlogs.length;
+ return `${success}/${attempts}`;
+ },
+ },
{
title: t("general.labels.actions"),
dataIndex: "actions",
key: "actions",
- sorter: (a, b) => a.clm_total - b.clm_total,
render: (text, record) => (
diff --git a/client/src/components/jobs-close-auto-allocate/jobs-close-auto-allocate.component.jsx b/client/src/components/jobs-close-auto-allocate/jobs-close-auto-allocate.component.jsx
index cbdca4501..ede82520d 100644
--- a/client/src/components/jobs-close-auto-allocate/jobs-close-auto-allocate.component.jsx
+++ b/client/src/components/jobs-close-auto-allocate/jobs-close-auto-allocate.component.jsx
@@ -61,7 +61,7 @@ export function JobsCloseAutoAllocate({ bodyshop, joblines, form, disabled }) {
);
};
- const overlay = (
+ const overlay = bodyshop.cdk_dealerid && (