check form updates

This commit is contained in:
2022-06-07 14:36:47 +01:00
parent 3b61d651f6
commit 9d90b7f0a8
22 changed files with 356 additions and 133 deletions
@@ -22,10 +22,11 @@ export default async function ApiProxy(req, res) {
var token = await getToken();
var queryUrl =
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
loggedInUserId +
" and servicestage eq 1 and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
return axios
.get(
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
@@ -22,7 +22,7 @@ export default async function ApiProxy(req, res) {
var token = await getToken();
var queryUrl =
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
loggedInUserId +
" and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
+16 -3
View File
@@ -2,13 +2,20 @@ import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import { useRouter } from "next/router";
import { connect } from "react-redux";
import { getAppealsTypesForNewAppeal, getLPA } from "../../actions";
import {
getAppealsTypesForNewAppeal,
getLPA,
getPersonalAccount,
} from "../../actions";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
import Footer from "../../components/footer";
import Header from "../../components/header";
import CreateCase from "../../components/newappeal/createCase";
import { setLoggedInUserId } from "../../store/accountDetails/action";
import {
setAccountDetails,
setLoggedInUserId,
} from "../../store/accountDetails/action";
import { setAppealType } from "../../store/appealType/action";
import { setLPA } from "../../store/lpa/action";
import { wrapper } from "../../store/store";
@@ -130,11 +137,16 @@ export const getServerSideProps = wrapper.getServerSideProps(
let loggedInUser = cookies.pinsUser;
const [appealTypeData, lpaData, caseData] = await Promise.all([
console.log("has loggedInUser", loggedInUser);
const [appealTypeData, lpaData, accountDetails] = await Promise.all([
await getAppealsTypesForNewAppeal(),
await getLPA(),
await getPersonalAccount(loggedInUser),
]);
console.log("wewerwe s s", accountDetails);
const providerConfig = await getProviderConfig();
// const lpaData = require("../../data/lpa.json");
// const appealTypeData = require("../../data/appealtypes.json");
@@ -143,6 +155,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(setAppealType(appealTypeData));
store.dispatch(setLPA(lpaData));
store.dispatch(setLoggedInUserId(loggedInUser));
store.dispatch(setAccountDetails(accountDetails));
}
);