Skip to content

Commit

Permalink
👌 Applied PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Nov 8, 2024
1 parent 0a2569a commit f1886c5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,25 @@ export default {
type: 'object',
},
},
{
id: 'microsoft-graph',
label: 'Microsoft Graph (OneDrive/SharePoint)',
schema: {
type: 'object',
properties: {
folderPath: {
type: 'string',
minLength: 1,
title: 'maplocatie',
},
driveId: {
type: 'string',
minLength: 1,
title: 'drive-ID',
},
},
},
},
],
configuredBackends: [],
onChange: fn(),
Expand Down Expand Up @@ -535,6 +554,15 @@ export const ConfiguredBackends = {
backend: 'exception-demo',
options: {extraLine: 'Filled out option'},
},
{
key: 'backend9',
name: 'MS Graph',
backend: 'microsoft-graph',
options: {
folderPath: '/formSubmissions',
driveId: 'myDrive',
},
},
],
validationErrors: [
['form.registrationBackends.1.options.zgwApiGroup', 'You sure about this?'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const MSGraphOptionsForm = ({name, label, formData, onChange}) => {
numErrors={relevantErrors.length}
modalTitle={
<FormattedMessage
description="Demo registration options modal title"
defaultMessage="Plugin configuration: demo"
description="MS Graph registration options modal title"
defaultMessage="Plugin configuration: MS Graph"
/>
}
initialFormData={{extraLine: '', ...formData}}
initialFormData={{folderPath: '', driveId: '', ...formData}}
onSubmit={values => onChange({formData: values})}
modalSize=""
>
Expand All @@ -44,7 +44,8 @@ MSGraphOptionsForm.propTypes = {
name: PropTypes.string.isRequired,
label: PropTypes.node.isRequired,
formData: PropTypes.shape({
extraLine: PropTypes.string,
folderPath: PropTypes.string,
driveId: PropTypes.string,
}),
onChange: PropTypes.func.isRequired,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ OptionsConfiguration.propTypes = {
numErrors: PropTypes.number.isRequired,
initialFormData: PropTypes.object.isRequired,
onSubmit: PropTypes.func.isRequired,
modalSize: PropTypes.oneOf(['', 'small', 'large']),
};

export default OptionsConfiguration;
1 change: 1 addition & 0 deletions src/openforms/js/components/admin/modals/FormModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ FormModal.propTypes = {
closeModal: PropTypes.func.isRequired,
onFormSubmit: PropTypes.func,
children: PropTypes.node,
extraModifiers: PropTypes.arrayOf(PropTypes.oneOf(['small', 'large'])),
};

export default FormModal;

0 comments on commit f1886c5

Please sign in to comment.