Added first round of analytics and event tracking BOD-190
This commit is contained in:
@@ -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 } },
|
||||
|
||||
Reference in New Issue
Block a user