Compare commits
30 Commits
feature/IO
...
feature/IO
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
596132b2af | ||
|
|
a55102b0ae | ||
|
|
9b75993ac1 | ||
|
|
d5e750c1f0 | ||
|
|
8801990d4a | ||
|
|
e8cda88a33 | ||
|
|
a240391a28 | ||
|
|
42660a7dd1 | ||
|
|
f186d9f8be | ||
|
|
71a74c5437 | ||
|
|
6fe4d982f5 | ||
|
|
5ec032d8d6 | ||
|
|
3f58f9a5f5 | ||
|
|
2718a66fb0 | ||
|
|
4c737371e3 | ||
|
|
ee7a3d0bdf | ||
|
|
181af581e5 | ||
|
|
85fcd64220 | ||
|
|
11e2f5d83d | ||
|
|
cbc723fa38 | ||
|
|
8a97c5109f | ||
|
|
2fdb06fabe | ||
|
|
95c310119f | ||
|
|
ebe1facbd1 | ||
|
|
b8c56c5c24 | ||
|
|
276771a8b7 | ||
|
|
b2239351f6 | ||
|
|
b021992552 | ||
|
|
f5be07d028 | ||
|
|
1202b86529 |
@@ -62,7 +62,17 @@
|
|||||||
t = d.getElementsByTagName("script")[0];
|
t = d.getElementsByTagName("script")[0];
|
||||||
t.parentNode.insertBefore(s, t);
|
t.parentNode.insertBefore(s, t);
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.$crisp = [];
|
||||||
|
window.CRISP_WEBSITE_ID = "36724f62-2eb0-4b29-9cdd-9905fb99913e";
|
||||||
|
(function () {
|
||||||
|
d = document;
|
||||||
|
s = d.createElement("script");
|
||||||
|
s.src = "https://client.crisp.chat/l.js";
|
||||||
|
s.async = 1;
|
||||||
|
d.getElementsByTagName("head")[0].appendChild(s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
<script>
|
<script>
|
||||||
!(function () {
|
!(function () {
|
||||||
|
|||||||
@@ -135,15 +135,19 @@ const CardPaymentModalComponent = ({
|
|||||||
if (window.intellipay) {
|
if (window.intellipay) {
|
||||||
// eslint-disable-next-line no-eval
|
// eslint-disable-next-line no-eval
|
||||||
eval(response.data);
|
eval(response.data);
|
||||||
SetIntellipayCallbackFunctions();
|
pollForIntelliPay(() => {
|
||||||
window.intellipay.autoOpen();
|
SetIntellipayCallbackFunctions();
|
||||||
|
window.intellipay.autoOpen();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
const rg = document.createRange();
|
const rg = document.createRange();
|
||||||
const node = rg.createContextualFragment(response.data);
|
const node = rg.createContextualFragment(response.data);
|
||||||
document.documentElement.appendChild(node);
|
document.documentElement.appendChild(node);
|
||||||
SetIntellipayCallbackFunctions();
|
pollForIntelliPay(() => {
|
||||||
window.intellipay.isAutoOpen = true;
|
SetIntellipayCallbackFunctions();
|
||||||
window.intellipay.initialize();
|
window.intellipay.isAutoOpen = true;
|
||||||
|
window.intellipay.initialize();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notification.open({
|
notification.open({
|
||||||
@@ -347,3 +351,27 @@ const CardPaymentModalComponent = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(CardPaymentModalComponent);
|
export default connect(mapStateToProps, mapDispatchToProps)(CardPaymentModalComponent);
|
||||||
|
|
||||||
|
//Poll for window.IntelliPay.fixAmount for 5 seconds. If it doesn't come up, just try anyways to force the possible error.
|
||||||
|
function pollForIntelliPay(callbackFunction) {
|
||||||
|
const timeout = 5000;
|
||||||
|
const interval = 150; // Poll every 100 milliseconds
|
||||||
|
const startTime = Date.now();
|
||||||
|
|
||||||
|
function checkFixAmount() {
|
||||||
|
if (window.intellipay && window.intellipay.fixAmount !== undefined) {
|
||||||
|
callbackFunction();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Date.now() - startTime >= timeout) {
|
||||||
|
console.log("Stopped polling IntelliPay after 10 seconds. Attemping to set functions anyways.");
|
||||||
|
callbackFunction();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(checkFixAmount, interval);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkFixAmount();
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||||
import { selectCardPayment } from "../../redux/modals/modals.selectors";
|
import { selectCardPayment } from "../../redux/modals/modals.selectors";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import CardPaymentModalComponent from "./card-payment-modal.component.";
|
import CardPaymentModalComponent from "./card-payment-modal.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
cardPaymentModal: selectCardPayment,
|
cardPaymentModal: selectCardPayment,
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
|
import * as Sentry from "@sentry/react";
|
||||||
import { Button, Col, Collapse, Result, Row, Space } from "antd";
|
import { Button, Col, Collapse, Result, Row, Space } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { withTranslation } from "react-i18next";
|
import { withTranslation } from "react-i18next";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
|
||||||
import * as Sentry from "@sentry/react";
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
|
|
||||||
@@ -38,28 +38,23 @@ class ErrorBoundary extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleErrorSubmit = () => {
|
handleErrorSubmit = () => {
|
||||||
InstanceRenderManager({
|
window.$crisp.push([
|
||||||
executeFunction: true,
|
"do",
|
||||||
args: [],
|
"message:send",
|
||||||
imex: () => {
|
[
|
||||||
window.$crisp.push([
|
"text",
|
||||||
"do",
|
`I hit the following error: \n\n
|
||||||
"message:send",
|
|
||||||
[
|
|
||||||
"text",
|
|
||||||
`I hit the following error: \n\n
|
|
||||||
${this.state.error.message}\n\n
|
${this.state.error.message}\n\n
|
||||||
${this.state.error.stack}\n\n
|
${this.state.error.stack}\n\n
|
||||||
URL:${window.location} as ${this.props.currentUser.email} for ${
|
URL:${window.location} as ${this.props.currentUser.email} for ${
|
||||||
this.props.bodyshop && this.props.bodyshop.name
|
this.props.bodyshop && this.props.bodyshop.name
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
window.$crisp.push(["do", "chat:open"]);
|
||||||
|
|
||||||
window.$crisp.push(["do", "chat:open"]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// const errorDescription = `**Please add relevant details about what you were doing before you encountered this issue**
|
// const errorDescription = `**Please add relevant details about what you were doing before you encountered this issue**
|
||||||
|
|
||||||
// ----
|
// ----
|
||||||
|
|||||||
@@ -656,14 +656,7 @@ function Header({
|
|||||||
icon: <Icon component={QuestionCircleFilled} />,
|
icon: <Icon component={QuestionCircleFilled} />,
|
||||||
label: t("menus.header.help"),
|
label: t("menus.header.help"),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
window.open(
|
window.open("https://help.imex.online/", "_blank");
|
||||||
InstanceRenderManager({
|
|
||||||
imex: "https://help.imex.online/",
|
|
||||||
rome: "https://rometech.com//"
|
|
||||||
}),
|
|
||||||
|
|
||||||
"_blank"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
...(InstanceRenderManager({
|
...(InstanceRenderManager({
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, Form, Input, Popover, Select, Space, Switch } from "antd";
|
import { Button, Form, Input, Popover, Select, Space, Switch } from "antd";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import React, { useState } from "react";
|
import { some } from "lodash";
|
||||||
|
import React, { useCallback, useState } from "react";
|
||||||
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";
|
||||||
@@ -19,7 +20,14 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
jobRO: selectJobReadOnly
|
jobRO: selectJobReadOnly
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
insertAuditTrail: ({ jobid, operation, type }) => dispatch(insertAuditTrail({ jobid, operation, type }))
|
insertAuditTrail: ({ jobid, operation, type }) =>
|
||||||
|
dispatch(
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid,
|
||||||
|
operation,
|
||||||
|
type
|
||||||
|
})
|
||||||
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTrail, parentFormIsFieldsTouched }) {
|
export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTrail, parentFormIsFieldsTouched }) {
|
||||||
@@ -29,6 +37,7 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const notification = useNotification();
|
const notification = useNotification();
|
||||||
|
const allFormValues = Form.useWatch([], form);
|
||||||
|
|
||||||
const handleConvert = async ({ employee_csr, category, ...values }) => {
|
const handleConvert = async ({ employee_csr, category, ...values }) => {
|
||||||
if (parentFormIsFieldsTouched()) {
|
if (parentFormIsFieldsTouched()) {
|
||||||
@@ -71,6 +80,8 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const submitDisabled = useCallback(() => some(allFormValues, (v) => v === undefined), [allFormValues]);
|
||||||
|
|
||||||
const popMenu = (
|
const popMenu = (
|
||||||
<div>
|
<div>
|
||||||
<Form
|
<Form
|
||||||
@@ -79,9 +90,12 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
|||||||
onFinish={handleConvert}
|
onFinish={handleConvert}
|
||||||
initialValues={{
|
initialValues={{
|
||||||
driveable: true,
|
driveable: true,
|
||||||
towin: false,
|
towin: job.towin,
|
||||||
|
ca_gst_registrant: job.ca_gst_registrant,
|
||||||
employee_csr: job.employee_csr,
|
employee_csr: job.employee_csr,
|
||||||
category: job.category
|
category: job.category,
|
||||||
|
referral_source: job.referral_source,
|
||||||
|
referral_source_extra: job.referral_source_extra ?? ""
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -211,7 +225,7 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
|||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Button type="primary" danger onClick={() => form.submit()} loading={loading}>
|
<Button disabled={submitDisabled()} type="primary" danger onClick={() => form.submit()} loading={loading}>
|
||||||
{t("jobs.actions.convert")}
|
{t("jobs.actions.convert")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={() => setOpen(false)}>{t("general.actions.close")}</Button>
|
<Button onClick={() => setOpen(false)}>{t("general.actions.close")}</Button>
|
||||||
@@ -233,11 +247,6 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
form.setFieldsValue({
|
|
||||||
driveable: true,
|
|
||||||
towin: false,
|
|
||||||
employee_csr: job.employee_csr
|
|
||||||
});
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("jobs.actions.convert")}
|
{t("jobs.actions.convert")}
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
|||||||
import { Button, Card, Dropdown, Form, Input, Modal, Popconfirm, Popover, Select, Space } from "antd";
|
import { Button, Card, Dropdown, Form, Input, Modal, Popconfirm, Popover, Select, Space } from "antd";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import parsePhoneNumber from "libphonenumber-js";
|
import parsePhoneNumber from "libphonenumber-js";
|
||||||
import React, { useContext, useMemo, useState } from "react";
|
import { useContext, useMemo, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import SocketContext from "../../contexts/SocketIO/socketContext.jsx";
|
||||||
import { auth, logImEXEvent } from "../../firebase/firebase.utils";
|
import { auth, logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { CANCEL_APPOINTMENTS_BY_JOB_ID, INSERT_MANUAL_APPT } from "../../graphql/appointments.queries";
|
import { CANCEL_APPOINTMENTS_BY_JOB_ID, INSERT_MANUAL_APPT } from "../../graphql/appointments.queries";
|
||||||
import { GET_CURRENT_QUESTIONSET_ID, INSERT_CSI } from "../../graphql/csi.queries";
|
import { GET_CURRENT_QUESTIONSET_ID, INSERT_CSI } from "../../graphql/csi.queries";
|
||||||
@@ -30,7 +31,6 @@ import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
|||||||
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
||||||
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
|
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
|
||||||
import JobsDetailHeaderActionsToggleProduction from "./jobs-detail-header-actions.toggle-production";
|
import JobsDetailHeaderActionsToggleProduction from "./jobs-detail-header-actions.toggle-production";
|
||||||
import SocketContext from "../../contexts/SocketIO/socketContext.jsx";
|
|
||||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -121,6 +121,7 @@ export function JobsDetailHeaderActions({
|
|||||||
const history = useNavigate();
|
const history = useNavigate();
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [dropdownOpen, setDropdownOpen] = useState(false);
|
||||||
const [isCancelScheduleModalVisible, setIsCancelScheduleModalVisible] = useState(false);
|
const [isCancelScheduleModalVisible, setIsCancelScheduleModalVisible] = useState(false);
|
||||||
const [insertAppointment] = useMutation(INSERT_MANUAL_APPT);
|
const [insertAppointment] = useMutation(INSERT_MANUAL_APPT);
|
||||||
const [deleteJob] = useMutation(DELETE_JOB);
|
const [deleteJob] = useMutation(DELETE_JOB);
|
||||||
@@ -718,7 +719,13 @@ export function JobsDetailHeaderActions({
|
|||||||
key: "toggleproduction",
|
key: "toggleproduction",
|
||||||
id: "job-actions-toggleproduction",
|
id: "job-actions-toggleproduction",
|
||||||
disabled: !job.converted || jobRO,
|
disabled: !job.converted || jobRO,
|
||||||
label: <JobsDetailHeaderActionsToggleProduction job={job} refetch={refetch} />
|
label: (
|
||||||
|
<JobsDetailHeaderActionsToggleProduction
|
||||||
|
job={job}
|
||||||
|
refetch={refetch}
|
||||||
|
closeParentMenu={() => setDropdownOpen(false)}
|
||||||
|
/>
|
||||||
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1148,7 +1155,7 @@ export function JobsDetailHeaderActions({
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
<Dropdown menu={menu} trigger={["click"]} key="changestatus">
|
<Dropdown menu={menu} trigger={["click"]} key="changestatus" open={dropdownOpen} onOpenChange={setDropdownOpen}>
|
||||||
<Button>
|
<Button>
|
||||||
<span>{t("general.labels.actions")}</span>
|
<span>{t("general.labels.actions")}</span>
|
||||||
<DownCircleFilled />
|
<DownCircleFilled />
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useLazyQuery, useMutation } from "@apollo/client";
|
||||||
import { Button, Form, Popover, Space } from "antd";
|
import { Button, Form, Popover, Space } from "antd";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import React, { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
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";
|
||||||
import { JOB_PRODUCTION_TOGGLE } from "../../graphql/jobs.queries";
|
import { GET_JOB_BY_PK_QUICK_INTAKE, JOB_PRODUCTION_TOGGLE } from "../../graphql/jobs.queries";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
@@ -23,16 +23,40 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
insertAuditTrail: ({ jobid, operation }) => dispatch(insertAuditTrail({ jobid, operation }))
|
insertAuditTrail: ({ jobid, operation }) => dispatch(insertAuditTrail({ jobid, operation }))
|
||||||
});
|
});
|
||||||
|
|
||||||
export function JobsDetailHeaderActionsToggleProduction({ bodyshop, job, jobRO, insertAuditTrail }) {
|
export function JobsDetailHeaderActionsToggleProduction({
|
||||||
|
bodyshop,
|
||||||
|
job,
|
||||||
|
jobRO,
|
||||||
|
refetch,
|
||||||
|
closeParentMenu,
|
||||||
|
insertAuditTrail
|
||||||
|
}) {
|
||||||
const [scenario, setScenario] = useState(false);
|
const [scenario, setScenario] = useState(false);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [popOverVisible, setPopOverVisible] = useState(false);
|
||||||
const [mutationUpdateJob] = useMutation(JOB_PRODUCTION_TOGGLE);
|
const [mutationUpdateJob] = useMutation(JOB_PRODUCTION_TOGGLE);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const notification = useNotification();
|
const notification = useNotification();
|
||||||
|
|
||||||
|
const [getJobDetails] = useLazyQuery(GET_JOB_BY_PK_QUICK_INTAKE, {
|
||||||
|
variables: { id: job.id },
|
||||||
|
onCompleted: (data) => {
|
||||||
|
if (data?.jobs_by_pk) {
|
||||||
|
form.setFieldsValue({
|
||||||
|
actual_in: data.jobs_by_pk.actual_in ? data.jobs_by_pk.actual_in : dayjs(),
|
||||||
|
scheduled_completion: data.jobs_by_pk.scheduled_completion,
|
||||||
|
actual_completion: data.jobs_by_pk.actual_completion,
|
||||||
|
scheduled_delivery: data.jobs_by_pk.scheduled_delivery,
|
||||||
|
actual_delivery: data.jobs_by_pk.actual_delivery
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fetchPolicy: "network-only"
|
||||||
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//Figure out what scenario were in, populate accodingly
|
//Figure out what scenario were in, populate accordingly
|
||||||
if (job && bodyshop) {
|
if (job && bodyshop) {
|
||||||
if (bodyshop.md_ro_statuses.pre_production_statuses.includes(job.status)) {
|
if (bodyshop.md_ro_statuses.pre_production_statuses.includes(job.status)) {
|
||||||
setScenario("pre");
|
setScenario("pre");
|
||||||
@@ -76,24 +100,16 @@ export function JobsDetailHeaderActionsToggleProduction({ bodyshop, job, jobRO,
|
|||||||
DateTimeFormatterFunction(values.actual_completion)
|
DateTimeFormatterFunction(values.actual_completion)
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
setPopOverVisible(false);
|
||||||
|
closeParentMenu();
|
||||||
|
refetch();
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const popMenu = (
|
const popMenu = (
|
||||||
<div onClick={(e) => e.stopPropagation()}>
|
<div onClick={(e) => e.stopPropagation()}>
|
||||||
<Form
|
<Form layout="vertical" form={form} onFinish={handleConvert}>
|
||||||
layout="vertical"
|
|
||||||
form={form}
|
|
||||||
onFinish={handleConvert}
|
|
||||||
initialValues={{
|
|
||||||
actual_in: dayjs(),
|
|
||||||
scheduled_completion: job.scheduled_completion,
|
|
||||||
actual_completion: job.actual_completion,
|
|
||||||
scheduled_deliver: job.scheduled_deliver,
|
|
||||||
actual_delivery: job.actual_delivery
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{scenario === "pre" && (
|
{scenario === "pre" && (
|
||||||
<>
|
<>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -158,7 +174,12 @@ export function JobsDetailHeaderActionsToggleProduction({ bodyshop, job, jobRO,
|
|||||||
return (
|
return (
|
||||||
<Popover //open={open}
|
<Popover //open={open}
|
||||||
content={popMenu}
|
content={popMenu}
|
||||||
onClick={(e) => e.stopPropagation()}
|
open={popOverVisible}
|
||||||
|
onOpenChange={setPopOverVisible}
|
||||||
|
onClick={(e) => {
|
||||||
|
getJobDetails();
|
||||||
|
e.stopPropagation();
|
||||||
|
}}
|
||||||
getPopupContainer={(trigger) => trigger.parentNode}
|
getPopupContainer={(trigger) => trigger.parentNode}
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ const ret = {
|
|||||||
"bills:reexport": 3,
|
"bills:reexport": 3,
|
||||||
|
|
||||||
"employees:page": 5,
|
"employees:page": 5,
|
||||||
|
"employee_teams:page": 5,
|
||||||
|
|
||||||
"owners:list": 2,
|
"owners:list": 2,
|
||||||
"owners:detail": 3,
|
"owners:detail": 3,
|
||||||
@@ -67,6 +68,9 @@ const ret = {
|
|||||||
"timetickets:list": 3,
|
"timetickets:list": 3,
|
||||||
"timetickets:edit": 4,
|
"timetickets:edit": 4,
|
||||||
"timetickets:shiftedit": 5,
|
"timetickets:shiftedit": 5,
|
||||||
|
"timetickets:editcommitted": 5,
|
||||||
|
"ttapprovals:view": 5,
|
||||||
|
"ttapprovals:approve": 5,
|
||||||
|
|
||||||
"users:editaccess": 4,
|
"users:editaccess": 4,
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMutation, useQuery } from "@apollo/client";
|
import { useMutation, useQuery } from "@apollo/client";
|
||||||
import { Form, Modal } from "antd";
|
import { Form, Modal } from "antd";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useMemo, useState } from "react";
|
||||||
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";
|
||||||
@@ -255,9 +255,13 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const taskTitle = useMemo(() => {
|
||||||
|
return existingTask ? t("tasks.actions.edit") : t("tasks.actions.new");
|
||||||
|
}, [existingTask, t]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={existingTask ? t("tasks.actions.edit") : t("tasks.actions.new")}
|
title={<span id="task-upsert-modal-title">{taskTitle}</span>}
|
||||||
open={open}
|
open={open}
|
||||||
okText={t("general.actions.save")}
|
okText={t("general.actions.save")}
|
||||||
width="50%"
|
width="50%"
|
||||||
|
|||||||
@@ -2553,3 +2553,16 @@ export const QUERY_JOBS_IN_PRODUCTION = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const GET_JOB_BY_PK_QUICK_INTAKE = gql`
|
||||||
|
query GET_JOB_BY_PK_QUICK_INTAKE($id: uuid!) {
|
||||||
|
jobs_by_pk(id: $id) {
|
||||||
|
id
|
||||||
|
actual_in
|
||||||
|
scheduled_completion
|
||||||
|
actual_completion
|
||||||
|
scheduled_delivery
|
||||||
|
actual_delivery
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import { useNotification } from "../../contexts/Notifications/notificationContex
|
|||||||
const JobsPage = lazy(() => import("../jobs/jobs.page"));
|
const JobsPage = lazy(() => import("../jobs/jobs.page"));
|
||||||
|
|
||||||
const CardPaymentModalContainer = lazy(
|
const CardPaymentModalContainer = lazy(
|
||||||
() => import("../../components/card-payment-modal/card-payment-modal.container.")
|
() => import("../../components/card-payment-modal/card-payment-modal.container.jsx")
|
||||||
);
|
);
|
||||||
|
|
||||||
const JobsDetailPage = lazy(() => import("../jobs-detail/jobs-detail.page.container"));
|
const JobsDetailPage = lazy(() => import("../jobs-detail/jobs-detail.page.container"));
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import {
|
|||||||
updateCurrentUser
|
updateCurrentUser
|
||||||
} from "../../firebase/firebase.utils";
|
} from "../../firebase/firebase.utils";
|
||||||
import { QUERY_EULA } from "../../graphql/bodyshop.queries";
|
import { QUERY_EULA } from "../../graphql/bodyshop.queries";
|
||||||
|
import cleanAxios from "../../utils/CleanAxios";
|
||||||
import client from "../../utils/GraphQLClient";
|
import client from "../../utils/GraphQLClient";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
@@ -47,7 +48,6 @@ import {
|
|||||||
validatePasswordResetSuccess
|
validatePasswordResetSuccess
|
||||||
} from "./user.actions";
|
} from "./user.actions";
|
||||||
import UserActionTypes from "./user.types";
|
import UserActionTypes from "./user.types";
|
||||||
import cleanAxios from "../../utils/CleanAxios";
|
|
||||||
|
|
||||||
const fpPromise = FingerprintJS.load();
|
const fpPromise = FingerprintJS.load();
|
||||||
|
|
||||||
@@ -234,16 +234,18 @@ export function* signInSuccessSaga({ payload }) {
|
|||||||
LogRocket.identify(payload.email);
|
LogRocket.identify(payload.email);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
window.$crisp.push(["set", "user:nickname", [payload.displayName || payload.email]]);
|
||||||
|
window.$crisp.push(["set", "session:segments", [["user"]]]);
|
||||||
InstanceRenderManager({
|
InstanceRenderManager({
|
||||||
executeFunction: true,
|
executeFunction: true,
|
||||||
args: [],
|
args: [],
|
||||||
imex: () => {
|
imex: () => {
|
||||||
window.$crisp.push(["set", "user:nickname", [payload.displayName || payload.email]]);
|
window.$crisp.push(["set", "session:segments", [["imex"]]]);
|
||||||
window.$crisp.push(["set", "session:segments", [["user"]]]);
|
|
||||||
},
|
},
|
||||||
rome: () => {
|
rome: () => {
|
||||||
window.$zoho.salesiq.visitor.name(payload.displayName || payload.email);
|
window.$zoho.salesiq.visitor.name(payload.displayName || payload.email);
|
||||||
window.$zoho.salesiq.visitor.email(payload.email);
|
window.$zoho.salesiq.visitor.email(payload.email);
|
||||||
|
window.$crisp.push(["set", "session:segments", [["rome"]]]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -380,11 +380,11 @@
|
|||||||
"md_parts_order_comment": "Parts Orders Comments",
|
"md_parts_order_comment": "Parts Orders Comments",
|
||||||
"md_parts_scan": {
|
"md_parts_scan": {
|
||||||
"caseInsensitive": "Case Insensitive",
|
"caseInsensitive": "Case Insensitive",
|
||||||
"expression": "",
|
"expression": "",
|
||||||
"field": "Field",
|
"field": "Field",
|
||||||
"flags": "",
|
"flags": "",
|
||||||
"operation": "Operation",
|
"operation": "Operation",
|
||||||
"value": "Value"
|
"value": "Value"
|
||||||
},
|
},
|
||||||
"md_payment_types": "Payment Types",
|
"md_payment_types": "Payment Types",
|
||||||
"md_referral_sources": "Referral Sources",
|
"md_referral_sources": "Referral Sources",
|
||||||
@@ -715,15 +715,15 @@
|
|||||||
"workingdays": "Working Days"
|
"workingdays": "Working Days"
|
||||||
},
|
},
|
||||||
"operations": {
|
"operations": {
|
||||||
"contains": "Contains",
|
"contains": "Contains",
|
||||||
"ends_with": "Ends With",
|
"ends_with": "Ends With",
|
||||||
"equals": "Equals",
|
"equals": "Equals",
|
||||||
"greater_than": "Greater Than",
|
"greater_than": "Greater Than",
|
||||||
"less_than": "Less Than",
|
"less_than": "Less Than",
|
||||||
"not_equals": "Not Equals",
|
"not_equals": "Not Equals",
|
||||||
"starts_with": "Starts With"
|
"starts_with": "Starts With"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"areyousure": "Are you sure you want to continue?",
|
"areyousure": "Are you sure you want to continue?",
|
||||||
"defaultviewcreated": "Default view created successfully.",
|
"defaultviewcreated": "Default view created successfully.",
|
||||||
"save": "Shop configuration saved successfully. ",
|
"save": "Shop configuration saved successfully. ",
|
||||||
@@ -1437,13 +1437,13 @@
|
|||||||
"adjustment": "Adjustment",
|
"adjustment": "Adjustment",
|
||||||
"ah_detail_line": "Mark as Detail Labor Line (Autohouse Only)",
|
"ah_detail_line": "Mark as Detail Labor Line (Autohouse Only)",
|
||||||
"alt_partno": "Alt Part #",
|
"alt_partno": "Alt Part #",
|
||||||
"amount": "Amount",
|
"amount": "Amount",
|
||||||
"assigned_team": "Team",
|
"assigned_team": "Team",
|
||||||
"assigned_team_name": "Team {{name}}",
|
"assigned_team_name": "Team {{name}}",
|
||||||
"create_ppc": "Create PPC?",
|
"create_ppc": "Create PPC?",
|
||||||
"db_price": "List Price",
|
"db_price": "List Price",
|
||||||
"include_in_part_cnt": "Include in Parts Status Count",
|
"include_in_part_cnt": "Include in Parts Status Count",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "LA1",
|
"LA1": "LA1",
|
||||||
"LA2": "LA2",
|
"LA2": "LA2",
|
||||||
"LA3": "LA3",
|
"LA3": "LA3",
|
||||||
@@ -3071,7 +3071,7 @@
|
|||||||
"production_by_repair_status": "Production by Status",
|
"production_by_repair_status": "Production by Status",
|
||||||
"production_by_repair_status_one": "Production filtered by Status",
|
"production_by_repair_status_one": "Production filtered by Status",
|
||||||
"production_by_ro": "Production by RO",
|
"production_by_ro": "Production by RO",
|
||||||
"production_by_target_date": "Production by Target Date",
|
"production_by_target_date": "Production by Scheduled Completion",
|
||||||
"production_by_technician": "Production by Technician",
|
"production_by_technician": "Production by Technician",
|
||||||
"production_by_technician_one": "Production filtered by Technician",
|
"production_by_technician_one": "Production filtered by Technician",
|
||||||
"production_not_production_status": "Production not in Production Status",
|
"production_not_production_status": "Production not in Production Status",
|
||||||
@@ -3081,7 +3081,8 @@
|
|||||||
"purchase_return_ratio_grouped_by_vendor_detail": "Purchase & Return Ratio by Vendor (Detail)",
|
"purchase_return_ratio_grouped_by_vendor_detail": "Purchase & Return Ratio by Vendor (Detail)",
|
||||||
"purchase_return_ratio_grouped_by_vendor_summary": "Purchase & Return Ratio by Vendor (Summary)",
|
"purchase_return_ratio_grouped_by_vendor_summary": "Purchase & Return Ratio by Vendor (Summary)",
|
||||||
"purchases_by_cost_center_detail": "Purchases by Cost Center (Detail)",
|
"purchases_by_cost_center_detail": "Purchases by Cost Center (Detail)",
|
||||||
"purchases_by_cost_center_summary": "Purchases by Cost Center (Summary)","purchases_by_date_excel": "Purchases by Date - Excel",
|
"purchases_by_cost_center_summary": "Purchases by Cost Center (Summary)",
|
||||||
|
"purchases_by_date_excel": "Purchases by Date - Excel",
|
||||||
"purchases_by_date_range_detail": "Purchases by Date - Detail",
|
"purchases_by_date_range_detail": "Purchases by Date - Detail",
|
||||||
"purchases_by_date_range_summary": "Purchases by Date - Summary",
|
"purchases_by_date_range_summary": "Purchases by Date - Summary",
|
||||||
"purchases_by_ro_detail_date": "Purchases by RO - Detail",
|
"purchases_by_ro_detail_date": "Purchases by RO - Detail",
|
||||||
|
|||||||
@@ -380,11 +380,11 @@
|
|||||||
"md_parts_order_comment": "",
|
"md_parts_order_comment": "",
|
||||||
"md_parts_scan": {
|
"md_parts_scan": {
|
||||||
"caseInsensitive": "",
|
"caseInsensitive": "",
|
||||||
"expression": "",
|
"expression": "",
|
||||||
"field": "",
|
"field": "",
|
||||||
"flags": "",
|
"flags": "",
|
||||||
"operation": "",
|
"operation": "",
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"md_payment_types": "",
|
"md_payment_types": "",
|
||||||
"md_referral_sources": "",
|
"md_referral_sources": "",
|
||||||
@@ -715,15 +715,15 @@
|
|||||||
"workingdays": ""
|
"workingdays": ""
|
||||||
},
|
},
|
||||||
"operations": {
|
"operations": {
|
||||||
"contains": "",
|
"contains": "",
|
||||||
"ends_with": "",
|
"ends_with": "",
|
||||||
"equals": "",
|
"equals": "",
|
||||||
"greater_than": "",
|
"greater_than": "",
|
||||||
"less_than": "",
|
"less_than": "",
|
||||||
"not_equals": "",
|
"not_equals": "",
|
||||||
"starts_with": ""
|
"starts_with": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"areyousure": "",
|
"areyousure": "",
|
||||||
"defaultviewcreated": "",
|
"defaultviewcreated": "",
|
||||||
"save": "",
|
"save": "",
|
||||||
@@ -1437,13 +1437,13 @@
|
|||||||
"adjustment": "",
|
"adjustment": "",
|
||||||
"ah_detail_line": "",
|
"ah_detail_line": "",
|
||||||
"alt_partno": "",
|
"alt_partno": "",
|
||||||
"amount": "",
|
"amount": "",
|
||||||
"assigned_team": "",
|
"assigned_team": "",
|
||||||
"assigned_team_name": "",
|
"assigned_team_name": "",
|
||||||
"create_ppc": "",
|
"create_ppc": "",
|
||||||
"db_price": "Precio de base de datos",
|
"db_price": "Precio de base de datos",
|
||||||
"include_in_part_cnt": "",
|
"include_in_part_cnt": "",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "",
|
"LA1": "",
|
||||||
"LA2": "",
|
"LA2": "",
|
||||||
"LA3": "",
|
"LA3": "",
|
||||||
@@ -3082,7 +3082,7 @@
|
|||||||
"purchase_return_ratio_grouped_by_vendor_summary": "",
|
"purchase_return_ratio_grouped_by_vendor_summary": "",
|
||||||
"purchases_by_cost_center_detail": "",
|
"purchases_by_cost_center_detail": "",
|
||||||
"purchases_by_cost_center_summary": "",
|
"purchases_by_cost_center_summary": "",
|
||||||
"purchases_by_date_excel": "",
|
"purchases_by_date_excel": "",
|
||||||
"purchases_by_date_range_detail": "",
|
"purchases_by_date_range_detail": "",
|
||||||
"purchases_by_date_range_summary": "",
|
"purchases_by_date_range_summary": "",
|
||||||
"purchases_by_ro_detail_date": "",
|
"purchases_by_ro_detail_date": "",
|
||||||
|
|||||||
@@ -380,11 +380,11 @@
|
|||||||
"md_parts_order_comment": "",
|
"md_parts_order_comment": "",
|
||||||
"md_parts_scan": {
|
"md_parts_scan": {
|
||||||
"caseInsensitive": "",
|
"caseInsensitive": "",
|
||||||
"expression": "",
|
"expression": "",
|
||||||
"field": "",
|
"field": "",
|
||||||
"flags": "",
|
"flags": "",
|
||||||
"operation": "",
|
"operation": "",
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"md_payment_types": "",
|
"md_payment_types": "",
|
||||||
"md_referral_sources": "",
|
"md_referral_sources": "",
|
||||||
@@ -715,15 +715,15 @@
|
|||||||
"workingdays": ""
|
"workingdays": ""
|
||||||
},
|
},
|
||||||
"operations": {
|
"operations": {
|
||||||
"contains": "",
|
"contains": "",
|
||||||
"ends_with": "",
|
"ends_with": "",
|
||||||
"equals": "",
|
"equals": "",
|
||||||
"greater_than": "",
|
"greater_than": "",
|
||||||
"less_than": "",
|
"less_than": "",
|
||||||
"not_equals": "",
|
"not_equals": "",
|
||||||
"starts_with": ""
|
"starts_with": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"areyousure": "",
|
"areyousure": "",
|
||||||
"defaultviewcreated": "",
|
"defaultviewcreated": "",
|
||||||
"save": "",
|
"save": "",
|
||||||
@@ -1437,13 +1437,13 @@
|
|||||||
"adjustment": "",
|
"adjustment": "",
|
||||||
"ah_detail_line": "",
|
"ah_detail_line": "",
|
||||||
"alt_partno": "",
|
"alt_partno": "",
|
||||||
"amount": "",
|
"amount": "",
|
||||||
"assigned_team": "",
|
"assigned_team": "",
|
||||||
"assigned_team_name": "",
|
"assigned_team_name": "",
|
||||||
"create_ppc": "",
|
"create_ppc": "",
|
||||||
"db_price": "Prix de la base de données",
|
"db_price": "Prix de la base de données",
|
||||||
"include_in_part_cnt": "",
|
"include_in_part_cnt": "",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "",
|
"LA1": "",
|
||||||
"LA2": "",
|
"LA2": "",
|
||||||
"LA3": "",
|
"LA3": "",
|
||||||
@@ -3082,7 +3082,7 @@
|
|||||||
"purchase_return_ratio_grouped_by_vendor_summary": "",
|
"purchase_return_ratio_grouped_by_vendor_summary": "",
|
||||||
"purchases_by_cost_center_detail": "",
|
"purchases_by_cost_center_detail": "",
|
||||||
"purchases_by_cost_center_summary": "",
|
"purchases_by_cost_center_summary": "",
|
||||||
"purchases_by_date_excel": "",
|
"purchases_by_date_excel": "",
|
||||||
"purchases_by_date_range_detail": "",
|
"purchases_by_date_range_detail": "",
|
||||||
"purchases_by_date_range_summary": "",
|
"purchases_by_date_range_summary": "",
|
||||||
"purchases_by_ro_detail_date": "",
|
"purchases_by_ro_detail_date": "",
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."associations" alter column "notification_settings" set default jsonb_build_object();
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."associations" alter column "notification_settings" set default jsonb_build_object();
|
||||||
@@ -818,6 +818,7 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
PAG: Dinero(),
|
PAG: Dinero(),
|
||||||
PAO: Dinero(),
|
PAO: Dinero(),
|
||||||
PAS: Dinero(),
|
PAS: Dinero(),
|
||||||
|
PASL: Dinero(),
|
||||||
PAP: Dinero(),
|
PAP: Dinero(),
|
||||||
PAM: Dinero(),
|
PAM: Dinero(),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user