Skip to content

Commit

Permalink
feat(moderation): presta E-mail Employing organisation or beta.gouv
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccadumazert committed Jan 20, 2025
1 parent 29589ce commit 8a71c27
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Bun Snapshot v1, https://goo.gl/fbAQLP

exports[`returns presta E-mail Employing organisation or beta.gouv - Public administration response 1`] = `
"Bonjour, 
Nous avons bien reçu votre demande de rattachement à l'organisation « 🦄 » sur ProConnect (anciennement : AgentConnect, MonComptePro).
Votre adresse e-mail associée au nom de domaine « 🍄 » vous permet de rattacher votre compte utilisateur ProConnect exclusivement à la DINUM.
Si vous travaillez pour l'organisation « 🦄 », demandez-lui de vous attribuer une adresse e-mail spécifique pour les prestataires. Vous pourrez ainsi l'utiliser dans le cadre de votre mission.
Autrement, si cela est possible, veuillez accéder au service souhaité sans passer par ProConnect.
Bien cordialement,
L’équipe ProConnect.
"
`;
6 changes: 4 additions & 2 deletions packages/~/moderations/ui/src/Actions/responses/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ import * as non_teaching_agent from "./non_teaching_agent";
import * as occupation_incorrectly_entered from "./occupation_incorrectly_entered";
import * as occupation_incorrectly_entered_not_blocking from "./occupation_incorrectly_entered_not_blocking";
import * as presta_email_admin_public from "./presta_email_admin_public";
import * as presta_email_orga_public_beta_gouv from "./presta_email_orga_public_beta_gouv";
import * as public_or_private_organization from "./public_or_private_organization";
import * as refusal_france_travail from "./refusal_france_travail";
import * as student_school_training_establishment from "./student_school_training_establishment";
import * as student_host_organisation from "./student_host_organisation";
import * as seconded_agent_min_interior from "./seconded_agent_min_interior";
import * as student_host_organisation from "./student_host_organisation";
import * as student_school_training_establishment from "./student_school_training_establishment";
import * as teacher_academic_email from "./teacher_academic_email";
import * as university_email_cnrs from "./university_email_cnrs";
import * as use_official_email from "./use_official_email";
Expand Down Expand Up @@ -84,4 +85,5 @@ export const reponse_templates = [
student_school_training_establishment,
student_host_organisation,
seconded_agent_min_interior,
presta_email_orga_public_beta_gouv,
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//

import { render_md } from "@~/app.ui/testing";
import { expect, test } from "bun:test";
import { context, type Values } from "../context";
import presta_email_orga_public_beta_gouv from "./presta_email_orga_public_beta_gouv";

//

test("returns presta E-mail Employing organisation or beta.gouv - Public administration response", async () => {
expect(
await render_md(
<context.Provider
value={
{
domain: "🍄",
moderation: {
organization: { cached_libelle: "🦄" },
},
} as Values
}
>
<Response />
</context.Provider>,
),
).toMatchSnapshot();
});

function Response() {
return <>{presta_email_orga_public_beta_gouv()}</>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//

import { useContext } from "hono/jsx";
import { dedent } from "ts-dedent";
import { context } from "../context";

export const label =
"Prestataires - E-mail Organisation employeuse ou beta.gouv —> Admin publique";

export default function template() {
const {
domain,
moderation: {
organization: { cached_libelle: organization_name },
},
} = useContext(context);

return dedent`
Bonjour, 
Nous avons bien reçu votre demande de rattachement à l'organisation « ${organization_name} » sur ProConnect (anciennement : AgentConnect, MonComptePro).
Votre adresse e-mail associée au nom de domaine « ${domain} » vous permet de rattacher votre compte utilisateur ProConnect exclusivement à la DINUM.
Si vous travaillez pour l'organisation « ${organization_name} », demandez-lui de vous attribuer une adresse e-mail spécifique pour les prestataires. Vous pourrez ainsi l'utiliser dans le cadre de votre mission.
Autrement, si cela est possible, veuillez accéder au service souhaité sans passer par ProConnect.
Bien cordialement,
L’équipe ProConnect.
`;
}

0 comments on commit 8a71c27

Please sign in to comment.