Przeglądaj źródła

Merge branch 'bugfix/loading_spinner_google_login' of Neca/HRCenter into FE_dev

pull/53/head
safet.purkovic 3 lat temu
rodzic
commit
ab5ca8630c

+ 1
- 1
src/components/Selection/Selection.js Wyświetl plik

@@ -25,7 +25,7 @@ const Selection = (props) => {
const dropItem = (e, selId) => {
var data = e.dataTransfer.getData("text/plain");
const selectionProcess = JSON.parse(data);
if (selectionProcess.selectionLevelId !== selId) {
if (selectionProcess.selectionLevelId < selId) {
dispatch(setDoneProcessReq({
id: selectionProcess.id,
name: "radnom name",

+ 6
- 2
src/pages/LoginPage/LoginPageMUI.js Wyświetl plik

@@ -32,7 +32,7 @@ import { Visibility, VisibilityOff } from "@mui/icons-material";
import Backdrop from "../../components/MUI/BackdropComponent";
import ErrorMessage from "../../components/MUI/ErrorMessageComponent";
import { selectIsLoadingByActionType } from "../../store/selectors/loadingSelectors";
import { LOGIN_USER_LOADING } from "../../store/actions/login/loginActionConstants";
import { LOGIN_USER_LOADING, LOGIN_GOOGLE_USER_LOADING } from "../../store/actions/login/loginActionConstants";
import { authScopeStringGetHelper } from "../../util/helpers/authScopeHelpers";
import { JWT_TOKEN } from "../../constants/localStorage";
const LoginPage = ({ history }) => {
@@ -73,6 +73,10 @@ const LoginPage = ({ history }) => {
const isLoading = useSelector(
selectIsLoadingByActionType(LOGIN_USER_LOADING)
);
const isGoogleLoading = useSelector(
selectIsLoadingByActionType(LOGIN_GOOGLE_USER_LOADING)
);

const handleApiResponseSuccess = () => {
history.push({
@@ -170,7 +174,7 @@ const LoginPage = ({ history }) => {
onSubmit={formik.handleSubmit}
sx={{ position: "relative" }}
>
<Backdrop position="absolute" isLoading={isLoading} />
<Backdrop position="absolute" isLoading={isLoading || isGoogleLoading} />
<TextField
name="username"
label={t("common.labelUsername")}

+ 2
- 1
src/store/saga/loginSaga.js Wyświetl plik

@@ -21,6 +21,7 @@ import {
sendResetPassword
} from '../../request/loginRequest';
import {
fetchGoogleUserSuccess,
fetchUserError,
fetchUserSuccess,
forgetPasswordSuccess,
@@ -124,7 +125,7 @@ function* fetchGoogleUser({ payload }) {
yield call(addHeaderToken, data.token);
yield put(setUser(data));
}
yield put(fetchUserSuccess(data));
yield put(fetchGoogleUserSuccess(data));
if (payload.handleApiResponseSuccess) {
yield call(payload.handleApiResponseSuccess);
}

Ładowanie…
Anuluj
Zapisz