@tricoteuses/senat 2.20.0 → 2.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/model/dosleg.js +18 -6
- package/lib/scripts/test_iter_load.js +4 -1
- package/package.json +1 -1
package/lib/model/dosleg.js
CHANGED
|
@@ -227,24 +227,35 @@ export function createActesLegislatifs(dossier) {
|
|
|
227
227
|
...texte,
|
|
228
228
|
}));
|
|
229
229
|
// Ajout étape -COM-FOND après chaque -DEPOT
|
|
230
|
-
let
|
|
230
|
+
let acteLegislatifsLecture = [];
|
|
231
231
|
for (let i = 0; i < textesWithCodeActe.length; i++) {
|
|
232
232
|
const t = textesWithCodeActe[i];
|
|
233
|
-
|
|
234
|
-
if (t.code_acte && t.
|
|
235
|
-
|
|
233
|
+
acteLegislatifsLecture.push(t);
|
|
234
|
+
if (t.code_acte?.endsWith("-DEPOT") && t.type === "texte de loi") {
|
|
235
|
+
acteLegislatifsLecture.push({
|
|
236
236
|
...t,
|
|
237
237
|
code_acte: t.code_acte.replace("-DEPOT", "-COM-FOND"),
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
+
if (lectureAss["dates_seances"]?.length > 0) {
|
|
242
|
+
acteLegislatifsLecture.push({
|
|
243
|
+
session: lectureAss["session"],
|
|
244
|
+
type_lecture: lecture["type_lecture"],
|
|
245
|
+
libelle_lecture: "Discussion en séance publique",
|
|
246
|
+
code_acte: `${codeParent}-DEBATS-SEANCE`,
|
|
247
|
+
date: lectureAss["dates_seances"][0]?.["date"],
|
|
248
|
+
id: lectureAss["id"],
|
|
249
|
+
numero: lectureAss["numero"]
|
|
250
|
+
});
|
|
251
|
+
}
|
|
241
252
|
const { textes, rapports, ...lectureAssWithoutTextes } = lectureAss;
|
|
242
253
|
return {
|
|
243
254
|
type_lecture: lecture["type_lecture"],
|
|
244
255
|
ordre_lecture: lecture["ordre_lecture"],
|
|
245
256
|
libelle_lecture: lecture["libelle"],
|
|
246
257
|
code_acte: codeParent,
|
|
247
|
-
actes_legislatifs:
|
|
258
|
+
actes_legislatifs: acteLegislatifsLecture,
|
|
248
259
|
...lectureAssWithoutTextes,
|
|
249
260
|
};
|
|
250
261
|
});
|
|
@@ -337,7 +348,8 @@ export function getCodeActeTexte(codeParent, texteOrigine) {
|
|
|
337
348
|
texteOrigine === "transmis à l'Assemblée nationale" ||
|
|
338
349
|
texteOrigine === "déposé à l'Assemblée nationale" ||
|
|
339
350
|
texteOrigine === "transmis à l'Assemblée Nationale" ||
|
|
340
|
-
texteOrigine === "déposé à l'Assemblée Nationale"
|
|
351
|
+
texteOrigine === "déposé à l'Assemblée Nationale" ||
|
|
352
|
+
texteOrigine === "transmis en application de l'article 47-1, alinéa 2, de la Constitution") {
|
|
341
353
|
return `${codeParent}-DEPOT`;
|
|
342
354
|
}
|
|
343
355
|
if (texteOrigine === "de la commission" ||
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { iterLoadSenatScrutins, iterLoadSenatAmendements } from "../loaders";
|
|
1
|
+
import { iterLoadSenatScrutins, iterLoadSenatAmendements, iterLoadSenatDossiersLegislatifs } from "../loaders";
|
|
2
2
|
import commandLineArgs from "command-line-args";
|
|
3
3
|
import { dataDirDefaultOption } from "./shared/cli_helpers";
|
|
4
4
|
const optionsDefinitions = [dataDirDefaultOption];
|
|
@@ -11,3 +11,6 @@ for (const { item: scrutin } of iterLoadSenatScrutins(options["dataDir"], sessio
|
|
|
11
11
|
for (const { item: amendement } of iterLoadSenatAmendements(options["dataDir"], session, { noValidation: noValidation })) {
|
|
12
12
|
console.log(amendement["numero"]);
|
|
13
13
|
}
|
|
14
|
+
for (const { item: dossierLegislatif } of iterLoadSenatDossiersLegislatifs(options["dataDir"], session, { noValidation: noValidation })) {
|
|
15
|
+
console.log(dossierLegislatif["numero"]);
|
|
16
|
+
}
|