@@ -342,63 +342,66 @@ const WorkflowEditionDrawer = ({ selectedElement, onClose }: WorkflowEditionDraw
342342 component = { TextField }
343343 variant = "standard"
344344 name = "event"
345- label = { t_i18n ( 'Event name' ) }
345+ label = { t_i18n ( 'Transition name' ) }
346346 fullWidth
347347 />
348+
349+ { /* Conditions */ }
348350 < div style = { { display : 'flex' , alignItems : 'center' } } >
349351 < Typography variant = "h3" sx = { { m : 0 } } >
350- { t_i18n ( 'Actions ' ) }
352+ { t_i18n ( 'Conditions ' ) }
351353 </ Typography >
352- < ActionMenuButton onAddObject = { onAddObject } setFieldValue = { setFieldValue } values = { values } type = "actions" />
354+ < IconButton
355+ color = "secondary"
356+ aria-label = "Add"
357+ onClick = { ( ) => onAddObject ( 'conditions' , '' , setFieldValue , values ) }
358+ >
359+ < Add fontSize = "small" />
360+ </ IconButton >
353361 </ div >
354362 < FieldArray
355- name = "actions "
363+ name = "conditions "
356364 render = { ( arrayHelpers ) => (
357365 < >
358- { values . actions ?. map ( ( _ , idx : number ) => (
366+ { values . conditions ?. map ( ( _ , idx : number ) => (
359367 < div
360- key = { `action -${ idx } ` }
368+ key = { `condition -${ idx } ` }
361369 style = { { display : 'flex' } }
362370 >
363371 < Field
364372 component = { WorkflowFields }
365- name = { `actions [${ idx } ]` }
373+ name = { `conditions [${ idx } ]` }
366374 index = { idx }
367- prefixLabel = "action_ "
375+ prefixLabel = "condition_ "
368376 onDelete = { ( ) => arrayHelpers . remove ( idx ) }
369377 />
370378 </ div >
371379 ) ) }
372380 </ >
373381 ) }
374382 />
375- { /* Conditions */ }
383+
384+ { /* Actions */ }
376385 < div style = { { display : 'flex' , alignItems : 'center' } } >
377386 < Typography variant = "h3" sx = { { m : 0 } } >
378- { t_i18n ( 'Conditions ' ) }
387+ { t_i18n ( 'Actions ' ) }
379388 </ Typography >
380- < IconButton
381- color = "secondary"
382- aria-label = "Add"
383- onClick = { ( ) => onAddObject ( 'conditions' , '' , setFieldValue , values ) }
384- >
385- < Add fontSize = "small" />
386- </ IconButton >
389+ < ActionMenuButton onAddObject = { onAddObject } setFieldValue = { setFieldValue } values = { values } type = "actions" />
387390 </ div >
388391 < FieldArray
389- name = "conditions "
392+ name = "actions "
390393 render = { ( arrayHelpers ) => (
391394 < >
392- { values . conditions ?. map ( ( _ , idx : number ) => (
395+ { values . actions ?. map ( ( _ , idx : number ) => (
393396 < div
394- key = { `condition -${ idx } ` }
397+ key = { `action -${ idx } ` }
395398 style = { { display : 'flex' } }
396399 >
397400 < Field
398401 component = { WorkflowFields }
399- name = { `conditions [${ idx } ]` }
402+ name = { `actions [${ idx } ]` }
400403 index = { idx }
401- prefixLabel = "condition_ "
404+ prefixLabel = "action_ "
402405 onDelete = { ( ) => arrayHelpers . remove ( idx ) }
403406 />
404407 </ div >
0 commit comments