update for offstage logout, minor updates
This commit is contained in:
parent
094be65a16
commit
963bd4cdb0
@ -156,9 +156,13 @@ export const logout = ({ dispatch, redirect = true }) =>
|
|||||||
dispatch({ type: actionTypes.AUTH, data: { logged: false, observer: false } });
|
dispatch({ type: actionTypes.AUTH, data: { logged: false, observer: false } });
|
||||||
dispatch({ type: actionTypes.USER, data: {} });
|
dispatch({ type: actionTypes.USER, data: {} });
|
||||||
dispatch({ type: actionTypes.COMPANY, data: {} });
|
dispatch({ type: actionTypes.COMPANY, data: {} });
|
||||||
dispatch({ type: actionTypes.CONTRACTS_INFO_RESET, data: {} });
|
|
||||||
dispatch({ type: actionTypes.EVENTS_RESET, data: {} });
|
dispatch({ type: actionTypes.EVENTS_RESET, data: {} });
|
||||||
dispatch({ type: actionTypes.SUPPORT_RESET, data: {} });
|
dispatch({ type: actionTypes.SUPPORT_RESET, data: {} });
|
||||||
|
dispatch({ type: actionTypes.CONTRACTS_INFO_RESET, data: {} });
|
||||||
|
dispatch({ type: actionTypes.CONTRACT_EVENTS_RESET, data: {} });
|
||||||
|
dispatch({ type: actionTypes.CONTRACT_FINES_RESET, data: {} });
|
||||||
|
|
||||||
|
window.store.__persistor.purge();
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
if(redirect)
|
if(redirect)
|
||||||
|
|||||||
@ -24,10 +24,12 @@ if(process.browser)
|
|||||||
|
|
||||||
export const getEvents = ({ dispatch, type, contract }) =>
|
export const getEvents = ({ dispatch, type, contract }) =>
|
||||||
{
|
{
|
||||||
console.log("getEvents", `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/events`);
|
console.log("ACTION", "getEvents()");
|
||||||
|
|
||||||
return new Promise((resolve, reject) =>
|
return new Promise((resolve, reject) =>
|
||||||
{
|
{
|
||||||
|
console.log("global.store.getState()", global.store.getState());
|
||||||
|
|
||||||
if(global.store.getState().events.list === undefined)
|
if(global.store.getState().events.list === undefined)
|
||||||
{
|
{
|
||||||
axios.post(`${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/events`, {}, {
|
axios.post(`${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/events`, {}, {
|
||||||
|
|||||||
@ -59,7 +59,7 @@ export const setAppealsRead = ({ dispatch, appeals }) =>
|
|||||||
|
|
||||||
export const getAppeals = ({ dispatch }) =>
|
export const getAppeals = ({ dispatch }) =>
|
||||||
{
|
{
|
||||||
console.log("ACTION", "support", "getAppeals", `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/support/appeals`);
|
console.log("ACTION", "support", "getAppeals()", `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/support/appeals`);
|
||||||
|
|
||||||
return new Promise((resolve, reject) =>
|
return new Promise((resolve, reject) =>
|
||||||
{
|
{
|
||||||
@ -68,12 +68,7 @@ export const getAppeals = ({ dispatch }) =>
|
|||||||
})
|
})
|
||||||
.then((response) =>
|
.then((response) =>
|
||||||
{
|
{
|
||||||
console.log("getEvents", "response", response.data);
|
console.log("ACTION", "support", "getAppeals()", "response", response.data);
|
||||||
const events = response.data;
|
|
||||||
const filtered_events = [];
|
|
||||||
|
|
||||||
console.log("events");
|
|
||||||
console.log(events);
|
|
||||||
|
|
||||||
dispatch({ type: actionTypes.SUPPORT_APPEALS, data: { appeals: { list: response.data.appeals, new: response.data.new, } } });
|
dispatch({ type: actionTypes.SUPPORT_APPEALS, data: { appeals: { list: response.data.appeals, new: response.data.new, } } });
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
@ -21,8 +21,7 @@ export default async function handler(req, res)
|
|||||||
var client_jwt_decoded = jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT);
|
var client_jwt_decoded = jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT);
|
||||||
var crm_jwt = jwt.sign(client_jwt_decoded, process.env.JWT_SECRET_CRM, { noTimestamp: true });
|
var crm_jwt = jwt.sign(client_jwt_decoded, process.env.JWT_SECRET_CRM, { noTimestamp: true });
|
||||||
|
|
||||||
console.log("client_jwt_decoded");
|
console.log("API", "events", "client_jwt_decoded", client_jwt_decoded);
|
||||||
console.log(client_jwt_decoded);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,25 +8,17 @@ import { cors } from '../../../lib/cors';
|
|||||||
|
|
||||||
export default async function handler(req, res)
|
export default async function handler(req, res)
|
||||||
{
|
{
|
||||||
console.log("API\n\n\n\n\n\n\n");
|
|
||||||
console.log("API", "file", "image");
|
|
||||||
|
|
||||||
await cors(req, res);
|
await cors(req, res);
|
||||||
|
|
||||||
if(req.headers.cookie !== undefined)
|
if(req.headers.cookie !== undefined)
|
||||||
{
|
{
|
||||||
console.log("api 1");
|
|
||||||
const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : "");
|
const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : "");
|
||||||
|
|
||||||
if(cookies.jwt !== undefined && cookies.jwt !== null)
|
if(cookies.jwt !== undefined && cookies.jwt !== null)
|
||||||
{
|
{
|
||||||
console.log("api 2");
|
|
||||||
var client_jwt_decoded = jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT);
|
var client_jwt_decoded = jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT);
|
||||||
var crm_jwt = jwt.sign(client_jwt_decoded, process.env.JWT_SECRET_CRM, { noTimestamp: true });
|
var crm_jwt = jwt.sign(client_jwt_decoded, process.env.JWT_SECRET_CRM, { noTimestamp: true });
|
||||||
|
|
||||||
console.log("api 3");
|
|
||||||
console.log("API", "file", "image", "/file/GetImage", "req.query.id", req.query.id);
|
|
||||||
|
|
||||||
await axios.get(`${ process.env.CRM_API_HOST }/file/GetImage`, {
|
await axios.get(`${ process.env.CRM_API_HOST }/file/GetImage`, {
|
||||||
params: { id: req.query.id },
|
params: { id: req.query.id },
|
||||||
responseType: 'arraybuffer',
|
responseType: 'arraybuffer',
|
||||||
@ -38,13 +30,8 @@ export default async function handler(req, res)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
console.log("crm_response.data");
|
|
||||||
console.log(crm_response.data);
|
|
||||||
const base64image = `data:${ crm_response['headers']['content-type'] };base64,${ Buffer.from(crm_response.data, 'binary').toString('base64') }`;
|
const base64image = `data:${ crm_response['headers']['content-type'] };base64,${ Buffer.from(crm_response.data, 'binary').toString('base64') }`;
|
||||||
|
|
||||||
console.log("base64image");
|
|
||||||
console.log(base64image);
|
|
||||||
|
|
||||||
res.status(200).send(base64image);
|
res.status(200).send(base64image);
|
||||||
}
|
}
|
||||||
catch(e)
|
catch(e)
|
||||||
@ -66,6 +53,6 @@ export default async function handler(req, res)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console.log("WTF?!?!?!!?");
|
res.status(403);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,10 +33,12 @@ class Header extends React.Component
|
|||||||
|
|
||||||
componentDidMount()
|
componentDidMount()
|
||||||
{
|
{
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
|
||||||
console.log("Header", "CDM");
|
console.log("Header", "CDM");
|
||||||
getEvents({ dispatch: this.props.dispatch });
|
getEvents({ dispatch });
|
||||||
console.log("Header", "CDM", "222222");
|
console.log("Header", "CDM", "222222");
|
||||||
getAppeals({ dispatch: this.props.dispatch });
|
getAppeals({ dispatch });
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState)
|
componentDidUpdate(prevProps, prevState)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export default class MainHeader extends React.Component
|
|||||||
{
|
{
|
||||||
const { logo_url } = this.props;
|
const { logo_url } = this.props;
|
||||||
|
|
||||||
console.log("Header", "this.props", this.props);
|
console.log("MainHeader", "this.props", this.props);
|
||||||
return (
|
return (
|
||||||
<header>
|
<header>
|
||||||
<div className="container">
|
<div className="container">
|
||||||
|
|||||||
@ -323,6 +323,18 @@ class SumSelector extends React.Component
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_handle_onMin = () =>
|
||||||
|
{
|
||||||
|
const { min } = this.state;
|
||||||
|
this.setState({ value: min });
|
||||||
|
}
|
||||||
|
|
||||||
|
_handle_onMax = () =>
|
||||||
|
{
|
||||||
|
const { max } = this.state;
|
||||||
|
this.setState({ value: max });
|
||||||
|
}
|
||||||
|
|
||||||
_handle_onMobileHelp = () =>
|
_handle_onMobileHelp = () =>
|
||||||
{
|
{
|
||||||
if(window.innerWidth < 768)
|
if(window.innerWidth < 768)
|
||||||
@ -341,8 +353,8 @@ class SumSelector extends React.Component
|
|||||||
<label style={ option.disable ? { opacity: 0.5 } : {} }>Изменить сумму платежа</label>
|
<label style={ option.disable ? { opacity: 0.5 } : {} }>Изменить сумму платежа</label>
|
||||||
<div className="input_with_notes" style={ option.disable ? { opacity: 0.5 } : {} }>
|
<div className="input_with_notes" style={ option.disable ? { opacity: 0.5 } : {} }>
|
||||||
<input type="number" placeholder="Укажите сумму" defaultValue={ value } disabled={ option.disable ? true : false } onChange={ this._handle_onChange }/>
|
<input type="number" placeholder="Укажите сумму" defaultValue={ value } disabled={ option.disable ? true : false } onChange={ this._handle_onChange }/>
|
||||||
<span>от { numeral(min).format(' ., ') } ₽</span>
|
<span className="interactive" style={{ textDecoration: "underline" }} onClick={ this._handle_onMin }>от { numeral(min).format(' ., ') } ₽</span>
|
||||||
<span>до { numeral(max).format(' ., ') } ₽</span>
|
<span className="interactive" style={{ textDecoration: "underline" }} onClick={ this._handle_onMax }>до { numeral(max).format(' ., ') } ₽</span>
|
||||||
</div>
|
</div>
|
||||||
{ option.information !== undefined && option.information !== null && (
|
{ option.information !== undefined && option.information !== null && (
|
||||||
<div className="help_tooltip">
|
<div className="help_tooltip">
|
||||||
@ -420,6 +432,18 @@ class InsurancePriceSelector extends React.Component
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_handle_onMin = () =>
|
||||||
|
{
|
||||||
|
const { min } = this.state;
|
||||||
|
this.setState({ value: min });
|
||||||
|
}
|
||||||
|
|
||||||
|
_handle_onMax = () =>
|
||||||
|
{
|
||||||
|
const { max } = this.state;
|
||||||
|
this.setState({ value: max });
|
||||||
|
}
|
||||||
|
|
||||||
_handle_onMobileHelp = () =>
|
_handle_onMobileHelp = () =>
|
||||||
{
|
{
|
||||||
if(window.innerWidth < 768)
|
if(window.innerWidth < 768)
|
||||||
@ -442,8 +466,8 @@ class InsurancePriceSelector extends React.Component
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<input type="number" placeholder="Укажите сумму" defaultValue={ value } disabled={ option.disable ? true : false } onChange={ this._handle_onChange }/>
|
<input type="number" placeholder="Укажите сумму" defaultValue={ value } disabled={ option.disable ? true : false } onChange={ this._handle_onChange }/>
|
||||||
<span>от { numeral(min).format(' ., ') } ₽</span>
|
<span className="interactive" style={{ textDecoration: "underline" }} onClick={ this._handle_onMin }>от { numeral(min).format(' ., ') } ₽</span>
|
||||||
<span>до { numeral(max).format(' ., ') } ₽</span>
|
<span className="interactive" style={{ textDecoration: "underline" }} onClick={ this._handle_onMax }>до { numeral(max).format(' ., ') } ₽</span>
|
||||||
</>
|
</>
|
||||||
) }
|
) }
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -14,6 +14,7 @@ class InnerMenu extends React.Component
|
|||||||
loaded: false,
|
loaded: false,
|
||||||
loading: true,
|
loading: true,
|
||||||
menuOpened: false,
|
menuOpened: false,
|
||||||
|
events_loaded: false,
|
||||||
contracts_info: {},
|
contracts_info: {},
|
||||||
contract_events: {},
|
contract_events: {},
|
||||||
contract_fines: {},
|
contract_fines: {},
|
||||||
@ -23,6 +24,7 @@ class InnerMenu extends React.Component
|
|||||||
static getDerivedStateFromProps(nextProps, prevState)
|
static getDerivedStateFromProps(nextProps, prevState)
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
|
events_loaded: nextProps.events_loaded,
|
||||||
contracts_info: nextProps.contracts_info,
|
contracts_info: nextProps.contracts_info,
|
||||||
contract_events: nextProps.contract_events,
|
contract_events: nextProps.contract_events,
|
||||||
contract_fines: nextProps.contract_fines,
|
contract_fines: nextProps.contract_fines,
|
||||||
@ -33,20 +35,10 @@ class InnerMenu extends React.Component
|
|||||||
{
|
{
|
||||||
console.log("Contact", "InnerMenu", "componentDidMount()");
|
console.log("Contact", "InnerMenu", "componentDidMount()");
|
||||||
|
|
||||||
const { loaded, loading, contracts_info, contract_events, contract_fines } = this.state;
|
const { loaded, loading, events_loaded, contracts_info, contract_events, contract_fines } = this.state;
|
||||||
|
|
||||||
console.log("CDM", "\n\n");
|
if(!loaded && events_loaded &&
|
||||||
console.log("CDM", "contracts_info", contracts_info);
|
contracts_info !== undefined && Object.keys(contracts_info).length > 0
|
||||||
console.log("CDM", "!".repeat(10));
|
|
||||||
console.log("CDM", "contract_events", contract_events);
|
|
||||||
console.log("CDM", "!".repeat(10));
|
|
||||||
console.log("CDM", "contract_fines", contract_fines);
|
|
||||||
console.log("CDM", "!".repeat(10));
|
|
||||||
|
|
||||||
if(!loaded &&
|
|
||||||
contracts_info !== undefined && Object.keys(contracts_info).length > 0 &&
|
|
||||||
contract_events !== undefined && Object.keys(contract_events).length > 0 &&
|
|
||||||
contract_fines !== undefined && Object.keys(contract_fines).length > 0
|
|
||||||
) {
|
) {
|
||||||
this.setState({ loaded: true }, () =>
|
this.setState({ loaded: true }, () =>
|
||||||
{
|
{
|
||||||
@ -57,21 +49,10 @@ class InnerMenu extends React.Component
|
|||||||
|
|
||||||
componentDidUpdate(prevProps, prevState)
|
componentDidUpdate(prevProps, prevState)
|
||||||
{
|
{
|
||||||
const { loaded, contracts_info, contract_events, contract_fines } = this.state;
|
const { loaded, events_loaded, contracts_info, contract_events, contract_fines } = this.state;
|
||||||
|
|
||||||
console.log("CDU", "\n\n");
|
if(!loaded && events_loaded && contracts_info !== undefined && Object.keys(contracts_info).length > 0)
|
||||||
console.log("CDU", "contracts_info", contracts_info);
|
{
|
||||||
console.log("CDU", "?".repeat(10));
|
|
||||||
console.log("CDU", "contract_events", contract_events);
|
|
||||||
console.log("CDU", "?".repeat(10));
|
|
||||||
console.log("CDU", "contract_fines", contract_fines);
|
|
||||||
console.log("CDU", "?".repeat(10));
|
|
||||||
|
|
||||||
if(!loaded &&
|
|
||||||
contracts_info !== undefined && Object.keys(contracts_info).length > 0 &&
|
|
||||||
contract_events !== undefined && Object.keys(contract_events).length > 0 &&
|
|
||||||
contract_fines !== undefined && Object.keys(contract_fines).length > 0
|
|
||||||
) {
|
|
||||||
this.setState({ loaded: true }, () =>
|
this.setState({ loaded: true }, () =>
|
||||||
{
|
{
|
||||||
this._loadMenu();
|
this._loadMenu();
|
||||||
@ -89,56 +70,46 @@ class InnerMenu extends React.Component
|
|||||||
Promise.all([
|
Promise.all([
|
||||||
new Promise((resolve) =>
|
new Promise((resolve) =>
|
||||||
{
|
{
|
||||||
console.log(11111);
|
|
||||||
if(contracts_info[ number ] === undefined)
|
if(contracts_info[ number ] === undefined)
|
||||||
{
|
{
|
||||||
console.log(10);
|
|
||||||
getContractInfo({ dispatch, number })
|
getContractInfo({ dispatch, number })
|
||||||
.then(() => { console.log(11); resolve(); })
|
.then(() => { console.log(11); resolve(); })
|
||||||
.catch(() => { console.log(12); resolve(); });
|
.catch(() => { console.log(12); resolve(); });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console.log(13);
|
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
new Promise((resolve) =>
|
new Promise((resolve) =>
|
||||||
{
|
{
|
||||||
console.log(22222);
|
|
||||||
if(contract_events[ number ] === undefined)
|
if(contract_events[ number ] === undefined)
|
||||||
{
|
{
|
||||||
console.log(20);
|
|
||||||
getContractEvents({ dispatch, contract: number })
|
getContractEvents({ dispatch, contract: number })
|
||||||
.then(() => { console.log(21); resolve(); })
|
.then(() => { console.log(21); resolve(); })
|
||||||
.catch(() => { console.log(22); resolve(); });
|
.catch(() => { console.log(22); resolve(); });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console.log(23);
|
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
new Promise((resolve) =>
|
new Promise((resolve) =>
|
||||||
{
|
{
|
||||||
console.log(33333);
|
|
||||||
if(contract_fines[ number ] === undefined)
|
if(contract_fines[ number ] === undefined)
|
||||||
{
|
{
|
||||||
console.log(30);
|
|
||||||
getContractFines({ dispatch, contract: number })
|
getContractFines({ dispatch, contract: number })
|
||||||
.then(() => { console.log(31); resolve(); })
|
.then(() => { console.log(31); resolve(); })
|
||||||
.catch(() => { console.log(32); resolve(); });
|
.catch(() => { console.log(32); resolve(); });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console.log(33);
|
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
.then(() =>
|
.then(() =>
|
||||||
{
|
{
|
||||||
console.log("******************************");
|
|
||||||
let l = 0;
|
let l = 0;
|
||||||
let m = 0;
|
let m = 0;
|
||||||
const menu = [ "payments", "change", "services", "agreement", "documents", "materials", "events", "fines" ];
|
const menu = [ "payments", "change", "services", "agreement", "documents", "materials", "events", "fines" ];
|
||||||
@ -151,39 +122,24 @@ class InnerMenu extends React.Component
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//setTimeout(() =>
|
|
||||||
//{
|
|
||||||
this.setState({ loading: false }, () =>
|
this.setState({ loading: false }, () =>
|
||||||
{
|
{
|
||||||
if(this.menuRef.current !== null)
|
if(this.menuRef.current !== null)
|
||||||
{
|
{
|
||||||
console.log("-".repeat(30));
|
|
||||||
console.log(this.menuRef.current);
|
|
||||||
console.log("-".repeat(30));
|
|
||||||
|
|
||||||
for(let i = 0; i < m; i++)
|
for(let i = 0; i < m; i++)
|
||||||
{
|
{
|
||||||
//console.log("-----", this.menuRef.current.children[i]);
|
|
||||||
if(this.menuRef.current.children[i] !== undefined)
|
if(this.menuRef.current.children[i] !== undefined)
|
||||||
{
|
{
|
||||||
console.log("this.menuRef.current.children[i]", this.menuRef.current.children[i]);
|
|
||||||
console.log(".".repeat(30));
|
|
||||||
|
|
||||||
l = l + this.menuRef.current.children[i].getBoundingClientRect().width;
|
l = l + this.menuRef.current.children[i].getBoundingClientRect().width;
|
||||||
console.log("W", this.menuRef.current.children[i].getBoundingClientRect().width, l);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//setTimeout(() =>
|
|
||||||
//{
|
|
||||||
if(this.menuRef.current !== null)
|
if(this.menuRef.current !== null)
|
||||||
{
|
{
|
||||||
this.menuRef.current.scrollLeft = l - 50;
|
this.menuRef.current.scrollLeft = l - 50;
|
||||||
}
|
}
|
||||||
//}, 10);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//}, 50);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,6 +257,7 @@ class InnerMenu extends React.Component
|
|||||||
function mapStateToProps(state, ownProps)
|
function mapStateToProps(state, ownProps)
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
|
events_loaded: state.events.loaded,
|
||||||
contracts_info: state.contracts_info,
|
contracts_info: state.contracts_info,
|
||||||
contract_events: state.contract_events,
|
contract_events: state.contract_events,
|
||||||
contract_fines: state.contract_fines,
|
contract_fines: state.contract_fines,
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import Footer from './components/Footer';
|
|||||||
import MainHeader from "./components/MainHeader";
|
import MainHeader from "./components/MainHeader";
|
||||||
import FormRequest from "./components/FormRequest";
|
import FormRequest from "./components/FormRequest";
|
||||||
|
|
||||||
import { sendOffstageToken } from '../actions';
|
import { logout, sendOffstageToken } from '../actions';
|
||||||
|
|
||||||
class OffstagePage extends React.Component
|
class OffstagePage extends React.Component
|
||||||
{
|
{
|
||||||
@ -32,7 +32,12 @@ class OffstagePage extends React.Component
|
|||||||
|
|
||||||
componentDidMount()
|
componentDidMount()
|
||||||
{
|
{
|
||||||
sendOffstageToken({ dispatch: this.props.dispatch, token: this.props.token })
|
const { dispatch, token } = this.props;
|
||||||
|
|
||||||
|
logout({ dispatch, redirect: false })
|
||||||
|
.then(() =>
|
||||||
|
{
|
||||||
|
sendOffstageToken({ dispatch, token })
|
||||||
.then(() =>
|
.then(() =>
|
||||||
{
|
{
|
||||||
this.setState({ error: false });
|
this.setState({ error: false });
|
||||||
@ -41,6 +46,7 @@ class OffstagePage extends React.Component
|
|||||||
{
|
{
|
||||||
this.setState({ error: true });
|
this.setState({ error: true });
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
render()
|
render()
|
||||||
|
|||||||
@ -26,11 +26,9 @@ const eventsReducer = (state = initialState.events, action) =>
|
|||||||
case actionTypes.EVENTS_RESET:
|
case actionTypes.EVENTS_RESET:
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
themes: null,
|
loaded: false,
|
||||||
searched: null,
|
list: undefined,
|
||||||
appeals: { list: null, new: 0 },
|
filtered: undefined,
|
||||||
appeal: null,
|
|
||||||
request: null,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user