@@ -39,8 +39,16 @@ const Rule = (props) => {
39
39
changeParameters = ( ) => { } ,
40
40
editGroup = ( ) => { } ,
41
41
controlledParameters = false ,
42
+ isNetworkAttached = false ,
42
43
} = props ;
43
- const { type, composition, mappedModel, setGroup, groupType } = rule ;
44
+ const {
45
+ type,
46
+ composition,
47
+ mappedModel,
48
+ setGroup,
49
+ groupType,
50
+ matches = [ ] ,
51
+ } = rule ;
44
52
const classes = useStyles ( isRuleValid ) ;
45
53
// TODO intl
46
54
const equipmentLabel = 'Each' ;
@@ -53,7 +61,8 @@ const Rule = (props) => {
53
61
const useBasicModeLabel = 'Use simple filters mode' ;
54
62
const useAdvancedModeLabel = 'Use advanced filters mode' ;
55
63
const unusedFiltersLabel = 'You have unused filter(s)' ;
56
-
64
+ const matchesLabel = 'matched network equipments' ;
65
+ const noMatchesLabel = 'None' ;
57
66
const onChangeComposition = ( event ) => {
58
67
changeComposition ( event . target . value ) ;
59
68
} ;
@@ -154,6 +163,24 @@ const Rule = (props) => {
154
163
editGroup = { editGroup }
155
164
controlledParameters = { controlledParameters }
156
165
/>
166
+ { isNetworkAttached && (
167
+ < Paper className = { classes . matches } >
168
+ < Grid container >
169
+ < Grid item xs = { 4 } >
170
+ < Typography variant = "h6" >
171
+ { `${ matchesLabel } :` }
172
+ </ Typography >
173
+ </ Grid >
174
+ < Grid item xs = { 8 } >
175
+ < Typography >
176
+ { matches . length > 0
177
+ ? `${ matches . join ( ', ' ) } `
178
+ : noMatchesLabel }
179
+ </ Typography >
180
+ </ Grid >
181
+ </ Grid >
182
+ </ Paper >
183
+ ) }
157
184
</ Paper >
158
185
) ;
159
186
} ;
@@ -174,6 +201,7 @@ Rule.propTypes = {
174
201
changeParameters : PropTypes . func . isRequired ,
175
202
editGroup : PropTypes . func . isRequired ,
176
203
controlledParameters : PropTypes . bool ,
204
+ isNetworkAttached : PropTypes . bool ,
177
205
} ;
178
206
179
207
export default Rule ;
0 commit comments