-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(moderation): presta E-mail Employing organisation or beta.gouv
- Loading branch information
1 parent
29589ce
commit 8a71c27
Showing
4 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...s/ui/src/Actions/responses/__snapshots__/presta_email_orga_public_beta_gouv.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/~/moderations/ui/src/Actions/responses/presta_email_orga_public_beta_gouv.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()}</>; | ||
} |
30 changes: 30 additions & 0 deletions
30
packages/~/moderations/ui/src/Actions/responses/presta_email_orga_public_beta_gouv.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
`; | ||
} |