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