Merge branch '21121-cluster-activity' refs #21121
[arvados.git] / services / workbench2 / src / views-components / sharing-dialog / sharing-invitation-form.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { reduxForm } from 'redux-form';
6 import SharingInvitationFormComponent from './sharing-invitation-form-component';
7 import { SHARING_INVITATION_FORM_NAME } from 'store/sharing-dialog/sharing-dialog-types';
8 import { PermissionLevel } from 'models/permission';
9
10 interface InvitationFormData {
11     permissions: PermissionLevel;
12     invitedPeople: string[];
13 }
14
15 interface SaveProps {
16     onSave: () => void;
17 }
18
19 export const SharingInvitationForm =
20     reduxForm<InvitationFormData, SaveProps>({
21         form: SHARING_INVITATION_FORM_NAME,
22         initialValues: {
23             permissions: PermissionLevel.CAN_READ,
24             invitedPeople: [],
25         }
26     })(SharingInvitationFormComponent);