Compare commits

...

15 Commits

Author SHA1 Message Date
Patrick Fic
3f070af7ab Merge branch 'release/2022-07-15' of bitbucket.org:snaptsoft/bodyshop into release/2022-07-15 2022-07-20 14:16:43 -07:00
Patrick Fic
bc4b6fa007 IO-1988 Download LMS as zip. 2022-07-20 14:16:41 -07:00
Patrick Fic
7cf32775eb Revert changes for IO-1972. 2022-07-15 15:31:16 -07:00
Patrick Fic
27ce30527e IO-1536 Add VIN Highlighting. 2022-07-14 15:18:01 -07:00
Patrick Fic
b346c28fe0 IO-1954 schedule display improvements. 2022-07-13 16:17:21 -07:00
Patrick Fic
05a0ee30f4 IO-1972 add table for converted parts to labor lines. 2022-07-13 13:50:13 -07:00
Patrick Fic
7a0d5d712a IO-1906 Remove bin from bill edit. 2022-07-13 11:35:21 -07:00
Patrick Fic
4802c1abe8 IO-1937 Update email sizing error message. 2022-07-12 15:42:00 -07:00
Patrick Fic
7022609e22 Parts Quote create order first. 2022-07-11 15:01:57 -07:00
Patrick Fic
d8447b1197 Resolve phone number parsing issue on messaging. 2022-07-11 14:23:27 -07:00
Patrick Fic
43b140aed4 Merged in release/2022-07-08 (pull request #536)
Autohouse error fix.

Approved-by: Patrick Fic
2022-07-07 16:30:46 +00:00
Patrick Fic
d4ee6ca8ba Autohouse error fix. 2022-07-07 09:29:37 -07:00
Patrick Fic
d6673ed278 Merged in release/2022-06-30 (pull request #534)
release/2022-06-30

Approved-by: Patrick Fic
2022-06-30 21:17:23 +00:00
Patrick Fic
40037216aa Merged in hotfix/2022-06-28 (pull request #527)
Update autohouse error logging.

Approved-by: Patrick Fic
2022-06-29 17:34:54 +00:00
Patrick Fic
1e24d5d57f Merged in hotfix/2022-06-28 (pull request #524)
hotfix/2022-06-28

Approved-by: Patrick Fic
2022-06-28 15:35:03 +00:00
25 changed files with 344 additions and 98 deletions

View File

@@ -26551,6 +26551,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>convertedtolabor</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>cost</name>
<definition_loaded>false</definition_loaded>

View File

@@ -314,15 +314,17 @@ export function BillFormComponent({
>
<CurrencyInput min={0} disabled={disabled} />
</Form.Item>
<Form.Item label={t("bills.fields.allpartslocation")} name="location">
<Select style={{ width: "10rem" }} disabled={disabled} allowClear>
{bodyshop.md_parts_locations.map((loc, idx) => (
<Select.Option key={idx} value={loc}>
{loc}
</Select.Option>
))}
</Select>
</Form.Item>
{!billEdit && (
<Form.Item label={t("bills.fields.allpartslocation")} name="location">
<Select style={{ width: "10rem" }} disabled={disabled} allowClear>
{bodyshop.md_parts_locations.map((loc, idx) => (
<Select.Option key={idx} value={loc}>
{loc}
</Select.Option>
))}
</Select>
</Form.Item>
)}
</LayoutFormRow>
<LayoutFormRow>
<Form.Item

View File

@@ -323,28 +323,31 @@ export function BillEnterModalLinesComponent({
</Select>
),
},
{
title: t("billlines.fields.location"),
dataIndex: "location",
editable: true,
label: t("billlines.fields.location"),
formItemProps: (field) => {
return {
key: `${field.index}location`,
name: [field.name, "location"],
};
},
formInput: (record, index) => (
<Select disabled={disabled}>
{bodyshop.md_parts_locations.map((loc, idx) => (
<Select.Option key={idx} value={loc}>
{loc}
</Select.Option>
))}
</Select>
),
},
...(billEdit
? []
: [
{
title: t("billlines.fields.location"),
dataIndex: "location",
editable: true,
label: t("billlines.fields.location"),
formItemProps: (field) => {
return {
key: `${field.index}location`,
name: [field.name, "location"],
};
},
formInput: (record, index) => (
<Select disabled={disabled}>
{bodyshop.md_parts_locations.map((loc, idx) => (
<Select.Option key={idx} value={loc}>
{loc}
</Select.Option>
))}
</Select>
),
},
]),
{
title: t("billlines.labels.deductedfromlbr"),
dataIndex: "deductedfromlbr",

View File

@@ -23,7 +23,7 @@ export default connect(
export function EmailDocumentsComponent({
emailConfig,
form,
selectedMediaState,
}) {
const { t } = useTranslation();
@@ -48,7 +48,8 @@ export function EmailDocumentsComponent({
{selectedMedia &&
selectedMedia
.filter((s) => s.isSelected)
.reduce((acc, val) => (acc = acc + val.size), 0) >= 9961472 ? (
.reduce((acc, val) => (acc = acc + val.size), 0) >=
10485760 - new Blob([form.getFieldValue("html")]).size ? (
<div style={{ color: "red" }}>{t("general.errors.sizelimit")}</div>
) : null}
{data && (

View File

@@ -162,7 +162,10 @@ export function EmailOverlayComponent({
<Tabs>
{!bodyshop.uselocalmediaserver && (
<Tabs.TabPane tab={t("emails.labels.documents")} key="documents">
<EmailDocumentsComponent selectedMediaState={selectedMediaState} />
<EmailDocumentsComponent
selectedMediaState={selectedMediaState}
form={form}
/>
</Tabs.TabPane>
)}
<Tabs.TabPane tab={t("emails.labels.attachments")} key="attachments">
@@ -188,7 +191,8 @@ export function EmailOverlayComponent({
0
);
const limit = 9961472;
const limit =
10485760 - new Blob([form.getFieldValue("html")]).size;
if (totalSize > limit) {
return Promise.reject(t("general.errors.sizelimit"));

View File

@@ -168,7 +168,6 @@ export function EmailOverlayContainer({
useEffect(() => {
if (modalVisible) render();
}, [modalVisible]); // eslint-disable-line react-hooks/exhaustive-deps
return (
<Modal
destroyOnClose={true}
@@ -178,7 +177,15 @@ export function EmailOverlayContainer({
onCancel={() => {
toggleEmailOverlayVisible();
}}
okButtonProps={{ loading: sending }}
okButtonProps={{
loading: sending,
disabled:
selectedMedia &&
( (selectedMedia
.filter((s) => s.isSelected)
.reduce((acc, val) => (acc = acc + val.size), 0) >=
10485760 - new Blob([form.getFieldValue("html")]).size) || selectedMedia.filter((s) => s.isSelected).length > 10),
}}
>
<Form layout="vertical" form={form} onFinish={handleFinish}>
{loading && (

View File

@@ -11,6 +11,7 @@ import AlertComponent from "../alert/alert.component";
import OwnerNameDisplay, {
OwnerNameDisplayFunction,
} from "../owner-name-display/owner-name-display.component";
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
export default function GlobalSearch() {
const { t } = useTranslation();
const history = useHistory();
@@ -97,7 +98,11 @@ export default function GlobalSearch() {
} ${vehicle.v_model_desc || ""}`}
</span>
<span>{vehicle.plate_no || ""}</span>
<span> {vehicle.v_vin || ""}</span>
<span>
<VehicleVinDisplay>
{vehicle.v_vin || ""}
</VehicleVinDisplay>
</span>
</Space>
</Link>
),

View File

@@ -247,40 +247,40 @@ export function ScheduleEventComponent({
);
const RegularEvent = event.isintake ? (
<div
<Space
wrap
size='small'
style={{
display: "flex",
flexWrap: "wrap",
height: "100%",
backgroundColor:
event.color && event.color.hex ? event.color.hex : event.color,
}}
>
<Space>
{event.note && <AlertFilled className="production-alert" />}
<strong>{`${event.job.ro_number || t("general.labels.na")}`}</strong>
<span>
<OwnerNameDisplay ownerObject={event.job} />
</span>
</Space>
<Space>
<span>
{`${(event.job && event.job.v_model_yr) || ""} ${
(event.job && event.job.v_make_desc) || ""
} ${(event.job && event.job.v_model_desc) || ""}`}
</span>
<span>
{`(${
(event.job && event.job.labhrs.aggregate.sum.mod_lb_hrs) || "0"
} / ${
(event.job && event.job.larhrs.aggregate.sum.mod_lb_hrs) || "0"
})`}
</span>
</Space>
{event.note && <AlertFilled className="production-alert" />}
<strong>{`${event.job.ro_number || t("general.labels.na")}`}</strong>
<OwnerNameDisplay ownerObject={event.job} />
{`${(event.job && event.job.v_model_yr) || ""} ${
(event.job && event.job.v_make_desc) || ""
} ${(event.job && event.job.v_model_desc) || ""}`}
{`(${(event.job && event.job.labhrs.aggregate.sum.mod_lb_hrs) || "0"} / ${
(event.job && event.job.larhrs.aggregate.sum.mod_lb_hrs) || "0"
})`}
{event.job && event.job.alt_transport && (
<div style={{ margin: ".1rem" }}>{event.job.alt_transport}</div>
)}
</div>
</Space>
) : (
<div style={{ height: "100%", width: "100%" }}>
<div
style={{
height: "100%",
width: "100%",
backgroundColor:
event.color && event.color.hex ? event.color.hex : event.color,
}}
>
<strong>{`${event.title || ""}`}</strong>
</div>
);
@@ -291,7 +291,13 @@ export function ScheduleEventComponent({
onVisibleChange={(vis) => !event.vacation && setVisible(vis)}
trigger="click"
content={event.block ? blockContent : popoverContent}
style={{ height: "100%", width: "100%" }}
style={{
height: "100%",
width: "100%",
backgroundColor:
event.color && event.color.hex ? event.color.hex : event.color,
}}
>
{RegularEvent}
</Popover>

View File

@@ -4,6 +4,7 @@ import { Table, Input, Card, Space } from "antd";
import { Link } from "react-router-dom";
import { alphaSort } from "../../utils/sorters";
import JobCreateContext from "../../pages/jobs-create/jobs-create.context";
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
export default function JobsCreateVehicleInfoSearchComponent({
loading,
@@ -27,7 +28,9 @@ export default function JobsCreateVehicleInfoSearchComponent({
tableState.sortedInfo.columnKey === "v_vin" &&
tableState.sortedInfo.order,
render: (text, record) => (
<Link to={"/manage/vehicles/" + record.id}>{record.v_vin}</Link>
<Link to={"/manage/vehicles/" + record.id}>
<VehicleVinDisplay>{record.v_vin}</VehicleVinDisplay>
</Link>
),
},
{

View File

@@ -23,6 +23,7 @@ import JobsRelatedRos from "../jobs-related-ros/jobs-related-ros.component";
import { DateTimeFormatter } from "../../utils/DateFormatter";
import ProductionListColumnComment from "../production-list-columns/production-list-columns.comment.component";
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
const mapStateToProps = createStructuredSelector({
jobRO: selectJobReadOnly,
@@ -211,7 +212,9 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
}`})`}
</DataLabel>
<DataLabel key="4" label={t("vehicles.fields.v_vin")}>
{`${job.v_vin || t("general.labels.na")}`}
<VehicleVinDisplay>
{`${job.v_vin || t("general.labels.na")}`}
</VehicleVinDisplay>
</DataLabel>
<DataLabel label={t("jobs.labels.relatedros")}>
<JobsRelatedRos jobid={job.id} job={job} />

View File

@@ -14,6 +14,7 @@ import { selectAllMedia } from "../../redux/media/media.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { CreateExplorerLinkForJob } from "../../utils/localmedia";
import DocumentsLocalUploadComponent from "../documents-local-upload/documents-local-upload.component";
import JobsLocalGalleryDownloadButton from "./jobs-documents-local-gallery.download";
import JobsDocumentsLocalGalleryReassign from "./jobs-documents-local-gallery.reassign.component";
import JobsDocumentsLocalGallerySelectAllComponent from "./jobs-documents-local-gallery.selectall.component";
@@ -78,6 +79,7 @@ export function JobsDocumentsLocalGallery({
</a>
<JobsDocumentsLocalGalleryReassign jobid={job.id} />
<JobsDocumentsLocalGallerySelectAllComponent jobid={job.id} />
<JobsLocalGalleryDownloadButton job={job} />
</Space>
<Card>
<DocumentsLocalUploadComponent

View File

@@ -0,0 +1,74 @@
import { Button } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import cleanAxios from "../../utils/CleanAxios";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectAllMedia } from "../../redux/media/media.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
allMedia: selectAllMedia,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export default connect(
mapStateToProps,
mapDispatchToProps
)(JobsLocalGalleryDownloadButton);
export function JobsLocalGalleryDownloadButton({
bodyshop,
galleryImages,
allMedia,
job,
}) {
const { t } = useTranslation();
const [download, setDownload] = useState(null);
function downloadProgress(progressEvent) {
setDownload((currentDownloadState) => {
return {
downloaded: progressEvent.loaded || 0,
speed:
(progressEvent.loaded || 0) -
((currentDownloadState && currentDownloadState.downloaded) || 0),
};
});
}
const handleDownload = async () => {
const theDownloadedZip = await cleanAxios.post(
`${bodyshop.localmediaserverhttp}/jobs/download`,
{
jobid: job.id,
files: ((allMedia && allMedia[job.id]) || [])
.filter((i) => i.isSelected)
.map((i) => i.filename),
},
{
headers: { ims_token: bodyshop.localmediatoken },
responseType: "arraybuffer",
onDownloadProgress: downloadProgress,
}
);
setDownload(null);
standardMediaDownload(theDownloadedZip.data, job.ro_number);
};
return (
<Button loading={!!download} onClick={handleDownload}>
{t("documents.actions.download")}
</Button>
);
}
function standardMediaDownload(bufferData, filename) {
const a = document.createElement("a");
const url = window.URL.createObjectURL(new Blob([bufferData]));
a.href = url;
a.download = `${filename}.zip`;
a.click();
}

View File

@@ -1,16 +1,17 @@
import { EditFilled } from "@ant-design/icons";
import { Card, Space, Table } from "antd";
import { Card, Col, Row, Space, Table } from "antd";
import _ from "lodash";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { selectTechnician } from "../../redux/tech/tech.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { alphaSort } from "../../utils/sorters";
import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component";
import "./labor-allocations-table.styles.scss";
import { CalculateAllocationsTotals } from "./labor-allocations-table.utility";
import _ from "lodash";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
technician: selectTechnician,
@@ -43,6 +44,11 @@ export function LaborAllocationsTable({
if (!jobId) setTotals([]);
}, [joblines, timetickets, bodyshop, adjustments, jobId]);
// const convertedLines = useMemo(
// () => joblines && joblines.filter((j) => j.convertedtolbr),
// [joblines]
// );
const columns = [
{
title: t("timetickets.fields.cost_center"),
@@ -114,24 +120,91 @@ export function LaborAllocationsTable({
),
},
];
// const convertedTableCols = [
// {
// title: t("joblines.fields.line_desc"),
// dataIndex: "line_desc",
// key: "line_desc",
// ellipsis: true,
// },
// {
// title: t("joblines.fields.op_code_desc"),
// dataIndex: "op_code_desc",
// key: "op_code_desc",
// ellipsis: true,
// render: (text, record) =>
// `${record.op_code_desc || ""}${
// record.alt_partm ? ` ${record.alt_partm}` : ""
// }`,
// },
// {
// title: t("joblines.fields.act_price"),
// dataIndex: "act_price",
// key: "act_price",
// ellipsis: true,
// render: (text, record) => (
// <>
// <CurrencyFormatter>
// {record.db_ref === "900510" || record.db_ref === "900511"
// ? record.prt_dsmk_m
// : record.act_price}
// </CurrencyFormatter>
// {record.prt_dsmk_p && record.prt_dsmk_p !== 0 ? (
// <span
// style={{ marginLeft: ".2rem" }}
// >{`(${record.prt_dsmk_p}%)`}</span>
// ) : (
// <></>
// )}
// </>
// ),
// },
// {
// title: t("joblines.fields.part_qty"),
// dataIndex: "part_qty",
// key: "part_qty",
// },
// ];
const handleTableChange = (pagination, filters, sorter) => {
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
};
return (
<Card title={t("jobs.labels.laborallocations")}>
<Table
columns={columns}
rowKey="cost_center"
pagination={false}
onChange={handleTableChange}
dataSource={totals}
scroll={{
x: true,
}}
/>
</Card>
<Row gutter={[16, 16]}>
<Col span={24}>
<Card title={t("jobs.labels.laborallocations")}>
<Table
columns={columns}
rowKey="cost_center"
pagination={false}
onChange={handleTableChange}
dataSource={totals}
scroll={{
x: true,
}}
/>
</Card>
</Col>
{
// convertedLines && convertedLines.length > 0 && (
// <Col span={24}>
// <Card title={t("jobs.labels.convertedtolabor")}>
// <Table
// columns={convertedTableCols}
// rowKey="id"
// pagination={false}
// dataSource={convertedLines}
// scroll={{
// x: true,
// }}
// />
// </Card>
// </Col>
// )
}
</Row>
);
}
export default connect(mapStateToProps, null)(LaborAllocationsTable);

View File

@@ -101,7 +101,7 @@ export function PartsOrderModalContainer({
logImEXEvent("parts_order_insert");
setSaving(true);
let insertResult;
if (!is_quote) {
insertResult = await insertPartOrder({
variables: {
po: [
@@ -112,16 +112,18 @@ export function PartsOrderModalContainer({
jobid: jobId,
user_email: currentUser.email,
return: isReturn,
status: bodyshop.md_order_statuses.default_ordered || "Ordered*",
status: is_quote
? bodyshop.md_order_statuses.default_quote || "Quote"
: bodyshop.md_order_statuses.default_ordered || "Ordered*",
},
],
},
refetchQueries: ["QUERY_PARTS_BILLS_BY_JOBID"],
});
if (!!insertResult.error) {
if (!!insertResult.errors) {
notification["error"]({
message: t("parts_orders.errors.creating"),
description: JSON.stringify(insertResult.error),
description: JSON.stringify(insertResult.errors),
});
return;
}
@@ -140,7 +142,7 @@ export function PartsOrderModalContainer({
insertResult.data.insert_parts_orders.returning[0].order_number
),
});
}
const jobLinesResult = await updateJobLines({
variables: {

View File

@@ -4,6 +4,10 @@
.rbc-time-view .rbc-allday-cell {
height: unset;
}
.rbc-month-row{
overflow: unset !important;
}
// .rbc-row-content {
// display: none;
// }

View File

@@ -34,7 +34,7 @@ export function ScheduleCalendarWrapperComponent({
const { t } = useTranslation();
const handleEventPropStyles = (event, start, end, isSelected) => {
return {
...(event.color
...(event.color && !((search.view || defaultView) === "agenda")
? {
style: {
backgroundColor:

View File

@@ -2,6 +2,7 @@ import { Button, Col, Descriptions, Popover, Row, Tag } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
export default function VehicleTagPopoverComponent({ job }) {
const { t } = useTranslation();
@@ -27,7 +28,9 @@ export default function VehicleTagPopoverComponent({ job }) {
{`${job.plate_st || t("general.labels.na")}`}
</Descriptions.Item>
<Descriptions.Item key="4" label={t("vehicles.fields.v_vin")}>
{`${job.v_vin || t("general.labels.na")}`}
<VehicleVinDisplay>
{`${job.v_vin || t("general.labels.na")}`}
</VehicleVinDisplay>
</Descriptions.Item>
</Descriptions>
</Col>
@@ -46,7 +49,9 @@ export default function VehicleTagPopoverComponent({ job }) {
{`${job.vehicle.plate_st || t("general.labels.na")}`}
</Descriptions.Item>
<Descriptions.Item key="4" label={t("vehicles.fields.v_vin")}>
{`${job.vehicle.v_vin || t("general.labels.na")}`}
<VehicleVinDisplay>{`${
job.vehicle.v_vin || t("general.labels.na")
}`}</VehicleVinDisplay>
</Descriptions.Item>
</Descriptions>
</Col>

View File

@@ -0,0 +1,18 @@
import React from "react";
export default function VehicleVinDisplay({ children }) {
if (!children) return null;
console.log(children);
if (typeof children !== "string" || children.length !== 17) return children;
const vin = children.trim();
const first = vin.substring(0, 9);
const second = vin.substring(9, 17);
return (
<>
<span>{first}</span>
<span style={{ textDecoration: "underline" }}>{second}</span>
</>
);
}

View File

@@ -4,6 +4,7 @@ import queryString from "query-string";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Link, useHistory, useLocation } from "react-router-dom";
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
export default function VehiclesListComponent({
loading,
vehicles,
@@ -31,7 +32,7 @@ export default function VehiclesListComponent({
key: "v_vin",
render: (text, record) => (
<Link to={"/manage/vehicles/" + record.id}>
{record.v_vin || "N/A"}
<VehicleVinDisplay>{record.v_vin || "N/A"}</VehicleVinDisplay>
</Link>
),
},

View File

@@ -48,6 +48,7 @@ export const GET_LINE_TICKET_BY_PK = gql`
lbr_op
lbr_amt
op_code_desc
convertedtolbr
}
timetickets(where: { jobid: { _eq: $id } }) {
actualhrs

View File

@@ -1,10 +1,10 @@
import axios from "axios";
import phone from "phone";
import parsePhoneNumber from "libphonenumber-js";
import { all, call, put, select, takeLatest } from "redux-saga/effects";
import { logImEXEvent } from "../../firebase/firebase.utils";
import {
CONVERSATION_ID_BY_PHONE,
CREATE_CONVERSATION,
CREATE_CONVERSATION
} from "../../graphql/conversations.queries";
import { INSERT_CONVERSATION_TAG } from "../../graphql/job-conversations.queries";
import client from "../../utils/GraphQLClient";
@@ -12,7 +12,7 @@ import { selectBodyshop } from "../user/user.selectors";
import {
sendMessageFailure,
sendMessageSuccess,
setSelectedConversation,
setSelectedConversation
} from "./messaging.actions";
import MessagingActionTypes from "./messaging.types";
@@ -33,13 +33,14 @@ export function* openChatByPhone({ payload }) {
logImEXEvent("messaging_open_by_phone");
const { phone_num, jobid } = payload;
const p = parsePhoneNumber(phone_num, "CA");
const bodyshop = yield select(selectBodyshop);
try {
const {
data: { conversations },
} = yield client.query({
query: CONVERSATION_ID_BY_PHONE,
variables: { phone: phone(phone_num).phoneNumber },
variables: { phone: p.number },
});
if (conversations.length === 0) {
@@ -52,7 +53,7 @@ export function* openChatByPhone({ payload }) {
variables: {
conversation: [
{
phone_num: phone(phone_num).phoneNumber,
phone_num: p.number,
bodyshopid: bodyshop.id,
job_conversations: jobid ? { data: { jobid: jobid } } : null,
},

View File

@@ -1570,6 +1570,7 @@
"closeconfirm": "Are you sure you want to close this job? This cannot be easily undone.",
"closejob": "Close Job {{ro_number}}",
"contracts": "CC Contracts",
"convertedtolabor": "Lines Converted to Labor",
"cost": "Cost",
"cost_Additional": "Cost - Additional",
"cost_labor": "Cost - Labor",

View File

@@ -1570,6 +1570,7 @@
"closeconfirm": "",
"closejob": "",
"contracts": "",
"convertedtolabor": "",
"cost": "",
"cost_Additional": "",
"cost_labor": "",

View File

@@ -1570,6 +1570,7 @@
"closeconfirm": "",
"closejob": "",
"contracts": "",
"convertedtolabor": "",
"cost": "",
"cost_Additional": "",
"cost_labor": "",

View File

@@ -113,6 +113,7 @@ exports.default = async (req, res) => {
allErrors.push({
bodyshopid: bodyshop.id,
imexshopid: bodyshop.imexshopid,
autuhouseid: bodyshop.autuhouseid,
fatal: true,
errors: [error.toString()],
});
@@ -120,7 +121,12 @@ exports.default = async (req, res) => {
allErrors.push({
bodyshopid: bodyshop.id,
imexshopid: bodyshop.imexshopid,
errors: erroredJobs,
autohouseid: bodyshop.autohouseid,
errors: erroredJobs.map((ej) => ({
ro_number: ej.job?.ro_number,
jobid: ej.job?.id,
error: ej.error,
})),
});
}
}
@@ -199,6 +205,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
if (!job.job_totals) {
errorCallback({
jobid: job.id,
job: job,
ro_number: job.ro_number,
error: { toString: () => "No job totals for RO." },
});