Skip to content

Commit

Permalink
FEAT/LBAC-1675 : Ajout classes tracking Matomo (version sans conflit) (
Browse files Browse the repository at this point in the history
…#809)

* FEAT/LBAC-1675 : Ajout classes tracking Matomo (version sans conflit)

* feat-lbac-1675-class-tracking-matomo-no-conflict

* Update DemandeDeContact.tsx

* fix: typo

* fix: prettier

---------

Co-authored-by: Alan Le Ruyet <[email protected]>
  • Loading branch information
guilletmarion and alanlr authored Nov 14, 2023
1 parent c211a13 commit af1c51a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 7 additions & 3 deletions ui/components/ItemDetail/CandidatureLba/CandidatureLbaSubmit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const CandidatureLbaSubmit = (props) => {

switch (sendingState) {
case "not_sent": {
return (
<Button aria-label="Envoyer la candidature spontanée" variant="blackButton" type="submit" data-testid="candidature-not-sent">
{amongst(kind, ["lbb", "lba"]) ? "J'envoie ma candidature spontanée" : "J'envoie ma candidature"}
return amongst(kind, ["lbb", "lba"]) ? (
<Button data-tracking-id="postuler-entreprise-algo" aria-label="Envoyer la candidature spontanée" variant="blackButton" type="submit" data-testid="candidature-not-sent">
J'envoie ma candidature spontanée
</Button>
) : (
<Button data-tracking-id="postuler-offre-lba" aria-label="Envoyer la candidature" variant="blackButton" type="submit" data-testid="candidature-not-sent">
J'envoie ma candidature
</Button>
)
}
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ItemDetail/ItemDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const ItemDetail = ({ selectedItem, handleClose, handleSelectItem }) => {

{buttonJePostuleShouldBeDisplayed(kind, selectedItem) && (
<Box my={4}>
<Link variant="postuler" href={selectedItem.url} target="poleemploi" onClick={postuleSurPoleEmploi}>
<Link data-tracking-id="postuler-offre-partenaire" variant="postuler" href={selectedItem.url} target="poleemploi" onClick={postuleSurPoleEmploi}>
Je postule sur Pôle emploi
</Link>
</Box>
Expand Down
10 changes: 9 additions & 1 deletion ui/components/RDV/DemandeDeContact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,15 @@ const DemandeDeContact = (props: Props) => {
</Box>
)}
<Box mb={8} textAlign="right" mr={4}>
<Button aria-label="Envoyer la demande de cntact" variant="blackButton" type="submit" fontWeight="700" onClick={submitForm} isDisabled={!formik.isValid}>
<Button
data-tracking-id="prendre-rdv-cfa"
aria-label="Envoyer la demande de contact"
variant="blackButton"
type="submit"
fontWeight="700"
onClick={submitForm}
isDisabled={!formik.isValid}
>
J'envoie ma demande
</Button>
</Box>
Expand Down

0 comments on commit af1c51a

Please sign in to comment.