Added job recalc when saving a line edit. BOD-385
This commit is contained in:
@@ -25960,6 +25960,27 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>labels</name>
|
<name>labels</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>fromvehicle</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>updatevehicle</name>
|
<name>updatevehicle</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ export const axiosAuthInterceptorId = axios.interceptors.request.use(
|
|||||||
(error) => Promise.reject(error)
|
(error) => Promise.reject(error)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const cleanAxios = axios.create();
|
||||||
|
cleanAxios.interceptors.request.eject(axiosAuthInterceptorId);
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "production") LogRocket.init("gvfvfw/bodyshopapp");
|
if (process.env.NODE_ENV === "production") LogRocket.init("gvfvfw/bodyshopapp");
|
||||||
|
|
||||||
const httpLink = new HttpLink({
|
const httpLink = new HttpLink({
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export function JobLinesComponent({
|
|||||||
setSelectedLines,
|
setSelectedLines,
|
||||||
job,
|
job,
|
||||||
setJobLineEditContext,
|
setJobLineEditContext,
|
||||||
|
form,
|
||||||
}) {
|
}) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
@@ -259,7 +260,7 @@ export function JobLinesComponent({
|
|||||||
disabled={jobRO}
|
disabled={jobRO}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setJobLineEditContext({
|
setJobLineEditContext({
|
||||||
actions: { refetch: refetch },
|
actions: { refetch: refetch, submit: form && form.submit },
|
||||||
context: record,
|
context: record,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import JobLinesComponent from "./job-lines.component";
|
import JobLinesComponent from "./job-lines.component";
|
||||||
|
|
||||||
function JobLinesContainer({ job, joblines, refetch }) {
|
function JobLinesContainer({ job, joblines, refetch, form }) {
|
||||||
const [searchText, setSearchText] = useState("");
|
const [searchText, setSearchText] = useState("");
|
||||||
const [selectedLines, setSelectedLines] = useState([]);
|
const [selectedLines, setSelectedLines] = useState([]);
|
||||||
|
|
||||||
@@ -39,6 +39,7 @@ function JobLinesContainer({ job, joblines, refetch }) {
|
|||||||
selectedLines={selectedLines}
|
selectedLines={selectedLines}
|
||||||
setSelectedLines={setSelectedLines}
|
setSelectedLines={setSelectedLines}
|
||||||
job={job}
|
job={job}
|
||||||
|
form={form}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import { useMutation } from "@apollo/react-hooks";
|
||||||
import { notification } from "antd";
|
import { notification } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useMutation } from "@apollo/react-hooks";
|
|
||||||
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";
|
||||||
@@ -27,6 +27,7 @@ function JobLinesUpsertModalContainer({
|
|||||||
const [insertJobLine] = useMutation(INSERT_NEW_JOB_LINE);
|
const [insertJobLine] = useMutation(INSERT_NEW_JOB_LINE);
|
||||||
const [updateJobLine] = useMutation(UPDATE_JOB_LINE);
|
const [updateJobLine] = useMutation(UPDATE_JOB_LINE);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
const handleFinish = (values) => {
|
const handleFinish = (values) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
if (!jobLineEditModal.context.id) {
|
if (!jobLineEditModal.context.id) {
|
||||||
@@ -70,7 +71,12 @@ function JobLinesUpsertModalContainer({
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
if (jobLineEditModal.actions.refetch) jobLineEditModal.actions.refetch();
|
if (jobLineEditModal.actions.submit) {
|
||||||
|
jobLineEditModal.actions.submit();
|
||||||
|
} else {
|
||||||
|
if (jobLineEditModal.actions.refetch)
|
||||||
|
jobLineEditModal.actions.refetch();
|
||||||
|
}
|
||||||
toggleModalVisible();
|
toggleModalVisible();
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
|
import { QuestionCircleOutlined } from "@ant-design/icons";
|
||||||
|
import { useMutation } from "@apollo/react-hooks";
|
||||||
import { Button, notification, Popconfirm } from "antd";
|
import { Button, notification, Popconfirm } from "antd";
|
||||||
|
import axios from "axios";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import axios from "axios";
|
import { cleanAxios } from "../../App/App.container";
|
||||||
import { useMutation } from "@apollo/react-hooks";
|
|
||||||
import { DELETE_DOCUMENT } from "../../graphql/documents.queries";
|
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { QuestionCircleOutlined } from "@ant-design/icons";
|
import { DELETE_DOCUMENT } from "../../graphql/documents.queries";
|
||||||
|
|
||||||
import { axiosAuthInterceptorId } from "../../App/App.container";
|
|
||||||
//Context: currentUserEmail, bodyshop, jobid, invoiceid
|
//Context: currentUserEmail, bodyshop, jobid, invoiceid
|
||||||
|
|
||||||
var cleanAxios = axios.create();
|
|
||||||
cleanAxios.interceptors.request.eject(axiosAuthInterceptorId);
|
|
||||||
|
|
||||||
export default function JobsDocumentsDeleteButton({
|
export default function JobsDocumentsDeleteButton({
|
||||||
galleryImages,
|
galleryImages,
|
||||||
deletionCallback,
|
deletionCallback,
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default function VehicleTagPopoverComponent({ job }) {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
title={t("owners.labels.fromowner")}
|
title={t("vehicles.labels.fromvehicle")}
|
||||||
size="small"
|
size="small"
|
||||||
column={1}
|
column={1}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ export function JobsDetailPage({
|
|||||||
job={job}
|
job={job}
|
||||||
joblines={job.joblines}
|
joblines={job.joblines}
|
||||||
refetch={refetch}
|
refetch={refetch}
|
||||||
|
form={form}
|
||||||
/>
|
/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane
|
<Tabs.TabPane
|
||||||
|
|||||||
@@ -1239,8 +1239,8 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"create_new": "Create a new owner record.",
|
"create_new": "Create a new owner record.",
|
||||||
"existing_owners": "Existing Owners",
|
"existing_owners": "Existing Owners",
|
||||||
"fromclaim": "Info From Claim",
|
"fromclaim": "Current Claim",
|
||||||
"fromowner": "Info From Previous",
|
"fromowner": "Historical Owner Record",
|
||||||
"updateowner": "Update Owner"
|
"updateowner": "Update Owner"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
@@ -1600,6 +1600,7 @@
|
|||||||
"registration": "Registration"
|
"registration": "Registration"
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
|
"fromvehicle": "Historical Vehicle Record",
|
||||||
"updatevehicle": "Update Vehicle Information"
|
"updatevehicle": "Update Vehicle Information"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
|||||||
@@ -1600,6 +1600,7 @@
|
|||||||
"registration": ""
|
"registration": ""
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
|
"fromvehicle": "",
|
||||||
"updatevehicle": ""
|
"updatevehicle": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
|||||||
@@ -1600,6 +1600,7 @@
|
|||||||
"registration": ""
|
"registration": ""
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
|
"fromvehicle": "",
|
||||||
"updatevehicle": ""
|
"updatevehicle": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
|||||||
Reference in New Issue
Block a user