| @@ -46,7 +46,7 @@ interface Props { | |||||
| auths: auth[]; | auths: auth[]; | ||||
| } | } | ||||
| const CreateUser: React.FC<Props> = async ({ rules, auths }) => { | |||||
| const CreateUser: React.FC<Props> = ({ rules, auths }) => { | |||||
| console.log(auths); | console.log(auths); | ||||
| const { t } = useTranslation("user"); | const { t } = useTranslation("user"); | ||||
| const formProps = useForm<UserInputs>(); | const formProps = useForm<UserInputs>(); | ||||
| @@ -219,20 +219,26 @@ const CreateUser: React.FC<Props> = async ({ rules, auths }) => { | |||||
| {tabIndex == 0 && <UserDetail />} | {tabIndex == 0 && <UserDetail />} | ||||
| {tabIndex === 1 && <AuthAllocation auths={auths!} />} | {tabIndex === 1 && <AuthAllocation auths={auths!} />} | ||||
| <Stack direction="row" justifyContent="flex-end" gap={1}> | <Stack direction="row" justifyContent="flex-end" gap={1}> | ||||
| <Button | |||||
| variant="text" | |||||
| startIcon={<RestartAlt />} | |||||
| onClick={resetForm} | |||||
| > | |||||
| {t("Reset")} | |||||
| </Button> | |||||
| <Button | |||||
| variant="outlined" | |||||
| startIcon={<Close />} | |||||
| onClick={handleCancel} | |||||
| > | |||||
| {t("Cancel")} | |||||
| </Button> | |||||
| <Button | |||||
| variant="text" | |||||
| startIcon={<RestartAlt />} | |||||
| onClick={(e) => { | |||||
| e.preventDefault(); | |||||
| e.stopPropagation(); | |||||
| resetForm(e); | |||||
| }} | |||||
| type="button" | |||||
| > | |||||
| {t("Reset")} | |||||
| </Button> | |||||
| <Button | |||||
| variant="outlined" | |||||
| startIcon={<Close />} | |||||
| onClick={handleCancel} | |||||
| type="button" | |||||
| > | |||||
| {t("Cancel")} | |||||
| </Button> | |||||
| <Button variant="contained" startIcon={<Check />} type="submit"> | <Button variant="contained" startIcon={<Check />} type="submit"> | ||||
| {t("Confirm")} | {t("Confirm")} | ||||
| </Button> | </Button> | ||||