Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const isProduction = process.env.NODE_ENV == "production"
* - OPENFISCA_PUBLIC_ROOT_URL
*/

const contextName = process.env.CONTEXT_NAME || "1jeune1solution"
const contextName = process.env.CONTEXT_NAME || "mes-aides.org"

const config: Configuration = {
env: process.env.NODE_ENV || "development",
Expand Down
5 changes: 4 additions & 1 deletion backend/lib/mes-aides/emails/email-render.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from "fs"
import yaml from "js-yaml"
import path from "path"
import consolidate from "consolidate"
import { fileURLToPath } from "url"
Expand All @@ -20,7 +21,8 @@ function readFile(filePath) {

const emailTemplate = readFile("templates/email.mjml")
const footerTemplate = readFile("templates/footer.mjml")
const headerTemplate = readFile("templates/header.mjml")
const headerTemplate = readFile(`templates/${config.contextName}/header.mjml`)
const style = yaml.load(readFile(`templates/${config.contextName}/style.yaml`))
const simulationResultsTemplate = readFile("templates/simulation-results.mjml")
const simulationUsefulnessTemplate = readFile(
"templates/simulation-usefulness.mjml",
Expand Down Expand Up @@ -57,6 +59,7 @@ const dataTemplateBuilder = (
returnURL: `${config.baseURL}${followup.returnPath}`,
wasUsefulLinkYes: `${config.baseURL}${followup.wasUsefulPath}`,
wasUsefulLinkNo: `${config.baseURL}${followup.wasNotUsefulPath}`,
style,
partials: {
header: headerTemplate,
content: emailTemplates[emailType],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ctaBackgroundColor: "#2aa28bff"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<mj-section padding="0px 24px">
<mj-group>
<mj-column>
<mj-text>
<h1>mes-aides.org</h1>
</mj-text>
</mj-column>
</mj-group>
</mj-section>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ctaBackgroundColor: "#2aa28bff"
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<mj-column width="100%" padding="0">
<mj-button
align="left"
background-color="#5770be"
background-color="{{&style.ctaBackgroundColor}}"
color="white"
href="{{&ctaLink}}"
padding="16px 0px 0px 0px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<mj-column align="center">
<mj-button
width="130px"
background-color="#5770be"
background-color="{{&style.ctaBackgroundColor}}"
color="white"
href="{{&wasUsefulLinkYes}}"
>
Expand All @@ -41,7 +41,7 @@
<mj-column>
<mj-button
width="130px"
background-color="#5770be"
background-color="{{&style.ctaBackgroundColor}}"
color="white"
href="{{&wasUsefulLinkNo}}"
>
Expand Down
14 changes: 8 additions & 6 deletions backend/lib/stats/funnel-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,14 @@ const getMatomoEventsData = async (
const matomoEventData = await callMatomoAPI(piwikParameters)
const dateKey = beginRange.format("YYYY-MM")
return {
showAccompanimentCount: matomoEventData[dateKey].find(
(d) => d.label === "show-accompaniment-link",
)["nb_events"],
clickAccompanimentCount: matomoEventData[dateKey].find(
(d) => d.label === "click-accompaniment-link",
)["nb_events"],
showAccompanimentCount:
matomoEventData[dateKey].find(
(d) => d.label === "show-accompaniment-link",
)?.["nb_events"] || 0,
clickAccompanimentCount:
matomoEventData[dateKey].find(
(d) => d.label === "click-accompaniment-link",
)?.["nb_events"] || 0,
}
}

Expand Down
4 changes: 4 additions & 0 deletions lib/enums/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ export enum Theme {
LightBlue = "light-blue",
BordeauxMetropole = "bordeaux-metropole",
Soliguide = "soliguide",
MesAidesOrg = "mes-aides-org",
ArcEnCiel = "arc-en-ciel",
}

export enum ThemeLabel {
Default = "Thème bleu foncé (DSFR)",
LightBlue = "Thème bleu clair",
BordeauxMetropole = "Thème Bordeaux Métropole",
Soliguide = "Thème Soliguide",
MesAidesOrg = "mes-aides.org",
ArcEnCiel = "Thème arc enciel",
}
2 changes: 1 addition & 1 deletion openfisca/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
gunicorn>=21.2.0
pytest==8.3.3
Openfisca-France==172.0.6
Openfisca-Core[web-api]==43.3.7
Openfisca-Core[web-api]==43.3.10
OpenFisca-France-Local[excel-reader]==6.17.7
Openfisca-Paris==5.5.12
typing_extensions==4.12.2
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"serve": "nodemon --exec 'node --loader ts-node/esm backend/dev.ts'",
"build": "concurrently 'npm run build:server' && concurrently 'npm run build:iframes' 'npm run build:front' && npm run copy:templates",
"clean:dist-server": "rm -fR dist-server",
"copy:templates": "mkdir -p dist-server/backend/lib/mes-aides/emails/templates && cp backend/lib/mes-aides/emails/templates/* dist-server/backend/lib/mes-aides/emails/templates",
"copy:templates": "mkdir -p dist-server/backend/lib/mes-aides/emails/templates && cp -r backend/lib/mes-aides/emails/templates/* dist-server/backend/lib/mes-aides/emails/templates",
"build:iframes": "NODE_OPTIONS='--loader ts-node/esm' webpack --config iframes/iframes.config.ts",
"build:front": "vite build",
"build:server": "tsc -p tsconfig.server.json",
Expand Down
Binary file added public/img/mes-aides.org/Twitter_1024x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/mes-aides.org/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading