@@ -7,15 +7,24 @@ import isArray from 'lodash/isArray';
7
7
import { PlusOutlined } from '@ant-design/icons' ;
8
8
9
9
import Topbar from '../../components/Topbar' ;
10
- import EventLevelForm from './Form ' ;
10
+ import SettingForm from '../../components/SettingForm ' ;
11
11
import NotificationForm from '../../components/NotificationForm' ;
12
12
import ListItemActions from '../../components/ListItemActions' ;
13
13
import ListItem from '../../components/ListItem' ;
14
14
import ItemList from '../../components/List' ;
15
15
import { notifyError , notifySuccess , truncateString } from '../../util' ;
16
16
import './styles.css' ;
17
17
18
- /* constants */
18
+ /* http actions */
19
+ const {
20
+ getEventLevelsExportUrl,
21
+ getFocalPeople,
22
+ getJurisdictions,
23
+ getPartyTopics,
24
+ getRoles,
25
+ getAgencies,
26
+ } = httpActions ;
27
+ /* redux actions */
19
28
const {
20
29
getEventLevels,
21
30
openEventLevelForm,
@@ -25,26 +34,18 @@ const {
25
34
deleteEventLevel,
26
35
refreshEventLevels,
27
36
paginateEventLevels,
37
+ postEventLevel,
38
+ putEventLevel,
28
39
} = reduxActions ;
40
+ /* constants */
41
+ const { confirm } = Modal ;
29
42
const nameSpan = { xxl : 4 , xl : 5 , lg : 6 , md : 7 , sm : 0 , xs : 0 } ;
30
43
const descriptionSpan = { xxl : 18 , xl : 17 , lg : 16 , md : 14 , sm : 20 , xs : 18 } ;
31
-
32
44
const headerLayout = [
33
45
{ ...nameSpan , header : 'Name' } ,
34
46
{ ...descriptionSpan , header : 'Description' } ,
35
47
] ;
36
48
37
- const {
38
- getEventLevelsExportUrl,
39
- getFocalPeople,
40
- getJurisdictions,
41
- getPartyTopics,
42
- getRoles,
43
- getAgencies,
44
- } = httpActions ;
45
-
46
- const { confirm } = Modal ;
47
-
48
49
/**
49
50
* @class
50
51
* @name EventLevels
@@ -142,6 +143,7 @@ class EventLevels extends Component {
142
143
* @since 0.1.0
143
144
*/
144
145
handleAfterCloseForm = ( ) => {
146
+ selectEventLevel ( null ) ;
145
147
this . setState ( { isEditForm : false } ) ;
146
148
} ;
147
149
@@ -346,11 +348,12 @@ class EventLevels extends Component {
346
348
maskClosable = { false }
347
349
afterClose = { this . handleAfterCloseForm }
348
350
>
349
- < EventLevelForm
351
+ < SettingForm
352
+ setting = { eventLevel }
350
353
posting = { posting }
351
- isEditForm = { isEditForm }
352
- eventLevel = { eventLevel }
353
354
onCancel = { this . closeEventLevelsForm }
355
+ onCreate = { postEventLevel }
356
+ onUpdate = { putEventLevel }
354
357
/>
355
358
</ Modal >
356
359
{ /* end create/edit form modal */ }
0 commit comments