diff --git a/.heroku/ensure-directory b/.heroku/ensure-directory
new file mode 100644
index 000000000..e69de29bb
diff --git a/.scalafmt.conf b/.scalafmt.conf
index 6bb10d38a..eb68a0880 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,4 +1,4 @@
-version = "3.8.5"
+version = "3.8.6"
runner.dialect = scala3
maxColumn = 100
spaces.afterKeywordBeforeParen = true
diff --git a/app.json b/app.json
index ff78dfb94..161e97586 100644
--- a/app.json
+++ b/app.json
@@ -1,60 +1,30 @@
{
"name": "aplus",
+ "stack": "scalingo-20",
"env": {
- "STAGING_DATABASE_URL": {
- "required": true
- },
- "APP_DOMAIN": {
- "required": true
- },
- "APP_HTTPS": {
- "required": true
+ "APP_HOST": {
+ "generator": "template",
+ "template": "%APP%.osc-fr1.scalingo.io"
},
"APPLICATION_SECRET": {
- "required": true
- },
- "EVOLUTIONS_AUTOAPPLY": {
- "required": true
- },
- "MAIL_HOST": {
- "required": true
- },
- "MAIL_PASSWORD": {
- "required": true
- },
- "MAIL_PORT": {
- "required": true
- },
- "MAIL_USER": {
- "required": true
+ "generator": "secret"
},
- "SENTRY_DSN": {
- "required": true
- },
- "AREAS_WITH_LOGIN_BY_KEY": {
- "required": true
- },
- "AREAS_WITH_ATTACHEMENTS": {
- "required": true
- },
- "FILES_PATH": {
- "required": true
+ "IS_REVIEW_APP": {
+ "value": "true"
}
},
"formation": {
"web": {
- "quantity": 1
+ "amount": 1,
+ "size": "S"
}
},
"addons": [
- "heroku-postgresql"
- ],
- "buildpacks": [
{
- "url": "heroku/nodejs"
- },
- {
- "url": "heroku/scala"
+ "plan": "postgresql:postgresql-sandbox"
}
- ]
+ ],
+ "scripts": {
+ "postdeploy": "bash scripts/copy-scalingo-review-app-db.sh"
+ }
}
diff --git a/app/models/Organisation.scala b/app/models/Organisation.scala
index 18184e985..b5a8f009d 100644
--- a/app/models/Organisation.scala
+++ b/app/models/Organisation.scala
@@ -101,7 +101,7 @@ object Organisation {
val msap: Organisation = Organisation("MSAP", "Maison de services au public")
val hopital: Organisation = Organisation("Hôpital", "Hôpital")
val poleEmploiId: Id = Organisation.Id("Pôle emploi")
- val poleEmploi: Organisation = Organisation(poleEmploiId, "Pôle emploi", "Pôle emploi")
+ val poleEmploi: Organisation = Organisation(poleEmploiId, "France Travail", "France Travail")
val prefId: Id = Organisation.Id("Préf")
val pref: Organisation = Organisation(prefId, "Préf", "Préfecture")
val sousPrefId: Id = Organisation.Id("Sous-Préf")
diff --git a/app/views/createApplication.scala.html b/app/views/createApplication.scala.html
index 1f8a17b88..cb0542700 100644
--- a/app/views/createApplication.scala.html
+++ b/app/views/createApplication.scala.html
@@ -154,16 +154,15 @@
@helper.input(applicationForm("mandatDate"),
"class" -> " single--padding-top-8px") { (id, name, value, args) =>
+ @defining(if(value.isEmpty) { java.time.ZonedDateTime.now().format(_root_.helper.Time.dateWithHourFormatter) } else { value }) { nonEmptyValue =>
-
- ex. : @{java.time.ZonedDateTime.now().format(_root_.helper.Time.dateWithHourFormatter)}
-
+ }
}
diff --git a/app/views/welcome.scala.html b/app/views/welcome.scala.html
index 4aab3125c..ffb463508 100644
--- a/app/views/welcome.scala.html
+++ b/app/views/welcome.scala.html
@@ -34,7 +34,7 @@ Bonjour et bienvenue dans la communauté Administration+
class="mdl-checkbox__input"
value="true">
- J’accepte de recevoir la newsletter mensuelle d’Administration+ sur l’évolution
+ J’accepte de recevoir la newsletter d’Administration+ sur l’évolution
de l’outil et de l’élargissement de la communauté.
diff --git a/build.sbt b/build.sbt
index 7eaa638ef..0c282018f 100644
--- a/build.sbt
+++ b/build.sbt
@@ -86,7 +86,7 @@ libraryDependencies ++= Seq(
"com.github.tototoshi" %% "scala-csv" % "2.0.0",
ws,
"com.lihaoyi" %% "scalatags" % "0.13.1",
- "org.typelevel" %% "cats-core" % "2.12.0",
+ "org.typelevel" %% "cats-core" % "2.13.0",
"org.typelevel" %% "cats-effect" % "3.5.7",
"co.fs2" %% "fs2-core" % fs2Version,
"co.fs2" %% "fs2-io" % fs2Version,
@@ -107,7 +107,7 @@ libraryDependencies ++= Seq(
)
// Crash
-libraryDependencies += "io.sentry" % "sentry-logback" % "7.20.0"
+libraryDependencies += "io.sentry" % "sentry-logback" % "7.20.1"
// Sync with Play and scala-steward pin
// https://github.com/playframework/playframework/blob/4c2d76095c2f6a5cab7be3e8f6017c4a4dd2a99f/project/Dependencies.scala#L20
diff --git a/conf/evolutions/default/80.sql b/conf/evolutions/default/80.sql
index 70454c8e8..ef5dc62a4 100644
--- a/conf/evolutions/default/80.sql
+++ b/conf/evolutions/default/80.sql
@@ -1,10 +1,11 @@
--- !Ups
+--- !Ups
-ALTER TABLE user_group ADD is_in_france_services_network BOOLEAN NOT NULL DEFAULT true;
-ALTER TABLE application ADD is_in_france_services_network BOOLEAN NOT NULL DEFAULT true;
+UPDATE organisation SET short_name = 'France Travail' WHERE id = 'Pôle emploi';
+UPDATE organisation SET name = 'France Travail' WHERE id = 'Pôle emploi';
--- !Downs
-ALTER TABLE application DROP is_in_france_services_network;
-ALTER TABLE user_group DROP is_in_france_services_network;
+--- !Downs
+
+UPDATE organisation SET name = 'Pôle emploi' WHERE id = 'Pôle emploi';
+UPDATE organisation SET short_name = 'Pôle emploi' WHERE id = 'Pôle emploi';
diff --git a/conf/evolutions/default/81.sql b/conf/evolutions/default/81.sql
new file mode 100644
index 000000000..70454c8e8
--- /dev/null
+++ b/conf/evolutions/default/81.sql
@@ -0,0 +1,10 @@
+-- !Ups
+
+ALTER TABLE user_group ADD is_in_france_services_network BOOLEAN NOT NULL DEFAULT true;
+ALTER TABLE application ADD is_in_france_services_network BOOLEAN NOT NULL DEFAULT true;
+
+
+-- !Downs
+
+ALTER TABLE application DROP is_in_france_services_network;
+ALTER TABLE user_group DROP is_in_france_services_network;
diff --git a/package.json b/package.json
index 0e6e4499b..98907c5bd 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"css-loader": "7.1.2",
"mini-css-extract-plugin": "2.9.2",
"rimraf": "6.0.1",
- "ts-loader": "9.5.1",
+ "ts-loader": "9.5.2",
"typescript": "5.0.4",
"webpack": "5.97.1",
"webpack-cli": "6.0.1",
diff --git a/scripts/copy-scalingo-review-app-db.sh b/scripts/copy-scalingo-review-app-db.sh
new file mode 100644
index 000000000..bc502bf3b
--- /dev/null
+++ b/scripts/copy-scalingo-review-app-db.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+echo "Running Scalingo review app DB copy script"
+
+if [ "$IS_REVIEW_APP" = "true" ]; then
+ dbclient-fetcher pgsql 15
+
+ echo "Copying review app db"
+
+ echo "Checking number of rows in 'user' table"
+
+ USER_COUNT=$(/app/bin/psql "${SCALINGO_POSTGRESQL_URL}" -A -t -c 'SELECT COUNT(*) FROM "user";')
+
+ if [ "$USER_COUNT" -gt 0 ] 2>/dev/null; then
+ echo "Table 'user' has $USER_COUNT rows. Doing nothing."
+ else
+ echo "Table 'user' has $USER_COUNT rows. Copying parent app db to review app db."
+
+ /app/bin/pg_dump --clean --if-exists --format c --dbname "${PARENT_APP_DATABASE_URL}" --no-owner --no-privileges --no-comments --exclude-schema 'information_schema' --exclude-schema '^pg_*' | /app/bin/pg_restore --clean --if-exists --no-owner --no-privileges --no-comments --dbname "${SCALINGO_POSTGRESQL_URL}"
+
+ fi
+
+else
+ echo "Not a review app - skipping database copy"
+fi
diff --git a/typescript/src/franceServices.ts b/typescript/src/franceServices.ts
index 0d8839493..f0d2aa04f 100644
--- a/typescript/src/franceServices.ts
+++ b/typescript/src/franceServices.ts
@@ -610,7 +610,7 @@ if (window.document.getElementById(tableId)) {
};
const addTableAreaCodeCol: ColumnDefinition = {
- title: 'Code INSEE',
+ title: 'Code Département',
field: 'areaCode',
headerFilter: 'input',
editor: 'input',