Skip to content

Commit cca5c07

Browse files
authored
Fix change naming way limit sets (#3503)
--------- Signed-off-by: basseche <[email protected]>
1 parent efc837a commit cca5c07

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/components/dialogs/limits/limits-pane-utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ const currentLimitsValidationSchema = () => ({
8181
[TEMPORARY_LIMITS]: yup
8282
.array()
8383
.of(temporaryLimitsValidationSchema())
84-
.required()
8584
.test('distinctNames', 'TemporaryLimitNameUnicityError', (array) => {
8685
const namesArray = !array
8786
? []

src/components/dialogs/limits/limits-side-pane.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,12 @@ export function LimitsSidePane({
235235
sx={{ paddingBottom: '15px' }}
236236
>
237237
<Grid item xs={4}>
238-
<TextInput name={`${name}.${NAME}`} label="name" formProps={{ error: !!error?.message }} />
238+
<TextInput
239+
name={`${name}.${NAME}`}
240+
label="name"
241+
formProps={error?.message ? { error: true } : {}}
242+
disabled={disabled}
243+
/>
239244
</Grid>
240245
<Grid item xs={4}>
241246
<SelectInput

src/components/dialogs/limits/operational-limits-group-tab-label.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export function OperationalLimitsGroupTabLabel({
3737
const { errors } = useFormState<LimitsFormSchema>({ name: `${LIMITS}.${OPERATIONAL_LIMITS_GROUPS}` });
3838

3939
const hasError =
40+
errors?.limits?.operationalLimitsGroups?.[index]?.name?.message ||
4041
errors?.limits?.operationalLimitsGroups?.[index]?.currentLimits?.permanentLimit?.message ||
4142
errors?.limits?.operationalLimitsGroups?.[index]?.[OLG_IS_DUPLICATE]?.message;
4243

0 commit comments

Comments
 (0)