1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { reduxForm, reset } from 'redux-form';
6 import { PROJECT_PROPERTIES_FORM_NAME, createProjectProperty } from '~/store/details-panel/details-panel-action';
7 import { ResourcePropertiesForm, ResourcePropertiesFormData } from '~/views-components/resource-properties-form/resource-properties-form';
9 export const ProjectPropertiesForm = reduxForm<ResourcePropertiesFormData>({
10 form: PROJECT_PROPERTIES_FORM_NAME,
11 onSubmit: (data, dispatch) => {
12 dispatch<any>(createProjectProperty(data));
13 dispatch(reset(PROJECT_PROPERTIES_FORM_NAME));
15 })(ResourcePropertiesForm);