1
1
import React from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
- // import isEmpty from 'lodash/isEmpty';
4
3
import get from 'lodash/get' ;
5
4
import { Button , Input , Form , Row , Col } from 'antd' ;
6
5
import { httpActions } from '@codetanzania/ewea-api-client' ;
@@ -47,7 +46,7 @@ const MESSAGE_PUT_ERROR =
47
46
* @description Form for create and edit administrative area
48
47
* @param {object } props Valid form properties
49
48
* @param {object } props.administrativeArea Valid administrative area object
50
- * @param {boolean } props.isEditForm Flag wether form is on edit mode
49
+ * @param {boolean } props.isEditForm Flag whether form is on edit mode
51
50
* @param {boolean } props.posting Flag whether form is posting data
52
51
* @param {Function } props.onCancel Form cancel callback
53
52
* @returns {object } AdministrativeAreaForm component
@@ -130,7 +129,7 @@ const AdministrativeAreaForm = ({
130
129
>
131
130
{ /* start: name & code */ }
132
131
< Row justify = "space-between" >
133
- { /* start:code */ }
132
+ { /* start:name */ }
134
133
< Col span = { 11 } >
135
134
< Form . Item
136
135
label = "Name"
@@ -258,6 +257,7 @@ AdministrativeAreaForm.propTypes = {
258
257
administrativeArea : PropTypes . shape ( {
259
258
_id : PropTypes . string ,
260
259
strings : PropTypes . shape ( {
260
+ code : PropTypes . string ,
261
261
name : PropTypes . shape ( {
262
262
en : PropTypes . string . isRequired ,
263
263
} ) ,
@@ -269,6 +269,9 @@ AdministrativeAreaForm.propTypes = {
269
269
weight : PropTypes . number . isRequired ,
270
270
} ) ,
271
271
relations : PropTypes . shape ( {
272
+ level : PropTypes . shape ( {
273
+ _id : PropTypes . string ,
274
+ } ) ,
272
275
parent : PropTypes . shape ( {
273
276
_id : PropTypes . string ,
274
277
} ) ,
0 commit comments