Explorar el Código

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

pull/53/head
safet.purkovic hace 3 años
padre
commit
ab5ca8630c

+ 1
- 1
src/components/Selection/Selection.js Ver fichero

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

+ 6
- 2
src/pages/LoginPage/LoginPageMUI.js Ver fichero

import Backdrop from "../../components/MUI/BackdropComponent"; import Backdrop from "../../components/MUI/BackdropComponent";
import ErrorMessage from "../../components/MUI/ErrorMessageComponent"; import ErrorMessage from "../../components/MUI/ErrorMessageComponent";
import { selectIsLoadingByActionType } from "../../store/selectors/loadingSelectors"; 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 { authScopeStringGetHelper } from "../../util/helpers/authScopeHelpers";
import { JWT_TOKEN } from "../../constants/localStorage"; import { JWT_TOKEN } from "../../constants/localStorage";
const LoginPage = ({ history }) => { const LoginPage = ({ history }) => {
const isLoading = useSelector( const isLoading = useSelector(
selectIsLoadingByActionType(LOGIN_USER_LOADING) selectIsLoadingByActionType(LOGIN_USER_LOADING)
); );
const isGoogleLoading = useSelector(
selectIsLoadingByActionType(LOGIN_GOOGLE_USER_LOADING)
);


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

+ 2
- 1
src/store/saga/loginSaga.js Ver fichero

sendResetPassword sendResetPassword
} from '../../request/loginRequest'; } from '../../request/loginRequest';
import { import {
fetchGoogleUserSuccess,
fetchUserError, fetchUserError,
fetchUserSuccess, fetchUserSuccess,
forgetPasswordSuccess, forgetPasswordSuccess,
yield call(addHeaderToken, data.token); yield call(addHeaderToken, data.token);
yield put(setUser(data)); yield put(setUser(data));
} }
yield put(fetchUserSuccess(data));
yield put(fetchGoogleUserSuccess(data));
if (payload.handleApiResponseSuccess) { if (payload.handleApiResponseSuccess) {
yield call(payload.handleApiResponseSuccess); yield call(payload.handleApiResponseSuccess);
} }

Cargando…
Cancelar
Guardar