1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"eslint.workingDirectories": ["./client", "./"],
|
||||||
"xml.fileAssociations": [
|
"xml.fileAssociations": [
|
||||||
{
|
{
|
||||||
"pattern": "**/Test.xml",
|
"pattern": "**/Test.xml",
|
||||||
|
|||||||
@@ -4339,6 +4339,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>dms_control_override</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>dms_wip_acctnumber</name>
|
<name>dms_wip_acctnumber</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -42140,6 +42161,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>production_over_time</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>psr_by_make</name>
|
<name>psr_by_make</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -42161,6 +42203,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>purchase_return_ratio_grouped_by_vendor_detail</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>purchase_return_ratio_grouped_by_vendor_summary</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>purchases_by_cost_center_detail</name>
|
<name>purchases_by_cost_center_detail</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ REACT_APP_CLOUDINARY_API_KEY=957865933348715
|
|||||||
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||||
REACT_APP_FIREBASE_PUBLIC_VAPID_KEY='BG3tzU7L2BXlGZ_3VLK4PNaRceoEXEnmHfxcVbRMF5o5g05ejslhVPki9kBM9cBBT-08Ad9kN3HSpS6JmrWD6h4'
|
REACT_APP_FIREBASE_PUBLIC_VAPID_KEY='BG3tzU7L2BXlGZ_3VLK4PNaRceoEXEnmHfxcVbRMF5o5g05ejslhVPki9kBM9cBBT-08Ad9kN3HSpS6JmrWD6h4'
|
||||||
REACT_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
REACT_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||||
REACT_APP_AXIOS_BASE_API_URL=https://api.imex.online/
|
REACT_APP_AXIOS_BASE_API_URL=http://localhost:4000
|
||||||
REACT_APP_REPORTS_SERVER_URL=https://reports3.test.imex.online
|
REACT_APP_REPORTS_SERVER_URL=https://reports3.test.imex.online
|
||||||
REACT_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
REACT_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||||
@@ -4,69 +4,69 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"proxy": "http://localhost:4000",
|
"proxy": "http://localhost:4000",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.6.9",
|
"@apollo/client": "^3.7.9",
|
||||||
"@asseinfo/react-kanban": "^2.2.0",
|
"@asseinfo/react-kanban": "^2.2.0",
|
||||||
"@craco/craco": "^6.4.5",
|
"@craco/craco": "^7.0.0",
|
||||||
"@fingerprintjs/fingerprintjs": "^3.3.3",
|
"@fingerprintjs/fingerprintjs": "^3.3.3",
|
||||||
"@jsreport/browser-client": "^3.1.0",
|
"@jsreport/browser-client": "^3.1.0",
|
||||||
"@sentry/react": "^7.28.1",
|
"@sentry/react": "^7.40.0",
|
||||||
"@sentry/tracing": "^7.28.1",
|
"@sentry/tracing": "^7.40.0",
|
||||||
"@splitsoftware/splitio-react": "^1.6.0",
|
"@splitsoftware/splitio-react": "^1.8.1",
|
||||||
"@tanem/react-nprogress": "^5.0.8",
|
"@tanem/react-nprogress": "^5.0.8",
|
||||||
"antd": "^4.22.3",
|
"antd": "^4.24.8",
|
||||||
"apollo-link-logger": "^2.0.0",
|
"apollo-link-logger": "^2.0.1",
|
||||||
"axios": "^0.27.2",
|
"axios": "^1.3.4",
|
||||||
"craco-less": "^1.20.0",
|
"craco-less": "^2.0.0",
|
||||||
"dinero.js": "^1.9.1",
|
"dinero.js": "^1.9.1",
|
||||||
"dotenv": "^16.0.1",
|
"dotenv": "^16.0.1",
|
||||||
"enquire-js": "^0.2.1",
|
"enquire-js": "^0.2.1",
|
||||||
"env-cmd": "^10.1.0",
|
"env-cmd": "^10.1.0",
|
||||||
"exifr": "^7.1.3",
|
"exifr": "^7.1.3",
|
||||||
"firebase": "^9.9.1",
|
"firebase": "^9.17.1",
|
||||||
"graphql": "^16.5.0",
|
"graphql": "^16.6.0",
|
||||||
"i18next": "^21.8.14",
|
"i18next": "^22.4.10",
|
||||||
"i18next-browser-languagedetector": "^6.1.4",
|
"i18next-browser-languagedetector": "^7.0.1",
|
||||||
"jsoneditor": "^9.9.0",
|
"jsoneditor": "^9.9.0",
|
||||||
"jsreport-browser-client-dist": "^1.3.0",
|
"jsreport-browser-client-dist": "^1.3.0",
|
||||||
"libphonenumber-js": "^1.10.9",
|
"libphonenumber-js": "^1.10.21",
|
||||||
"logrocket": "^3.0.1",
|
"logrocket": "^3.0.1",
|
||||||
"markerjs2": "^2.22.0",
|
"markerjs2": "^2.28.1",
|
||||||
"moment-business-days": "^1.2.0",
|
"moment-business-days": "^1.2.0",
|
||||||
"moment-timezone": "^0.5.34",
|
"moment-timezone": "^0.5.41",
|
||||||
"normalize-url": "^7.0.3",
|
"normalize-url": "^8.0.0",
|
||||||
"phone": "^3.1.23",
|
"phone": "^3.1.35",
|
||||||
"preval.macro": "^5.0.0",
|
"preval.macro": "^5.0.0",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"query-string": "^7.1.1",
|
"query-string": "^7.1.3",
|
||||||
"rc-queue-anim": "^2.0.0",
|
"rc-queue-anim": "^2.0.0",
|
||||||
"rc-scroll-anim": "^2.7.6",
|
"rc-scroll-anim": "^2.7.6",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-big-calendar": "^1.5.0",
|
"react-big-calendar": "^1.6.8",
|
||||||
"react-color": "^2.19.3",
|
"react-color": "^2.19.3",
|
||||||
"react-cookie": "^4.1.1",
|
"react-cookie": "^4.1.1",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-drag-listview": "^0.2.1",
|
"react-drag-listview": "^0.2.1",
|
||||||
"react-grid-gallery": "^0.5.5",
|
"react-grid-gallery": "^0.5.5",
|
||||||
"react-grid-layout": "^1.3.4",
|
"react-grid-layout": "^1.3.4",
|
||||||
"react-i18next": "^11.18.1",
|
"react-i18next": "^12.2.0",
|
||||||
"react-icons": "^4.4.0",
|
"react-icons": "^4.7.1",
|
||||||
"react-number-format": "^4.9.3",
|
"react-number-format": "^5.1.3",
|
||||||
"react-redux": "^7.2.8",
|
"react-redux": "^8.0.5",
|
||||||
"react-resizable": "^3.0.4",
|
"react-resizable": "^3.0.4",
|
||||||
"react-router-dom": "^5.3.0",
|
"react-router-dom": "^5.3.0",
|
||||||
"react-scripts": "^4.0.3",
|
"react-scripts": "^5.0.1",
|
||||||
"react-sticky": "^6.0.3",
|
"react-sticky": "^6.0.3",
|
||||||
"react-sublime-video": "^0.2.5",
|
"react-sublime-video": "^0.2.5",
|
||||||
"react-virtualized": "^9.22.3",
|
"react-virtualized": "^9.22.3",
|
||||||
"recharts": "^2.1.12",
|
"recharts": "^2.4.3",
|
||||||
"redux": "^4.2.0",
|
"redux": "^4.2.1",
|
||||||
"redux-persist": "^6.0.0",
|
"redux-persist": "^6.0.0",
|
||||||
"redux-saga": "^1.1.3",
|
"redux-saga": "^1.2.2",
|
||||||
"redux-state-sync": "^3.1.4",
|
"redux-state-sync": "^3.1.4",
|
||||||
"reselect": "^4.1.6",
|
"reselect": "^4.1.7",
|
||||||
"sass": "^1.54.0",
|
"sass": "^1.58.3",
|
||||||
"socket.io-client": "^4.5.1",
|
"socket.io-client": "^4.6.1",
|
||||||
"styled-components": "^5.3.5",
|
"styled-components": "^5.3.6",
|
||||||
"subscriptions-transport-ws": "^0.11.0",
|
"subscriptions-transport-ws": "^0.11.0",
|
||||||
"web-vitals": "^2.1.4",
|
"web-vitals": "^2.1.4",
|
||||||
"workbox-background-sync": "^6.5.3",
|
"workbox-background-sync": "^6.5.3",
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export function ChatConversationContainer({ bodyshop, selectedConversation }) {
|
|||||||
MARK_MESSAGES_AS_READ_BY_CONVERSATION,
|
MARK_MESSAGES_AS_READ_BY_CONVERSATION,
|
||||||
{
|
{
|
||||||
variables: { conversationId: selectedConversation },
|
variables: { conversationId: selectedConversation },
|
||||||
|
refetchQueries: ["UNREAD_CONVERSATION_COUNT"],
|
||||||
update(cache) {
|
update(cache) {
|
||||||
cache.modify({
|
cache.modify({
|
||||||
id: cache.identify({
|
id: cache.identify({
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ 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 { CONVERSATION_LIST_QUERY } from "../../graphql/conversations.queries";
|
import {
|
||||||
|
CONVERSATION_LIST_QUERY,
|
||||||
|
UNREAD_CONVERSATION_COUNT,
|
||||||
|
} from "../../graphql/conversations.queries";
|
||||||
import { toggleChatVisible } from "../../redux/messaging/messaging.actions";
|
import { toggleChatVisible } from "../../redux/messaging/messaging.actions";
|
||||||
import {
|
import {
|
||||||
selectChatVisible,
|
selectChatVisible,
|
||||||
@@ -37,9 +40,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, {
|
||||||
|
fetchPolicy: "network-only",
|
||||||
|
nextFetchPolicy: "network-only",
|
||||||
|
...(pollInterval > 0 ? { pollInterval } : {}),
|
||||||
|
});
|
||||||
|
|
||||||
const { loading, data, refetch, called } = useQuery(CONVERSATION_LIST_QUERY, {
|
const { loading, data, refetch, called } = useQuery(CONVERSATION_LIST_QUERY, {
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
|
skip: !chatVisible,
|
||||||
...(pollInterval > 0 ? { pollInterval } : {}),
|
...(pollInterval > 0 ? { pollInterval } : {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -57,12 +68,14 @@ export function ChatPopupComponent({
|
|||||||
if (called && chatVisible) refetch();
|
if (called && chatVisible) refetch();
|
||||||
}, [chatVisible, called, refetch]);
|
}, [chatVisible, called, refetch]);
|
||||||
|
|
||||||
const unreadCount = data
|
// const unreadCount = data
|
||||||
? data.conversations.reduce(
|
// ? data.conversations.reduce(
|
||||||
(acc, val) => val.messages_aggregate.aggregate.count + acc,
|
// (acc, val) => val.messages_aggregate.aggregate.count + acc,
|
||||||
0
|
// 0
|
||||||
)
|
// )
|
||||||
: 0;
|
// : 0;
|
||||||
|
|
||||||
|
const unreadCount = unreadData?.messages_aggregate.aggregate.count || 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Badge count={unreadCount}>
|
<Badge count={unreadCount}>
|
||||||
|
|||||||
@@ -9,7 +9,11 @@ const colSpan = {
|
|||||||
lg: { span: 12 },
|
lg: { span: 12 },
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function JobsCreateVehicleInfoComponent({ loading, vehicles }) {
|
export default function JobsCreateVehicleInfoComponent({
|
||||||
|
loading,
|
||||||
|
vehicles,
|
||||||
|
form,
|
||||||
|
}) {
|
||||||
const [state, setState] = useContext(JobCreateContext);
|
const [state, setState] = useContext(JobCreateContext);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
@@ -58,7 +62,7 @@ export default function JobsCreateVehicleInfoComponent({ loading, vehicles }) {
|
|||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col {...colSpan}>
|
<Col {...colSpan}>
|
||||||
<JobsCreateVehicleInfoNewComponent />
|
<JobsCreateVehicleInfoNewComponent form={form}/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export default function JobsCreateVehicleInfoContainer({ form }) {
|
|||||||
<JobsCreateVehicleInfoComponent
|
<JobsCreateVehicleInfoComponent
|
||||||
loading={loading}
|
loading={loading}
|
||||||
vehicles={data ? data.search_vehicles : null}
|
vehicles={data ? data.search_vehicles : null}
|
||||||
|
form={form}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import { useTranslation } from "react-i18next";
|
|||||||
import JobCreateContext from "../../pages/jobs-create/jobs-create.context";
|
import JobCreateContext from "../../pages/jobs-create/jobs-create.context";
|
||||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
import JobsCreateVehicleInfoPredefined from "./jobs-create-vehicle-info.predefined.component";
|
||||||
|
|
||||||
export default function JobsCreateVehicleInfoNewComponent() {
|
export default function JobsCreateVehicleInfoNewComponent({ form }) {
|
||||||
const [state] = useContext(JobCreateContext);
|
const [state] = useContext(JobCreateContext);
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -25,7 +26,7 @@ export default function JobsCreateVehicleInfoNewComponent() {
|
|||||||
<Input disabled={!state.vehicle.new} />
|
<Input disabled={!state.vehicle.new} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow noDivider>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("vehicles.fields.v_color")}
|
label={t("vehicles.fields.v_color")}
|
||||||
name={["vehicle", "data", "v_color"]}
|
name={["vehicle", "data", "v_color"]}
|
||||||
@@ -52,8 +53,9 @@ export default function JobsCreateVehicleInfoNewComponent() {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
|
||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow noDivider>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
span={10}
|
||||||
label={t("vehicles.fields.v_make_desc")}
|
label={t("vehicles.fields.v_make_desc")}
|
||||||
name={["vehicle", "data", "v_make_desc"]}
|
name={["vehicle", "data", "v_make_desc"]}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -66,6 +68,7 @@ export default function JobsCreateVehicleInfoNewComponent() {
|
|||||||
<Input disabled={!state.vehicle.new} />
|
<Input disabled={!state.vehicle.new} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
span={11}
|
||||||
label={t("vehicles.fields.v_model_desc")}
|
label={t("vehicles.fields.v_model_desc")}
|
||||||
name={["vehicle", "data", "v_model_desc"]}
|
name={["vehicle", "data", "v_model_desc"]}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -77,6 +80,11 @@ export default function JobsCreateVehicleInfoNewComponent() {
|
|||||||
>
|
>
|
||||||
<Input disabled={!state.vehicle.new} />
|
<Input disabled={!state.vehicle.new} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<JobsCreateVehicleInfoPredefined
|
||||||
|
disabled={!state.vehicle.new}
|
||||||
|
form={form}
|
||||||
|
span={1}
|
||||||
|
/>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
|
||||||
<LayoutFormRow header={t("vehicles.forms.registration")} grow>
|
<LayoutFormRow header={t("vehicles.forms.registration")} grow>
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
import { PlusOutlined, SearchOutlined } from "@ant-design/icons";
|
||||||
|
import { Button, Input, Popover, Table } from "antd";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import PredefinedVehicles from "./predefined-vehicles.js";
|
||||||
|
|
||||||
|
export default function JobsCreateVehicleInfoPredefined({ disabled, form }) {
|
||||||
|
const [open, setOpen] = useState(false);
|
||||||
|
const [search, setSearch] = useState("");
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const handleOpenChange = (newOpen) => {
|
||||||
|
setOpen(newOpen);
|
||||||
|
setSearch("");
|
||||||
|
};
|
||||||
|
const filteredPredefinedVehicles =
|
||||||
|
search === ""
|
||||||
|
? PredefinedVehicles
|
||||||
|
: PredefinedVehicles.filter(
|
||||||
|
(v) =>
|
||||||
|
v.make.toLowerCase().includes(search.toLowerCase()) ||
|
||||||
|
v.model.toLowerCase().includes(search.toLowerCase())
|
||||||
|
);
|
||||||
|
|
||||||
|
const popContent = () => (
|
||||||
|
<div>
|
||||||
|
<Table
|
||||||
|
size="small"
|
||||||
|
title={() => <Input.Search onSearch={(value) => setSearch(value)} />}
|
||||||
|
dataSource={filteredPredefinedVehicles}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
dataIndex: "make",
|
||||||
|
key: "make",
|
||||||
|
title: t("vehicles.fields.v_make_desc"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: "model",
|
||||||
|
key: "model",
|
||||||
|
title: t("vehicles.fields.v_model_desc"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: "select",
|
||||||
|
key: "select",
|
||||||
|
title: t("general.labels.actions"),
|
||||||
|
render: (value, record) => (
|
||||||
|
<Button
|
||||||
|
disabled={disabled}
|
||||||
|
onClick={() => {
|
||||||
|
form.setFieldsValue({
|
||||||
|
vehicle: {
|
||||||
|
data: {
|
||||||
|
v_make_desc: record.make,
|
||||||
|
v_model_desc: record.model,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
setOpen(false);
|
||||||
|
setSearch("");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<PlusOutlined />
|
||||||
|
</Button>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<Popover
|
||||||
|
content={popContent}
|
||||||
|
trigger="click"
|
||||||
|
open={open}
|
||||||
|
placement="left"
|
||||||
|
onOpenChange={handleOpenChange}
|
||||||
|
destroyTooltipOnHide
|
||||||
|
>
|
||||||
|
<SearchOutlined style={{ cursor: "pointer" }} />
|
||||||
|
</Popover>
|
||||||
|
);
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import cleanAxios from "../../utils/CleanAxios";
|
import cleanAxios from "../../utils/CleanAxios";
|
||||||
import formatBytes from "../../utils/formatbytes";
|
import formatBytes from "../../utils/formatbytes";
|
||||||
import yauzl from "yauzl";
|
//import yauzl from "yauzl";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -69,44 +69,44 @@ export function JobsDocumentsDownloadButton({
|
|||||||
setDownload(null);
|
setDownload(null);
|
||||||
if (Direct_Media_Download.treatment === "on") {
|
if (Direct_Media_Download.treatment === "on") {
|
||||||
try {
|
try {
|
||||||
const parentDir = await window.showDirectoryPicker({
|
// const parentDir = await window.showDirectoryPicker({
|
||||||
id: "media",
|
// id: "media",
|
||||||
startIn: "downloads",
|
// startIn: "downloads",
|
||||||
});
|
// });
|
||||||
|
|
||||||
const directory = await parentDir.getDirectoryHandle(identifier, {
|
// const directory = await parentDir.getDirectoryHandle(identifier, {
|
||||||
create: true,
|
// create: true,
|
||||||
});
|
// });
|
||||||
|
|
||||||
yauzl.fromBuffer(
|
// yauzl.fromBuffer(
|
||||||
Buffer.from(theDownloadedZip.data),
|
// Buffer.from(theDownloadedZip.data),
|
||||||
{},
|
// {},
|
||||||
(err, zipFile) => {
|
// (err, zipFile) => {
|
||||||
if (err) throw err;
|
// if (err) throw err;
|
||||||
zipFile.on("entry", (entry) => {
|
// zipFile.on("entry", (entry) => {
|
||||||
zipFile.openReadStream(entry, async (readErr, readStream) => {
|
// zipFile.openReadStream(entry, async (readErr, readStream) => {
|
||||||
if (readErr) {
|
// if (readErr) {
|
||||||
zipFile.close();
|
// zipFile.close();
|
||||||
throw readErr;
|
// throw readErr;
|
||||||
}
|
// }
|
||||||
if (err) throw err;
|
// if (err) throw err;
|
||||||
let fileSystemHandle = await directory.getFileHandle(
|
// let fileSystemHandle = await directory.getFileHandle(
|
||||||
entry.fileName,
|
// entry.fileName,
|
||||||
{
|
// {
|
||||||
create: true,
|
// create: true,
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
const writable = await fileSystemHandle.createWritable();
|
// const writable = await fileSystemHandle.createWritable();
|
||||||
readStream.on("data", async function (chunk) {
|
// readStream.on("data", async function (chunk) {
|
||||||
await writable.write(chunk);
|
// await writable.write(chunk);
|
||||||
});
|
// });
|
||||||
readStream.on("end", async function () {
|
// readStream.on("end", async function () {
|
||||||
await writable.close();
|
// await writable.close();
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
standardMediaDownload(theDownloadedZip.data);
|
standardMediaDownload(theDownloadedZip.data);
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ export function ProductionListTable({
|
|||||||
const assoc = bodyshop.associations.find(
|
const assoc = bodyshop.associations.find(
|
||||||
(a) => a.useremail === currentUser.email
|
(a) => a.useremail === currentUser.email
|
||||||
);
|
);
|
||||||
|
|
||||||
if (assoc) {
|
if (assoc) {
|
||||||
await updateDefaultProdView({
|
await updateDefaultProdView({
|
||||||
variables: { assocId: assoc.id, view: value },
|
variables: { assocId: assoc.id, view: value },
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default function ProfileShopsComponent({
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
console.log("🚀 ~ file: profile-shops.component.jsx:45 ~ data", data);
|
|
||||||
const filteredData =
|
const filteredData =
|
||||||
search === ""
|
search === ""
|
||||||
? data
|
? data
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import React from "react";
|
|||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import {
|
import {
|
||||||
QUERY_ALL_ASSOCIATIONS,
|
QUERY_ALL_ASSOCIATIONS,
|
||||||
UPDATE_ASSOCIATION,
|
UPDATE_ACTIVE_ASSOCIATION,
|
||||||
} from "../../graphql/associations.queries";
|
} from "../../graphql/associations.queries";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import ProfileShopsComponent from "./profile-shops.component";
|
import ProfileShopsComponent from "./profile-shops.component";
|
||||||
@@ -13,9 +13,13 @@ import { getToken } from "firebase/messaging";
|
|||||||
|
|
||||||
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 {
|
||||||
|
selectBodyshop,
|
||||||
|
selectCurrentUser,
|
||||||
|
} from "../../redux/user/user.selectors";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
|
currentUser: selectCurrentUser,
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
@@ -25,14 +29,18 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(ProfileShopsContainer);
|
)(ProfileShopsContainer);
|
||||||
|
|
||||||
export function ProfileShopsContainer({ bodyshop }) {
|
export function ProfileShopsContainer({ bodyshop, currentUser }) {
|
||||||
const { loading, error, data } = useQuery(QUERY_ALL_ASSOCIATIONS, {
|
const { loading, error, data } = useQuery(QUERY_ALL_ASSOCIATIONS, {
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
|
variables: {
|
||||||
|
email: currentUser.email,
|
||||||
|
},
|
||||||
|
skip: !currentUser,
|
||||||
});
|
});
|
||||||
const [updateAssocation] = useMutation(UPDATE_ASSOCIATION);
|
const [updateActiveAssociation] = useMutation(UPDATE_ACTIVE_ASSOCIATION);
|
||||||
|
|
||||||
const updateActiveShop = async (activeShopId) => {
|
const updateActiveShop = async (newActiveAssocId) => {
|
||||||
logImEXEvent("profile_change_active_shop");
|
logImEXEvent("profile_change_active_shop");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -46,16 +54,12 @@ export function ProfileShopsContainer({ bodyshop }) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("No FCM token. Skipping unsubscribe.");
|
console.log("No FCM token. Skipping unsubscribe.");
|
||||||
}
|
}
|
||||||
await Promise.all(
|
|
||||||
data.associations.map(async (record) => {
|
await updateActiveAssociation({
|
||||||
await updateAssocation({
|
variables: {
|
||||||
variables: {
|
newActiveAssocId: newActiveAssocId,
|
||||||
assocId: record.id,
|
},
|
||||||
assocActive: record.id === activeShopId ? true : false,
|
});
|
||||||
},
|
|
||||||
});
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
//Force window refresh.
|
//Force window refresh.
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,9 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
{t("jobs.fields.ponumber")}
|
{t("jobs.fields.ponumber")}
|
||||||
</Select.Option>
|
</Select.Option>
|
||||||
<Select.Option value="account_number">
|
<Select.Option value="account_number">
|
||||||
{t("jobs.fields.dms.control_type.account_number")}
|
{t(
|
||||||
|
"jobs.fields.dms.control_type.account_number"
|
||||||
|
)}
|
||||||
</Select.Option>
|
</Select.Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -423,6 +425,15 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
<Input onBlur={handleBlur} />
|
<Input onBlur={handleBlur} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
{bodyshop.cdk_dealerid && (
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.dms.dms_control_override")}
|
||||||
|
key={`${index}dms_control_override`}
|
||||||
|
name={[field.name, "dms_control_override"]}
|
||||||
|
>
|
||||||
|
<Input onBlur={handleBlur} />
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
|
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -546,6 +557,15 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
<Input onBlur={handleBlur} />
|
<Input onBlur={handleBlur} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
{bodyshop.cdk_dealerid && (
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.dms.dms_control_override")}
|
||||||
|
key={`${index}dms_control_override`}
|
||||||
|
name={[field.name, "dms_control_override"]}
|
||||||
|
>
|
||||||
|
<Input onBlur={handleBlur} />
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
remove(field.name);
|
remove(field.name);
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ export default function ShopUsersAuthEdit({ association }) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!visible && (
|
{!visible && (
|
||||||
<div style={{ cursor: "pointer" }} onClick={() => setVisible(true)}>
|
<div
|
||||||
|
style={{ cursor: "pointer" }} //onClick={() => setVisible(true)}
|
||||||
|
>
|
||||||
{association.authlevel || t("general.labels.na")}
|
{association.authlevel || t("general.labels.na")}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
|
|
||||||
export const QUERY_ALL_ASSOCIATIONS = gql`
|
export const QUERY_ALL_ASSOCIATIONS = gql`
|
||||||
query QUERY_ALL_ASSOCIATIONS {
|
query QUERY_ALL_ASSOCIATIONS($email: String) {
|
||||||
associations(order_by: { bodyshop: { shopname: asc } }) {
|
associations(
|
||||||
|
where: { useremail: { _eq: $email } }
|
||||||
|
order_by: { bodyshop: { shopname: asc } }
|
||||||
|
) {
|
||||||
id
|
id
|
||||||
active
|
active
|
||||||
bodyshop {
|
bodyshop {
|
||||||
@@ -27,6 +30,30 @@ export const UPDATE_ASSOCIATION = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
export const UPDATE_ACTIVE_ASSOCIATION = gql`
|
||||||
|
mutation UPDATE_ACTIVE_ASSOCIATION($newActiveAssocId: uuid) {
|
||||||
|
nweActive: update_associations(
|
||||||
|
where: { id: { _eq: $newActiveAssocId } }
|
||||||
|
_set: { active: true }
|
||||||
|
) {
|
||||||
|
returning {
|
||||||
|
id
|
||||||
|
shopid
|
||||||
|
active
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inactive: update_associations(
|
||||||
|
where: { id: { _neq: $newActiveAssocId } }
|
||||||
|
_set: { active: false }
|
||||||
|
) {
|
||||||
|
returning {
|
||||||
|
id
|
||||||
|
shopid
|
||||||
|
active
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
export const UPDATE_ACTIVE_PROD_LIST_VIEW = gql`
|
export const UPDATE_ACTIVE_PROD_LIST_VIEW = gql`
|
||||||
mutation UPDATE_ACTIVE_PROD_LIST_VIEW($assocId: uuid, $view: String) {
|
mutation UPDATE_ACTIVE_PROD_LIST_VIEW($assocId: uuid, $view: String) {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export const QUERY_BODYSHOP = gql`
|
|||||||
query QUERY_BODYSHOP {
|
query QUERY_BODYSHOP {
|
||||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||||
associations {
|
associations {
|
||||||
|
id
|
||||||
authlevel
|
authlevel
|
||||||
useremail
|
useremail
|
||||||
default_prod_list_view
|
default_prod_list_view
|
||||||
|
|||||||
@@ -31,6 +31,18 @@ import { gql } from "@apollo/client";
|
|||||||
// }
|
// }
|
||||||
// `;
|
// `;
|
||||||
|
|
||||||
|
export const UNREAD_CONVERSATION_COUNT = gql`
|
||||||
|
query UNREAD_CONVERSATION_COUNT {
|
||||||
|
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 {
|
||||||
conversations(
|
conversations(
|
||||||
|
|||||||
@@ -2060,6 +2060,7 @@ export const QUERY_JOB_EXPORT_DMS = gql`
|
|||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_co_nm
|
ownr_co_nm
|
||||||
|
ins_co_nm
|
||||||
kmin
|
kmin
|
||||||
kmout
|
kmout
|
||||||
v_make_desc
|
v_make_desc
|
||||||
|
|||||||
@@ -101,7 +101,10 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
];
|
];
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
socket.on("connect_error", (err) => {
|
||||||
|
console.log(`connect_error due to ${err}`, err);
|
||||||
|
notification.error({ message: err.message });
|
||||||
|
});
|
||||||
socket.on("log-event", (payload) => {
|
socket.on("log-event", (payload) => {
|
||||||
setLogs((logs) => {
|
setLogs((logs) => {
|
||||||
return [...logs, payload];
|
return [...logs, payload];
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function JobsCreateComponent({ form }) {
|
|||||||
const steps = [
|
const steps = [
|
||||||
{
|
{
|
||||||
title: t("jobs.labels.create.vehicleinfo"),
|
title: t("jobs.labels.create.vehicleinfo"),
|
||||||
content: <JobsCreateVehicleInfoContainer />,
|
content: <JobsCreateVehicleInfoContainer form={form} />,
|
||||||
validation:
|
validation:
|
||||||
!!state.vehicle.new ||
|
!!state.vehicle.new ||
|
||||||
!!state.vehicle.selectedid ||
|
!!state.vehicle.selectedid ||
|
||||||
|
|||||||
@@ -270,6 +270,7 @@
|
|||||||
"disablebillwip": "Disable bill WIP for A/P Posting",
|
"disablebillwip": "Disable bill WIP for A/P Posting",
|
||||||
"disablecontactvehiclecreation": "Disable Contact & Vehicle Updates/Creation",
|
"disablecontactvehiclecreation": "Disable Contact & Vehicle Updates/Creation",
|
||||||
"dms_acctnumber": "DMS Account #",
|
"dms_acctnumber": "DMS Account #",
|
||||||
|
"dms_control_override": "Static Control # Override",
|
||||||
"dms_wip_acctnumber": "DMS W.I.P. Account #",
|
"dms_wip_acctnumber": "DMS W.I.P. Account #",
|
||||||
"generic_customer_number": "Generic Customer Number",
|
"generic_customer_number": "Generic Customer Number",
|
||||||
"itc_federal": "Federal Tax is ITC?",
|
"itc_federal": "Federal Tax is ITC?",
|
||||||
|
|||||||
@@ -270,6 +270,7 @@
|
|||||||
"disablebillwip": "",
|
"disablebillwip": "",
|
||||||
"disablecontactvehiclecreation": "",
|
"disablecontactvehiclecreation": "",
|
||||||
"dms_acctnumber": "",
|
"dms_acctnumber": "",
|
||||||
|
"dms_control_override": "",
|
||||||
"dms_wip_acctnumber": "",
|
"dms_wip_acctnumber": "",
|
||||||
"generic_customer_number": "",
|
"generic_customer_number": "",
|
||||||
"itc_federal": "",
|
"itc_federal": "",
|
||||||
|
|||||||
@@ -270,6 +270,7 @@
|
|||||||
"disablebillwip": "",
|
"disablebillwip": "",
|
||||||
"disablecontactvehiclecreation": "",
|
"disablecontactvehiclecreation": "",
|
||||||
"dms_acctnumber": "",
|
"dms_acctnumber": "",
|
||||||
|
"dms_control_override": "",
|
||||||
"dms_wip_acctnumber": "",
|
"dms_wip_acctnumber": "",
|
||||||
"generic_customer_number": "",
|
"generic_customer_number": "",
|
||||||
"itc_federal": "",
|
"itc_federal": "",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import NumberFormat from "react-number-format";
|
import { NumericFormat } from "react-number-format";
|
||||||
|
|
||||||
export default function CurrencyFormatter(props) {
|
export default function CurrencyFormatter(props) {
|
||||||
return (
|
return (
|
||||||
<NumberFormat
|
<NumericFormat
|
||||||
thousandSeparator={true}
|
thousandSeparator={true}
|
||||||
decimalScale={2}
|
decimalScale={2}
|
||||||
fixedDecimalScale={true}
|
fixedDecimalScale={true}
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ middlewares.push(
|
|||||||
|
|
||||||
const cache = new InMemoryCache({});
|
const cache = new InMemoryCache({});
|
||||||
|
|
||||||
export default new ApolloClient({
|
const client = new ApolloClient({
|
||||||
link: ApolloLink.from(middlewares),
|
link: ApolloLink.from(middlewares),
|
||||||
cache,
|
cache,
|
||||||
connectToDevTools: process.env.NODE_ENV !== "production",
|
connectToDevTools: process.env.NODE_ENV !== "production",
|
||||||
@@ -161,3 +161,4 @@ export default new ApolloClient({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
export default client;
|
||||||
|
|||||||
11164
client/yarn.lock
11164
client/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -223,11 +223,9 @@
|
|||||||
- kanban_settings
|
- kanban_settings
|
||||||
- qbo_realmId
|
- qbo_realmId
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
user:
|
||||||
associations:
|
authid:
|
||||||
user:
|
_eq: X-Hasura-User-Id
|
||||||
authid:
|
|
||||||
_eq: X-Hasura-User-Id
|
|
||||||
check: null
|
check: null
|
||||||
- table:
|
- table:
|
||||||
name: audit_trail
|
name: audit_trail
|
||||||
|
|||||||
5634
package-lock.json
generated
5634
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
40
package.json
40
package.json
@@ -17,41 +17,41 @@
|
|||||||
"start": "node server.js"
|
"start": "node server.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"aws-sdk": "^2.1181.0",
|
"aws-sdk": "^2.1326.0",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"bluebird": "^3.7.2",
|
"bluebird": "^3.7.2",
|
||||||
"body-parser": "^1.20.0",
|
"body-parser": "^1.20.2",
|
||||||
"cloudinary": "^1.30.1",
|
"cloudinary": "^1.34.0",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"cookie-parser": "^1.4.6",
|
"cookie-parser": "^1.4.6",
|
||||||
"cors": "2.8.5",
|
"cors": "2.8.5",
|
||||||
"csrf": "^3.1.0",
|
"csrf": "^3.1.0",
|
||||||
"dinero.js": "^1.9.1",
|
"dinero.js": "^1.9.1",
|
||||||
"dotenv": "16.0.1",
|
"dotenv": "16.0.3",
|
||||||
"express": "^4.18.1",
|
"express": "^4.18.2",
|
||||||
"firebase-admin": "^11.0.0",
|
"firebase-admin": "^11.5.0",
|
||||||
"graphql": "^16.5.0",
|
"graphql": "^16.6.0",
|
||||||
"graphql-request": "^4.2.0",
|
"graphql-request": "^4.2.0",
|
||||||
"graylog2": "^0.2.1",
|
"graylog2": "^0.2.1",
|
||||||
"inline-css": "^4.0.1",
|
"inline-css": "^4.0.2",
|
||||||
"intuit-oauth": "^4.0.0",
|
"intuit-oauth": "^4.0.0",
|
||||||
"json-2-csv": "^3.17.1",
|
"json-2-csv": "^3.19.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"moment-timezone": "^0.5.34",
|
"moment-timezone": "^0.5.41",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
"node-mailjet": "^5.1.0",
|
"node-mailjet": "^6.0.2",
|
||||||
"node-persist": "^3.1.0",
|
"node-persist": "^3.1.3",
|
||||||
"node-quickbooks": "^2.0.39",
|
"node-quickbooks": "^2.0.41",
|
||||||
"nodemailer": "^6.7.7",
|
"nodemailer": "^6.9.1",
|
||||||
"phone": "^3.1.23",
|
"phone": "^3.1.35",
|
||||||
"query-string": "^7.1.1",
|
"query-string": "^7.1.1",
|
||||||
"soap": "^0.45.0",
|
"soap": "^1.0.0",
|
||||||
"socket.io": "^4.5.0",
|
"socket.io": "^4.6.1",
|
||||||
"ssh2-sftp-client": "^9.0.2",
|
"ssh2-sftp-client": "^9.0.4",
|
||||||
"stripe": "^9.15.0",
|
"stripe": "^9.15.0",
|
||||||
"twilio": "^3.80.0",
|
"twilio": "^4.8.0",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^9.0.0",
|
||||||
"xml2js": "^0.4.23",
|
"xml2js": "^0.4.23",
|
||||||
"xmlbuilder2": "^3.0.2"
|
"xmlbuilder2": "^3.0.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1092,7 +1092,13 @@ async function GenerateTransWips(socket) {
|
|||||||
if (alloc.sale.getAmount() > 0 && !alloc.tax) {
|
if (alloc.sale.getAmount() > 0 && !alloc.tax) {
|
||||||
const item = {
|
const item = {
|
||||||
acct: alloc.profitCenter.dms_acctnumber,
|
acct: alloc.profitCenter.dms_acctnumber,
|
||||||
cntl: socket.JobData.ro_number,
|
cntl:
|
||||||
|
alloc.profitCenter.dms_control_override &&
|
||||||
|
alloc.profitCenter.dms_control_override !== null &&
|
||||||
|
alloc.profitCenter.dms_control_override !== undefined &&
|
||||||
|
alloc.profitCenter.dms_control_override?.trim() !== ""
|
||||||
|
? alloc.profitCenter.dms_control_override
|
||||||
|
: socket.JobData.ro_number,
|
||||||
cntl2: null,
|
cntl2: null,
|
||||||
credtMemoNo: null,
|
credtMemoNo: null,
|
||||||
postAmt: alloc.sale.multiply(-1).getAmount(),
|
postAmt: alloc.sale.multiply(-1).getAmount(),
|
||||||
@@ -1109,7 +1115,13 @@ async function GenerateTransWips(socket) {
|
|||||||
if (alloc.cost.getAmount() > 0 && !alloc.tax) {
|
if (alloc.cost.getAmount() > 0 && !alloc.tax) {
|
||||||
const item = {
|
const item = {
|
||||||
acct: alloc.costCenter.dms_acctnumber,
|
acct: alloc.costCenter.dms_acctnumber,
|
||||||
cntl: socket.JobData.ro_number,
|
cntl:
|
||||||
|
alloc.costCenter.dms_control_override &&
|
||||||
|
alloc.costCenter.dms_control_override !== null &&
|
||||||
|
alloc.costCenter.dms_control_override !== undefined &&
|
||||||
|
alloc.costCenter.dms_control_override?.trim() !== ""
|
||||||
|
? alloc.costCenter.dms_control_override
|
||||||
|
: socket.JobData.ro_number,
|
||||||
cntl2: null,
|
cntl2: null,
|
||||||
credtMemoNo: null,
|
credtMemoNo: null,
|
||||||
postAmt: alloc.cost.getAmount(),
|
postAmt: alloc.cost.getAmount(),
|
||||||
@@ -1123,7 +1135,13 @@ async function GenerateTransWips(socket) {
|
|||||||
|
|
||||||
const itemWip = {
|
const itemWip = {
|
||||||
acct: alloc.costCenter.dms_wip_acctnumber,
|
acct: alloc.costCenter.dms_wip_acctnumber,
|
||||||
cntl: socket.JobData.ro_number,
|
cntl:
|
||||||
|
alloc.costCenter.dms_control_override &&
|
||||||
|
alloc.costCenter.dms_control_override !== null &&
|
||||||
|
alloc.costCenter.dms_control_override !== undefined &&
|
||||||
|
alloc.costCenter.dms_control_override?.trim() !== ""
|
||||||
|
? alloc.costCenter.dms_control_override
|
||||||
|
: socket.JobData.ro_number,
|
||||||
cntl2: null,
|
cntl2: null,
|
||||||
credtMemoNo: null,
|
credtMemoNo: null,
|
||||||
postAmt: alloc.cost.multiply(-1).getAmount(),
|
postAmt: alloc.cost.multiply(-1).getAmount(),
|
||||||
@@ -1158,7 +1176,13 @@ async function GenerateTransWips(socket) {
|
|||||||
if (alloc.sale.getAmount() > 0) {
|
if (alloc.sale.getAmount() > 0) {
|
||||||
const item2 = {
|
const item2 = {
|
||||||
acct: alloc.profitCenter.dms_acctnumber,
|
acct: alloc.profitCenter.dms_acctnumber,
|
||||||
cntl: socket.JobData.ro_number,
|
cntl:
|
||||||
|
alloc.profitCenter.dms_control_override &&
|
||||||
|
alloc.profitCenter.dms_control_override !== null &&
|
||||||
|
alloc.profitCenter.dms_control_override !== undefined &&
|
||||||
|
alloc.profitCenter.dms_control_override?.trim() !== ""
|
||||||
|
? alloc.profitCenter.dms_control_override
|
||||||
|
: socket.JobData.ro_number,
|
||||||
cntl2: null,
|
cntl2: null,
|
||||||
credtMemoNo: null,
|
credtMemoNo: null,
|
||||||
postAmt: alloc.sale.multiply(-1).getAmount(),
|
postAmt: alloc.sale.multiply(-1).getAmount(),
|
||||||
|
|||||||
@@ -42,14 +42,16 @@ function pollFunc(fn, timeout, interval) {
|
|||||||
pollFunc(getEntegralShopData, 0, 5 * 60 * 1000); //Set the metadata to refresh every 5 minutes.
|
pollFunc(getEntegralShopData, 0, 5 * 60 * 1000); //Set the metadata to refresh every 5 minutes.
|
||||||
|
|
||||||
async function getEntegralShopData() {
|
async function getEntegralShopData() {
|
||||||
await storage.init({ logging: true });
|
// await storage.init({ logging: true });
|
||||||
const { bodyshops } = await client.request(queries.GET_ENTEGRAL_SHOPS);
|
// const { bodyshops } = await client.request(queries.GET_ENTEGRAL_SHOPS);
|
||||||
logger.log("set-entegral-shops-local-storage", "DEBUG", "API", null, null);
|
// logger.log("set-entegral-shops-local-storage", "DEBUG", "API", null, null);
|
||||||
await storage.setItem("entegralShops", bodyshops);
|
// await storage.setItem("entegralShops", bodyshops);
|
||||||
return true; //Continue execution.
|
// return true; //Continue execution.
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.default = async (req, res) => {
|
exports.default = async (req, res) => {
|
||||||
|
res.sendStatus(200);
|
||||||
|
return;
|
||||||
//Query for the List of Bodyshop Clients.
|
//Query for the List of Bodyshop Clients.
|
||||||
const job = req.body.event.data.new;
|
const job = req.body.event.data.new;
|
||||||
logger.log("arms-job-update", "DEBUG", "api", job.id, null);
|
logger.log("arms-job-update", "DEBUG", "api", job.id, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user