From 3126061ab421c964aece718cfc130ff753545e75 Mon Sep 17 00:00:00 2001 From: Viktor van Wijk Date: Thu, 19 Dec 2024 17:07:32 +0100 Subject: [PATCH] :bulb: [#4908] Update TODOs --- .../registrations/json/fields/FormVariablesSelect.js | 2 ++ src/openforms/registrations/contrib/json/plugin.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/openforms/js/components/admin/form_design/registrations/json/fields/FormVariablesSelect.js b/src/openforms/js/components/admin/form_design/registrations/json/fields/FormVariablesSelect.js index b2841250bb..bd25d1e088 100644 --- a/src/openforms/js/components/admin/form_design/registrations/json/fields/FormVariablesSelect.js +++ b/src/openforms/js/components/admin/form_design/registrations/json/fields/FormVariablesSelect.js @@ -7,6 +7,8 @@ import FormRow from 'components/admin/forms/FormRow'; import ReactSelect from 'components/admin/forms/ReactSelect'; // TODO-4908: where to add already selected form variables from the variables table? +// TODO-4098: the select box does not change size when you add more form variables, which causes +// selected form variables to be hidden const FormVariablesSelect = ({options}) => { const [fieldProps, , fieldHelpers] = useField('formVariables'); const {setValue} = fieldHelpers; diff --git a/src/openforms/registrations/contrib/json/plugin.py b/src/openforms/registrations/contrib/json/plugin.py index d0aaf5dcf4..d0b2cd43f7 100644 --- a/src/openforms/registrations/contrib/json/plugin.py +++ b/src/openforms/registrations/contrib/json/plugin.py @@ -33,14 +33,14 @@ def register_submission(self, submission: Submission, options: OptionsT) -> None f.seek(0) values[attachment.form_key] = base64.b64encode(f.read()).decode() - # TODO-4908: what should the behaviour be when a form - # variable is not in the data or static variables? # Create static variables dict static_variables = get_static_variables(submission=submission) static_variables_dict = { variable.key: variable.initial_value for variable in static_variables } + # TODO-4908: what should the behaviour be when a form + # variable is not in the data or static variables? # Update values dict with relevant form data values.update({ form_variable: submission.data.get( @@ -54,12 +54,15 @@ def register_submission(self, submission: Submission, options: OptionsT) -> None # Send to the service json = {"values": values} service = options["service"] + # TODO-4098: is the service type relevant here? with build_client(service) as client: url = f"{client.base_url}{options['relative_api_endpoint']}" response = client.post(url, json=json, headers={"Content-Type": "application/json"}) response.raise_for_status() + print(response.json()) - # TODO-4908: does this need to be used? If so, what to put in spec? + # TODO-4908: does this need to be used (what does it even do, there is no documentation)? + # If so, what to put in spec? # result = execute_unless_result_exists( # partial( # client.post, @@ -73,6 +76,7 @@ def register_submission(self, submission: Submission, options: OptionsT) -> None # TODO-4908: added return for testing purposes return json - # TODO-4098: what to do in here? def check_config(self): + # TODO-4098: check if it's possible to connect to the service + # TODO-4098: check anything else? pass