Skip to content

Commit e879918

Browse files
committed
feat: add required fields label in create eservice steps
1 parent ddb1195 commit e879918

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pages/ProviderEServiceCreatePage/ProviderEServiceCreate.page.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import type { EServiceMode } from '@/api/api.generatedTypes'
3333
import { useQuery } from '@tanstack/react-query'
3434
import { EServiceCreateFromTemplateStepPurpose } from './components/EServiceCreateStepPurpose/EServiceCreateFromTemplateStepPurpose'
3535
import { EServiceTemplateQueries } from '@/api/eserviceTemplate'
36+
import { Typography } from '@mui/material'
3637

3738
const ProviderEServiceCreatePage: React.FC = () => {
3839
const { t } = useTranslation('eservice')
@@ -145,6 +146,15 @@ const ProviderEServiceCreatePage: React.FC = () => {
145146
}}
146147
isLoading={!isReady}
147148
>
149+
<Typography
150+
sx={{
151+
fontSize: 16,
152+
fontWeight: 700,
153+
color: 'text.secondary',
154+
}}
155+
>
156+
{t('create.requiredLabel')}
157+
</Typography>
148158
<Stepper steps={steps} activeIndex={activeStep} />
149159
{isReady && (
150160
<EServiceCreateContextProvider

src/pages/ProviderEServiceCreatePage/components/EServiceCreateStepGeneral/EServiceCreateStepGeneral.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export const EServiceCreateStepGeneral: React.FC = () => {
190190
inputProps={{ maxLength: 60 }}
191191
size="small"
192192
sx={{ width: '49%', my: 0, mt: 1 }}
193+
required
193194
/>
194195

195196
<RHFTextField
@@ -202,6 +203,7 @@ export const EServiceCreateStepGeneral: React.FC = () => {
202203
inputProps={{ maxLength: 250 }}
203204
rules={!eserviceTemplate ? { required: true, minLength: 10 } : undefined}
204205
sx={{ mb: 0, mt: 3 }}
206+
required
205207
/>
206208

207209
<RHFRadioGroup

src/static/locales/en/eservice.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"backToEServiceBtn": "Back to the e-service",
44
"create": {
55
"emptyTitle": "Create e-service",
6+
"requiredLabel": "*Required fields.",
67
"stepper": {
78
"step1Label": "General",
89
"step2Label": "Version",

src/static/locales/it/eservice.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"backToEServiceBtn": "Torna all'e-service",
44
"create": {
55
"emptyTitle": "Crea e-service",
6+
"requiredLabel": "*Campi obbligatori.",
67
"stepper": {
78
"step1Label": "Generale",
89
"step2Label": "Versione",

0 commit comments

Comments
 (0)