Skip to content

Commit 19648a7

Browse files
committed
style(api): replace CRLF with LF
1 parent 0bd37a3 commit 19648a7

25 files changed

+1677
-1677
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "./sendTrainingEmail";
1+
export * from "./sendTrainingEmail";
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { CandidacyStatusStep } from "@prisma/client";
2-
import { prismaClient } from "../../../../prisma/client";
3-
4-
export const existsCandidacyHavingHadStatus = async (params: {
5-
candidacyId: string;
6-
status: CandidacyStatusStep;
7-
}) =>
8-
!!(await prismaClient.candidacy.count({
9-
where: {
10-
id: params.candidacyId,
11-
candidacyStatuses: {
12-
some: {
13-
status: params.status,
14-
},
15-
},
16-
},
17-
}));
1+
import { CandidacyStatusStep } from "@prisma/client";
2+
import { prismaClient } from "../../../../prisma/client";
3+
4+
export const existsCandidacyHavingHadStatus = async (params: {
5+
candidacyId: string;
6+
status: CandidacyStatusStep;
7+
}) =>
8+
!!(await prismaClient.candidacy.count({
9+
where: {
10+
id: params.candidacyId,
11+
candidacyStatuses: {
12+
some: {
13+
status: params.status,
14+
},
15+
},
16+
},
17+
}));
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from "./sendCandidacyTransferToNewCertificationAuthority";
2-
export * from "./sendCandidacyTransferToPreviousCertificationAuthority";
3-
export * from "./sendCandidacyTransferedToOrganism";
1+
export * from "./sendCandidacyTransferToNewCertificationAuthority";
2+
export * from "./sendCandidacyTransferToPreviousCertificationAuthority";
3+
export * from "./sendCandidacyTransferedToOrganism";
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
import mjml2html from "mjml";
2-
3-
import { sendEmailWithLink, templateMail } from "../../shared/email";
4-
5-
export const sendCandidacyTransferToNewCertificationAuthorityEmail = ({
6-
email,
7-
previousCertificationAuthorityName,
8-
newCertificationAuthorityName,
9-
candidateName,
10-
transferReason,
11-
candidacyId,
12-
}: {
13-
email: string;
14-
previousCertificationAuthorityName: string;
15-
newCertificationAuthorityName: string;
16-
candidateName: string;
17-
transferReason: string;
18-
candidacyId: string;
19-
}) => {
20-
const htmlContent = (url: string) =>
21-
mjml2html(
22-
templateMail({
23-
content: `
24-
<p>Bonjour ${newCertificationAuthorityName},</p>
25-
<p>Le certificateur ${previousCertificationAuthorityName} vous a transféré la candidature de ${candidateName} pour la raison suivante : ${transferReason}.</p>
26-
<p>Vous êtes désormais le nouveau certificateur en charge de ce dossier.</p>
27-
`,
28-
url,
29-
labelCTA: "Accéder à la candidature",
30-
bottomLine: `
31-
<p>Nous restons disponibles si vous avez la moindre question.</p>
32-
<p>Cordialement,</p>
33-
<p>L'équipe France VAE</p>
34-
`,
35-
}),
36-
);
37-
38-
return sendEmailWithLink({
39-
to: { email },
40-
htmlContent,
41-
subject: "Une candidature vous a été transférée",
42-
customUrl: `/candidacies/${candidacyId}/feasibility/`,
43-
app: "admin",
44-
});
45-
};
1+
import mjml2html from "mjml";
2+
3+
import { sendEmailWithLink, templateMail } from "../../shared/email";
4+
5+
export const sendCandidacyTransferToNewCertificationAuthorityEmail = ({
6+
email,
7+
previousCertificationAuthorityName,
8+
newCertificationAuthorityName,
9+
candidateName,
10+
transferReason,
11+
candidacyId,
12+
}: {
13+
email: string;
14+
previousCertificationAuthorityName: string;
15+
newCertificationAuthorityName: string;
16+
candidateName: string;
17+
transferReason: string;
18+
candidacyId: string;
19+
}) => {
20+
const htmlContent = (url: string) =>
21+
mjml2html(
22+
templateMail({
23+
content: `
24+
<p>Bonjour ${newCertificationAuthorityName},</p>
25+
<p>Le certificateur ${previousCertificationAuthorityName} vous a transféré la candidature de ${candidateName} pour la raison suivante : ${transferReason}.</p>
26+
<p>Vous êtes désormais le nouveau certificateur en charge de ce dossier.</p>
27+
`,
28+
url,
29+
labelCTA: "Accéder à la candidature",
30+
bottomLine: `
31+
<p>Nous restons disponibles si vous avez la moindre question.</p>
32+
<p>Cordialement,</p>
33+
<p>L'équipe France VAE</p>
34+
`,
35+
}),
36+
);
37+
38+
return sendEmailWithLink({
39+
to: { email },
40+
htmlContent,
41+
subject: "Une candidature vous a été transférée",
42+
customUrl: `/candidacies/${candidacyId}/feasibility/`,
43+
app: "admin",
44+
});
45+
};
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
import mjml2html from "mjml";
2-
3-
import { sendGenericEmail, templateMail } from "../../shared/email";
4-
5-
export const sendCandidacyTransferToPreviousCertificationAuthorityEmail =
6-
async ({
7-
email,
8-
previousCertificationAuthorityName,
9-
candidateName,
10-
newCertificationAuthorityName,
11-
}: {
12-
email: string;
13-
previousCertificationAuthorityName: string;
14-
candidateName: string;
15-
newCertificationAuthorityName: string;
16-
}) => {
17-
const htmlContent = mjml2html(
18-
templateMail({
19-
content: `
20-
<p>Bonjour ${previousCertificationAuthorityName}</p>
21-
<p>Votre demande de transfert sur la candidature de ${candidateName} a bien été prise en compte.</p>
22-
<p>Le dossier est désormais géré par ${newCertificationAuthorityName}.</p>
23-
<p>Nous restons disponibles si vous avez la moindre question.</p>
24-
<p>Cordialement,</p>
25-
<p>L'équipe France VAE</p>
26-
`,
27-
}),
28-
);
29-
30-
return sendGenericEmail({
31-
to: { email },
32-
htmlContent: htmlContent.html,
33-
subject: "Le transfert de candidature a bien été effectué",
34-
});
35-
};
1+
import mjml2html from "mjml";
2+
3+
import { sendGenericEmail, templateMail } from "../../shared/email";
4+
5+
export const sendCandidacyTransferToPreviousCertificationAuthorityEmail =
6+
async ({
7+
email,
8+
previousCertificationAuthorityName,
9+
candidateName,
10+
newCertificationAuthorityName,
11+
}: {
12+
email: string;
13+
previousCertificationAuthorityName: string;
14+
candidateName: string;
15+
newCertificationAuthorityName: string;
16+
}) => {
17+
const htmlContent = mjml2html(
18+
templateMail({
19+
content: `
20+
<p>Bonjour ${previousCertificationAuthorityName}</p>
21+
<p>Votre demande de transfert sur la candidature de ${candidateName} a bien été prise en compte.</p>
22+
<p>Le dossier est désormais géré par ${newCertificationAuthorityName}.</p>
23+
<p>Nous restons disponibles si vous avez la moindre question.</p>
24+
<p>Cordialement,</p>
25+
<p>L'équipe France VAE</p>
26+
`,
27+
}),
28+
);
29+
30+
return sendGenericEmail({
31+
to: { email },
32+
htmlContent: htmlContent.html,
33+
subject: "Le transfert de candidature a bien été effectué",
34+
});
35+
};
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
import mjml2html from "mjml";
2-
3-
import { sendEmailWithLink, templateMail } from "../../shared/email";
4-
5-
export const sendCandidacyTransferedToOrganismEmail = ({
6-
email,
7-
organismName,
8-
candidateName,
9-
certificationAuthorityName,
10-
}: {
11-
email: string;
12-
organismName: string;
13-
candidateName: string;
14-
certificationAuthorityName: string;
15-
}) => {
16-
const htmlContent = (url: string) =>
17-
mjml2html(
18-
templateMail({
19-
content: `
20-
<p>Bonjour ${organismName},</p>
21-
<p>Nous vous informons que la certification visée par le candidat ${candidateName} sera désormais traitée par ${certificationAuthorityName}.</p>
22-
<p>Vous trouverez les informations liées à ce nouvel interlocuteur dans votre espace.</p>
23-
`,
24-
url,
25-
labelCTA: "Accéder à mon espace",
26-
bottomLine: `
27-
<p>Nous restons disponibles si vous avez des questions sur ce transfert.</p>
28-
<p>Cordialement,</p>
29-
<p>L'équipe France VAE</p>
30-
`,
31-
}),
32-
);
33-
34-
return sendEmailWithLink({
35-
to: { email },
36-
htmlContent,
37-
subject: "Votre candidat a un nouveau certificateur",
38-
app: "admin",
39-
});
40-
};
1+
import mjml2html from "mjml";
2+
3+
import { sendEmailWithLink, templateMail } from "../../shared/email";
4+
5+
export const sendCandidacyTransferedToOrganismEmail = ({
6+
email,
7+
organismName,
8+
candidateName,
9+
certificationAuthorityName,
10+
}: {
11+
email: string;
12+
organismName: string;
13+
candidateName: string;
14+
certificationAuthorityName: string;
15+
}) => {
16+
const htmlContent = (url: string) =>
17+
mjml2html(
18+
templateMail({
19+
content: `
20+
<p>Bonjour ${organismName},</p>
21+
<p>Nous vous informons que la certification visée par le candidat ${candidateName} sera désormais traitée par ${certificationAuthorityName}.</p>
22+
<p>Vous trouverez les informations liées à ce nouvel interlocuteur dans votre espace.</p>
23+
`,
24+
url,
25+
labelCTA: "Accéder à mon espace",
26+
bottomLine: `
27+
<p>Nous restons disponibles si vous avez des questions sur ce transfert.</p>
28+
<p>Cordialement,</p>
29+
<p>L'équipe France VAE</p>
30+
`,
31+
}),
32+
);
33+
34+
return sendEmailWithLink({
35+
to: { email },
36+
htmlContent,
37+
subject: "Votre candidat a un nouveau certificateur",
38+
app: "admin",
39+
});
40+
};
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { prismaClient } from "../../../prisma/client";
2-
3-
export const getAccountByCertificationAuthorityId = async ({
4-
certificationAuthorityId,
5-
}: {
6-
certificationAuthorityId: string;
7-
}) =>
8-
prismaClient.account.findFirst({
9-
where: { certificationAuthority: { id: certificationAuthorityId } },
10-
});
1+
import { prismaClient } from "../../../prisma/client";
2+
3+
export const getAccountByCertificationAuthorityId = async ({
4+
certificationAuthorityId,
5+
}: {
6+
certificationAuthorityId: string;
7+
}) =>
8+
prismaClient.account.findFirst({
9+
where: { certificationAuthority: { id: certificationAuthorityId } },
10+
});

0 commit comments

Comments
 (0)