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 4eb60ac commit 6fbca5d
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 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.
"
`;
2 changes: 2 additions & 0 deletions packages/~/moderations/ui/src/Actions/responses/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import * as name_incorrectly_entered from "./name_incorrectly_entered";
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_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 teacher_academic_email from "./teacher_academic_email";
Expand Down Expand Up @@ -74,4 +75,5 @@ export const reponse_templates = [
more_precise_existing_establishement_cnrs,
association_with_staff_but_no_domain_name,
association_ordinary_person,
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 6fbca5d

Please sign in to comment.