-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Product to the ZGW API registration #4803
Add Product to the ZGW API registration #4803
Conversation
9e24349
to
135ff90
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4803 +/- ##
==========================================
- Coverage 96.58% 96.57% -0.01%
==========================================
Files 748 749 +1
Lines 25477 25531 +54
Branches 3368 3376 +8
==========================================
+ Hits 24606 24656 +50
- Misses 608 612 +4
Partials 263 263 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
63d8e50
to
f3c7954
Compare
src/openforms/js/components/admin/form_design/registrations/zgw/ZGWOptionsFormFields.stories.js
Show resolved
Hide resolved
1b0eee6
to
3574ee1
Compare
03d0f12
to
4e229c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest renaming product
-> product_url
everywhere so that it's clear we're dealing with a URL. Especially because we're moving literal URL-configuration options to their semantic 'description' and resolve URLs dynamically, I suspect we will go through this at some point too (where maybe a product slug/description will be stored instead of the exact URL).
src/openforms/js/components/admin/form_design/registrations/zgw/fields/ProductSelect.js
Outdated
Show resolved
Hide resolved
src/openforms/js/components/admin/form_design/registrations/zgw/fields/ProductSelect.js
Outdated
Show resolved
Hide resolved
1d5d05f
to
a280f43
Compare
src/openforms/js/components/admin/form_design/registrations/zgw/BasicOptionsFieldset.js
Outdated
Show resolved
Hide resolved
src/openforms/js/components/admin/form_design/registrations/zgw/fields/ProductSelect.js
Outdated
Show resolved
Hide resolved
src/openforms/registrations/contrib/zgw_apis/tests/test_api_endpoints.py
Outdated
Show resolved
Hide resolved
src/openforms/registrations/contrib/zgw_apis/tests/test_api_endpoints.py
Outdated
Show resolved
Hide resolved
29da83e
to
fbd9f70
Compare
products.append( | ||
Product( | ||
url=case_type_product["url"], | ||
description=case_type_product["description"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you address this type checker error? I would opt to make the key required in the product, if it's missing from the upstream API, you can default it to an empty string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% happy with how the catalogueUrl
now is passed around/calculated, but I won't let it block this PR since my #4606 UX ticket will touch that code anyway, so I'll play around with it in my future PR.
Once the type checking error is addressed, we can merge this.
fbd9f70
to
bdc3ec4
Compare
4079598
to
73d4b26
Compare
73d4b26
to
a50050b
Compare
Closes #4796
Changes
Added product as a configuration option to the ZGW API registration. The product select gets populated from the selected case type. If there are multiple versions of the case type, then the case type version that is active at the moment of configuring is chosen.
Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Commit hygiene