updated storage account stuff to take auth id
This commit is contained in:
@@ -7,12 +7,12 @@ import { useEffect } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import xpath from "xpath";
|
||||
import {
|
||||
createCase,
|
||||
getCase,
|
||||
getAppealsTypes,
|
||||
getMandatoryFields,
|
||||
getPickLists,
|
||||
getFilesFromBlob,
|
||||
getProgressFromBlob,
|
||||
} from "../../actions";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
@@ -24,7 +24,10 @@ import BuildSection from "../../components/newappeal/buildsection";
|
||||
import CompleteAppeal from "../../components/newappeal/complete";
|
||||
import TimeOut from "../../components/timeout";
|
||||
|
||||
import { setLoggedInUserId } from "../../store/accountDetails/action";
|
||||
import {
|
||||
setLoggedInUserId,
|
||||
setContainerID,
|
||||
} from "../../store/accountDetails/action";
|
||||
import {
|
||||
setAppealLPA,
|
||||
setAppealType,
|
||||
@@ -36,6 +39,8 @@ import {
|
||||
import { setForm } from "../../store/formData/action";
|
||||
import { getGovGatewayConfig } from "../../store/govgateway/action";
|
||||
import { wrapper } from "../../store/store";
|
||||
import { getProgressBlobs } from "../../actions/azurestorage";
|
||||
import { getSession, useSession } from "next-auth/react";
|
||||
|
||||
let Home = (props) => {
|
||||
const { footerLinks, pages, formData } = props;
|
||||
@@ -217,17 +222,27 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
console.log("ref:", query.id);
|
||||
let loggedInUser = cookies.pinsUser;
|
||||
|
||||
let thisSession = await getSession(ctx);
|
||||
console.log("nextAuth Session:", thisSession);
|
||||
|
||||
let loggedInUserIdent = thisSession.user.id;
|
||||
|
||||
console.log("logged ident:", loggedInUserIdent);
|
||||
|
||||
const [
|
||||
caseReferenceData,
|
||||
appealTypeData,
|
||||
mandatoryFieldsData,
|
||||
pickListData,
|
||||
//blobList,
|
||||
blobProgress,
|
||||
] = await Promise.all([
|
||||
await getCase(query.id),
|
||||
await getAppealsTypes(),
|
||||
await getMandatoryFields(query.appealtypes),
|
||||
await getPickLists(query.appealtypes),
|
||||
await getProgressFromBlob(loggedInUserIdent, query.casereference),
|
||||
|
||||
//await getFilesFromBlob(query.casereference),
|
||||
]);
|
||||
|
||||
@@ -255,6 +270,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
store.dispatch(setCaseReference(caseReference));
|
||||
store.dispatch(setForm(xmlStr, mandatoryFieldsData, pickListData));
|
||||
store.dispatch(setAppealType(appealTypeData));
|
||||
store.dispatch(setContainerID(thisSession.user.id));
|
||||
|
||||
//store.dispatch(setFilesForAppeal(blobList));
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user