#
vincentlu
2025-02-14 fdc311475ee8b50b7d15011779e3afea1c129f7a
rsf-admin/src/page/login/Login.jsx
@@ -26,7 +26,7 @@
    const notify = useNotify();
    const login = useLogin();
    const location = useLocation();
    const { systemInfo, tenantList } = props;
    const { systemInfo: { mode }, tenantList } = props;
    const { control, handleSubmit, watch, setValue, getValues, setError, clearErrors } = useForm();
@@ -83,7 +83,8 @@
                component="form" onSubmit={handleSubmit(onSubmit)} noValidate
            >
                <Stack spacing={2}>
                    {/* <Controller
                    {mode === 'OFFLINE' && (
                        <Controller
                        name="tenantId"
                        control={control}
                        rules={{ required: true }}
@@ -111,7 +112,8 @@
                                />
                            );
                        }}
                    /> */}
                        />
                    )}
                    <Controller
                        name="username"
@@ -170,10 +172,7 @@
                    <Button
                        type="submit"
                        variant="contained"
                        disabled={loading || !(true && username && password)}
                        sx={{
                            // backgroundColor: "#3D4BA7"
                        }}
                        disabled={loading || !((mode === 'OFFLINE' ? tenantId : true) && username && password)}
                    >
                        {loading && <CircularProgress size={25} thickness={2} />}
                        {translate('page.login.button.login')}