({
export function DashboardGridComponent({ currentUser, bodyshop }) {
const { loading, error, data } = useQuery(QUERY_DASHBOARD_DETAILS);
+ console.log("DashboardGridComponent -> data", data)
const { t } = useTranslation();
const [state, setState] = useState({
layout: bodyshop.associations[0].user.dashboardlayout || [
@@ -47,6 +49,7 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
const [updateLayout] = useMutation(UPDATE_DASHBOARD_LAYOUT);
const handleLayoutChange = async (newLayout) => {
+ logImEXEvent("dashboard_change_layout");
setState({ ...state, layout: newLayout });
const result = await updateLayout({
variables: { email: currentUser.email, layout: newLayout },
@@ -62,6 +65,8 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
};
const handleRemoveComponent = (key) => {
+ logImEXEvent("dashboard_remove_component", { name: key });
+
const idxToRemove = state.layout.findIndex((i) => i.i === key);
const newLayout = state.layout;
newLayout.splice(idxToRemove, 1);
@@ -70,6 +75,8 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
};
const handleAddComponent = (e) => {
+ logImEXEvent("dashboard_add_component", { name: e });
+
handleLayoutChange([
...state.layout,
{
@@ -99,7 +106,6 @@ export function DashboardGridComponent({ currentUser, bodyshop }) {
))}
);
- console.log("Dashboard Data:", data);
if (error) return
;
diff --git a/client/src/components/documents-upload/documents-upload.utility.js b/client/src/components/documents-upload/documents-upload.utility.js
index 4f5fda5e2..7700a0232 100644
--- a/client/src/components/documents-upload/documents-upload.utility.js
+++ b/client/src/components/documents-upload/documents-upload.utility.js
@@ -4,10 +4,14 @@ import Resizer from "react-image-file-resizer";
import { client } from "../../App/App.container";
import { INSERT_NEW_DOCUMENT } from "../../graphql/documents.queries";
import i18n from "i18next";
+import { logImEXEvent } from "../../firebase/firebase.utils";
//Context: currentUserEmail, bodyshop, jobid, invoiceid
export const handleUpload = (ev, context) => {
console.log("ev", ev);
+
+ logImEXEvent("document_upload", { filetype: ev.file.type });
+
const { onError, onSuccess, onProgress } = ev;
const { bodyshop, jobId } = context;
//If PDF, upload directly.
diff --git a/client/src/components/email-overlay/email-overlay.container.jsx b/client/src/components/email-overlay/email-overlay.container.jsx
index acd6adc0d..edbbddda2 100644
--- a/client/src/components/email-overlay/email-overlay.container.jsx
+++ b/client/src/components/email-overlay/email-overlay.container.jsx
@@ -14,6 +14,7 @@ import { EmailSettings } from "../../utils/TemplateConstants";
import RenderTemplate from "../../utils/RenderTemplate";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import EmailOverlayComponent from "./email-overlay.component";
+import { logImEXEvent } from "../../firebase/firebase.utils";
const mapStateToProps = createStructuredSelector({
modalVisible: selectEmailVisible,
@@ -47,6 +48,8 @@ export function EmailOverlayContainer({
});
const handleOk = async () => {
+ logImEXEvent("email_send_from_modal");
+
setSending(true);
try {
await axios.post("/sendemail", messageOptions);
@@ -70,6 +73,8 @@ export function EmailOverlayContainer({
};
const render = async () => {
+ logImEXEvent("email_render_template", { template: emailConfig.template });
+
setLoading(true);
console.log("emailConfig", emailConfig);
let html = await RenderTemplate(emailConfig.template, bodyshop);
@@ -94,8 +99,7 @@ export function EmailOverlayContainer({
onCancel={() => {
toggleEmailOverlayVisible();
}}
- okButtonProps={{ loading: sending }}
- >
+ okButtonProps={{ loading: sending }}>
{
navigator.clipboard.writeText(messageOptions.html);
- }}
- >
+ }}>
Copy HTML
diff --git a/client/src/components/error-boundary/error-boundary.component.jsx b/client/src/components/error-boundary/error-boundary.component.jsx
index 51d3f3d6c..96211cc00 100644
--- a/client/src/components/error-boundary/error-boundary.component.jsx
+++ b/client/src/components/error-boundary/error-boundary.component.jsx
@@ -1,6 +1,7 @@
+import { Button, Col, Collapse, Result, Row, Space } from "antd";
import React from "react";
import { withTranslation } from "react-i18next";
-import { Result, Button, Collapse, Row, Col, Space } from "antd";
+import { logImEXEvent } from "../../firebase/firebase.utils";
class ErrorBoundary extends React.Component {
constructor() {
@@ -24,28 +25,29 @@ class ErrorBoundary extends React.Component {
render() {
const { t } = this.props;
+ const { error, info } = this.state;
if (this.state.hasErrored === true) {
+ logImEXEvent("error_boundary_rendered", { error, info });
+
return (
diff --git a/client/src/components/fcm-notification/fcm-notification.component.jsx b/client/src/components/fcm-notification/fcm-notification.component.jsx
index 24ab1c0c2..998c068de 100644
--- a/client/src/components/fcm-notification/fcm-notification.component.jsx
+++ b/client/src/components/fcm-notification/fcm-notification.component.jsx
@@ -2,9 +2,10 @@ import React, { Component } from "react";
import { withApollo } from "react-apollo";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
-import { messaging } from "../../firebase/firebase.utils";
+import { logImEXEvent, messaging } from "../../firebase/firebase.utils";
import { UPDATE_FCM_TOKEN } from "../../graphql/user.queries";
import { selectCurrentUser } from "../../redux/user/user.selectors";
+
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser,
});
@@ -28,6 +29,7 @@ class FcmNotificationComponent extends Component {
})
.catch(function (err) {
console.log("Unable to get permission to notify.", err);
+ logImEXEvent("fcm_permission_denied", { message: err });
});
navigator.serviceWorker.addEventListener("message", (message) => {
const { payload } = message.data.firebaseMessaging;
diff --git a/client/src/components/global-search/global-search.component.jsx b/client/src/components/global-search/global-search.component.jsx
index 95701af79..d0a800728 100644
--- a/client/src/components/global-search/global-search.component.jsx
+++ b/client/src/components/global-search/global-search.component.jsx
@@ -1,10 +1,12 @@
-import React, { useState } from "react";
import { useLazyQuery } from "@apollo/react-hooks";
-import { GLOBAL_SEARCH_QUERY } from "../../graphql/search.queries";
-import { Input, AutoComplete } from "antd";
+import { AutoComplete, Input } from "antd";
+import React from "react";
import { useTranslation } from "react-i18next";
-import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { Link } from "react-router-dom";
+import { logImEXEvent } from "../../firebase/firebase.utils";
+import { GLOBAL_SEARCH_QUERY } from "../../graphql/search.queries";
+import CurrencyFormatter from "../../utils/CurrencyFormatter";
+import AlertComponent from "../alert/alert.component";
export default function GlobalSearch() {
const { t } = useTranslation();
@@ -13,6 +15,8 @@ export default function GlobalSearch() {
);
const handleSearch = (searchTerm) => {
+ logImEXEvent("global_search", { term: searchTerm });
+
if (searchTerm.length > 0)
callSearch({ variables: { search: searchTerm } });
};
@@ -129,6 +133,8 @@ export default function GlobalSearch() {
]
: [];
+ if (error) return ;
+
return (
({
setUserLanguage: (language) => dispatch(setUserLanguage(language)),
@@ -12,8 +13,13 @@ export function HeaderContainer({ setUserLanguage }) {
const handleMenuClick = (e) => {
if (e.item.props.actiontype === "lang-select") {
i18next.changeLanguage(e.key, (err, t) => {
- if (err)
+ if (err) {
+ logImEXEvent("language_change_error", { error: err });
+
return console.log("Error encountered when changing languages.", err);
+ }
+ logImEXEvent("language_change", { language: e.key });
+
setUserLanguage(e.key);
});
}
diff --git a/client/src/components/invoice-export-all-button/invoice-export-all-button.component.jsx b/client/src/components/invoice-export-all-button/invoice-export-all-button.component.jsx
index 70c6d367a..afcfe25c2 100644
--- a/client/src/components/invoice-export-all-button/invoice-export-all-button.component.jsx
+++ b/client/src/components/invoice-export-all-button/invoice-export-all-button.component.jsx
@@ -8,6 +8,8 @@ import { createStructuredSelector } from "reselect";
import { auth } from "../../firebase/firebase.utils";
import { UPDATE_INVOICES } from "../../graphql/invoices.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
+import { logImEXEvent } from "../../firebase/firebase.utils";
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
@@ -24,6 +26,8 @@ export function InvoiceExportAllButton({
const [loading, setLoading] = useState(false);
const handleQbxml = async () => {
+ logImEXEvent("accounting_payables_export_all");
+
setLoading(true);
if (!!loadingCallback) loadingCallback(true);
@@ -117,8 +121,7 @@ export function InvoiceExportAllButton({
onClick={handleQbxml}
loading={loading}
disabled={disabled}
- type="dashed"
- >
+ type='dashed'>
{t("jobs.actions.exportselected")}
);
diff --git a/client/src/components/invoice-export-button/invoice-export-button.component.jsx b/client/src/components/invoice-export-button/invoice-export-button.component.jsx
index 20aaa3ce6..974d147f0 100644
--- a/client/src/components/invoice-export-button/invoice-export-button.component.jsx
+++ b/client/src/components/invoice-export-button/invoice-export-button.component.jsx
@@ -8,6 +8,8 @@ import { createStructuredSelector } from "reselect";
import { auth } from "../../firebase/firebase.utils";
import { UPDATE_INVOICES } from "../../graphql/invoices.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
+import { logImEXEvent } from "../../firebase/firebase.utils";
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
@@ -23,6 +25,8 @@ export function InvoiceExportButton({
const [loading, setLoading] = useState(false);
const handleQbxml = async () => {
+ logImEXEvent("accounting_export_payable");
+
setLoading(true);
if (!!loadingCallback) loadingCallback(true);
@@ -114,8 +118,7 @@ export function InvoiceExportButton({
onClick={handleQbxml}
loading={loading}
disabled={disabled}
- type="dashed"
- >
+ type='dashed'>
{t("jobs.actions.export")}
);
diff --git a/client/src/components/invoice-form/invoice-form.totals.utility.js b/client/src/components/invoice-form/invoice-form.totals.utility.js
index 07ef47908..02f64f2aa 100644
--- a/client/src/components/invoice-form/invoice-form.totals.utility.js
+++ b/client/src/components/invoice-form/invoice-form.totals.utility.js
@@ -1,6 +1,9 @@
import Dinero from "dinero.js";
+import { logImEXEvent } from "../../firebase/firebase.utils";
export const CalculateInvoiceTotal = (invoice) => {
+ logImEXEvent("invoice_calculate_total");
+
const {
total,
diff --git a/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx b/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx
index f99ed58a3..0edf3bec0 100644
--- a/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx
+++ b/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx
@@ -4,6 +4,7 @@ import React from "react";
import { useTranslation } from "react-i18next";
import { UPDATE_JOB } from "../../graphql/jobs.queries";
import JobEmployeeAssignmentsComponent from "./job-employee-assignments.component";
+import { logImEXEvent } from "../../firebase/firebase.utils";
export default function JobEmployeeAssignmentsContainer({ job }) {
const { t } = useTranslation();
@@ -11,6 +12,7 @@ export default function JobEmployeeAssignmentsContainer({ job }) {
const handleAdd = async (assignment) => {
const { operation, employeeid } = assignment;
+ logImEXEvent("job_assign_employee", { operation });
let empAssignment = determineFieldName(operation);
@@ -29,7 +31,8 @@ export default function JobEmployeeAssignmentsContainer({ job }) {
}
};
const handleRemove = async (operation) => {
- console.log("handleRemove -> operation", operation);
+ logImEXEvent("job_unassign_employee", { operation });
+
let empAssignment = determineFieldName(operation);
const result = await updateJob({
variables: { jobId: job.id, job: { [empAssignment]: null } },
diff --git a/client/src/components/job-intake/components/job-intake-form/job-intake-form.component.jsx b/client/src/components/job-intake/components/job-intake-form/job-intake-form.component.jsx
index 8c6c06518..c9ad59410 100644
--- a/client/src/components/job-intake/components/job-intake-form/job-intake-form.component.jsx
+++ b/client/src/components/job-intake/components/job-intake-form/job-intake-form.component.jsx
@@ -11,6 +11,7 @@ import { UPDATE_JOB } from "../../../../graphql/jobs.queries";
import { selectBodyshop } from "../../../../redux/user/user.selectors";
import DateTimePicker from "../../../form-date-time-picker/form-date-time-picker.component";
import ConfigFormComponents from "../../../config-form-components/config-form-components.component";
+import { logImEXEvent } from "../../../../firebase/firebase.utils";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -29,6 +30,7 @@ export function JobIntakeForm({ formItems, bodyshop }) {
const handleFinish = async (values) => {
console.log("values", values);
+ logImEXEvent("job_complete_intake");
const result = await intakeJob({
variables: {
diff --git a/client/src/components/job-intake/components/job-intake-template-list/job-intake-template-list.component.jsx b/client/src/components/job-intake/components/job-intake-template-list/job-intake-template-list.component.jsx
index 69799a332..722367e89 100644
--- a/client/src/components/job-intake/components/job-intake-template-list/job-intake-template-list.component.jsx
+++ b/client/src/components/job-intake/components/job-intake-template-list/job-intake-template-list.component.jsx
@@ -9,6 +9,7 @@ import { selectBodyshop } from "../../../../redux/user/user.selectors";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { useTranslation } from "react-i18next";
+import { logImEXEvent } from "../../../../firebase/firebase.utils";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
@@ -21,7 +22,10 @@ const mapDispatchToProps = (dispatch) => ({
export function JobIntakeTemplateList({ bodyshop, templates }) {
const { jobId } = useParams();
const { t } = useTranslation();
+ //TODO SHould this be using the generic one?
const renderTemplate = async (templateKey) => {
+ logImEXEvent("job_intake_template_render");
+
const html = await RenderTemplate(
{
name: templateKey,
@@ -33,6 +37,8 @@ export function JobIntakeTemplateList({ bodyshop, templates }) {
};
const renderAllTemplates = () => {
+ logImEXEvent("job_intake_render_all_templates");
+
templates.forEach((template) => renderTemplate(template));
};
diff --git a/client/src/components/job-invoices-total/job-invoices-total.component.jsx b/client/src/components/job-invoices-total/job-invoices-total.component.jsx
index d0bb014a3..d50a4411c 100644
--- a/client/src/components/job-invoices-total/job-invoices-total.component.jsx
+++ b/client/src/components/job-invoices-total/job-invoices-total.component.jsx
@@ -5,13 +5,16 @@ import { useTranslation } from "react-i18next";
import AlertComponent from "../alert/alert.component";
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
import "./job-invoices-total.styles.scss";
+
export default function JobInvoiceTotals({ loading, invoices, jobTotals }) {
const { t } = useTranslation();
+
if (loading) return ;
if (!!!jobTotals)
return (
);
+
const totals = JSON.parse(jobTotals);
let invoiceTotals = Dinero({ amount: 0 });
diff --git a/client/src/components/job-scoreboard-add-button/job-scoreboard-add-button.component.jsx b/client/src/components/job-scoreboard-add-button/job-scoreboard-add-button.component.jsx
index 4fef7f88a..40b79a485 100644
--- a/client/src/components/job-scoreboard-add-button/job-scoreboard-add-button.component.jsx
+++ b/client/src/components/job-scoreboard-add-button/job-scoreboard-add-button.component.jsx
@@ -12,6 +12,7 @@ import moment from "moment";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { INSERT_SCOREBOARD_ENTRY } from "../../graphql/scoreboard.queries";
+import { logImEXEvent } from "../../firebase/firebase.utils";
export default function ScoreboardAddButton({ job, ...otherBtnProps }) {
const { t } = useTranslation();
@@ -21,6 +22,8 @@ export default function ScoreboardAddButton({ job, ...otherBtnProps }) {
const [visibility, setVisibility] = useState(false);
const handleFinish = async (values) => {
+ logImEXEvent("job_close_add_to_scoreboard");
+
setLoading(true);
const result = await insertScoreboardEntry({
variables: { sbInput: [{ jobid: job.id, ...values }] },
diff --git a/client/src/components/job-totals-table/job-totals.utility.js b/client/src/components/job-totals-table/job-totals.utility.js
index e5376554c..ceb1e06c9 100644
--- a/client/src/components/job-totals-table/job-totals.utility.js
+++ b/client/src/components/job-totals-table/job-totals.utility.js
@@ -1,6 +1,9 @@
import Dinero from "dinero.js";
+import { logImEXEvent } from "../../firebase/firebase.utils";
export function CalculateJob(job, shoprates) {
+ logImEXEvent("job_calculate_total");
+
let ret = {
parts: CalculatePartsTotals(job.joblines),
rates: CalculateRatesTotals(job, shoprates),
diff --git a/client/src/components/jobs-available-new/jobs-available-new.container.jsx b/client/src/components/jobs-available-new/jobs-available-new.container.jsx
index 8f1e12d15..397b61f48 100644
--- a/client/src/components/jobs-available-new/jobs-available-new.container.jsx
+++ b/client/src/components/jobs-available-new/jobs-available-new.container.jsx
@@ -15,6 +15,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import JobsAvailableComponent from "./jobs-available-new.component";
+import { logImEXEvent } from "../../firebase/firebase.utils";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -40,6 +41,8 @@ export function JobsAvailableContainer({
const [loadEstData, estData] = estDataLazyLoad;
const onModalOk = () => {
+ logImEXEvent("job_import_new");
+
setModalVisible(false);
setInsertLoading(true);
@@ -118,12 +121,11 @@ export function JobsAvailableContainer({
setSelectedOwner(null);
};
- if (error) return ;
+ if (error) return ;
return (
+ message={t("jobs.labels.creating_new_job")}>
{
+ logImEXEvent("job_import_supplement");
+
setModalVisible(false);
setInsertLoading(true);
@@ -137,12 +140,11 @@ export function JobsAvailableSupplementContainer({
setSelectedJob(null);
};
- if (error) return ;
+ if (error) return ;
return (
+ message={t("jobs.labels.creating_new_job")}>
{
+ logImEXEvent("jobs_close_allocate_single");
+
const existingIndex = allocation.allocations.findIndex(
(e) => e.center === state.center
);
@@ -70,8 +73,7 @@ export function JobsCloseLabmatAllocationButton({
{visible ? (
-
setVisible(false)} disabled={invoiced} />
+ setVisible(false)}
+ disabled={invoiced}
+ />
) : (
- setVisible(true)} disabled={invoiced}/>
+ setVisible(true)}
+ disabled={invoiced}
+ />
)}
diff --git a/client/src/components/jobs-close-auto-allocate/jobs-close-auto-allocate.component.jsx b/client/src/components/jobs-close-auto-allocate/jobs-close-auto-allocate.component.jsx
index 31f12fdd5..3a5430939 100644
--- a/client/src/components/jobs-close-auto-allocate/jobs-close-auto-allocate.component.jsx
+++ b/client/src/components/jobs-close-auto-allocate/jobs-close-auto-allocate.component.jsx
@@ -4,6 +4,8 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { useTranslation } from "react-i18next";
+import { logImEXEvent } from "../../firebase/firebase.utils";
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
@@ -19,6 +21,8 @@ export function JobsCloseAutoAllocate({
}) {
const { t } = useTranslation();
const handleAllocate = () => {
+ logImEXEvent("jobs_close_allocate_auto");
+
const { defaults } = bodyshop.md_responsibility_centers;
Object.keys(labmatAllocations).forEach((i) => {
diff --git a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx
index 2d15c55b7..f863c3f9d 100644
--- a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx
+++ b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx
@@ -8,6 +8,8 @@ import { createStructuredSelector } from "reselect";
import { auth } from "../../firebase/firebase.utils";
import { UPDATE_JOB } from "../../graphql/jobs.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
+import { logImEXEvent } from "../../firebase/firebase.utils";
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
@@ -17,6 +19,8 @@ export function JobsCloseExportButton({ bodyshop, jobId, disabled }) {
const [updateJob] = useMutation(UPDATE_JOB);
const [loading, setLoading] = useState(false);
const handleQbxml = async () => {
+ logImEXEvent("jobs_close_export");
+
setLoading(true);
let QbXmlResponse;
try {
@@ -107,8 +111,7 @@ export function JobsCloseExportButton({ bodyshop, jobId, disabled }) {
onClick={handleQbxml}
loading={loading}
disabled={disabled}
- type="dashed"
- >
+ type='dashed'>
{t("jobs.actions.export")}
);
diff --git a/client/src/components/jobs-close-save-button/jobs-close-save-button.component.jsx b/client/src/components/jobs-close-save-button/jobs-close-save-button.component.jsx
index 0f52e1e40..d4a6889f7 100644
--- a/client/src/components/jobs-close-save-button/jobs-close-save-button.component.jsx
+++ b/client/src/components/jobs-close-save-button/jobs-close-save-button.component.jsx
@@ -1,12 +1,13 @@
-import React, { useState } from "react";
-import { Button, notification } from "antd";
import { useMutation } from "@apollo/react-hooks";
-import { UPDATE_JOB } from "../../graphql/jobs.queries";
+import { Button, notification } from "antd";
+import React, { useState } from "react";
import { useTranslation } from "react-i18next";
-
-import { selectBodyshop } from "../../redux/user/user.selectors";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
+import { UPDATE_JOB } from "../../graphql/jobs.queries";
+import { selectBodyshop } from "../../redux/user/user.selectors";
+import { logImEXEvent } from "../../firebase/firebase.utils";
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
@@ -26,6 +27,8 @@ export function JobsCloseSaveButton({
const [updateJob] = useMutation(UPDATE_JOB);
const handleSave = async () => {
+ logImEXEvent("jobs_close_save");
+
setLoading(true);
const result = await updateJob({
diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.addtoproduction.util.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.addtoproduction.util.jsx
index 19c44ed83..4d23ac53f 100644
--- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.addtoproduction.util.jsx
+++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.addtoproduction.util.jsx
@@ -1,12 +1,15 @@
import { notification } from "antd";
import i18n from "i18next";
import { UPDATE_JOB } from "../../graphql/jobs.queries";
+import { logImEXEvent } from "../../firebase/firebase.utils";
export default function AddToProduction(
apolloClient,
jobId,
completionCallback
) {
+ logImEXEvent("job_add_to_production");
+
//get a list of all fields on the job
apolloClient
.mutate({
diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx
index 8b4f2d913..136d32ae5 100644
--- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx
+++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx
@@ -11,6 +11,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component";
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
+import { logImEXEvent } from "../../firebase/firebase.utils";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -37,9 +38,11 @@ export function JobsDetailHeaderActions({
const client = useApolloClient();
const history = useHistory();
const statusmenu = (
-