From b8fe2f29e5584c8e13c74864e12220e1b1e361e0 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Tue, 18 May 2021 13:38:27 -0700
Subject: [PATCH 1/9] IO-1145 Remove force refresh (and move from test branch
to dev).
---
admin/src/components/auth-provider/auth-provider.js | 2 +-
.../jobs-close-export-button.component.jsx | 6 +++---
.../jobs-export-all-button.component.jsx | 4 ++--
.../payable-export-all-button.component.jsx | 2 +-
.../payable-export-button.component.jsx | 2 +-
.../payment-export-button.component.jsx | 2 +-
.../payments-export-all-button.component.jsx | 2 +-
client/src/utils/CleanAxios.js | 3 +--
8 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/admin/src/components/auth-provider/auth-provider.js b/admin/src/components/auth-provider/auth-provider.js
index 2adf29d50..ba8132048 100644
--- a/admin/src/components/auth-provider/auth-provider.js
+++ b/admin/src/components/auth-provider/auth-provider.js
@@ -8,7 +8,7 @@ const authProvider = {
username,
password
);
- const token = await user.getIdToken(true);
+ const token = await user.getIdToken();
localStorage.setItem("token", token);
return Promise.resolve();
} catch (error) {
diff --git a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx
index fa6875628..b6e2006f8 100644
--- a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx
+++ b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx
@@ -40,7 +40,7 @@ export function JobsCloseExportButton({
{ jobIds: [jobId] },
{
headers: {
- Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
+ Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
@@ -64,7 +64,7 @@ export function JobsCloseExportButton({
QbXmlResponse.data,
{
headers: {
- Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
+ Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
@@ -86,7 +86,7 @@ export function JobsCloseExportButton({
failedTransactions.forEach((ft) => {
//insert failed export log
notification.open({
- // key: "failedexports",
+ // key: "failedexports",
type: "error",
message: t("jobs.errors.exporting", {
error: ft.errorMessage || "",
diff --git a/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx b/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx
index 56b38122d..e0be5621c 100644
--- a/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx
+++ b/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx
@@ -43,7 +43,7 @@ export function JobsExportAllButton({
{ jobIds: jobIds },
{
headers: {
- Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
+ Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
@@ -66,7 +66,7 @@ export function JobsExportAllButton({
QbXmlResponse.data,
{
headers: {
- Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
+ Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
diff --git a/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx b/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx
index 7e190bb7f..4583251f9 100644
--- a/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx
+++ b/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx
@@ -46,7 +46,7 @@ export function PayableExportAll({
{ bills: billids },
{
headers: {
- Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
+ Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
diff --git a/client/src/components/payable-export-button/payable-export-button.component.jsx b/client/src/components/payable-export-button/payable-export-button.component.jsx
index 1ba480b78..bdeaa4455 100644
--- a/client/src/components/payable-export-button/payable-export-button.component.jsx
+++ b/client/src/components/payable-export-button/payable-export-button.component.jsx
@@ -44,7 +44,7 @@ export function PayableExportButton({
{ bills: [billId] },
{
headers: {
- Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
+ Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
diff --git a/client/src/components/payment-export-button/payment-export-button.component.jsx b/client/src/components/payment-export-button/payment-export-button.component.jsx
index d808a0d37..3c0254180 100644
--- a/client/src/components/payment-export-button/payment-export-button.component.jsx
+++ b/client/src/components/payment-export-button/payment-export-button.component.jsx
@@ -43,7 +43,7 @@ export function PaymentExportButton({
{ payments: [paymentId] },
{
headers: {
- Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
+ Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
diff --git a/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx b/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx
index 77381c810..62f47b890 100644
--- a/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx
+++ b/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx
@@ -42,7 +42,7 @@ export function PaymentsExportAllButton({
{ payments: paymentIds },
{
headers: {
- Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
+ Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
},
}
);
diff --git a/client/src/utils/CleanAxios.js b/client/src/utils/CleanAxios.js
index a35b44aa4..49da5740a 100644
--- a/client/src/utils/CleanAxios.js
+++ b/client/src/utils/CleanAxios.js
@@ -9,8 +9,7 @@ if (process.env.NODE_ENV === "production") {
export const axiosAuthInterceptorId = axios.interceptors.request.use(
async (config) => {
if (!config.headers.Authorization) {
- const token =
- auth.currentUser && (await auth.currentUser.getIdToken(true));
+ const token = auth.currentUser && (await auth.currentUser.getIdToken());
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
From 2e614197e17e9d1f1d33f291cddac79ad0498981 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Tue, 18 May 2021 14:11:54 -0700
Subject: [PATCH 2/9] IO-1034 Resolve undefined error messages for reqd form
list fields.
---
.../bill-form/bill-form.lines.component.jsx | 15 ++++++++++++++-
.../jobs-close-lines.component.jsx | 6 ++++--
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx
index 82d9b6931..ffe6a45e5 100644
--- a/client/src/components/bill-form/bill-form.lines.component.jsx
+++ b/client/src/components/bill-form/bill-form.lines.component.jsx
@@ -47,6 +47,7 @@ export function BillEnterModalLinesComponent({
return {
key: `${field.index}joblinename`,
name: [field.name, "joblineid"],
+ label: t("billlines.fields.jobline"),
rules: [
{
required: true,
@@ -94,6 +95,7 @@ export function BillEnterModalLinesComponent({
return {
key: `${field.index}line_desc`,
name: [field.name, "line_desc"],
+ label: t("billlines.fields.line_desc"),
rules: [
{
required: true,
@@ -113,6 +115,7 @@ export function BillEnterModalLinesComponent({
return {
key: `${field.index}quantity`,
name: [field.name, "quantity"],
+ label: t("billlines.fields.quantity"),
rules: [
{
required: true,
@@ -134,6 +137,7 @@ export function BillEnterModalLinesComponent({
return {
key: `${field.index}actual_price`,
name: [field.name, "actual_price"],
+ label: t("billlines.fields.actual_price"),
rules: [
{
required: true,
@@ -186,10 +190,12 @@ export function BillEnterModalLinesComponent({
dataIndex: "actual_cost",
editable: true,
width: "8rem",
+
formItemProps: (field) => {
return {
key: `${field.index}actual_cost`,
name: [field.name, "actual_cost"],
+ label: t("billlines.fields.actual_cost"),
rules: [
{
required: true,
@@ -221,10 +227,12 @@ export function BillEnterModalLinesComponent({
title: t("billlines.fields.cost_center"),
dataIndex: "cost_center",
editable: true,
+
formItemProps: (field) => {
return {
key: `${field.index}cost_center`,
name: [field.name, "cost_center"],
+ label: t("billlines.fields.cost_center"),
rules: [
{
required: true,
@@ -246,6 +254,7 @@ export function BillEnterModalLinesComponent({
title: t("billlines.fields.location"),
dataIndex: "location",
editable: true,
+ label: t("billlines.fields.location"),
formItemProps: (field) => {
return {
key: `${field.index}location`,
@@ -499,7 +508,11 @@ const EditableCell = ({
return (
-
+
{(formInput && formInput(record, record.key)) || children}
|
diff --git a/client/src/components/jobs-close-lines/jobs-close-lines.component.jsx b/client/src/components/jobs-close-lines/jobs-close-lines.component.jsx
index 4e4d804c4..d3b7d6028 100644
--- a/client/src/components/jobs-close-lines/jobs-close-lines.component.jsx
+++ b/client/src/components/jobs-close-lines/jobs-close-lines.component.jsx
@@ -102,9 +102,10 @@ export function JobsCloseLines({ bodyshop, job, jobRO }) {
|
Date: Tue, 18 May 2021 14:29:14 -0700
Subject: [PATCH 3/9] IO-1050 Mark for Reexport disable logic.
---
.../jobs-admin-mark-reexport.component.jsx | 2 +-
client/src/pages/jobs-admin/jobs-admin.page.jsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx b/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx
index cc69a1f2b..f6002d144 100644
--- a/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx
+++ b/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx
@@ -57,7 +57,7 @@ export function JobAdminMarkReexport({ bodyshop, job }) {
return (
| |