Add delivery to checklist & remove jria submit on error.

This commit is contained in:
Patrick Fic
2021-06-18 11:22:49 -07:00
parent ae67033417
commit 012f256b77
8 changed files with 52 additions and 21 deletions

View File

@@ -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>
}