Added file scanning module.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import gql from "graphql-tag";
|
||||
import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import client from "../graphql/GraphQLClient";
|
||||
import {
|
||||
INSERT_NEW_JOB,
|
||||
@@ -8,7 +9,6 @@ import {
|
||||
} from "../graphql/jobs.queries";
|
||||
import { QUERY_GROUPS_BY_MAKE_TYPE } from "../graphql/veh_group.queries";
|
||||
import { store } from "../redux/store";
|
||||
import moment from "moment";
|
||||
const { logger } = window;
|
||||
|
||||
export async function UpsertEstimate(job) {
|
||||
@@ -76,8 +76,8 @@ export async function UpsertEstimate(job) {
|
||||
export const GetSupplementDelta = async (jobId, existingLinesO, newLines) => {
|
||||
const existingLines = _.cloneDeep(existingLinesO);
|
||||
|
||||
console.log("GetSupplementDelta -> newLines", newLines);
|
||||
console.log("GetSupplementDelta -> existingLines", existingLines);
|
||||
//console.log("GetSupplementDelta -> newLines", newLines);
|
||||
//console.log("GetSupplementDelta -> existingLines", existingLines);
|
||||
const linesToInsert = [];
|
||||
const linesToUpdate = [];
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from "../redux/application/application.actions";
|
||||
import { store } from "../redux/store";
|
||||
import { UpsertEstimate } from "./ipc-estimate-utils";
|
||||
|
||||
import { setScanEstimateList } from "../redux/scan/scan.actions";
|
||||
const { ipcRenderer } = window;
|
||||
|
||||
console.log("----Initializing IPC Listeners in React App.");
|
||||
@@ -57,3 +57,11 @@ ipcRenderer.on(
|
||||
ipcRenderer.on(ipcTypes.default.store.response, (event, obj) => {
|
||||
store.dispatch(setSettings(obj));
|
||||
});
|
||||
|
||||
//FileScan Section
|
||||
ipcRenderer.on(
|
||||
ipcTypes.default.fileScan.toRenderer.scanFilePathsResponse,
|
||||
async (event, listOfEstimates) => {
|
||||
store.dispatch(setScanEstimateList(listOfEstimates));
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user