Skip to content

Commit 65c41a9

Browse files
Added Radio button for personal data
1 parent 9769962 commit 65c41a9

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/components/dialogs/DialogTenantKindPurposeTemplate.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { useTranslation } from 'react-i18next'
1313
import { useDialog } from '@/stores'
1414
import type { DialogTenantKindPurposeTemplateProps } from '@/types/dialog.types'
15-
import { RHFAutocompleteSingle } from '../shared/react-hook-form-inputs'
15+
import { RHFAutocompleteSingle, RHFRadioGroup } from '../shared/react-hook-form-inputs'
1616
import { FormProvider, useForm } from 'react-hook-form'
1717
import type { PurposeTemplateSeed, TenantKind } from '@/api/api.generatedTypes'
1818

@@ -60,6 +60,17 @@ export const DialogTenantKindPurposeTemplate: React.FC<DialogTenantKindPurposeTe
6060
},
6161
]
6262

63+
const optionsPersonalData: Array<{ label: string; value: string }> = [
64+
{
65+
label: t('content.personalDataRadioBtn.options.true'),
66+
value: 'true',
67+
},
68+
{
69+
label: t('content.personalDataRadioBtn.options.false'),
70+
value: 'false',
71+
},
72+
]
73+
6374
return (
6475
<Dialog
6576
open
@@ -73,7 +84,7 @@ export const DialogTenantKindPurposeTemplate: React.FC<DialogTenantKindPurposeTe
7384
<Box component="form" noValidate onSubmit={onSubmit}>
7485
<DialogTitle id={ariaLabelId}>{t('title')}</DialogTitle>
7586
<DialogContent>
76-
<Stack spacing={2}>
87+
<Stack spacing={3}>
7788
<Typography variant="body1">{t('content.description')}</Typography>
7889
<RHFAutocompleteSingle
7990
sx={{ my: 0 }}
@@ -82,6 +93,13 @@ export const DialogTenantKindPurposeTemplate: React.FC<DialogTenantKindPurposeTe
8293
label={t('content.label')}
8394
rules={{ required: true }}
8495
/>
96+
<RHFRadioGroup
97+
name="personalData"
98+
options={optionsPersonalData}
99+
label={t('content.personalDataRadioBtn.label')}
100+
rules={{ required: true }}
101+
row
102+
/>
85103
</Stack>
86104
</DialogContent>
87105
<DialogActions>

0 commit comments

Comments
 (0)