@tricoteuses/senat 3.1.8 → 3.1.9
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.
|
@@ -39,6 +39,13 @@ function getDateSortValue(value) {
|
|
|
39
39
|
function compareByDate(left, right) {
|
|
40
40
|
return getDateSortValue(left.date) - getDateSortValue(right.date);
|
|
41
41
|
}
|
|
42
|
+
function getCommissionCodeActe(phasePrefix, rapportType) {
|
|
43
|
+
const normalizedType = (rapportType || "").toLowerCase();
|
|
44
|
+
if (normalizedType.includes("avis") || normalizedType.includes("information")) {
|
|
45
|
+
return `${phasePrefix}-COM-AVIS`;
|
|
46
|
+
}
|
|
47
|
+
return `${phasePrefix}-COM-FOND`;
|
|
48
|
+
}
|
|
42
49
|
function getPhasePrefix(lecture, assemblee, codeNatureDossier) {
|
|
43
50
|
if (assemblee !== "Sénat")
|
|
44
51
|
return null;
|
|
@@ -100,8 +107,9 @@ export function buildActesLegislatifs(dossier) {
|
|
|
100
107
|
const rapports = lecAss.rapports ?? [];
|
|
101
108
|
for (const rap of rapports) {
|
|
102
109
|
if (rap.date) {
|
|
110
|
+
const codeActeCommission = getCommissionCodeActe(phasePrefix, rap.type);
|
|
103
111
|
actes.push({
|
|
104
|
-
code_acte:
|
|
112
|
+
code_acte: codeActeCommission,
|
|
105
113
|
date: rap.date,
|
|
106
114
|
libelle: `Rapport n°${rap.numero} de la commission`,
|
|
107
115
|
id: rap.id,
|