my cases portal module by loggedin user
This commit is contained in:
@@ -14,6 +14,10 @@ import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import jsonpath from "jsonpath";
|
||||
import { useEffect } from "react";
|
||||
import {
|
||||
setLoggedInUserId,
|
||||
setAccountDetails,
|
||||
} from "../../store/accountDetails/action";
|
||||
import {
|
||||
setAppealType,
|
||||
setAppealTypeTitle,
|
||||
@@ -73,8 +77,9 @@ let Home = (props) => {
|
||||
const optionsTitleObj = selectedObj.reduce(
|
||||
(obj, arrValue) => (
|
||||
(obj[arrValue] = arrValue
|
||||
.replace(/[\s\-\+\(\)\,]/g, "")
|
||||
.toLowerCase()),
|
||||
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
||||
.toLowerCase()
|
||||
.slice(0, 39)),
|
||||
obj
|
||||
),
|
||||
{}
|
||||
@@ -164,7 +169,7 @@ let Home = (props) => {
|
||||
export const getServerSideProps = wrapper.getServerSideProps(
|
||||
(store) =>
|
||||
async ({ query, req, res }) => {
|
||||
//console.log("the query", query);
|
||||
console.log("the query", query);
|
||||
|
||||
const [
|
||||
caseReferenceData,
|
||||
@@ -185,12 +190,20 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
// query.apt
|
||||
// );
|
||||
|
||||
const cookies = new Cookies(req, res);
|
||||
// Get a cookie
|
||||
|
||||
console.log(cookies.get("pipinsUser"));
|
||||
|
||||
let caseReference = caseReferenceData;
|
||||
let xmlStr = formdata;
|
||||
xmlStr = formdata.value[0].formxml;
|
||||
xmlStr = xmlStr.replace(/\\"/g, "");
|
||||
|
||||
//console.log(caseReference, query.appealtypes, formdata);
|
||||
store.dispatch(
|
||||
setLoggedInUserId("f8b454ed-eded-eb11-aac7-00224800be9c")
|
||||
);
|
||||
store.dispatch(setAppealLPA(query.lpa));
|
||||
store.dispatch(setAppealTypeID(query.apt));
|
||||
store.dispatch(setCaseReference(caseReference));
|
||||
@@ -206,6 +219,7 @@ const mapStateToProps = (state) => {
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ const mapStateToProps = (state) => {
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user