Compare commits
10 Commits
rome/test
...
rome/maste
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07f74ca5c2 | ||
|
|
4fd18b54bd | ||
|
|
0ef1090224 | ||
|
|
f8b7d2c4a7 | ||
|
|
6f09064f05 | ||
|
|
a74b340d23 | ||
|
|
388446f46c | ||
|
|
10516e44bc | ||
|
|
10b3f82619 | ||
|
|
737d6232c6 |
@@ -21,7 +21,13 @@ export function DmsCdkMakesRefetch({ currentUser, bodyshop, form, socket }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!currentUser.email.includes("@imex.")) return null;
|
||||
if (
|
||||
!(
|
||||
currentUser.email.includes("@imex.") ||
|
||||
currentUser.email.includes("@rome.")
|
||||
)
|
||||
)
|
||||
return null;
|
||||
|
||||
const handleRefetch = async () => {
|
||||
setLoading(true);
|
||||
|
||||
@@ -18,8 +18,8 @@ const sortByParentId = (arr) => {
|
||||
//console.log("sortByParentId -> byParentsIdsList", byParentsIdsList);
|
||||
|
||||
while (byParentsIdsList[parentId]) {
|
||||
sortedList.push(byParentsIdsList[parentId][0]);
|
||||
parentId = byParentsIdsList[parentId][0].id;
|
||||
sortedList.push(...byParentsIdsList[parentId]); //Spread in the whole list in case several items have the same parents.
|
||||
parentId = byParentsIdsList[parentId][byParentsIdsList[parentId].length -1].id; //Grab the ID from the last one.
|
||||
}
|
||||
|
||||
if (byParentsIdsList["null"])
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
import {useLazyQuery} from "@apollo/client";
|
||||
import { useLazyQuery } from "@apollo/client";
|
||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||
import {Button, Card, Col, DatePicker, Form, Input, Radio, Row, Typography,} from "antd";
|
||||
import { Button, Card, Col, DatePicker, Form, Input, Radio, Row, Typography, } from "antd";
|
||||
import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import React, {useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {QUERY_ACTIVE_EMPLOYEES} from "../../graphql/employees.queries";
|
||||
import {QUERY_ALL_VENDORS} from "../../graphql/vendors.queries";
|
||||
import {selectReportCenter} from "../../redux/modals/modals.selectors";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_ACTIVE_EMPLOYEES } from "../../graphql/employees.queries";
|
||||
import { QUERY_ALL_VENDORS } from "../../graphql/vendors.queries";
|
||||
import { selectReportCenter } from "../../redux/modals/modals.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import DatePickerRanges from "../../utils/DatePickerRanges";
|
||||
import {GenerateDocument} from "../../utils/RenderTemplate";
|
||||
import {TemplateList} from "../../utils/TemplateConstants";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import EmployeeSearchSelect from "../employee-search-select/employee-search-select.component";
|
||||
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
||||
import "./report-center-modal.styles.scss";
|
||||
import ReportCenterModalFiltersSortersComponent from "./report-center-modal-filters-sorters-component";
|
||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||
import "./report-center-modal.styles.scss";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
reportCenterModal: selectReportCenter,
|
||||
|
||||
@@ -75,17 +75,18 @@ exports.default = async function ReloadCdkMakes(req, res) {
|
||||
);
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
console.log("Error inserting CDK Vehicles.", error)
|
||||
logger.log(
|
||||
"cdk-replace-makes-models-error",
|
||||
"ERROR",
|
||||
req.user.email,
|
||||
null,
|
||||
{
|
||||
{CDK_CREDENTIALS,
|
||||
cdk_dealerid,
|
||||
error,
|
||||
error: error.message,
|
||||
}
|
||||
);
|
||||
res.status(500).json(error);
|
||||
res.status(500).json(error.message);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -141,8 +142,10 @@ async function GetCdkMakes(req, cdk_dealerid) {
|
||||
req.user.email,
|
||||
null,
|
||||
{
|
||||
CDK_CREDENTIALS,
|
||||
cdk_dealerid,
|
||||
error,
|
||||
request: JSON.stringify(error.request)
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -600,11 +600,7 @@ async function InsertDmsCustomer(socket, newCustomerNumber) {
|
||||
socket.JobData.ownr_ctry &&
|
||||
socket.JobData.ownr_ctry.replace(replaceSpecialRegex, ""),
|
||||
postalCode:
|
||||
socket.JobData.ownr_zip &&
|
||||
socket.JobData.ownr_zip //TODO Need to remove for US Based customers.
|
||||
.toUpperCase()
|
||||
.replace(/\W/g, "")
|
||||
.replace(/(...)/, "$1 "),
|
||||
socket.JobData.ownr_zip,
|
||||
stateOrProvince:
|
||||
socket.JobData.ownr_st &&
|
||||
socket.JobData.ownr_st.replace(replaceSpecialRegex, ""),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const job = require('../job/job');
|
||||
const ppc = require('../ccc/partspricechange')
|
||||
const {partsScan} = require('../parts-scan/parts-scan');
|
||||
const eventAuthorizationMiddleware = require('../middleware/eventAuthorizationMIddleware');
|
||||
const validateFirebaseIdTokenMiddleware = require("../middleware/validateFirebaseIdTokenMiddleware");
|
||||
@@ -14,5 +15,6 @@ router.post('/costing', validateFirebaseIdTokenMiddleware, withUserGraphQLClient
|
||||
router.post('/lifecycle', validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, lifecycle);
|
||||
router.post('/costingmulti', validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, costingmulti);
|
||||
router.post('/partsscan', validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, partsScan);
|
||||
router.post('/ppc', validateFirebaseIdTokenMiddleware, withUserGraphQLClientMiddleware, ppc.generatePpc);
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user