Add delivery to checklist & remove jria submit on error.
This commit is contained in:
@@ -12706,7 +12706,7 @@
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>submit</name>
|
||||
<name>senderrortosupport</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
@@ -12727,7 +12727,7 @@
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>submitticket</name>
|
||||
<name>submit</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
|
||||
@@ -5,9 +5,14 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
@@ -34,24 +39,41 @@ class ErrorBoundary extends React.Component {
|
||||
}
|
||||
|
||||
handleErrorSubmit = () => {
|
||||
const errorDescription = `**Please add relevant details about what you were doing before you encountered this issue**
|
||||
window.$crisp.push([
|
||||
"do",
|
||||
"message:send",
|
||||
[
|
||||
"text",
|
||||
`I hit the following error: \n\n
|
||||
${this.state.error.message}\n\n
|
||||
${this.state.error.stack}\n\n
|
||||
URL:${window.location} as ${this.props.currentUser.email} for ${
|
||||
this.props.bodyshop && this.props.bodyshop.name
|
||||
}
|
||||
`,
|
||||
],
|
||||
]);
|
||||
|
||||
----
|
||||
System Generated Log:
|
||||
${this.state.error.message}
|
||||
${this.state.error.stack}
|
||||
`;
|
||||
window.$crisp.push(["do", "chat:open"]);
|
||||
// const errorDescription = `**Please add relevant details about what you were doing before you encountered this issue**
|
||||
|
||||
const URL = `https://bodyshop.atlassian.net/servicedesk/customer/portal/3/group/8/create/26?summary=123&description=${encodeURI(
|
||||
errorDescription
|
||||
)}&customfield_10049=${window.location}&email=${
|
||||
this.props.currentUser.email
|
||||
}`;
|
||||
console.log(`URL`, URL);
|
||||
window.open(URL, "_blank");
|
||||
// ----
|
||||
// System Generated Log:
|
||||
// ${this.state.error.message}
|
||||
// ${this.state.error.stack}
|
||||
// `;
|
||||
|
||||
// const URL = `https://bodyshop.atlassian.net/servicedesk/customer/portal/3/group/8/create/26?summary=123&description=${encodeURI(
|
||||
// errorDescription
|
||||
// )}&customfield_10049=${window.location}&email=${
|
||||
// this.props.currentUser.email
|
||||
// }`;
|
||||
// console.log(`URL`, URL);
|
||||
// window.open(URL, "_blank");
|
||||
};
|
||||
|
||||
render() {
|
||||
console.log("this.props :>> ", this.props);
|
||||
const { t } = this.props;
|
||||
const { error, info } = this.state;
|
||||
if (this.state.hasErrored === true) {
|
||||
@@ -91,7 +113,7 @@ ${this.state.error.stack}
|
||||
{t("general.actions.refresh")}
|
||||
</Button>
|
||||
<Button onClick={this.handleErrorSubmit}>
|
||||
{t("general.actions.submitticket")}
|
||||
{t("general.actions.senderrortosupport")}
|
||||
</Button>
|
||||
</Space>
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ export function JobChecklistForm({
|
||||
|
||||
...(type === "deliver" && {
|
||||
scheduled_delivery: values.scheduled_delivery,
|
||||
actual_delivery: values.actual_delivery,
|
||||
}),
|
||||
...(type === "deliver" &&
|
||||
values.removeFromProduction && {
|
||||
@@ -147,6 +148,7 @@ export function JobChecklistForm({
|
||||
...(type === "deliver" && {
|
||||
removeFromProduction: true,
|
||||
actual_completion: job && job.actual_completion,
|
||||
actual_delivery: job && job.actual_delivery,
|
||||
}),
|
||||
...formItems
|
||||
.filter((fi) => fi.value)
|
||||
@@ -212,6 +214,13 @@ export function JobChecklistForm({
|
||||
>
|
||||
<DateTimePicker />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="actual_delivery"
|
||||
label={t("jobs.fields.actual_delivery")}
|
||||
disabled={readOnly}
|
||||
>
|
||||
<DateTimePicker />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="removeFromProduction"
|
||||
valuePropName="checked"
|
||||
|
||||
@@ -2,7 +2,6 @@ import React from "react";
|
||||
import ConfigFormComponents from "../config-form-components/config-form-components.component";
|
||||
|
||||
export default function JobChecklistDisplay({ checklist }) {
|
||||
console.log("JobChecklistDisplay -> checklist", checklist);
|
||||
if (!checklist) return <div></div>;
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -1838,6 +1838,7 @@ export const QUERY_JOB_CHECKLISTS = gql`
|
||||
scheduled_completion
|
||||
actual_completion
|
||||
scheduled_delivery
|
||||
actual_delivery
|
||||
production_vars
|
||||
bodyshop {
|
||||
id
|
||||
|
||||
@@ -812,8 +812,8 @@
|
||||
"save": "Save",
|
||||
"saveandnew": "Save and New",
|
||||
"selectall": "Select All",
|
||||
"senderrortosupport": "Send Error to Support",
|
||||
"submit": "Submit",
|
||||
"submitticket": "Submit a Support Ticket",
|
||||
"view": "View",
|
||||
"viewreleasenotes": "See What's Changed"
|
||||
},
|
||||
|
||||
@@ -812,8 +812,8 @@
|
||||
"save": "Salvar",
|
||||
"saveandnew": "",
|
||||
"selectall": "",
|
||||
"senderrortosupport": "",
|
||||
"submit": "",
|
||||
"submitticket": "",
|
||||
"view": "",
|
||||
"viewreleasenotes": ""
|
||||
},
|
||||
|
||||
@@ -812,8 +812,8 @@
|
||||
"save": "sauvegarder",
|
||||
"saveandnew": "",
|
||||
"selectall": "",
|
||||
"senderrortosupport": "",
|
||||
"submit": "",
|
||||
"submitticket": "",
|
||||
"view": "",
|
||||
"viewreleasenotes": ""
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user