diff --git a/server/src/cli.js b/server/src/cli.js
index 14d613b2..afabc37d 100644
--- a/server/src/cli.js
+++ b/server/src/cli.js
@@ -118,8 +118,12 @@ cli
.command("computeContinuumStats")
.description("Calcule les données statistiques manquantes pour les anciens/nouveaux diplomes")
.argument("[stats]", "Le nom des stats à importer (formations,certifications,regionales)", asArray)
- .action((stats) => {
- runScript(() => computeContinuumStats({ stats }));
+ .option(
+ "--millesime [millesime]",
+ "Spécifie un millésime à importer (attention les millésimes nationales et formations/regionales sont différents"
+ )
+ .action((stats, options) => {
+ runScript(() => computeContinuumStats({ stats, millesime: options.millesime }));
});
cli
diff --git a/server/src/jobs/stats/computeContinuumStats.js b/server/src/jobs/stats/computeContinuumStats.js
index dd5e1124..99592adc 100644
--- a/server/src/jobs/stats/computeContinuumStats.js
+++ b/server/src/jobs/stats/computeContinuumStats.js
@@ -203,6 +203,8 @@ export async function computeContinuumStats(options = {}) {
let stats = options.stats || ["certifications", "regionales", "formations"];
const result = { total: 0, created: 0, updated: 0, failed: 0 };
+ const millesime = options.millesime || null;
+
function handleError(e, context = {}) {
logger.error({ err: e, ...context }, `Impossible de calculer les données pour les anciens/nouveaux diplomes`);
result.failed++;
@@ -211,7 +213,7 @@ export async function computeContinuumStats(options = {}) {
await oleoduc(
mergeStreams(stats.map(streamStats)),
- filterData(({ data }) => data.donnee_source.type === "self"),
+ filterData(({ data }) => data.donnee_source.type === "self" && (!millesime || data.millesime === millesime)),
transformData(async ({ data, statName }) => {
const query = { ...getQueryForStats({ data, statName, millesime: data.millesime }) };
diff --git a/server/src/jobs/stats/importFormationsSupStats.js b/server/src/jobs/stats/importFormationsSupStats.js
index e471b68a..58b4362f 100644
--- a/server/src/jobs/stats/importFormationsSupStats.js
+++ b/server/src/jobs/stats/importFormationsSupStats.js
@@ -106,6 +106,7 @@ export async function importFormationsSupStats(options = {}) {
code_certification: formationStats.diplome,
type: "self",
},
+ libelle_etablissement: formationStats.uo_lib,
"_meta.insersup": {
etablissement_libelle: formationStats.uo_lib,
etablissement_actuel_libelle: formationStats.uo_lib_actuel,
diff --git a/server/src/services/widget/templates/assets/remixicon.light.symbol.svg b/server/src/services/widget/templates/assets/remixicon.light.symbol.svg
index 496f5221..689e6709 100644
--- a/server/src/services/widget/templates/assets/remixicon.light.symbol.svg
+++ b/server/src/services/widget/templates/assets/remixicon.light.symbol.svg
@@ -34,4 +34,9 @@
d="M12 0.585693L18 6.58569V9H22V19H23V21H1V19H2V9H6V6.58569L12 0.585693ZM18 19H20V11H18V19ZM6 11H4V19H6V11ZM8 7.41412V18.9999H11V12H13V18.9999H16V7.41412L12 3.41412L8 7.41412Z">
+