@tricoteuses/senat 2.14.5 → 2.14.6

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.
@@ -35,13 +35,14 @@ export function groupNonSPByTypeOrganeHour(events) {
35
35
  continue;
36
36
  const { startISO, endISO } = deriveTimesForEvent(e);
37
37
  const hourShort = hourShortFromISO(startISO) ?? hourShortFromOriginal(e.timeOriginal);
38
- const key = [e.date, kind, hourShort || "NA"].join("|");
38
+ const org = e.organe ?? "NA_ORG";
39
+ const key = [e.date, kind, org, hourShort || "NA"].join("|");
39
40
  if (!buckets.has(key))
40
41
  buckets.set(key, []);
41
42
  buckets.get(key).push({ ...e, startTime: startISO ?? e.startTime, endTime: endISO ?? e.endTime });
42
43
  }
43
44
  for (const [key, list] of buckets) {
44
- const [date, kindStr, hourShort] = key.split("|");
45
+ const [date, kindStr, organe, hourShort] = key.split("|");
45
46
  const kind = kindStr;
46
47
  const enriched = list
47
48
  .map((ev) => {
@@ -63,7 +64,7 @@ export function groupNonSPByTypeOrganeHour(events) {
63
64
  }, null);
64
65
  const any = enriched[0]?.ev;
65
66
  const hour = hourShort !== "NA" ? hourShort : (hourShortFromISO(startTime) ?? hourShortFromOriginal(any?.timeOriginal));
66
- const uid = makeTypeGroupUid(date, kind, hour ?? null, any?.organe || undefined);
67
+ const uid = makeTypeGroupUid(date, kind, hour ?? "", any?.organe ?? "");
67
68
  const suffix = (kind === "COM" ? "IDC" : kind === "MC" ? "IDM" : kind === "OD" ? "IDO" : "IDI");
68
69
  const group = {
69
70
  uid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tricoteuses/senat",
3
- "version": "2.14.5",
3
+ "version": "2.14.6",
4
4
  "description": "Handle French Sénat's open data",
5
5
  "keywords": [
6
6
  "France",