Merge remote-tracking branch 'origin/master' into release/2022-07-22
This commit is contained in:
@@ -26551,6 +26551,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>cost</name>
|
<name>cost</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -314,15 +314,17 @@ export function BillFormComponent({
|
|||||||
>
|
>
|
||||||
<CurrencyInput min={0} disabled={disabled} />
|
<CurrencyInput min={0} disabled={disabled} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("bills.fields.allpartslocation")} name="location">
|
{!billEdit && (
|
||||||
<Select style={{ width: "10rem" }} disabled={disabled} allowClear>
|
<Form.Item label={t("bills.fields.allpartslocation")} name="location">
|
||||||
{bodyshop.md_parts_locations.map((loc, idx) => (
|
<Select style={{ width: "10rem" }} disabled={disabled} allowClear>
|
||||||
<Select.Option key={idx} value={loc}>
|
{bodyshop.md_parts_locations.map((loc, idx) => (
|
||||||
{loc}
|
<Select.Option key={idx} value={loc}>
|
||||||
</Select.Option>
|
{loc}
|
||||||
))}
|
</Select.Option>
|
||||||
</Select>
|
))}
|
||||||
</Form.Item>
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
@@ -323,28 +323,31 @@ export function BillEnterModalLinesComponent({
|
|||||||
</Select>
|
</Select>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
...(billEdit
|
||||||
{
|
? []
|
||||||
title: t("billlines.fields.location"),
|
: [
|
||||||
dataIndex: "location",
|
{
|
||||||
editable: true,
|
title: t("billlines.fields.location"),
|
||||||
label: t("billlines.fields.location"),
|
dataIndex: "location",
|
||||||
formItemProps: (field) => {
|
editable: true,
|
||||||
return {
|
label: t("billlines.fields.location"),
|
||||||
key: `${field.index}location`,
|
formItemProps: (field) => {
|
||||||
name: [field.name, "location"],
|
return {
|
||||||
};
|
key: `${field.index}location`,
|
||||||
},
|
name: [field.name, "location"],
|
||||||
formInput: (record, index) => (
|
};
|
||||||
<Select disabled={disabled}>
|
},
|
||||||
{bodyshop.md_parts_locations.map((loc, idx) => (
|
formInput: (record, index) => (
|
||||||
<Select.Option key={idx} value={loc}>
|
<Select disabled={disabled}>
|
||||||
{loc}
|
{bodyshop.md_parts_locations.map((loc, idx) => (
|
||||||
</Select.Option>
|
<Select.Option key={idx} value={loc}>
|
||||||
))}
|
{loc}
|
||||||
</Select>
|
</Select.Option>
|
||||||
),
|
))}
|
||||||
},
|
</Select>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]),
|
||||||
{
|
{
|
||||||
title: t("billlines.labels.deductedfromlbr"),
|
title: t("billlines.labels.deductedfromlbr"),
|
||||||
dataIndex: "deductedfromlbr",
|
dataIndex: "deductedfromlbr",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default connect(
|
|||||||
|
|
||||||
export function EmailDocumentsComponent({
|
export function EmailDocumentsComponent({
|
||||||
emailConfig,
|
emailConfig,
|
||||||
|
form,
|
||||||
selectedMediaState,
|
selectedMediaState,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -48,7 +48,8 @@ export function EmailDocumentsComponent({
|
|||||||
{selectedMedia &&
|
{selectedMedia &&
|
||||||
selectedMedia
|
selectedMedia
|
||||||
.filter((s) => s.isSelected)
|
.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>
|
<div style={{ color: "red" }}>{t("general.errors.sizelimit")}</div>
|
||||||
) : null}
|
) : null}
|
||||||
{data && (
|
{data && (
|
||||||
|
|||||||
@@ -162,7 +162,10 @@ export function EmailOverlayComponent({
|
|||||||
<Tabs>
|
<Tabs>
|
||||||
{!bodyshop.uselocalmediaserver && (
|
{!bodyshop.uselocalmediaserver && (
|
||||||
<Tabs.TabPane tab={t("emails.labels.documents")} key="documents">
|
<Tabs.TabPane tab={t("emails.labels.documents")} key="documents">
|
||||||
<EmailDocumentsComponent selectedMediaState={selectedMediaState} />
|
<EmailDocumentsComponent
|
||||||
|
selectedMediaState={selectedMediaState}
|
||||||
|
form={form}
|
||||||
|
/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
)}
|
)}
|
||||||
<Tabs.TabPane tab={t("emails.labels.attachments")} key="attachments">
|
<Tabs.TabPane tab={t("emails.labels.attachments")} key="attachments">
|
||||||
@@ -188,7 +191,8 @@ export function EmailOverlayComponent({
|
|||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
const limit = 9961472;
|
const limit =
|
||||||
|
10485760 - new Blob([form.getFieldValue("html")]).size;
|
||||||
|
|
||||||
if (totalSize > limit) {
|
if (totalSize > limit) {
|
||||||
return Promise.reject(t("general.errors.sizelimit"));
|
return Promise.reject(t("general.errors.sizelimit"));
|
||||||
|
|||||||
@@ -168,7 +168,6 @@ export function EmailOverlayContainer({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (modalVisible) render();
|
if (modalVisible) render();
|
||||||
}, [modalVisible]); // eslint-disable-line react-hooks/exhaustive-deps
|
}, [modalVisible]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
@@ -178,7 +177,15 @@ export function EmailOverlayContainer({
|
|||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
toggleEmailOverlayVisible();
|
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}>
|
<Form layout="vertical" form={form} onFinish={handleFinish}>
|
||||||
{loading && (
|
{loading && (
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import AlertComponent from "../alert/alert.component";
|
|||||||
import OwnerNameDisplay, {
|
import OwnerNameDisplay, {
|
||||||
OwnerNameDisplayFunction,
|
OwnerNameDisplayFunction,
|
||||||
} from "../owner-name-display/owner-name-display.component";
|
} from "../owner-name-display/owner-name-display.component";
|
||||||
|
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||||
export default function GlobalSearch() {
|
export default function GlobalSearch() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
@@ -97,7 +98,11 @@ export default function GlobalSearch() {
|
|||||||
} ${vehicle.v_model_desc || ""}`}
|
} ${vehicle.v_model_desc || ""}`}
|
||||||
</span>
|
</span>
|
||||||
<span>{vehicle.plate_no || ""}</span>
|
<span>{vehicle.plate_no || ""}</span>
|
||||||
<span> {vehicle.v_vin || ""}</span>
|
<span>
|
||||||
|
<VehicleVinDisplay>
|
||||||
|
{vehicle.v_vin || ""}
|
||||||
|
</VehicleVinDisplay>
|
||||||
|
</span>
|
||||||
</Space>
|
</Space>
|
||||||
</Link>
|
</Link>
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -247,40 +247,40 @@ export function ScheduleEventComponent({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const RegularEvent = event.isintake ? (
|
const RegularEvent = event.isintake ? (
|
||||||
<div
|
<Space
|
||||||
|
wrap
|
||||||
|
size='small'
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
backgroundColor:
|
||||||
flexWrap: "wrap",
|
event.color && event.color.hex ? event.color.hex : event.color,
|
||||||
height: "100%",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Space>
|
{event.note && <AlertFilled className="production-alert" />}
|
||||||
{event.note && <AlertFilled className="production-alert" />}
|
<strong>{`${event.job.ro_number || t("general.labels.na")}`}</strong>
|
||||||
<strong>{`${event.job.ro_number || t("general.labels.na")}`}</strong>
|
|
||||||
<span>
|
<OwnerNameDisplay ownerObject={event.job} />
|
||||||
<OwnerNameDisplay ownerObject={event.job} />
|
|
||||||
</span>
|
{`${(event.job && event.job.v_model_yr) || ""} ${
|
||||||
</Space>
|
(event.job && event.job.v_make_desc) || ""
|
||||||
<Space>
|
} ${(event.job && event.job.v_model_desc) || ""}`}
|
||||||
<span>
|
|
||||||
{`${(event.job && event.job.v_model_yr) || ""} ${
|
{`(${(event.job && event.job.labhrs.aggregate.sum.mod_lb_hrs) || "0"} / ${
|
||||||
(event.job && event.job.v_make_desc) || ""
|
(event.job && event.job.larhrs.aggregate.sum.mod_lb_hrs) || "0"
|
||||||
} ${(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.job && event.job.alt_transport && (
|
{event.job && event.job.alt_transport && (
|
||||||
<div style={{ margin: ".1rem" }}>{event.job.alt_transport}</div>
|
<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>
|
<strong>{`${event.title || ""}`}</strong>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -291,7 +291,13 @@ export function ScheduleEventComponent({
|
|||||||
onVisibleChange={(vis) => !event.vacation && setVisible(vis)}
|
onVisibleChange={(vis) => !event.vacation && setVisible(vis)}
|
||||||
trigger="click"
|
trigger="click"
|
||||||
content={event.block ? blockContent : popoverContent}
|
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}
|
{RegularEvent}
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { Table, Input, Card, Space } from "antd";
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { alphaSort } from "../../utils/sorters";
|
import { alphaSort } from "../../utils/sorters";
|
||||||
import JobCreateContext from "../../pages/jobs-create/jobs-create.context";
|
import JobCreateContext from "../../pages/jobs-create/jobs-create.context";
|
||||||
|
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||||
|
|
||||||
export default function JobsCreateVehicleInfoSearchComponent({
|
export default function JobsCreateVehicleInfoSearchComponent({
|
||||||
loading,
|
loading,
|
||||||
@@ -27,7 +28,9 @@ export default function JobsCreateVehicleInfoSearchComponent({
|
|||||||
tableState.sortedInfo.columnKey === "v_vin" &&
|
tableState.sortedInfo.columnKey === "v_vin" &&
|
||||||
tableState.sortedInfo.order,
|
tableState.sortedInfo.order,
|
||||||
render: (text, record) => (
|
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>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import JobsRelatedRos from "../jobs-related-ros/jobs-related-ros.component";
|
|||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
import ProductionListColumnComment from "../production-list-columns/production-list-columns.comment.component";
|
import ProductionListColumnComment from "../production-list-columns/production-list-columns.comment.component";
|
||||||
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
|
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
|
||||||
|
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly,
|
||||||
@@ -211,7 +212,9 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
|||||||
}`})`}
|
}`})`}
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
<DataLabel key="4" label={t("vehicles.fields.v_vin")}>
|
<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>
|
||||||
<DataLabel label={t("jobs.labels.relatedros")}>
|
<DataLabel label={t("jobs.labels.relatedros")}>
|
||||||
<JobsRelatedRos jobid={job.id} job={job} />
|
<JobsRelatedRos jobid={job.id} job={job} />
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
import { EditFilled } from "@ant-design/icons";
|
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 React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
|
||||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||||
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { alphaSort } from "../../utils/sorters";
|
import { alphaSort } from "../../utils/sorters";
|
||||||
import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component";
|
import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component";
|
||||||
import "./labor-allocations-table.styles.scss";
|
import "./labor-allocations-table.styles.scss";
|
||||||
import { CalculateAllocationsTotals } from "./labor-allocations-table.utility";
|
import { CalculateAllocationsTotals } from "./labor-allocations-table.utility";
|
||||||
import _ from "lodash";
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
technician: selectTechnician,
|
technician: selectTechnician,
|
||||||
@@ -43,6 +44,11 @@ export function LaborAllocationsTable({
|
|||||||
if (!jobId) setTotals([]);
|
if (!jobId) setTotals([]);
|
||||||
}, [joblines, timetickets, bodyshop, adjustments, jobId]);
|
}, [joblines, timetickets, bodyshop, adjustments, jobId]);
|
||||||
|
|
||||||
|
// const convertedLines = useMemo(
|
||||||
|
// () => joblines && joblines.filter((j) => j.convertedtolbr),
|
||||||
|
// [joblines]
|
||||||
|
// );
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: t("timetickets.fields.cost_center"),
|
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) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={t("jobs.labels.laborallocations")}>
|
<Row gutter={[16, 16]}>
|
||||||
<Table
|
<Col span={24}>
|
||||||
columns={columns}
|
<Card title={t("jobs.labels.laborallocations")}>
|
||||||
rowKey="cost_center"
|
<Table
|
||||||
pagination={false}
|
columns={columns}
|
||||||
onChange={handleTableChange}
|
rowKey="cost_center"
|
||||||
dataSource={totals}
|
pagination={false}
|
||||||
scroll={{
|
onChange={handleTableChange}
|
||||||
x: true,
|
dataSource={totals}
|
||||||
}}
|
scroll={{
|
||||||
/>
|
x: true,
|
||||||
</Card>
|
}}
|
||||||
|
/>
|
||||||
|
</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);
|
export default connect(mapStateToProps, null)(LaborAllocationsTable);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ export function PartsOrderModalContainer({
|
|||||||
logImEXEvent("parts_order_insert");
|
logImEXEvent("parts_order_insert");
|
||||||
setSaving(true);
|
setSaving(true);
|
||||||
let insertResult;
|
let insertResult;
|
||||||
if (!is_quote) {
|
|
||||||
insertResult = await insertPartOrder({
|
insertResult = await insertPartOrder({
|
||||||
variables: {
|
variables: {
|
||||||
po: [
|
po: [
|
||||||
@@ -112,16 +112,18 @@ export function PartsOrderModalContainer({
|
|||||||
jobid: jobId,
|
jobid: jobId,
|
||||||
user_email: currentUser.email,
|
user_email: currentUser.email,
|
||||||
return: isReturn,
|
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"],
|
refetchQueries: ["QUERY_PARTS_BILLS_BY_JOBID"],
|
||||||
});
|
});
|
||||||
if (!!insertResult.error) {
|
if (!!insertResult.errors) {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("parts_orders.errors.creating"),
|
message: t("parts_orders.errors.creating"),
|
||||||
description: JSON.stringify(insertResult.error),
|
description: JSON.stringify(insertResult.errors),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -140,7 +142,7 @@ export function PartsOrderModalContainer({
|
|||||||
insertResult.data.insert_parts_orders.returning[0].order_number
|
insertResult.data.insert_parts_orders.returning[0].order_number
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
const jobLinesResult = await updateJobLines({
|
const jobLinesResult = await updateJobLines({
|
||||||
variables: {
|
variables: {
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
.rbc-time-view .rbc-allday-cell {
|
.rbc-time-view .rbc-allday-cell {
|
||||||
height: unset;
|
height: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rbc-month-row{
|
||||||
|
overflow: unset !important;
|
||||||
|
}
|
||||||
// .rbc-row-content {
|
// .rbc-row-content {
|
||||||
// display: none;
|
// display: none;
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function ScheduleCalendarWrapperComponent({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const handleEventPropStyles = (event, start, end, isSelected) => {
|
const handleEventPropStyles = (event, start, end, isSelected) => {
|
||||||
return {
|
return {
|
||||||
...(event.color
|
...(event.color && !((search.view || defaultView) === "agenda")
|
||||||
? {
|
? {
|
||||||
style: {
|
style: {
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Button, Col, Descriptions, Popover, Row, Tag } from "antd";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||||
|
|
||||||
export default function VehicleTagPopoverComponent({ job }) {
|
export default function VehicleTagPopoverComponent({ job }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -27,7 +28,9 @@ export default function VehicleTagPopoverComponent({ job }) {
|
|||||||
{`${job.plate_st || t("general.labels.na")}`}
|
{`${job.plate_st || t("general.labels.na")}`}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item key="4" label={t("vehicles.fields.v_vin")}>
|
<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.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</Col>
|
</Col>
|
||||||
@@ -46,7 +49,9 @@ export default function VehicleTagPopoverComponent({ job }) {
|
|||||||
{`${job.vehicle.plate_st || t("general.labels.na")}`}
|
{`${job.vehicle.plate_st || t("general.labels.na")}`}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item key="4" label={t("vehicles.fields.v_vin")}>
|
<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.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import queryString from "query-string";
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link, useHistory, useLocation } from "react-router-dom";
|
import { Link, useHistory, useLocation } from "react-router-dom";
|
||||||
|
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||||
export default function VehiclesListComponent({
|
export default function VehiclesListComponent({
|
||||||
loading,
|
loading,
|
||||||
vehicles,
|
vehicles,
|
||||||
@@ -31,7 +32,7 @@ export default function VehiclesListComponent({
|
|||||||
key: "v_vin",
|
key: "v_vin",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Link to={"/manage/vehicles/" + record.id}>
|
<Link to={"/manage/vehicles/" + record.id}>
|
||||||
{record.v_vin || "N/A"}
|
<VehicleVinDisplay>{record.v_vin || "N/A"}</VehicleVinDisplay>
|
||||||
</Link>
|
</Link>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export const GET_LINE_TICKET_BY_PK = gql`
|
|||||||
lbr_op
|
lbr_op
|
||||||
lbr_amt
|
lbr_amt
|
||||||
op_code_desc
|
op_code_desc
|
||||||
|
convertedtolbr
|
||||||
}
|
}
|
||||||
timetickets(where: { jobid: { _eq: $id } }) {
|
timetickets(where: { jobid: { _eq: $id } }) {
|
||||||
actualhrs
|
actualhrs
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import phone from "phone";
|
import parsePhoneNumber from "libphonenumber-js";
|
||||||
import { all, call, put, select, takeLatest } from "redux-saga/effects";
|
import { all, call, put, select, takeLatest } from "redux-saga/effects";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import {
|
import {
|
||||||
CONVERSATION_ID_BY_PHONE,
|
CONVERSATION_ID_BY_PHONE,
|
||||||
CREATE_CONVERSATION,
|
CREATE_CONVERSATION
|
||||||
} from "../../graphql/conversations.queries";
|
} from "../../graphql/conversations.queries";
|
||||||
import { INSERT_CONVERSATION_TAG } from "../../graphql/job-conversations.queries";
|
import { INSERT_CONVERSATION_TAG } from "../../graphql/job-conversations.queries";
|
||||||
import client from "../../utils/GraphQLClient";
|
import client from "../../utils/GraphQLClient";
|
||||||
@@ -12,7 +12,7 @@ import { selectBodyshop } from "../user/user.selectors";
|
|||||||
import {
|
import {
|
||||||
sendMessageFailure,
|
sendMessageFailure,
|
||||||
sendMessageSuccess,
|
sendMessageSuccess,
|
||||||
setSelectedConversation,
|
setSelectedConversation
|
||||||
} from "./messaging.actions";
|
} from "./messaging.actions";
|
||||||
import MessagingActionTypes from "./messaging.types";
|
import MessagingActionTypes from "./messaging.types";
|
||||||
|
|
||||||
@@ -33,13 +33,14 @@ export function* openChatByPhone({ payload }) {
|
|||||||
logImEXEvent("messaging_open_by_phone");
|
logImEXEvent("messaging_open_by_phone");
|
||||||
const { phone_num, jobid } = payload;
|
const { phone_num, jobid } = payload;
|
||||||
|
|
||||||
|
const p = parsePhoneNumber(phone_num, "CA");
|
||||||
const bodyshop = yield select(selectBodyshop);
|
const bodyshop = yield select(selectBodyshop);
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
data: { conversations },
|
data: { conversations },
|
||||||
} = yield client.query({
|
} = yield client.query({
|
||||||
query: CONVERSATION_ID_BY_PHONE,
|
query: CONVERSATION_ID_BY_PHONE,
|
||||||
variables: { phone: phone(phone_num).phoneNumber },
|
variables: { phone: p.number },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (conversations.length === 0) {
|
if (conversations.length === 0) {
|
||||||
@@ -52,7 +53,7 @@ export function* openChatByPhone({ payload }) {
|
|||||||
variables: {
|
variables: {
|
||||||
conversation: [
|
conversation: [
|
||||||
{
|
{
|
||||||
phone_num: phone(phone_num).phoneNumber,
|
phone_num: p.number,
|
||||||
bodyshopid: bodyshop.id,
|
bodyshopid: bodyshop.id,
|
||||||
job_conversations: jobid ? { data: { jobid: jobid } } : null,
|
job_conversations: jobid ? { data: { jobid: jobid } } : null,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1570,6 +1570,7 @@
|
|||||||
"closeconfirm": "Are you sure you want to close this job? This cannot be easily undone.",
|
"closeconfirm": "Are you sure you want to close this job? This cannot be easily undone.",
|
||||||
"closejob": "Close Job {{ro_number}}",
|
"closejob": "Close Job {{ro_number}}",
|
||||||
"contracts": "CC Contracts",
|
"contracts": "CC Contracts",
|
||||||
|
"convertedtolabor": "Lines Converted to Labor",
|
||||||
"cost": "Cost",
|
"cost": "Cost",
|
||||||
"cost_Additional": "Cost - Additional",
|
"cost_Additional": "Cost - Additional",
|
||||||
"cost_labor": "Cost - Labor",
|
"cost_labor": "Cost - Labor",
|
||||||
|
|||||||
@@ -1570,6 +1570,7 @@
|
|||||||
"closeconfirm": "",
|
"closeconfirm": "",
|
||||||
"closejob": "",
|
"closejob": "",
|
||||||
"contracts": "",
|
"contracts": "",
|
||||||
|
"convertedtolabor": "",
|
||||||
"cost": "",
|
"cost": "",
|
||||||
"cost_Additional": "",
|
"cost_Additional": "",
|
||||||
"cost_labor": "",
|
"cost_labor": "",
|
||||||
|
|||||||
@@ -1570,6 +1570,7 @@
|
|||||||
"closeconfirm": "",
|
"closeconfirm": "",
|
||||||
"closejob": "",
|
"closejob": "",
|
||||||
"contracts": "",
|
"contracts": "",
|
||||||
|
"convertedtolabor": "",
|
||||||
"cost": "",
|
"cost": "",
|
||||||
"cost_Additional": "",
|
"cost_Additional": "",
|
||||||
"cost_labor": "",
|
"cost_labor": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user