Skip to content

Commit 473e520

Browse files
Mike van den Hoekmvdhoek1
authored andcommitted
feat: Pink and EnableU v2 implementation
1 parent 2a4cfd1 commit 473e520

31 files changed

Lines changed: 808 additions & 15005 deletions

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,15 @@ do_action('pg::exception/intercept', $exception, $method)
120120
```
121121

122122
The `$exception` parameter contains the caught exception object.
123+
124+
### Provide Custom Mapping Options from a Theme Directory
125+
126+
This plugin includes supplier-specific mapping option files. In version 1 of the "HaalCentraal API", all available fields were returned, even when only a subset was needed.
127+
128+
Since version 2 of HaalCentraal, this has changed: the goal binding (doelbinding) now determines which fields are returned. This results in a more concise dataset that contains only the necessary fields. Because each municipality (gemeente) can define its own unique goal bindings and corresponding fields, this plugin cannot include all possible mapping configurations by default.
129+
130+
```php
131+
add_filter('pg::theme/dir_mapping_options', function ($value) {
132+
return __DIR__ . '/templates/owc-prefill/';
133+
}, 10, 1);
134+
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return ['dependencies' => ['react-jsx-runtime', 'wp-block-editor', 'wp-blocks'], 'version' => '6b367cd01e8bb61dfd0a'];
1+
<?php return ['dependencies' => ['react-jsx-runtime', 'wp-block-editor', 'wp-blocks'], 'version' => '743c996e1df71c631ae5'];

build/personal-data-table/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/personal-data-table/personal-data-row/block.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
"label": ""
1919
}
2020
},
21+
"goalBinding": {
22+
"type": "string",
23+
"default": ""
24+
},
25+
"processing": {
26+
"type": "string",
27+
"default": ""
28+
},
2129
"selectedOption": {
2230
"type": "object",
2331
"default": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return ['dependencies' => ['react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'], 'version' => 'b973b3662f9ee0c4c3e3'];
1+
<?php return ['dependencies' => ['react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'], 'version' => '581e0c58080f4f89a7ad'];

build/personal-data-table/personal-data-row/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/personal-data-table/personal-data-row/render.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use OWC\PrefillGravityForms\Services\PersonalDataService;
44

5-
$retrievedValue = (new PersonalDataService($attributes['selectedSupplier']['value'] ?? ''))->get($attributes['selectedOption']['value'] ?? '');
5+
$retrievedValue = (new PersonalDataService($attributes['selectedSupplier']['value'] ?? ''))->get($attributes['selectedOption']['value'] ?? '', $attributes['goalBinding'] ?? '');
66

77
if ($attributes['isChildOfTable'] && ! empty($retrievedValue)) : ?>
88
<tr>

config/suppliers.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
declare(strict_types=1);
44

55
return [
6-
'enable-u' => 'EnableU',
7-
'openzaak' => 'OpenZaak',
8-
'pink-roccade' => 'PinkRoccade',
9-
'vrij-brp' => 'VrijBRP',
10-
'we-are-frank' => 'WeAreFrank'
6+
'mapping' => [
7+
'enable-u' => 'EnableU',
8+
'enable-u-v2' => 'EnableUV2',
9+
'openzaak' => 'OpenZaak',
10+
'pink-roccade' => 'PinkRoccade',
11+
'pink-roccade-v2' => 'PinkRoccadeV2',
12+
'vrij-brp' => 'VrijBRP',
13+
'we-are-frank' => 'WeAreFrank',
14+
]
1115
];

0 commit comments

Comments
 (0)