mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
(ui) show required fields not filled in trainings settings
This commit is contained in:
parent
116475780f
commit
4a8e69a06e
@ -65,7 +65,7 @@ export const TrainingsSettings: React.FC<TrainingsSettingsProps> = ({ onError, o
|
||||
<div className="trainings-settings">
|
||||
<header>
|
||||
<h2>{t('app.admin.trainings_settings.title')}</h2>
|
||||
<FabButton onClick={handleSubmit(onSubmit)} className='save-btn is-main'>{t('app.admin.trainings_settings.save')}</FabButton>
|
||||
<FabButton onClick={() => handleSubmit(onSubmit)()} className='save-btn is-main'>{t('app.admin.trainings_settings.save')}</FabButton>
|
||||
</header>
|
||||
<form className="trainings-settings-content">
|
||||
<div className="settings-section">
|
||||
@ -124,6 +124,7 @@ export const TrainingsSettings: React.FC<TrainingsSettingsProps> = ({ onError, o
|
||||
type="number"
|
||||
register={register}
|
||||
rules={{ required: isActiveAuthorizationValidity, min: 1 }}
|
||||
nullable
|
||||
step={1}
|
||||
formState={formState}
|
||||
label={t('app.admin.trainings_settings.authorization_validity_period')} />
|
||||
@ -146,6 +147,7 @@ export const TrainingsSettings: React.FC<TrainingsSettingsProps> = ({ onError, o
|
||||
type="number"
|
||||
register={register}
|
||||
rules={{ required: isActiveInvalidationRule, min: 1 }}
|
||||
nullable
|
||||
step={1}
|
||||
formState={formState}
|
||||
label={t('app.admin.trainings_settings.validation_rule_period')} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user