@@ -86,18 +86,18 @@ export function EntityForm({ onSave, actionLabel, entry }: EntityFormProps) {
86
86
return (
87
87
< form onSubmit = { f . onSubmit ( onSave ) } >
88
88
< Stack >
89
- < CarerSelect { ...f . getInputProps ( "carerId " ) } placeholder = { t . labelCarer } />
89
+ < CarerSelect { ...f . getInputProps ( "carer " ) } placeholder = { t . labelCarer } />
90
90
91
91
{ f . getValues ( ) . entryLanguages . map ( ( _ , index ) => (
92
92
// TODO: make key either languageId or name of new language entry
93
93
< Group key = { `entry-${ index } ` } justify = "stretch" >
94
- < NumberInput { ...f . getInputProps ( `languageEntries .${ index } .ratio` ) } max = { 100 } min = { 1 } w = { 80 } rightSection = "%" />
95
- < LanguageSelect { ...f . getInputProps ( `languageEntries .${ index } .languageId ` ) } flex = { 1 } placeholder = { t . labelLanguage } />
94
+ < NumberInput { ...f . getInputProps ( `entryLanguages .${ index } .ratio` ) } max = { 100 } min = { 1 } w = { 80 } rightSection = "%" />
95
+ < LanguageSelect { ...f . getInputProps ( `entryLanguages .${ index } .language ` ) } flex = { 1 } placeholder = { t . labelLanguage } />
96
96
{ ! ! index && (
97
97
< ActionIcon
98
98
variant = "light"
99
99
onClick = { ( ) => {
100
- f . removeListItem ( "languageEntries " , index ) ;
100
+ f . removeListItem ( "entryLanguages " , index ) ;
101
101
updateRatios ( ) ;
102
102
} }
103
103
>
@@ -112,9 +112,9 @@ export function EntityForm({ onSave, actionLabel, entry }: EntityFormProps) {
112
112
const currentRatio = getTotalRatio ( ) ;
113
113
114
114
if ( currentRatio < 100 ) {
115
- f . insertListItem ( "languageEntries " , { ratio : 100 - currentRatio } ) ;
115
+ f . insertListItem ( "entryLanguages " , { ratio : 100 - currentRatio } ) ;
116
116
} else {
117
- f . insertListItem ( "languageEntries " , { ratio : 0 } ) ;
117
+ f . insertListItem ( "entryLanguages " , { ratio : 0 } ) ;
118
118
updateRatios ( ) ;
119
119
}
120
120
} }
0 commit comments