Added first round of analytics and event tracking BOD-190

This commit is contained in:
Patrick Fic
2020-07-17 08:27:28 -07:00
parent 3f0394760a
commit a54a85b96c
73 changed files with 433 additions and 208 deletions

View File

@@ -8,6 +8,8 @@ import { createStructuredSelector } from "reselect";
import { auth } from "../../firebase/firebase.utils";
import { UPDATE_PAYMENTS } from "../../graphql/payments.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 PaymentExportButton({
const [loading, setLoading] = useState(false);
const handleQbxml = async () => {
logImEXEvent("accounting_payment_export");
setLoading(true);
if (!!loadingCallback) loadingCallback(true);
@@ -114,8 +118,7 @@ export function PaymentExportButton({
onClick={handleQbxml}
loading={loading}
disabled={disabled}
type="dashed"
>
type='dashed'>
{t("jobs.actions.export")}
</Button>
);