@@ -51,6 +51,7 @@
|
|||||||
"react-i18next": "^12.2.0",
|
"react-i18next": "^12.2.0",
|
||||||
"react-icons": "^4.7.1",
|
"react-icons": "^4.7.1",
|
||||||
"react-image-lightbox": "^5.1.4",
|
"react-image-lightbox": "^5.1.4",
|
||||||
|
"react-intersection-observer": "^9.4.3",
|
||||||
"react-number-format": "^5.1.3",
|
"react-number-format": "^5.1.3",
|
||||||
"react-redux": "^8.0.5",
|
"react-redux": "^8.0.5",
|
||||||
"react-resizable": "^3.0.4",
|
"react-resizable": "^3.0.4",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Badge, List, Tag } from "antd";
|
import { Badge, List, Tag } from "antd";
|
||||||
import React from "react";
|
import React, { useEffect } from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { setSelectedConversation } from "../../redux/messaging/messaging.actions";
|
import { setSelectedConversation } from "../../redux/messaging/messaging.actions";
|
||||||
@@ -7,6 +7,8 @@ import { selectSelectedConversation } from "../../redux/messaging/messaging.sele
|
|||||||
import { TimeAgoFormatter } from "../../utils/DateFormatter";
|
import { TimeAgoFormatter } from "../../utils/DateFormatter";
|
||||||
import PhoneFormatter from "../../utils/PhoneFormatter";
|
import PhoneFormatter from "../../utils/PhoneFormatter";
|
||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
|
import { List as VirtualizedList, AutoSizer } from "react-virtualized";
|
||||||
|
|
||||||
import "./chat-conversation-list.styles.scss";
|
import "./chat-conversation-list.styles.scss";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -18,59 +20,86 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
dispatch(setSelectedConversation(conversationId)),
|
dispatch(setSelectedConversation(conversationId)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function ChatConversationListComponent({
|
function ChatConversationListComponent({
|
||||||
conversationList,
|
conversationList,
|
||||||
selectedConversation,
|
selectedConversation,
|
||||||
setSelectedConversation,
|
setSelectedConversation,
|
||||||
|
subscribeToMoreConversations,
|
||||||
|
loadMoreConversations,
|
||||||
}) {
|
}) {
|
||||||
|
useEffect(
|
||||||
|
() => subscribeToMoreConversations(),
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
|
const rowRenderer = ({ index, key, style }) => {
|
||||||
|
const item = conversationList[index];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<List.Item
|
||||||
|
key={key}
|
||||||
|
onClick={() => setSelectedConversation(item.id)}
|
||||||
|
className={`chat-list-item ${
|
||||||
|
item.id === selectedConversation
|
||||||
|
? "chat-list-selected-conversation"
|
||||||
|
: null
|
||||||
|
}`}
|
||||||
|
style={style}
|
||||||
|
>
|
||||||
|
<div sryle={{ display: "inline-block" }}>
|
||||||
|
{item.label && <div className="chat-name">{item.label}</div>}
|
||||||
|
{item.job_conversations.length > 0 ? (
|
||||||
|
<div className="chat-name">
|
||||||
|
{item.job_conversations.map((j, idx) => (
|
||||||
|
<div key={idx}>
|
||||||
|
<OwnerNameDisplay ownerObject={j.job} />
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<PhoneFormatter>{item.phone_num}</PhoneFormatter>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div sryle={{ display: "inline-block" }}>
|
||||||
|
<div>
|
||||||
|
{item.job_conversations.length > 0
|
||||||
|
? item.job_conversations.map((j, idx) => (
|
||||||
|
<Tag key={idx} className="ro-number-tag">
|
||||||
|
{j.job.ro_number}
|
||||||
|
</Tag>
|
||||||
|
))
|
||||||
|
: null}
|
||||||
|
</div>
|
||||||
|
<TimeAgoFormatter>{item.updated_at}</TimeAgoFormatter>
|
||||||
|
</div>
|
||||||
|
<Badge count={item.messages_aggregate.aggregate.count || 0} />
|
||||||
|
</List.Item>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="chat-list-container">
|
<div className="chat-list-container">
|
||||||
<List
|
<AutoSizer>
|
||||||
bordered
|
{({ height, width }) => (
|
||||||
dataSource={conversationList}
|
<VirtualizedList
|
||||||
renderItem={(item) => (
|
height={height}
|
||||||
<List.Item
|
width={width}
|
||||||
key={item.id}
|
rowCount={conversationList.length}
|
||||||
onClick={() => setSelectedConversation(item.id)}
|
rowHeight={60}
|
||||||
className={`chat-list-item ${
|
rowRenderer={rowRenderer}
|
||||||
item.id === selectedConversation
|
onScroll={({ scrollTop, scrollHeight, clientHeight }) => {
|
||||||
? "chat-list-selected-conversation"
|
if (scrollTop + clientHeight === scrollHeight) {
|
||||||
: null
|
loadMoreConversations();
|
||||||
}`}
|
}
|
||||||
>
|
}}
|
||||||
<div sryle={{ display: "inline-block" }}>
|
/>
|
||||||
{item.label && <div className="chat-name">{item.label}</div>}
|
|
||||||
{item.job_conversations.length > 0 ? (
|
|
||||||
<div className="chat-name">
|
|
||||||
{item.job_conversations.map((j, idx) => (
|
|
||||||
<div key={idx}>
|
|
||||||
<OwnerNameDisplay ownerObject={j.job} />
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<PhoneFormatter>{item.phone_num}</PhoneFormatter>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div sryle={{ display: "inline-block" }}>
|
|
||||||
<div>
|
|
||||||
{item.job_conversations.length > 0
|
|
||||||
? item.job_conversations.map((j, idx) => (
|
|
||||||
<Tag key={idx} className="ro-number-tag">
|
|
||||||
{j.job.ro_number}
|
|
||||||
</Tag>
|
|
||||||
))
|
|
||||||
: null}
|
|
||||||
</div>
|
|
||||||
<TimeAgoFormatter>{item.updated_at}</TimeAgoFormatter>
|
|
||||||
</div>
|
|
||||||
<Badge count={item.messages_aggregate.aggregate.count || 0} />
|
|
||||||
</List.Item>
|
|
||||||
)}
|
)}
|
||||||
/>
|
</AutoSizer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
}
|
}
|
||||||
.chat-list-container {
|
.chat-list-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
border: 1px solid gainsboro;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-list-item {
|
.chat-list-item {
|
||||||
@@ -21,4 +22,6 @@
|
|||||||
.ro-number-tag {
|
.ro-number-tag {
|
||||||
align-self: baseline;
|
align-self: baseline;
|
||||||
}
|
}
|
||||||
|
padding: 12px 24px;
|
||||||
|
border-bottom: 1px solid gainsboro;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,16 @@ import {
|
|||||||
ShrinkOutlined,
|
ShrinkOutlined,
|
||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { useQuery } from "@apollo/client";
|
import { useLazyQuery, useSubscription } from "@apollo/client";
|
||||||
import { Badge, Card, Col, Row, Space, Tag, Tooltip, Typography } from "antd";
|
import { Badge, Card, Col, Row, Space, Tag, Tooltip, Typography } from "antd";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useCallback, 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 {
|
import {
|
||||||
CONVERSATION_LIST_QUERY,
|
CONVERSATION_LIST_QUERY,
|
||||||
UNREAD_CONVERSATION_COUNT,
|
CONVERSATION_LIST_SUBSCRIPTION,
|
||||||
|
UNREAD_CONVERSATION_COUNT_SUBSCRIPTION,
|
||||||
} from "../../graphql/conversations.queries";
|
} from "../../graphql/conversations.queries";
|
||||||
import { toggleChatVisible } from "../../redux/messaging/messaging.actions";
|
import { toggleChatVisible } from "../../redux/messaging/messaging.actions";
|
||||||
import {
|
import {
|
||||||
@@ -41,17 +42,17 @@ export function ChatPopupComponent({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [pollInterval, setpollInterval] = useState(0);
|
const [pollInterval, setpollInterval] = useState(0);
|
||||||
|
|
||||||
const { data: unreadData } = useQuery(UNREAD_CONVERSATION_COUNT, {
|
const { data: unreadData } = useSubscription(
|
||||||
fetchPolicy: "network-only",
|
UNREAD_CONVERSATION_COUNT_SUBSCRIPTION
|
||||||
nextFetchPolicy: "network-only",
|
);
|
||||||
...(pollInterval > 0 ? { pollInterval } : {}),
|
|
||||||
});
|
|
||||||
|
|
||||||
const { loading, data, refetch, called } = useQuery(CONVERSATION_LIST_QUERY, {
|
const [
|
||||||
|
getConversations,
|
||||||
|
{ loading, data, called, refetch, fetchMore, subscribeToMore },
|
||||||
|
] = useLazyQuery(CONVERSATION_LIST_QUERY, {
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
skip: !chatVisible,
|
skip: !chatVisible,
|
||||||
...(pollInterval > 0 ? { pollInterval } : {}),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const fcmToken = sessionStorage.getItem("fcmtoken");
|
const fcmToken = sessionStorage.getItem("fcmtoken");
|
||||||
@@ -65,15 +66,22 @@ export function ChatPopupComponent({
|
|||||||
}, [fcmToken]);
|
}, [fcmToken]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (called && chatVisible) refetch();
|
if (called && chatVisible)
|
||||||
}, [chatVisible, called, refetch]);
|
getConversations({
|
||||||
|
variables: {
|
||||||
|
offset: 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}, [chatVisible, called, getConversations]);
|
||||||
|
|
||||||
// const unreadCount = data
|
const loadMoreConversations = useCallback(() => {
|
||||||
// ? data.conversations.reduce(
|
if (data)
|
||||||
// (acc, val) => val.messages_aggregate.aggregate.count + acc,
|
fetchMore({
|
||||||
// 0
|
variables: {
|
||||||
// )
|
offset: data.conversations.length,
|
||||||
// : 0;
|
},
|
||||||
|
});
|
||||||
|
}, [data, fetchMore]);
|
||||||
|
|
||||||
const unreadCount = unreadData?.messages_aggregate.aggregate.count || 0;
|
const unreadCount = unreadData?.messages_aggregate.aggregate.count || 0;
|
||||||
|
|
||||||
@@ -110,6 +118,44 @@ export function ChatPopupComponent({
|
|||||||
) : (
|
) : (
|
||||||
<ChatConversationListComponent
|
<ChatConversationListComponent
|
||||||
conversationList={data ? data.conversations : []}
|
conversationList={data ? data.conversations : []}
|
||||||
|
loadMoreConversations={loadMoreConversations}
|
||||||
|
subscribeToMoreConversations={() =>
|
||||||
|
subscribeToMore({
|
||||||
|
document: CONVERSATION_LIST_SUBSCRIPTION,
|
||||||
|
variables: { offset: 0 },
|
||||||
|
updateQuery: (prev, { subscriptionData }) => {
|
||||||
|
if (
|
||||||
|
!subscriptionData.data ||
|
||||||
|
subscriptionData.data.conversations.length === 0
|
||||||
|
)
|
||||||
|
return prev;
|
||||||
|
|
||||||
|
let conversations = [...prev.conversations];
|
||||||
|
const newConversations =
|
||||||
|
subscriptionData.data.conversations;
|
||||||
|
|
||||||
|
for (const conversation of newConversations) {
|
||||||
|
const index = conversations.findIndex(
|
||||||
|
(prevConversation) =>
|
||||||
|
prevConversation.id === conversation.id
|
||||||
|
);
|
||||||
|
|
||||||
|
if (index !== -1) {
|
||||||
|
conversations.splice(index, 1);
|
||||||
|
conversations.unshift(conversation);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
conversations.unshift(conversation);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Object.assign({}, prev, {
|
||||||
|
conversations: conversations,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export default function ProductionListDate({
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//e.stopPropagation();
|
//e.stopPropagation();
|
||||||
|
|
||||||
updateAlert({
|
updateAlert({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: record.id,
|
jobId: record.id,
|
||||||
@@ -32,6 +33,11 @@ export default function ProductionListDate({
|
|||||||
[field]: date,
|
[field]: date,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
optimisticResponse: {
|
||||||
|
update_jobs: {
|
||||||
|
[field]: date,
|
||||||
|
},
|
||||||
|
},
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (record.refetch) record.refetch();
|
if (record.refetch) record.refetch();
|
||||||
if (!time) {
|
if (!time) {
|
||||||
@@ -49,9 +55,11 @@ export default function ProductionListDate({
|
|||||||
(moment().add(1, "day").isSame(moment(record[field]), "day") &&
|
(moment().add(1, "day").isSame(moment(record[field]), "day") &&
|
||||||
"production-completion-soon"));
|
"production-completion-soon"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
//trigger={["click"]}
|
trigger={["click"]}
|
||||||
|
onVisibleChange={(v) => setVisible(v)}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
style={{
|
style={{
|
||||||
height: "19px",
|
height: "19px",
|
||||||
|
|||||||
@@ -96,8 +96,9 @@ export function TimeTicketModalComponent({
|
|||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<JobSearchSelect
|
<JobSearchSelect
|
||||||
convertedOnly={!bodyshop.tt_allow_post_to_invoiced}
|
convertedOnly={true}
|
||||||
notExported={!bodyshop.tt_allow_post_to_invoiced}
|
notExported={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
|
notInvoiced={!bodyshop.tt_allow_post_to_invoiced}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,35 +1,36 @@
|
|||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
|
|
||||||
// export const CONVERSATION_LIST_SUBSCRIPTION = gql`
|
export const CONVERSATION_LIST_SUBSCRIPTION = gql`
|
||||||
// subscription CONVERSATION_LIST_SUBSCRIPTION {
|
subscription CONVERSATION_LIST_SUBSCRIPTION($offset: Int!) {
|
||||||
// conversations(
|
conversations(
|
||||||
// order_by: { updated_at: desc }
|
order_by: { updated_at: desc }
|
||||||
// limit: 50
|
limit: 1
|
||||||
// where: { archived: { _eq: false } }
|
offset: $offset
|
||||||
// ) {
|
where: { archived: { _eq: false } }
|
||||||
// phone_num
|
) {
|
||||||
// id
|
phone_num
|
||||||
// updated_at
|
id
|
||||||
// unreadcnt
|
updated_at
|
||||||
// messages_aggregate(
|
unreadcnt
|
||||||
// where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
messages_aggregate(
|
||||||
// ) {
|
where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
||||||
// aggregate {
|
) {
|
||||||
// count
|
aggregate {
|
||||||
// }
|
count
|
||||||
// }
|
}
|
||||||
// job_conversations {
|
}
|
||||||
// job {
|
job_conversations {
|
||||||
// id
|
job {
|
||||||
// ro_number
|
id
|
||||||
// ownr_fn
|
ro_number
|
||||||
// ownr_ln
|
ownr_fn
|
||||||
// ownr_co_nm
|
ownr_ln
|
||||||
// }
|
ownr_co_nm
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// `;
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
export const UNREAD_CONVERSATION_COUNT = gql`
|
export const UNREAD_CONVERSATION_COUNT = gql`
|
||||||
query UNREAD_CONVERSATION_COUNT {
|
query UNREAD_CONVERSATION_COUNT {
|
||||||
@@ -43,11 +44,24 @@ export const UNREAD_CONVERSATION_COUNT = gql`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const UNREAD_CONVERSATION_COUNT_SUBSCRIPTION = gql`
|
||||||
|
subscription UNREAD_CONVERSATION_COUNT_SUBSCRIPTION {
|
||||||
|
messages_aggregate(
|
||||||
|
where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
count
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
export const CONVERSATION_LIST_QUERY = gql`
|
export const CONVERSATION_LIST_QUERY = gql`
|
||||||
query CONVERSATION_LIST_QUERY {
|
query CONVERSATION_LIST_QUERY($offset: Int!) {
|
||||||
conversations(
|
conversations(
|
||||||
order_by: { updated_at: desc }
|
order_by: { updated_at: desc }
|
||||||
limit: 50
|
limit: 20
|
||||||
|
offset: $offset
|
||||||
where: { archived: { _eq: false } }
|
where: { archived: { _eq: false } }
|
||||||
) {
|
) {
|
||||||
phone_num
|
phone_num
|
||||||
|
|||||||
@@ -1075,6 +1075,9 @@ export const UPDATE_JOB = gql`
|
|||||||
lbr_adjustments
|
lbr_adjustments
|
||||||
suspended
|
suspended
|
||||||
queued_for_parts
|
queued_for_parts
|
||||||
|
scheduled_completion
|
||||||
|
actual_in
|
||||||
|
date_repairstarted
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2316,7 +2316,7 @@
|
|||||||
"folder_label_multiple": "Folder Label - Multi",
|
"folder_label_multiple": "Folder Label - Multi",
|
||||||
"glass_express_checklist": "Glass Express Checklist",
|
"glass_express_checklist": "Glass Express Checklist",
|
||||||
"guarantee": "Repair Guarantee",
|
"guarantee": "Repair Guarantee",
|
||||||
"individual_job_note": "Job Note RO # {{ro_number}}",
|
"individual_job_note": "RO Job Note",
|
||||||
"invoice_customer_payable": "Invoice (Customer Payable)",
|
"invoice_customer_payable": "Invoice (Customer Payable)",
|
||||||
"invoice_total_payable": "Invoice (Total Payable)",
|
"invoice_total_payable": "Invoice (Total Payable)",
|
||||||
"iou_form": "IOU Form",
|
"iou_form": "IOU Form",
|
||||||
@@ -2332,7 +2332,8 @@
|
|||||||
"mechanical_authorization": "Mechanical Authorization",
|
"mechanical_authorization": "Mechanical Authorization",
|
||||||
"mpi_animal_checklist": "MPI - Animal Checklist",
|
"mpi_animal_checklist": "MPI - Animal Checklist",
|
||||||
"mpi_eglass_auth": "MPI - eGlass Auth",
|
"mpi_eglass_auth": "MPI - eGlass Auth",
|
||||||
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet",
|
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet (Direct Repair)",
|
||||||
|
"mpi_final_repair_acct_sheet": "MPI - Final Accounting Sheet",
|
||||||
"paint_grid": "Paint Grid",
|
"paint_grid": "Paint Grid",
|
||||||
"parts_invoice_label_single": "Parts Label Single",
|
"parts_invoice_label_single": "Parts Label Single",
|
||||||
"parts_label_multiple": "Parts Label - Multi",
|
"parts_label_multiple": "Parts Label - Multi",
|
||||||
@@ -2394,6 +2395,7 @@
|
|||||||
},
|
},
|
||||||
"subjects": {
|
"subjects": {
|
||||||
"jobs": {
|
"jobs": {
|
||||||
|
"individual_job_note": "Job Note RO: {{ro_number}}",
|
||||||
"parts_order": "Parts Order PO: {{ro_number}} - {{name}}",
|
"parts_order": "Parts Order PO: {{ro_number}} - {{name}}",
|
||||||
"sublet_order": "Sublet Order PO: {{ro_number}} - {{name}}"
|
"sublet_order": "Sublet Order PO: {{ro_number}} - {{name}}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2333,6 +2333,7 @@
|
|||||||
"mpi_animal_checklist": "",
|
"mpi_animal_checklist": "",
|
||||||
"mpi_eglass_auth": "",
|
"mpi_eglass_auth": "",
|
||||||
"mpi_final_acct_sheet": "",
|
"mpi_final_acct_sheet": "",
|
||||||
|
"mpi_final_repair_acct_sheet": "",
|
||||||
"paint_grid": "",
|
"paint_grid": "",
|
||||||
"parts_invoice_label_single": "",
|
"parts_invoice_label_single": "",
|
||||||
"parts_label_multiple": "",
|
"parts_label_multiple": "",
|
||||||
@@ -2394,6 +2395,7 @@
|
|||||||
},
|
},
|
||||||
"subjects": {
|
"subjects": {
|
||||||
"jobs": {
|
"jobs": {
|
||||||
|
"individual_job_note": "",
|
||||||
"parts_order": "",
|
"parts_order": "",
|
||||||
"sublet_order": ""
|
"sublet_order": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2333,6 +2333,7 @@
|
|||||||
"mpi_animal_checklist": "",
|
"mpi_animal_checklist": "",
|
||||||
"mpi_eglass_auth": "",
|
"mpi_eglass_auth": "",
|
||||||
"mpi_final_acct_sheet": "",
|
"mpi_final_acct_sheet": "",
|
||||||
|
"mpi_final_repair_acct_sheet": "",
|
||||||
"paint_grid": "",
|
"paint_grid": "",
|
||||||
"parts_invoice_label_single": "",
|
"parts_invoice_label_single": "",
|
||||||
"parts_label_multiple": "",
|
"parts_label_multiple": "",
|
||||||
@@ -2394,6 +2395,7 @@
|
|||||||
},
|
},
|
||||||
"subjects": {
|
"subjects": {
|
||||||
"jobs": {
|
"jobs": {
|
||||||
|
"individual_job_note": "",
|
||||||
"parts_order": "",
|
"parts_order": "",
|
||||||
"sublet_order": ""
|
"sublet_order": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ import { setContext } from "@apollo/client/link/context";
|
|||||||
import { HttpLink } from "@apollo/client/link/http"; //"apollo-link-http";
|
import { HttpLink } from "@apollo/client/link/http"; //"apollo-link-http";
|
||||||
import { RetryLink } from "@apollo/client/link/retry";
|
import { RetryLink } from "@apollo/client/link/retry";
|
||||||
import { WebSocketLink } from "@apollo/client/link/ws";
|
import { WebSocketLink } from "@apollo/client/link/ws";
|
||||||
import { getMainDefinition } from "@apollo/client/utilities";
|
import {
|
||||||
|
getMainDefinition,
|
||||||
|
offsetLimitPagination,
|
||||||
|
} from "@apollo/client/utilities";
|
||||||
//import { split } from "apollo-link";
|
//import { split } from "apollo-link";
|
||||||
import apolloLogger from "apollo-link-logger";
|
import apolloLogger from "apollo-link-logger";
|
||||||
//import axios from "axios";
|
//import axios from "axios";
|
||||||
@@ -140,7 +143,15 @@ middlewares.push(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const cache = new InMemoryCache({});
|
const cache = new InMemoryCache({
|
||||||
|
typePolicies: {
|
||||||
|
Query: {
|
||||||
|
fields: {
|
||||||
|
conversations: offsetLimitPagination(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const client = new ApolloClient({
|
const client = new ApolloClient({
|
||||||
link: ApolloLink.from(middlewares),
|
link: ApolloLink.from(middlewares),
|
||||||
|
|||||||
@@ -421,6 +421,17 @@ export const TemplateList = (type, context) => {
|
|||||||
CA_MB: true,
|
CA_MB: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mpi_final_repair_acct_sheet: {
|
||||||
|
title: i18n.t("printcenter.jobs.mpi_final_repair_acct_sheet"),
|
||||||
|
description: "",
|
||||||
|
key: "mpi_final_repair_acct_sheet",
|
||||||
|
subject: i18n.t("printcenter.jobs.mpi_final_repair_acct_sheet"),
|
||||||
|
disabled: false,
|
||||||
|
group: "post",
|
||||||
|
regions: {
|
||||||
|
CA_MB: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
mpi_eglass_auth: {
|
mpi_eglass_auth: {
|
||||||
title: i18n.t("printcenter.jobs.mpi_eglass_auth"),
|
title: i18n.t("printcenter.jobs.mpi_eglass_auth"),
|
||||||
description: "",
|
description: "",
|
||||||
@@ -542,7 +553,7 @@ export const TemplateList = (type, context) => {
|
|||||||
title: i18n.t("printcenter.jobs.individual_job_note"),
|
title: i18n.t("printcenter.jobs.individual_job_note"),
|
||||||
description: "",
|
description: "",
|
||||||
key: "individual_job_note",
|
key: "individual_job_note",
|
||||||
subject: i18n.t("printcenter.jobs.individual_job_note", {
|
subject: i18n.t("printcenter.subjects.jobs.individual_job_note", {
|
||||||
ro_number: (context && context.ro_number) || "",
|
ro_number: (context && context.ro_number) || "",
|
||||||
}),
|
}),
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|||||||
@@ -11168,6 +11168,11 @@ react-image-lightbox@^5.1.4:
|
|||||||
prop-types "^15.7.2"
|
prop-types "^15.7.2"
|
||||||
react-modal "^3.11.1"
|
react-modal "^3.11.1"
|
||||||
|
|
||||||
|
react-intersection-observer@^9.4.3:
|
||||||
|
version "9.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-intersection-observer/-/react-intersection-observer-9.4.3.tgz#ec84ce0c25cad548075130ea045ac5c7adf908f3"
|
||||||
|
integrity sha512-WNRqMQvKpupr6MzecAQI0Pj0+JQong307knLP4g/nBex7kYfIaZsPpXaIhKHR+oV8z+goUbH9e10j6lGRnTzlQ==
|
||||||
|
|
||||||
react-is@^16.10.2, react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
|
react-is@^16.10.2, react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
|
||||||
version "16.13.1"
|
version "16.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ async function CdkSelectedCustomer(socket, selectedCustomerId) {
|
|||||||
} finally {
|
} finally {
|
||||||
//Ensure we always insert logEvents
|
//Ensure we always insert logEvents
|
||||||
//GQL to insert logevents.
|
//GQL to insert logevents.
|
||||||
|
|
||||||
CdkBase.createLogEvent(
|
CdkBase.createLogEvent(
|
||||||
socket,
|
socket,
|
||||||
"DEBUG",
|
"DEBUG",
|
||||||
@@ -432,7 +432,7 @@ async function QueryDmsCustomerById(socket, JobData, CustomerId) {
|
|||||||
|
|
||||||
async function QueryDmsCustomerByName(socket, JobData) {
|
async function QueryDmsCustomerByName(socket, JobData) {
|
||||||
const ownerName = (
|
const ownerName = (
|
||||||
JobData.ownr_co_nm && JobData.ownr_co_nm !== ""
|
JobData.ownr_co_nm && JobData.ownr_co_nm.trim() !== ""
|
||||||
? JobData.ownr_co_nm
|
? JobData.ownr_co_nm
|
||||||
: `${JobData.ownr_ln},${JobData.ownr_fn}`
|
: `${JobData.ownr_ln},${JobData.ownr_fn}`
|
||||||
).replace(replaceSpecialRegex, "");
|
).replace(replaceSpecialRegex, "");
|
||||||
@@ -642,7 +642,8 @@ async function InsertDmsCustomer(socket, newCustomerNumber) {
|
|||||||
.toUpperCase(),
|
.toUpperCase(),
|
||||||
middleName: null,
|
middleName: null,
|
||||||
nameType:
|
nameType:
|
||||||
socket.JobData.ownr_co_nm && socket.JobData.ownr_co_nm
|
socket.JobData.ownr_co_nm &&
|
||||||
|
String(socket.JobData.ownr_co_nm).trim() !== ""
|
||||||
? "Business"
|
? "Business"
|
||||||
: "Person",
|
: "Person",
|
||||||
suffix: null,
|
suffix: null,
|
||||||
@@ -728,7 +729,9 @@ async function InsertDmsVehicle(socket) {
|
|||||||
deliveryDate: moment()
|
deliveryDate: moment()
|
||||||
// .tz(socket.JobData.bodyshop.timezone)
|
// .tz(socket.JobData.bodyshop.timezone)
|
||||||
.format("YYYYMMDD"),
|
.format("YYYYMMDD"),
|
||||||
licensePlateNo: socket.JobData.plate_no,
|
licensePlateNo: String(socket.JobData.plate_no)
|
||||||
|
.replace(/([^\w]|_)/g, "")
|
||||||
|
.toUpperCase(),
|
||||||
make: socket.txEnvelope.dms_make,
|
make: socket.txEnvelope.dms_make,
|
||||||
modelAbrev: socket.txEnvelope.dms_model,
|
modelAbrev: socket.txEnvelope.dms_model,
|
||||||
modelYear: socket.JobData.v_model_yr,
|
modelYear: socket.JobData.v_model_yr,
|
||||||
|
|||||||
11
yarn.lock
11
yarn.lock
@@ -4312,14 +4312,9 @@ tslib@^1.11.1:
|
|||||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||||
|
|
||||||
tslib@^2.0.1, tslib@^2.1.0:
|
tslib@^2.0.1, tslib@^2.1.0:
|
||||||
|
version "2.5.2"
|
||||||
tslib@^2.3.1, tslib@^2.5.0:
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338"
|
||||||
version "2.5.0"
|
integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
|
||||||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
|
||||||
version "2.5.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
|
||||||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
|
||||||
|
|
||||||
tslib@^2.3.1, tslib@^2.5.0:
|
tslib@^2.3.1, tslib@^2.5.0:
|
||||||
version "2.5.0"
|
version "2.5.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user