@stamhoofd/metabase 2.150.0 → 2.151.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamhoofd/metabase",
3
- "version": "2.150.0",
3
+ "version": "2.151.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -22,12 +22,12 @@
22
22
  "test:coverage": "vitest --coverage"
23
23
  },
24
24
  "devDependencies": {
25
- "@stamhoofd/test-utils": "2.150.0",
25
+ "@stamhoofd/test-utils": "2.151.1",
26
26
  "vitest": "4.1.10"
27
27
  },
28
28
  "license": "UNLICENCED",
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "gitHead": "94d90d85b97e7e2ad677897a17920f5a8151d296"
32
+ "gitHead": "77331fca6a59fa0b0e7bc2e85f7a5e727f87b707"
33
33
  }
@@ -2,9 +2,6 @@
2
2
  WITH all_registrations AS (
3
3
  -- @include all-registrations
4
4
  )
5
- -- The koepel is the national body rather than an eenheid, and the ledenstatistieken normally count
6
- -- none of its structuurvrijwilligers. `platform.membershipOrganizationId` is the only thing that says
7
- -- which organization it is; the import writes the koepel under that same id.
8
5
  SELECT all_registrations.* FROM all_registrations
9
6
  WHERE {{platformleden_opnemen}}
10
7
  OR NOT EXISTS (SELECT 1 FROM platform WHERE platform.membershipOrganizationId = all_registrations.organization_id)
@@ -46,7 +46,7 @@ JOIN members ON members.id = registrations.memberId AND members.periodId = regis
46
46
  JOIN organizations ON organizations.id = registrations.organizationId AND organizations.periodId = registrations.periodId
47
47
  AND organizations.active = 1
48
48
  WHERE registrations.registeredAt IS NOT NULL
49
- [[AND registration_periods.name = {{werkjaar}}]]
49
+ AND registration_periods.name = {{werkjaar}}
50
50
  [[AND organizations.name = {{eenheid}}]]
51
51
  AND (
52
52
  -- @include filter-registration-types
@@ -2,7 +2,6 @@
2
2
  WITH non_platform_registrations AS (
3
3
  -- @include all-non-platform-registrations
4
4
  )
5
- -- Identical to `deduplicated-non-platform-registrations-all-years.sql` apart from the grain it reads; a test keeps the two in step.
6
5
  SELECT deduplicated.* FROM (
7
6
  SELECT
8
7
  non_platform_registrations.*,
@@ -101,7 +101,7 @@ SELECT
101
101
  COUNT(DISTINCT CASE WHEN leden.`Werkjaar` = gekozen.vorig THEN leden.member_id END) AS `Aantal leden vorig jaar`
102
102
  FROM leden
103
103
  CROSS JOIN gekozen
104
- WHERE leden.`Werkjaar` IN (gekozen.name, gekozen.vorig)
104
+ WHERE leden.`Werkjaar` IN (gekozen.name, gekozen.vorig) and age_group_id is not null
105
105
  GROUP BY leden.`Leeftijdsgroep`
106
106
  ORDER BY MIN(COALESCE(leden.age_group_min_age, 99)), leden.`Leeftijdsgroep`
107
107