Merge remote-tracking branch 'origin/release/2023-03-24' into feature/america

This commit is contained in:
Patrick Fic
2023-03-21 09:13:08 -07:00
80 changed files with 13903 additions and 11088 deletions

View File

@@ -1,9 +1,9 @@
import React from "react";
import NumberFormat from "react-number-format";
import { NumericFormat } from "react-number-format";
export default function CurrencyFormatter(props) {
return (
<NumberFormat
<NumericFormat
thousandSeparator={true}
decimalScale={2}
fixedDecimalScale={true}

View File

@@ -142,7 +142,7 @@ middlewares.push(
const cache = new InMemoryCache({});
export default new ApolloClient({
const client = new ApolloClient({
link: ApolloLink.from(middlewares),
cache,
connectToDevTools: process.env.NODE_ENV !== "production",
@@ -161,3 +161,4 @@ export default new ApolloClient({
},
},
});
export default client;

View File

@@ -1841,6 +1841,34 @@ export const TemplateList = (type, context) => {
},
group: "purchases",
},
production_over_time: {
title: i18n.t("reportcenter.templates.production_over_time"),
subject: i18n.t(
"reportcenter.templates.production_over_time"
),
key: "production_over_time",
//idtype: "vendor",
disabled: false,
rangeFilter: {
object: i18n.t("reportcenter.labels.objects.jobs"),
field: i18n.t("jobs.fields.actual_in"),
},
group: "jobs",
},
customer_list: {
title: i18n.t("reportcenter.templates.customer_list"),
subject: i18n.t(
"reportcenter.templates.customer_list"
),
key: "customer_list",
//idtype: "vendor",
disabled: false,
rangeFilter: {
object: i18n.t("reportcenter.labels.objects.jobs"),
field: i18n.t("jobs.fields.date_invoiced"),
},
group: "customers",
},
}
: {}),
...(!type || type === "courtesycarcontract"

View File

@@ -0,0 +1,12 @@
import axios from "axios";
import { notification } from "antd";
async function CriticalPartsScan(jobid) {
try {
await axios.post("/job/partsscan", { jobid });
} catch (error) {
notification.open({ type: "error", message: JSON.stringify(error) });
}
}
export default CriticalPartsScan;