Skip to content

feat: add option to only show current zaken in mijn zaken block - #68

Merged
richardkorthuis merged 4 commits into
mainfrom
feat/mijn-zaken-only-current-zaken
Nov 23, 2026
Merged

richardkorthuis merged 4 commits into
mainfrom
feat/mijn-zaken-only-current-zaken

Conversation

@richardkorthuis

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Without a zaaktype filter, only the first API page is fetched, so filtering can omit ongoing zaken on later pages and incorrectly show too few or no current zaken.

1 open issue
1 file not reviewed
  • build/mijn-zaken/index.js: Generated file
What changed in this PR

Adds an optional current-cases-only view to the Mijn Zaken block when tabs are disabled, while preserving the existing default behavior.

Changes:

  • Registers onlyCurrentZaken and adds an editor toggle with contextual display-limit help.
  • Filters out completed cases before applying the display limit and adds an empty-state message.
  • Updates the compiled block assets and metadata.
File Description
src/​Providers/​BlockServiceProvider.php Registers the new server-side attribute.
src/​Blocks/​MijnZaken.php Filters current cases before limiting results.
resources/​blocks/​mijn-zaken/​edit.js Adds the toggle and contextual help.
resources/​blocks/​mijn-zaken/​block.json Defines the attribute with a false default.
build/​mijn-zaken/​index.js Updates the compiled editor bundle.
build/​mijn-zaken/​index.asset.php Refreshes the asset version hash.
build/​mijn-zaken/​block.json Includes the attribute in built metadata.

Review effort: Balanced

Comment thread src/Blocks/MijnZaken.php Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the optional current-cases-only view.

No open issues 🎉

1 resolved since last review
1 file not reviewed
  • build/mijn-zaken/index.js: Generated file

Review effort: Balanced

@mvdhoek1 mvdhoek1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kunnen we niet beter aan de API-kant filteren? De Zaken API ondersteunt vanaf 1.4 einddatum__isnull, dus met $filter->add( 'einddatum__isnull', 'true' ) krijg je direct alleen lopende zaken terug, al in de juiste volgorde. Dan hoef je niet meer door alle pagina's heen.

Ik zou de predicate wel laten staan als vangnet voor leveranciers die het filter niet ondersteunen. Als het filter werkt, stopt de loop na de eerste pagina; anders werkt het zoals nu. Eventueel kan het meesturen van de parameter achter een supplier-instelling, zoals bij de zaaktypefiltering.

Bron: https://vng-realisatie.github.io/gemma-zaken/standaard/zaken/redoc-1.7.0.html#/zaken/zaak_list#zaken/zaak_list/t=request&in=query&path=einddatum__isnull

@richardkorthuis

Copy link
Copy Markdown
Member Author

@mvdhoek1 Goede! Ik heb API-kant filtering toegevoegd.

@richardkorthuis
richardkorthuis force-pushed the feat/mijn-zaken-only-current-zaken branch from de00d67 to cc3d726 Compare November 17, 2026 08:18
When only current zaken are shown, pass 'einddatum__isnull=true' to the
Zaken API (1.4+) for suppliers selected in the new 'Einddatumfiltering
ondersteunde leveranciers' setting, so completed zaken are excluded by
the API and fetching usually stops after the first page.

The setting is disabled by default, as suppliers on older versions may
ignore or reject the parameter. The client side predicate remains in
place as a safety net for suppliers without support.
@richardkorthuis
richardkorthuis force-pushed the feat/mijn-zaken-only-current-zaken branch from cc3d726 to 7277d22 Compare November 23, 2026 10:32

@mvdhoek1 mvdhoek1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vergeet de version bumps en de changelog niet 👏🏼

@richardkorthuis
richardkorthuis merged commit 123fd0d into main Nov 23, 2026
1 check passed
@richardkorthuis
richardkorthuis deleted the feat/mijn-zaken-only-current-zaken branch November 23, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants