Added first round of analytics and event tracking BOD-190
This commit is contained in:
@@ -23,6 +23,7 @@ import RenderTemplate, {
|
||||
} from "../../utils/RenderTemplate";
|
||||
import moment from "moment";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
@@ -68,6 +69,8 @@ export function PartsOrderModalContainer({
|
||||
const [insertInvoice] = useMutation(INSERT_NEW_INVOICE);
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
logImEXEvent("parts_order_insert");
|
||||
|
||||
const insertResult = await insertPartOrder({
|
||||
variables: {
|
||||
po: [
|
||||
@@ -109,11 +112,13 @@ export function PartsOrderModalContainer({
|
||||
|
||||
if (values.vendorid === bodyshop.inhousevendorid) {
|
||||
console.log("Inhouse Invoice needs to be psoted.");
|
||||
logImEXEvent("parts_order_inhouse_invoice");
|
||||
|
||||
let invoiceToPost = {
|
||||
vendorid: bodyshop.inhousevendorid,
|
||||
jobid: jobId,
|
||||
total: 0,
|
||||
invoice_number: `${jobId}`,
|
||||
invoice_number: `${jobId}`,
|
||||
federal_tax_rate: bodyshop.invoice_tax_rates.federal_tax_rate || 0,
|
||||
state_tax_rate: bodyshop.invoice_tax_rates.state_tax_rate || 0,
|
||||
local_tax_rate: bodyshop.invoice_tax_rates.local_tax_rate || 0,
|
||||
|
||||
Reference in New Issue
Block a user