@@ -12,7 +12,9 @@ import {
12
12
CCardBody ,
13
13
} from '@coreui/react'
14
14
import { Form } from 'react-final-form'
15
- import { RFFCFormInput , RFFCFormSelect } from 'src/components/forms'
15
+ import { RFFCFormInput , RFFCFormSelect , RFFCFormTextarea } from 'src/components/forms'
16
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
17
+ import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
16
18
import { CippPage } from 'src/components/layout/CippPage'
17
19
import { useLazyGenericPostRequestQuery } from 'src/store/api/app'
18
20
import { useListDomainsQuery } from 'src/store/api/domains'
@@ -33,6 +35,7 @@ const AddSharedMailbox = () => {
33
35
domain : values . domain ,
34
36
displayName : values . displayName ,
35
37
username : values . username ,
38
+ addedAliases : values . addedAliases ,
36
39
}
37
40
//window.alert(JSON.stringify(shippedValues))
38
41
genericPostRequest ( { path : '/api/AddSharedMailbox' , values : shippedValues } )
@@ -74,16 +77,32 @@ const AddSharedMailbox = () => {
74
77
) }
75
78
{ domainsError && < span > Failed to load list of domains</ span > }
76
79
</ CCol >
80
+ < CCol xs = { 12 } >
81
+ < RFFCFormTextarea
82
+ type = "text"
83
+ name = "addedAliases"
84
+ label = "Aliases"
85
+ placeholder = "Enter one alias per line"
86
+ disabled = { submitting }
87
+ />
88
+ </ CCol >
77
89
</ CRow >
78
90
< CRow className = "mb-3" >
79
91
< CCol md = { 6 } >
80
92
< CButton type = "submit" disabled = { submitting } >
81
93
Add Shared Mailbox
94
+ { postResults . isFetching && (
95
+ < FontAwesomeIcon icon = { faCircleNotch } spin className = "ms-2" size = "1x" />
96
+ ) }
82
97
</ CButton >
83
98
</ CCol >
84
99
</ CRow >
85
100
{ postResults . isSuccess && (
86
- < CCallout color = "success" > { postResults . data . Results } </ CCallout >
101
+ < CCallout color = "success" >
102
+ { postResults . data . Results . map ( ( message , idx ) => {
103
+ return < li key = { idx } > { message } </ li >
104
+ } ) }
105
+ </ CCallout >
87
106
) }
88
107
</ CForm >
89
108
)
0 commit comments