-
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.
- Loading branch information
1 parent
2ab7ea6
commit f4991a9
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
39 changes: 39 additions & 0 deletions
39
packages/~/moderations/api/src/:id/responses/test_signed.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,39 @@ | ||
// | ||
|
||
import type { MonComptePro_Pg_Context } from "@~/app.middleware/moncomptepro_pg"; | ||
import { get_emails_by_organization_id } from "@~/users.repository/get_emails_by_organization_id"; | ||
import { useContext } from "hono/jsx"; | ||
import { useRequestContext } from "hono/jsx-renderer"; | ||
import { dedent } from "ts-dedent"; | ||
import { ModerationPage_Context } from "../context"; | ||
|
||
export const label = "Vous possédez déjà un compte MonComptePro"; | ||
|
||
export default async function template() { | ||
const { moderation } = useContext(ModerationPage_Context); | ||
|
||
const { | ||
var: { moncomptepro_pg }, | ||
} = useRequestContext<MonComptePro_Pg_Context>(); | ||
|
||
const members_email = await get_emails_by_organization_id(moncomptepro_pg, { | ||
organization_id: moderation.organization.id, | ||
}); | ||
|
||
return dedent` | ||
Bonsoir, | ||
Votre demande pour rejoindre l'organisation « ${moderation.organization.cached_libelle} » a été prise en compte sur https://app.moncomptepro.beta.gouv.fr. | ||
Vous possédez déjà un compte MonComptePro : | ||
- ${members_email.map(({ email }) => email).join("\n- ")} | ||
Merci de bien vouloir vous connecter avec le compte déjà existant. | ||
Je reste à votre disposition pour tout complément d'information. | ||
Excellente journée, | ||
L’équipe MonComptePro. | ||
`; | ||
} |