Repository navigation
feat: add option to only show current zaken in mijn zaken block - #68
Conversation
There was a problem hiding this comment.
🟡 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
onlyCurrentZakenand 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
mvdhoek1
left a comment
There was a problem hiding this comment.
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.
|
@mvdhoek1 Goede! Ik heb API-kant filtering toegevoegd. |
de00d67 to
cc3d726
Compare
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.
cc3d726 to
7277d22
Compare
mvdhoek1
left a comment
There was a problem hiding this comment.
Vergeet de version bumps en de changelog niet 👏🏼

No description provided.