Skip to content

Commit

Permalink
Merge pull request #17 from BlackBeltTechnology/feature/JNG-4446-visu…
Browse files Browse the repository at this point in the history
…alize-mandatory-attributes

JNG-4446 Visualize mandatory attributes in React clients
  • Loading branch information
Madmat8 authored Mar 6, 2023
2 parents bf43063 + 8996b9b commit 796b51a
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{ editMode
? (
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
name="{{ child.attributeType.name }}"
id="{{ getXMIID child }}"
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<DatePicker
renderInput={ (props: any) => (
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
{...props}
error={!!validation.get('{{ child.attributeType.name }}')}
helperText={validation.get('{{ child.attributeType.name }}')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<DateTimePicker
renderInput={ (props: any) => (
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
{...props}
error={!!validation.get('{{ child.attributeType.name }}')}
helperText={validation.get('{{ child.attributeType.name }}')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{# if child.hiddenBy }} { !data.{{ child.hiddenBy.name }} && {{/ if }}
<Grid item xs={12} sm={12} {{# neq (calculateSize child) 12.0 }}md={ {{ calculateSize child }} }{{/ neq }}>
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
name="{{ child.attributeType.name }}"
id="{{ getXMIID child }}"
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AggregationInput
name="{{ child.dataElement.name }}"
id="{{ getXMIID child }}"
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string }
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string {{# if child.attributeType.isRequired }} + " *" {{/ if }} }
labelList={[
{{# each child.parts as |part| }}
data.{{ child.dataElement.name }}?.{{ part.attributeType.name }}?.toString() ?? '',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{# if child.hiddenBy }} { !data.{{ child.hiddenBy.name }} && {{/ if }}
<Grid item xs={12} sm={12} {{# neq (calculateSize child) 12.0 }}md={ {{ calculateSize child }} }{{/ neq }}>
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
name="{{ child.attributeType.name }}"
id="{{ getXMIID child }}"
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{# if child.hiddenBy }} { !data.{{ child.hiddenBy.name }} && {{/ if }}
<Grid item xs={12} sm={12} {{# neq (calculateSize child) 12.0 }}md={ {{ calculateSize child }} }{{/ neq }}>
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
name="{{ child.attributeType.name }}"
id="{{ getXMIID child }}"
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{# if child.hiddenBy }} { !data.{{ child.hiddenBy.name }} && {{/ if }}
<Grid item xs={12} sm={12} {{# neq (calculateSize child) 12.0 }}md={ {{ calculateSize child }} }{{/ neq }}>
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
name="{{ child.attributeType.name }}"
id="{{ getXMIID child }}"
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{# if child.hiddenBy }} { !data.{{ child.hiddenBy.name }} && {{/ if }}
<Grid item xs={12} sm={12} {{# neq (calculateSize child) 12.0 }}md={ {{ calculateSize child }} }{{/ neq }}>
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
name="{{ child.attributeType.name }}"
id="{{ getXMIID child }}"
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TimePicker
renderInput={ (props: any) => (
<TextField
{{# if child.attributeType.isRequired }} required {{/ if }}
{...props}
error={!!validation.get('{{ child.attributeType.name }}')}
helperText={validation.get('{{ child.attributeType.name }}')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TrinaryLogicCombobox
name="{{ child.attributeType.name }}"
id="{{ getXMIID child }}"
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string }
label={ t('{{ idToTranslationKey child.fQName application }}', { defaultValue: '{{ child.label }}' }) as string {{# if child.attributeType.isRequired }} + " *" {{/ if }} }
value={ data?.{{ child.attributeType.name }} }
error={ !!validation.get('{{ child.attributeType.name }}') }
helperText={ validation.get('{{ child.attributeType.name }}') }
Expand Down

0 comments on commit 796b51a

Please sign in to comment.