diff --git a/netlify.toml b/netlify.toml
index 4026ec94a..612a763e4 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -17,14 +17,20 @@ from = "https://mycompanyinfrance.fr/sitemap.txt"
to = "/sitemap.infrance.en.txt"
status = 200
+## Redirection pour les pages prérendues
[[redirects]]
from = "https://mycompanyinfrance.fr"
to = "/prerender/infrance/index.html"
status = 200
[[redirects]]
-from = "https://mycompanyinfrance.fr/social-security"
-to = "/prerender/infrance/social-security/index.html"
+from = "https://mycompanyinfrance.fr/social-security/salaried"
+to = "/prerender/infrance/social-security/salaried/index.html"
+status = 200
+
+[[redirects]]
+from = "https://mycompanyinfrance.fr/iframes/simulateur-embauche"
+to = "/prerender/infrance/iframes/simulateur-embauche/index.html"
status = 200
[[redirects]]
@@ -49,18 +55,30 @@ from = "https://mon-entreprise.fr/sitemap.txt"
to = "/sitemap.infrance.fr.txt"
status = 200
+
+## Redirection pour les pages prérendues
[[redirects]]
from = "https://mon-entreprise.fr"
to = "/prerender/mon-entreprise/index.html"
status = 200
+[[redirects]]
+from = "https://mon-entreprise.fr/social-security/salaried"
+to = "/prerender/mon-entreprise/sécurité-sociale/salarié/index.html"
+status = 200
+
+[[redirects]]
+from = "https://mon-entreprise.fr/iframes/simulateur-embauche"
+to = "/prerender/mon-entreprise/iframes/simulateur-embauche/index.html"
+status = 200
+
[[redirects]]
from = "https://mon-entreprise.fr/*"
to = "/mon-entreprise.html"
status = 200
-# Embauche PRODUCTION settings
+# Embauche redirection settings
[[redirects]]
from = "https://embauche.beta.gouv.fr/"
@@ -72,22 +90,17 @@ from = "https://embauche.beta.gouv.fr/documentation/*"
to = "https://mon-entreprise.fr/documentation/:splat"
status = 301
+## Old iframe adresse
[[redirects]]
-from = "https://embauche.beta.gouv.fr/"
-to = "https://mon-entreprise.fr/sécurité-sociale/salarié"
+from = "https://embauche.beta.gouv.fr/modules/v2/dist/simulateur.js"
+to = "https://mon-entreprise.fr/simulateur-iframe-integration-script.js"
status = 301
-# Old iframe adresse
[[redirects]]
-from = "https://embauche.beta.gouv.fr/modules/v2/*"
-to = "/:splat"
+from = "https://embauche.beta.gouv.fr/dist/simulateur.js"
+to = "https://mon-entreprise.fr/simulateur-iframe-integration-script.js"
+status = 301
-# When in iframe, we don't prerender the page
-[[redirects]]
-from = "https://embauche.beta.gouv.fr/"
-query = {iframe=":iframe", s=":e", couleur=":couleur", integratorUrl=":integratorUrl", lang=":lang"}
-to = "/embauche.html?iframe=:iframe&s=:e&couleur=:couleur&integratorUrl=:integratorUrl&lang=:lang"
-status = 200
# Redirect to mycompanyinfrance in staging and development settings
@@ -109,6 +122,17 @@ status = 200
from = "/"
to = "/prerender/mon-entreprise/index.html"
status = 200
+
+[[redirects]]
+from = "/sécurité-sociale/salarié"
+to = "/prerender/mon-entreprise/sécurité-sociale/salarié/index.html"
+status = 200
+
+[[redirects]]
+from = "/iframes/simulateur-embauche"
+to = "/prerender/mon-entreprise/iframes/simulateur-embauche/index.html"
+status = 200
+
[[redirects]]
from = "/*"
to = "/mon-entreprise.html"
diff --git a/package.json b/package.json
index fc5ce9548..df762d9ef 100644
--- a/package.json
+++ b/package.json
@@ -81,13 +81,11 @@
"test-lib": "yarn test-common --grep 'library'",
"compile-lib": "yarn webpack --config source/webpack.lib.js",
"compile-dev": "FR_SITE='http://localhost:5000${path}' EN_SITE='http://localhost:5001${path}' yarn run compile",
- "mon-entreprise:serve": "PORT=5000 serve --config serve.mon-entreprise.json",
+ "mon-entreprise:serve": "PORT=5000 serve --config serve.mon-entreprise.json --no-clipboard",
"mon-entreprise:test": "cypress open",
- "mycompanyinfrance:serve": "PORT=5001 serve --config serve.infrance.json",
+ "mycompanyinfrance:serve": "PORT=5001 serve --config serve.infrance.json --no-clipboard",
"mycompanyinfrance:test": "cypress open --env language=en --config baseUrl=http://localhost:8080/infrance",
- "embauche:serve": "cp dist/embauche.html dist/index.html && PORT=5002 serve -s dist",
- "embauche:test": "cypress open --config baseUrl=http://localhost:8080/embauche,integrationFolder=cypress/integration/embauche",
- "serve-dev": "yarn run mon-entreprise:serve & yarn run mycompanyinfrance:serve & yarn run embauche:serve"
+ "serve-dev": "yarn run mon-entreprise:serve & yarn run mycompanyinfrance:serve"
},
"devDependencies": {
"@babel/core": "^7.1.0",
@@ -143,7 +141,7 @@
"ramda-fantasy": "^0.8.0",
"raw-loader": "^0.5.1",
"react-hot-loader": "^4.7.1",
- "serve": "^10.0.2",
+ "serve": "^11.0.0",
"serve-handler": "^5.0.5",
"sinon": "^4.5.0",
"sinon-chai": "^3.0.0",
diff --git a/source/components/ui/Toggle.css b/source/components/ui/Toggle.css
index 807c53fcb..dd1ff9cbd 100644
--- a/source/components/ui/Toggle.css
+++ b/source/components/ui/Toggle.css
@@ -33,8 +33,8 @@
vertical-align: middle;
border-radius: 20px;
cursor: pointer;
- box-shadow: 0 0 0px 1.5px var(--colour);
box-shadow: 0 0 0px 1.5px rgb(41, 117, 209);
+ box-shadow: 0 0 0px 1.5px var(--colour);
transition: all 0.1s;
border: 0.5em solid white;
}
diff --git a/source/règles/externalized.yaml b/source/règles/externalized.yaml
index 134191e0d..74ac2b323 100644
--- a/source/règles/externalized.yaml
+++ b/source/règles/externalized.yaml
@@ -541,7 +541,7 @@ contrat salarié . salaire:
contrat salarié . salaire . brut de base:
titre.en: Gross salary
titre.fr: Salaire brut de base
- résumé.en: Written in the employment contract.
+ résumé.en: Written in the employment contract
résumé.fr: Inscrit dans le contrat de travail
question.en: What is the monthly gross salary?
question.fr: Quel est le salaire de base ?
@@ -749,7 +749,7 @@ contrat salarié . salaire . net:
titre.fr: Salaire net
question.en: What is the net salary?
question.fr: Quel est le salaire net ?
- résumé.en: Received by the employee.
+ résumé.en: Received by the employee
résumé.fr: Salaire net avant impôt
description.en: >
The gross salary minus the social contributions.
@@ -829,7 +829,7 @@ contrat salarié . rémunération . total:
titre.fr: Total chargé
question.en: 'What is the monthly remuneration, contributions included ?'
question.fr: Quel est la rémunération chargée ?
- résumé.en: Spent by the employer.
+ résumé.en: Spent by the employer
résumé.fr: Dépensé par l'employeur
description.en: >-
It is the gross salary, plus the employer contributions. It is the total
diff --git a/source/sites/mon-entreprise.fr/App.js b/source/sites/mon-entreprise.fr/App.js
index 0472197a0..70a927bbc 100644
--- a/source/sites/mon-entreprise.fr/App.js
+++ b/source/sites/mon-entreprise.fr/App.js
@@ -28,6 +28,7 @@ import Header from './layout/Header/Header'
import Navigation from './layout/Navigation/Navigation'
import trackSimulatorActions from './middlewares/trackSimulatorActions'
import CompanyIndex from './pages/Company'
+import Couleur from './pages/Dev/Couleur'
import IntegrationTest from './pages/Dev/IntegrationTest'
import Sitemap from './pages/Dev/Sitemap'
import Documentation from './pages/Documentation'
@@ -131,6 +132,7 @@ const App = compose(
path="/dev/integration-test"
component={IntegrationTest}
/>
+
diff --git a/source/sites/mon-entreprise.fr/iframe-integration-script.js b/source/sites/mon-entreprise.fr/iframe-integration-script.js
index 39b2f30aa..75e477665 100644
--- a/source/sites/mon-entreprise.fr/iframe-integration-script.js
+++ b/source/sites/mon-entreprise.fr/iframe-integration-script.js
@@ -1,10 +1,14 @@
import { iframeResizer } from 'iframe-resizer';
let script = document.getElementById('script-simulateur-embauche'),
couleur = script.dataset.couleur,
- baseUrl =
- script.dataset.iframeUrl || script.getAttribute('src').split('dist')[0] + 'iframes/simulateur-embauche',
- integratorUrl = encodeURIComponent(window.location.href.toString()),
lang = script.dataset.lang,
+ baseUrl =
+ script.dataset.iframeUrl ||
+ (lang === 'en' ? process.env.EN_SITE : process.env.FR_SITE).replace(
+ '${path}',
+ '/iframes/simulateur-embauche'
+ ),
+ integratorUrl = encodeURIComponent(window.location.href.toString()),
src =
baseUrl +
`?s=e&couleur=${couleur}&iframe&integratorUrl=${integratorUrl}&lang=${lang}`
diff --git a/source/sites/mon-entreprise.fr/layout/Footer/Integration.js b/source/sites/mon-entreprise.fr/layout/Footer/Integration.js
index 3f8b14730..ae141264a 100644
--- a/source/sites/mon-entreprise.fr/layout/Footer/Integration.js
+++ b/source/sites/mon-entreprise.fr/layout/Footer/Integration.js
@@ -39,7 +39,11 @@ export default function Integration() {
choisir la couleur principale du module pour le
fondre dans le thème visuel de votre page : changez simplement
la valeur de data-couleur ci-dessus. Pour la choisir,
- utilisez notre outil interactif.
+ utilisez notre{' '}
+ setOpened(false)} to="/dev/couleur">
+ outil interactif
+
+ .
L'attribut data-lang="en" vous permet quand à lui de
diff --git a/source/sites/mon-entreprise.fr/layout/Footer/Privacy.js b/source/sites/mon-entreprise.fr/layout/Footer/Privacy.js
index a17c7e0e3..066e4da24 100644
--- a/source/sites/mon-entreprise.fr/layout/Footer/Privacy.js
+++ b/source/sites/mon-entreprise.fr/layout/Footer/Privacy.js
@@ -50,7 +50,9 @@ export default withLanguage(
height: '200px',
width: '100%'
}}
- src={`https://stats.data.gouv.fr/index.php?module=CoreAdminHome&action=optOut&language=${language}`}
+ src={`https://stats.data.gouv.fr/index.php?module=CoreAdminHome&action=optOut&language=${
+ this.props.language
+ }`}
/>
)}
diff --git a/source/sites/mon-entreprise.fr/pages/Dev/Couleur.js b/source/sites/mon-entreprise.fr/pages/Dev/Couleur.js
index 28a250b3c..23bc3ce7e 100644
--- a/source/sites/mon-entreprise.fr/pages/Dev/Couleur.js
+++ b/source/sites/mon-entreprise.fr/pages/Dev/Couleur.js
@@ -2,13 +2,14 @@
import withColours, { ThemeColoursProvider } from 'Components/utils/withColours'
import React, { Suspense, useState } from 'react'
-import Home from './Home'
+import Home from '../Iframes/SimulateurEmbauche'
let LazyColorPicker = React.lazy(() => import('./ColorPicker'))
const Couleur = ({ colours: { colour: defaultColour } }) => {
const [colour, setColour] = useState(defaultColour)
return (
-
+ <>
+
Changez la couleur de l'integration
Visualisez sur cette page l’apparence du module pour différentes
couleurs principales.
@@ -20,10 +21,12 @@ const Couleur = ({ colours: { colour: defaultColour } }) => {
La couleur sélectionnée, à déclarer comme attribut
"data-couleur" du script sur votre page est : {colour}