+
{`${event.title || ""}`}
);
@@ -291,7 +290,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}
diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx
index cecc22795..9ba78c922 100644
--- a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx
+++ b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx
@@ -1,6 +1,6 @@
import { EditFilled } from "@ant-design/icons";
-import { Card, Space, Table } from "antd";
-import React, { useEffect, useState } from "react";
+import { Card, Space, Table, Row, Col } from "antd";
+import React, { useEffect, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
@@ -11,6 +11,8 @@ import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit
import "./labor-allocations-table.styles.scss";
import { CalculateAllocationsTotals } from "./labor-allocations-table.utility";
import _ from "lodash";
+import CurrencyFormatter from "../../utils/CurrencyFormatter";
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
technician: selectTechnician,
@@ -43,6 +45,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 +121,104 @@ 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) => (
+ <>
+
+ {record.db_ref === "900510" || record.db_ref === "900511"
+ ? record.prt_dsmk_m
+ : record.act_price}
+
+ {record.prt_dsmk_p && record.prt_dsmk_p !== 0 ? (
+
{`(${record.prt_dsmk_p}%)`}
+ ) : (
+ <>>
+ )}
+ >
+ ),
+ },
+ {
+ title: t("joblines.fields.part_qty"),
+ dataIndex: "part_qty",
+ key: "part_qty",
+ },
+
+ {
+ title: t("joblines.fields.mod_lbr_ty"),
+ dataIndex: "mod_lbr_ty",
+ key: "mod_lbr_ty",
+ render: (text, record) =>
+ record.mod_lbr_ty
+ ? t(`joblines.fields.lbr_types.${record.mod_lbr_ty}`)
+ : null,
+ },
+ {
+ title: t("joblines.fields.mod_lb_hrs"),
+ dataIndex: "mod_lb_hrs",
+ key: "mod_lb_hrs",
+ },
+ ];
const handleTableChange = (pagination, filters, sorter) => {
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
};
return (
-
-
-
+
+
+
+
+
+
+ {convertedLines && convertedLines.length > 0 && (
+
+
+
+
+
+ )}
+
);
}
export default connect(mapStateToProps, null)(LaborAllocationsTable);
diff --git a/client/src/components/parts-order-modal/parts-order-modal.container.jsx b/client/src/components/parts-order-modal/parts-order-modal.container.jsx
index ec7cc9470..643d39200 100644
--- a/client/src/components/parts-order-modal/parts-order-modal.container.jsx
+++ b/client/src/components/parts-order-modal/parts-order-modal.container.jsx
@@ -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: {
diff --git a/client/src/components/schedule-calendar-wrapper/schedule-calendar.styles.scss b/client/src/components/schedule-calendar-wrapper/schedule-calendar.styles.scss
index 432e46099..a46e37b41 100644
--- a/client/src/components/schedule-calendar-wrapper/schedule-calendar.styles.scss
+++ b/client/src/components/schedule-calendar-wrapper/schedule-calendar.styles.scss
@@ -4,6 +4,10 @@
.rbc-time-view .rbc-allday-cell {
height: unset;
}
+
+.rbc-month-row{
+ overflow: unset !important;
+}
// .rbc-row-content {
// display: none;
// }
diff --git a/client/src/components/schedule-calendar-wrapper/scheduler-calendar-wrapper.component.jsx b/client/src/components/schedule-calendar-wrapper/scheduler-calendar-wrapper.component.jsx
index 616c58ecb..95f825c6e 100644
--- a/client/src/components/schedule-calendar-wrapper/scheduler-calendar-wrapper.component.jsx
+++ b/client/src/components/schedule-calendar-wrapper/scheduler-calendar-wrapper.component.jsx
@@ -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:
diff --git a/client/src/graphql/jobs-lines.queries.js b/client/src/graphql/jobs-lines.queries.js
index 0c0b4228d..5ac7f30c5 100644
--- a/client/src/graphql/jobs-lines.queries.js
+++ b/client/src/graphql/jobs-lines.queries.js
@@ -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
diff --git a/client/src/redux/messaging/messaging.sagas.js b/client/src/redux/messaging/messaging.sagas.js
index fb1c7d4db..f2684a171 100644
--- a/client/src/redux/messaging/messaging.sagas.js
+++ b/client/src/redux/messaging/messaging.sagas.js
@@ -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,
},
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 12cf52836..95a6d0ea1 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -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",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index ca23c77a3..402e26e56 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -1570,6 +1570,7 @@
"closeconfirm": "",
"closejob": "",
"contracts": "",
+ "convertedtolabor": "",
"cost": "",
"cost_Additional": "",
"cost_labor": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 7f5176898..eb6800fb5 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -1570,6 +1570,7 @@
"closeconfirm": "",
"closejob": "",
"contracts": "",
+ "convertedtolabor": "",
"cost": "",
"cost_Additional": "",
"cost_labor": "",