IO-3325 Additional ImEX log Events.

This commit is contained in:
Patrick Fic
2025-09-19 09:51:38 -07:00
parent 252758747b
commit f93800ded4
47 changed files with 165 additions and 45 deletions

View File

@@ -1,17 +1,18 @@
import { Button, Form, Popconfirm } from "antd";
import { PageHeader } from "@ant-design/pro-layout";
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { useApolloClient, useMutation } from "@apollo/client";
import { Button, Form, Popconfirm } from "antd";
import { phone } from "phone"; // Import phone utility for formatting
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useNavigate } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
import { logImEXEvent } from "../../firebase/firebase.utils.js";
import { DELETE_OWNER, UPDATE_OWNER } from "../../graphql/owners.queries";
import { selectBodyshop } from "../../redux/user/user.selectors"; // Adjust path
import { phoneNumberOptOutService } from "../../utils/phoneOptOutService.js"; // Adjust path
import OwnerDetailFormComponent from "./owner-detail-form.component";
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
import { phone } from "phone"; // Import phone utility for formatting
// Connect to Redux to access bodyshop
const mapStateToProps = createStructuredSelector({
@@ -55,6 +56,7 @@ function OwnerDetailFormContainer({ owner, refetch, bodyshop }) {
const handleDelete = async () => {
setLoading(true);
logImEXEvent("owner_delete", {});
try {
const result = await deleteOwner({
variables: { id: owner.id }
@@ -84,6 +86,7 @@ function OwnerDetailFormContainer({ owner, refetch, bodyshop }) {
const handleFinish = async (values) => {
setLoading(true);
logImEXEvent("owner_update", {});
try {
const result = await updateOwner({
variables: { ownerId: owner.id, owner: values }