Skip to content

Commit

Permalink
fix: tracking event enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
victor committed Jan 9, 2025
1 parent 26ca99d commit c7b9834
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ export const EnterpriseAgreementSearchInput = ({
setSelectedAgreement(undefined);
}}
onAgreementSelect={(agreement) => {
emitSelectEnterpriseEvent({
label: selectedEnterprise.label,
siren: selectedEnterprise.siren,
});
if (onAgreementSelect) onAgreementSelect(agreement);
setSelectedAgreement(agreement);
}}
Expand Down Expand Up @@ -358,25 +362,20 @@ export const EnterpriseAgreementSearchInput = ({
href: widgetMode
? `/widgets/convention-collective/entreprise/${enterprise.siren}${getQueries()}`
: `/outils/convention-collective/entreprise/${enterprise.siren}${getQueries()}`,
onClick: () => {
emitSelectEnterpriseEvent({
label: enterprise.label,
siren: enterprise.siren,
});
},
}
: {
href: "",
onClick: () => {
emitSelectEnterpriseEvent({
label: enterprise.label,
siren: enterprise.siren,
});
onClick: (ev) => {
ev.preventDefault();
setSelectedEnterprise(enterprise);
if (enterprise.conventions.length === 1) {
emitSelectEnterpriseAgreementEvent(
`idcc${enterprise.conventions[0].id}`
);
emitSelectEnterpriseEvent({
label: enterprise.label,
siren: enterprise.siren,
});
onAgreementSelect(enterprise.conventions[0]);
}
},
Expand Down

0 comments on commit c7b9834

Please sign in to comment.