feature/IO-3000-messaging-sockets-migrations2 -

- Merge release / fix conflicts

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-11-22 10:02:05 -08:00
26 changed files with 828 additions and 347 deletions

View File

@@ -1,5 +1,5 @@
import { useMutation } from "@apollo/client";
import { Button, Form, notification, Popover, Tooltip } from "antd";
import { Button, Checkbox, Form, notification, Popover, Tooltip } from "antd";
import axios from "axios";
import { t } from "i18next";
import React, { useState } from "react";
@@ -60,24 +60,26 @@ export function JobLinesPartPriceChange({ job, line, refetch, technician }) {
}
};
const popcontent = !technician && InstanceRenderManager({
imex: null,
rome: (
<Form layout="vertical" onFinish={handleFinish} initialValues={{ act_price: line.act_price }}>
<Form.Item name="act_price" label={t("jobs.labels.act_price_ppc")} rules={[{ required: true }]}>
<CurrencyFormItemComponent />
</Form.Item>
<Button
disabled={InstanceRenderManager({ imex: true, rome: false, promanager: true })}
loading={loading}
htmlType="primary"
>
{t("general.actions.save")}
</Button>
</Form>
),
promanager: null
});
const popcontent =
!technician &&
InstanceRenderManager({
imex: null,
rome: (
<Form layout="vertical" onFinish={handleFinish} initialValues={{ act_price: line.act_price }}>
<Form.Item name="act_price" label={t("jobs.labels.act_price_ppc")} rules={[{ required: true }]}>
<CurrencyFormItemComponent />
</Form.Item>
<Button
disabled={InstanceRenderManager({ imex: true, rome: false, promanager: true })}
loading={loading}
htmlType="primary"
>
{t("general.actions.save")}
</Button>
</Form>
),
promanager: null
});
return (
<JobLineConvertToLabor jobline={line} job={job}>

View File

@@ -22,6 +22,14 @@ export function JobTotalsTableTotals({ bodyshop, job }) {
const data = useMemo(() => {
return [
...(job.job_totals?.totals?.ttl_adjustment
? [
{
key: `Subtotal Adj.`,
total: job.job_totals?.totals?.ttl_adjustment
}
]
: []),
{
key: t("jobs.labels.subtotal"),
total: job.job_totals.totals.subtotal,
@@ -102,7 +110,7 @@ export function JobTotalsTableTotals({ bodyshop, job }) {
total: job.job_totals.totals.us_sales_tax_breakdown.ty4Tax
},
{
key: `${bodyshop.md_responsibility_centers.taxes.tax_ty5?.tax_type5 || "TT"} - ${[
key: `${bodyshop.md_responsibility_centers.taxes.tax_ty5?.tax_type5 || "Adj."} - ${[
job.cieca_pft.ty5_rate1,
job.cieca_pft.ty5_rate2,
job.cieca_pft.ty5_rate3,
@@ -113,6 +121,14 @@ export function JobTotalsTableTotals({ bodyshop, job }) {
.join(", ")}%`,
total: job.job_totals.totals.us_sales_tax_breakdown.ty5Tax
},
...(job.job_totals?.totals?.ttl_tax_adjustment
? [
{
key: `Tax Adj.`,
total: job.job_totals?.totals?.ttl_tax_adjustment
}
]
: []),
{
key: t("jobs.labels.total_sales_tax"),
bold: true,
@@ -121,6 +137,7 @@ export function JobTotalsTableTotals({ bodyshop, job }) {
.add(Dinero(job.job_totals.totals.us_sales_tax_breakdown.ty3Tax))
.add(Dinero(job.job_totals.totals.us_sales_tax_breakdown.ty4Tax))
.add(Dinero(job.job_totals.totals.us_sales_tax_breakdown.ty5Tax))
.add(Dinero(job.job_totals.totals.ttl_tax_adjustment))
.toJSON()
}
].filter((item) => item.total.amount !== 0)

View File

@@ -1,6 +1,6 @@
import { gql, useApolloClient, useLazyQuery, useMutation, useQuery } from "@apollo/client";
import { useSplitTreatments } from "@splitsoftware/splitio-react";
import { Col, Row, notification } from "antd";
import { Button, Col, Row, notification } from "antd";
import Axios from "axios";
import _ from "lodash";
import queryString from "query-string";
@@ -409,24 +409,23 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
setSchComp={setSchComp}
/>
{
// currentUser.email.includes("@rome.") ||
// currentUser.email.includes("@imex.") ? (
// <Button
// onClick={async () => {
// for (const record of data.available_jobs) {
// //Query the data
// console.log("Start Job", record.id);
// const {data} = await loadEstData({
// variables: {id: record.id},
// });
// console.log("Query has been awaited and is complete");
// await onOwnerFindModalOk(data);
// }
// }}
// >
// Add all jobs as new.
// </Button>
// ) : null
{/* currentUser.email.includes("@rome.") || currentUser.email.includes("@imex.") ? (
<Button
onClick={async () => {
for (const record of data.available_jobs) {
//Query the data
console.log("Start Job", record.id);
const { data } = await loadEstData({
variables: { id: record.id }
});
console.log("Query has been awaited and is complete");
await onOwnerFindModalOk(data);
}
}}
>
Add all jobs as new.
</Button>
) : null */}
}
<Row gutter={[16, 16]}>
<Col span={24}>
@@ -617,6 +616,7 @@ function ResolveCCCLineIssues(estData, bodyshop) {
// ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
estData.joblines.data[indexInEstData].act_price = 0;
estData.joblines.data[indexInEstData].db_price = 0;
estData.joblines.data[indexInEstData].part_type = null;
});
});
}

View File

@@ -4334,6 +4334,70 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
<Input />
</Form.Item>
</LayoutFormRow>
{InstanceRenderManager({
promanager: "USE_ROME",
rome: (
<LayoutFormRow header={<div>Adjustments</div>} id="refund">
{bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber ? (
<>
<Form.Item
label={t("bodyshop.labels.responsibilitycenters.ttl_adjustment")}
rules={[
{
required: true
//message: t("general.validation.required"),
}
]}
name={["md_responsibility_centers", "ttl_adjustment", "dms_acctnumber"]}
>
<Input />
</Form.Item>
<Form.Item
label={t("bodyshop.labels.responsibilitycenters.ttl_tax_adjustment")}
rules={[
{
required: true
//message: t("general.validation.required"),
}
]}
name={["md_responsibility_centers", "ttl_tax_adjustment", "dms_acctnumber"]}
>
<Input />
</Form.Item>
</>
) : (
<>
<Form.Item
label={t("bodyshop.labels.responsibilitycenters.ttl_adjustment")}
rules={[
{
required: true
//message: t("general.validation.required"),
}
]}
name={["md_responsibility_centers", "ttl_adjustment", "accountitem"]}
>
<Input />
</Form.Item>
<Form.Item
label={t("bodyshop.labels.responsibilitycenters.ttl_tax_adjustment")}
rules={[
{
required: true
//message: t("general.validation.required"),
}
]}
name={["md_responsibility_centers", "ttl_tax_adjustment", "accountitem"]}
>
<Input />
</Form.Item>
</>
)}
</LayoutFormRow>
)
})}
{Qb_Multi_Ar.treatment === "on" && (
<LayoutFormRow header={<div>Multiple Payers Item</div>} id="accountitem">
<Form.Item

View File

@@ -694,8 +694,8 @@
"sales_tax_codes": "Sales Tax Codes",
"tax_accounts": "Tax Accounts",
"title": "Responsibility Centers",
"ttl_adjustment": "",
"ttl_tax_adjustment": ""
"ttl_adjustment": "Subtotal Adjustment Account",
"ttl_tax_adjustment": "Tax Adjustment Account"
},
"roguard": {
"title": "RO Guard"
@@ -1257,7 +1257,7 @@
"sunday": "Sunday",
"text": "Text",
"thursday": "Thursday",
"time": "Select Time",
"time": "Select Time",
"total": "Total",
"totals": "Totals",
"tuesday": "Tuesday",
@@ -1342,8 +1342,8 @@
},
"job_lifecycle": {
"columns": {
"average_human_readable": "Average Human Readable",
"average_value": "Average Value",
"average_human_readable": "Average Human Readable",
"average_value": "Average Value",
"duration": "Duration",
"end": "End",
"human_readable": "Human Readable",
@@ -1877,7 +1877,7 @@
"tax_str_rt": "Storage Tax Rate",
"tax_sub_rt": "Sublet Tax Rate",
"tax_tow_rt": "Towing Tax Rate",
"tlos_ind": "Total Loss Indicator",
"tlos_ind": "Total Loss Indicator",
"towin": "Tow In",
"towing_payable": "Towing Payable",
"unitnumber": "Unit #",

View File

@@ -1257,7 +1257,7 @@
"sunday": "",
"text": "",
"thursday": "",
"time": "",
"time": "",
"total": "",
"totals": "",
"tuesday": "",
@@ -1342,8 +1342,8 @@
},
"job_lifecycle": {
"columns": {
"average_human_readable": "",
"average_value": "",
"average_human_readable": "",
"average_value": "",
"duration": "",
"end": "",
"human_readable": "",
@@ -1877,7 +1877,7 @@
"tax_str_rt": "",
"tax_sub_rt": "",
"tax_tow_rt": "",
"tlos_ind": "",
"tlos_ind": "",
"towin": "",
"towing_payable": "Remolque a pagar",
"unitnumber": "Unidad #",

View File

@@ -1257,7 +1257,7 @@
"sunday": "",
"text": "",
"thursday": "",
"time": "",
"time": "",
"total": "",
"totals": "",
"tuesday": "",
@@ -1342,8 +1342,8 @@
},
"job_lifecycle": {
"columns": {
"average_human_readable": "",
"average_value": "",
"average_human_readable": "",
"average_value": "",
"duration": "",
"end": "",
"human_readable": "",
@@ -1877,7 +1877,7 @@
"tax_str_rt": "",
"tax_sub_rt": "",
"tax_tow_rt": "",
"tlos_ind": "",
"tlos_ind": "",
"towin": "",
"towing_payable": "Remorquage à payer",
"unitnumber": "Unité #",