reps trigger for logged out & upload storage acc

This commit is contained in:
2023-01-05 14:26:08 +00:00
parent 98aefdd867
commit ee4d00a500
16 changed files with 251 additions and 465 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ RELAYPATH = "dev-pedw-hc"
GOOGLE_TAG_MANAGER = GTM-T78CBC3
SHOWLOGIN = "true"
SHOWREPRESENTATIONS = "true"
SHOWREPRESENTATIONS = true
SHOWFILEUPLOAD = "false"
SHOWMAPS = "false"
//BASIC_AUTH_CREDENTIALS = pinswg:password|pinswg2:password2
+1 -1
View File
@@ -45,7 +45,7 @@ const Case = (props) => {
searchDetailsObj={props.searchDetailsObj}
documentDetailsObj={props.documentDetailsObj}
/>
{showRepresentations == "true" && (
{showRepresentations == true && (
<RepresentationList
incidentid={props.incidentid}
caseReference={props.caseReference}
+17 -35
View File
@@ -67,7 +67,7 @@ let MakeRepresentation = (props) => {
setRepresentationSubmitConfirmation,
} = props;
const formObj = props.props.form;
let setCaseQueryObj = props[currentType];
let setCaseQueryObj = props[currentType] || {};
var casesObj = {};
currentType == "searchResultsObj"
@@ -84,16 +84,6 @@ let MakeRepresentation = (props) => {
var detailsObj = {};
currentType == "searchResultsObj"
? (casesObj = jsonpath.query(
setCaseQueryObj,
'$..[?(@.title=="' + caseReference + '")]'
))
: (casesObj = jsonpath.query(
setCaseQueryObj,
'$..[?(@.reference=="' + caseReference + '")]'
));
const capacityOptionsArr = [
"Appellant",
"Agent",
@@ -213,6 +203,7 @@ let MakeRepresentation = (props) => {
setRepresentationSubmit={setRepresentationSubmit}
currentView={currentView}
setSubmitBack={setSubmitBack}
props={props}
/>
);
break;
@@ -248,6 +239,7 @@ let MakeRepresentation = (props) => {
let day = repDate.getDate();
let month = repDate.getMonth() + 1;
let year = repDate.getFullYear();
let time = repDate.getTime();
const repType = "";
switch (values.representationCapacity) {
@@ -276,6 +268,8 @@ let MakeRepresentation = (props) => {
"-" +
day +
"-" +
time +
"-" +
repType +
"-REP" +
"_" +
@@ -299,7 +293,7 @@ let MakeRepresentation = (props) => {
//console.log(updateBody);
window.alert(`form is :\n\n${JSON.stringify(updateBody, null, 2)}`);
//window.alert(`form is :\n\n${JSON.stringify(updateBody, null, 2)}`);
const reference = "PEDW-PARTIAL-REP";
const templateId = "021b0a7b-df00-41f1-b94e-c269bee98c75";
@@ -323,35 +317,23 @@ let MakeRepresentation = (props) => {
const onHandleSubmit = (values) => {
currentView.representationSubmit != true
? // console.log(
// values,
// values.representationCapacity,
// currentView.representationCapacity
// );
// console.log(_.isEmpty(currentView.representationCapacity));
// console.log(
// values.representationCapacity
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
// .toLowerCase() == currentView.representationCapacity
// );
_.isEmpty(currentView.representationCapacity)
? _.isEmpty(currentView.representationCapacity)
? setRepresentationCapacity(
values.representationCapacity
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
.toLowerCase()
)
: setRepresentationSubmit(true)
: currentView.representationSubmit == true &&
(console.log("capacity", currentView.representationCapacity),
: currentView.representationSubmit == true
? (console.log("capacity", currentView.representationCapacity),
console.log("has errors:", props.invalid),
props.invalid == false &&
updateRepresentation(values, false, false),
uploadRepresentationFiles(values),
setRepresentationSubmitConfirmation(true));
setRepresentationSubmitConfirmation(true))
: console.log("nit updated");
window.alert(`You submitted:\n\n${JSON.stringify(values, null, 2)}`);
//window.alert(`You submitted:\n\n${JSON.stringify(values, null, 2)}`);
};
const uploadRepresentationFiles = (values) => {
@@ -388,15 +370,15 @@ let MakeRepresentation = (props) => {
const repForm = props.props.form;
// console.log(
// "waht is representationSubmit:",
// currentView.representationSubmit
// );
console.log(
"waht is representationSubmit:",
currentView.representationSubmit
);
return (
<div>
<form onSubmit={handleSubmit(onHandleSubmit)}>
{currentView.representationSubmit == "true" ? (
{currentView.representationSubmit == true ? (
<RepCompleteSubmit
formObj={formObj}
capacityOptionsArr={capacityOptionsArr}
@@ -8,6 +8,7 @@ import {
RenderRadioList,
RenderMultiline,
RenderCondtionalRadioList,
FileUploadField,
} from "./representationElements";
import {
setRepresentationCapacity,
@@ -90,6 +91,7 @@ const RepAgent = (props) => {
/>
</div>
</div>
<div className="govuk-grid-row">
<div className="govuk-form-group">
<p className="govuk-body">
@@ -101,122 +103,33 @@ const RepAgent = (props) => {
aria-describedby="commentBox-hint"
>
<div id="commentBox-hint" className="govuk-hint">
My comments are set out in:*
My comments are set out in:
</div>
<div
className="govuk-checkboxes"
data-module="govuk-checkboxes"
>
<div className="govuk-checkboxes__item">
<Field
className="govuk-checkboxes__input"
id="commentBox"
name="commentBox"
value="email"
data-aria-controls="commentBox"
type="checkbox"
component={RenderTextfield}
/>
<label
className="govuk-label govuk-checkboxes__label"
htmlFor="commentBox"
>
the box below{" "}
</label>
</div>
<div
className={
_.isEmpty(formObj["representationForm"])
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
: _.isEmpty(
formObj["representationForm"]
.values
)
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
: _.isEmpty(
formObj["representationForm"]
.values.commentBox
)
? formObj["representationForm"]
.values.commentBox == false
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: "govuk-checkboxes__conditional"
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
/>
</div>
<div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField
name={"representationDocuments"}
label={"Add your files"}
ticketnumber={props.props.caseReference}
hint={"sdsd"}
fileList={[]}
setFilesForRepresentation={[]}
containerID={
props.props.props.accountDetails
.containerID
}
id="conditional-commentBox"
>
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={
props.name + "-hint"
}
/>
</div>
</div>
<div className="govuk-checkboxes__item">
<Field
className="govuk-checkboxes__input"
id="documentBox"
name="documentBox"
value="email"
data-aria-controls="documentBox"
type="checkbox"
component={RenderTextfield}
/>
<label
className="govuk-label govuk-checkboxes__label"
htmlFor="documentBox"
>
separate documents
</label>
</div>
<div
className={
_.isEmpty(formObj["representationForm"])
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
: _.isEmpty(
formObj["representationForm"]
.values
)
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: _.isEmpty(
formObj["representationForm"]
.values.documentBox
)
? formObj["representationForm"]
.values.documentBox == false
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: "govuk-checkboxes__conditional"
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
}
id="conditional-documentBox"
>
<div className="govuk-form-group">
<section className="container">
<div
{...getRootProps({
className: "dropzone",
})}
>
<input {...getInputProps()} />
<p>
Drag and drop files here or
click to select files
</p>
</div>
<aside>
<h4>Files</h4>
<ul>{files}</ul>
</aside>
</section>
</div>
</div>
/>
</div>
</fieldset>
</div>{" "}
@@ -11,6 +11,7 @@ import {
RenderRadioList,
RenderMultiline,
RenderFileUpload,
FileUploadField,
} from "./representationElements";
import { useDropzone } from "react-dropzone";
// import {
@@ -70,6 +71,7 @@ const RepAppellant = (props) => {
/>
</div>
</div> */}
<div className="govuk-grid-row">
<div className="govuk-form-group">
<p className="govuk-body">
@@ -81,124 +83,33 @@ const RepAppellant = (props) => {
aria-describedby="commentBox-hint"
>
<div id="commentBox-hint" className="govuk-hint">
My comments are set out in:*
My comments are set out in:
</div>
<div
className="govuk-checkboxes"
data-module="govuk-checkboxes"
>
<div className="govuk-checkboxes__item">
<Field
className="govuk-checkboxes__input"
id="commentBox"
name="commentBox"
value="email"
data-aria-controls="commentBox"
type="checkbox"
component={RenderTextfield}
/>
<label
className="govuk-label govuk-checkboxes__label"
htmlFor="commentBox"
>
the box below{" "}
</label>
</div>
<div
className={
_.isEmpty(formObj["representationForm"])
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
: _.isEmpty(
formObj["representationForm"]
.values
)
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
: _.isEmpty(
formObj["representationForm"]
.values.commentBox
)
? formObj["representationForm"]
.values.commentBox == false
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: "govuk-checkboxes__conditional"
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
/>
</div>
<div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField
name={"representationDocuments"}
label={"Add your files"}
ticketnumber={props.props.caseReference}
hint={"sdsd"}
fileList={[]}
setFilesForRepresentation={[]}
containerID={
props.props.props.accountDetails
.containerID
}
id="conditional-commentBox"
>
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={
props.name + "-hint"
}
/>
</div>
</div>
<div className="govuk-checkboxes__item">
<Field
className="govuk-checkboxes__input"
id="documentBox"
name="documentBox"
data-aria-controls="documentBox"
type="checkbox"
component={RenderTextfield}
/>
<label
className="govuk-label govuk-checkboxes__label"
htmlFor="documentBox"
>
separate documents
</label>
</div>
<div
className={
_.isEmpty(formObj["representationForm"])
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
: _.isEmpty(
formObj["representationForm"]
.values
)
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: _.isEmpty(
formObj["representationForm"]
.values.documentBox
)
? formObj["representationForm"]
.values.documentBox == false
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: "govuk-checkboxes__conditional"
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
}
id="conditional-documentBox"
>
<h2 className="govuk-heading-s">
{props.label}{" "}
</h2>
<Field
name="repsFiles"
id="repsFiles"
component={RenderFileUpload}
className="govuk-input govuk-input--width-20"
//validate={[required]}
label={props.label}
errorMsg="Is required"
ticketnumber={props.caseReference}
documentTypeCode={
props.documentTypeCode
}
hint={props.hint}
fileList={props.fileList}
setFilesForAppeal={
props.setFilesForAppeal
}
containerID={props.containerID}
/>
</div>
/>
</div>
</fieldset>
</div>{" "}
@@ -77,7 +77,7 @@ let RepCapacitySelection = (props) => {
className="govuk-button"
data-module="govuk-button"
>
Continue
{t("common:continue-button")}
</button>
</div>
</div>
@@ -166,6 +166,7 @@ const RepCompleteSubmit = (props) => {
<dd className="govuk-summary-list__value">
<span
className="multiline-elipsis"
dangerouslySetInnerHTML={{
__html: repFormData.representationComments,
}}
@@ -260,12 +261,12 @@ const RepCompleteSubmit = (props) => {
type="submit"
className="govuk-button"
data-module="govuk-button"
onClick={() =>
//setRepresentationSubmitConfirmation()
setRepresentationSubmit(true)
}
// onClick={() => {
// setRepresentationSubmitConfirmation();
// setRepresentationSubmit(true);
// }}
>
Continue
{t("common:continue-button")}
</button>
{/* <a
onClick={() => {
@@ -280,7 +281,7 @@ const RepCompleteSubmit = (props) => {
onClick={() => setSubmitBack()}
className="govuk-link"
>
Back
{t("case:summary-back-button-label")}
</a>
</div>
</div>
@@ -117,25 +117,26 @@ const RepInterestedPartyPerson = (props) => {
</fieldset>
</div>{" "}
</div>
<div className="govuk-grid-row">
<div className="govuk-button-group">
{/* <button
<button
type="submit"
className="govuk-button"
data-module="govuk-button"
>
Continue
</button> */}
{t("common:continue-button")}
</button>
{/* <Link href="/representation">
<a
onClick={() => {
setRepresentationSubmit(true);
}}
className="govuk-button"
>
Continue
</a>
</Link> */}
<a
onClick={() => {
setRepresentationSubmit(true);
}}
className="govuk-button"
>
Continue
</a>
</Link> */}
<a
onClick={() => {
setRepresentationCapacity();
@@ -143,7 +144,7 @@ const RepInterestedPartyPerson = (props) => {
}}
className="govuk-link"
>
Back
{t("case:summary-back-button-label")}
</a>
</div>
</div>
@@ -7,6 +7,7 @@ import {
RenderTextfield,
RenderRadioList,
RenderMultiline,
FileUploadField,
} from "./representationElements";
import { useDropzone } from "react-dropzone";
import {
@@ -69,6 +70,7 @@ const RepLandOwner = (props) => {
/>
</div>
</div> */}
<div className="govuk-grid-row">
<div className="govuk-form-group">
<p className="govuk-body">
@@ -80,126 +82,38 @@ const RepLandOwner = (props) => {
aria-describedby="commentBox-hint"
>
<div id="commentBox-hint" className="govuk-hint">
My comments are set out in:*
My comments are set out in:
</div>
<div
className="govuk-checkboxes"
data-module="govuk-checkboxes"
>
<div className="govuk-checkboxes__item">
<Field
className="govuk-checkboxes__input"
id="commentBox"
name="commentBox"
value="email"
data-aria-controls="commentBox"
type="checkbox"
component={RenderTextfield}
/>
<label
className="govuk-label govuk-checkboxes__label"
htmlFor="commentBox"
>
the box below{" "}
</label>
</div>
<div
className={
_.isEmpty(formObj["representationForm"])
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
: _.isEmpty(
formObj["representationForm"]
.values
)
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
: _.isEmpty(
formObj["representationForm"]
.values.commentBox
)
? formObj["representationForm"]
.values.commentBox == false
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: "govuk-checkboxes__conditional"
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
/>
</div>
<div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField
name={"representationDocuments"}
label={"Add your files"}
ticketnumber={props.props.caseReference}
hint={"sdsd"}
fileList={[]}
setFilesForRepresentation={[]}
containerID={
props.props.props.accountDetails
.containerID
}
id="conditional-commentBox"
>
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={
props.name + "-hint"
}
/>
</div>
</div>
<div className="govuk-checkboxes__item">
<Field
className="govuk-checkboxes__input"
id="documentBox"
name="documentBox"
value="email"
data-aria-controls="documentBox"
type="checkbox"
component={RenderTextfield}
/>
<label
className="govuk-label govuk-checkboxes__label"
htmlFor="documentBox"
>
separate documents
</label>
</div>
<div
className={
_.isEmpty(formObj["representationForm"])
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
: _.isEmpty(
formObj["representationForm"]
.values
)
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: _.isEmpty(
formObj["representationForm"]
.values.documentBox
)
? formObj["representationForm"]
.values.documentBox == false
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
: "govuk-checkboxes__conditional"
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
}
id="conditional-documentBox"
>
<div className="govuk-form-group">
<section className="container">
<div
{...getRootProps({
className: "dropzone",
})}
>
<input {...getInputProps()} />
<p>
Drag and drop files here or
click to select files
</p>
</div>
<aside>
<h4>Files</h4>
<ul>{files}</ul>
</aside>
</section>
</div>
</div>
/>
</div>
</fieldset>
</div>
</div>{" "}
</div>
<div className="govuk-grid-row">
<div className="govuk-button-group">
<button
+42 -40
View File
@@ -289,50 +289,53 @@ const CaseSummary = (props) => {
</div>
</div>
{props.currentView.showReps == "true" &&
_.has(detailsObj, "pinswg_startdate") &&
hasEndDate &&
showReps(
detailsObj.pinswg_startdate,
detailsObj.pinswg_representation_period_end_date
) && (
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<div className="govuk-button-group">
<Link
href={{
pathname:
"/myportal/representation",
query: {
case:
currentType ==
"searchResultsObj"
? detailsObj.pinswg_name
: casesObj.reference,
},
}}
>
<a className="govuk-button">
{props.currentView.showReps == true ||
(props.currentView.showReps == "true" &&
_.has(detailsObj, "pinswg_startdate") &&
hasEndDate &&
showReps(
detailsObj.pinswg_startdate,
detailsObj.pinswg_representation_period_end_date
) && (
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<div className="govuk-button-group">
<Link
href={{
pathname:
"/myportal/representation",
query: {
case:
currentType ==
"searchResultsObj"
? detailsObj.pinswg_name
: casesObj.reference,
},
}}
>
<a className="govuk-button">
{t(
"case:summary-make-representation-label"
)}
</a>
</Link>
<a
onClick={() => {
//spinnerState();
router.back();
}}
className="govuk-button govuk-button--secondary"
>
{t(
"case:summary-make-representation-label"
"case:summary-back-button-label"
)}
</a>
</Link>
<a
onClick={() => {
//spinnerState();
router.back();
}}
className="govuk-button govuk-button--secondary"
>
{t("case:summary-back-button-label")}
</a>
</div>
</div>
</div>
</div>
)}
{props.currentView.showReps == "true" &&
))}
{props.currentView.showReps == true &&
_.has(detailsObj, "pinswg_startdate") &&
hasEndDate &&
showRepsEnded(
@@ -352,7 +355,6 @@ const CaseSummary = (props) => {
</div>
</div>
)}
{/* 1{" "}
{_.has(detailsObj, "pinswg_startdatetimeiftheevent") &&
detailsObj.pinswg_startdatetimeiftheevent}
+1 -1
View File
@@ -133,7 +133,7 @@ const TopThree = (props) => {
}
};
let topThreeOnlyArr = showTopThreeArr.slice(0, 3);
let topThreeOnlyArr = showTopThreeArr; //.slice(0, 3);
Object.keys(topThreeOnlyArr).map((key, index) => {
topthreeRow.push(
<div className="cardModuleItem" key={index}>
+12 -10
View File
@@ -162,23 +162,25 @@ export const getServerSideProps = wrapper.getServerSideProps(
let loggedInUserCookie = cookies.pinsUser;
let thisSession = await getSession(ctx);
let loggedInUser = {};
let [loggedInUser] = await Promise.all([
await getPortalLogin(thisSession.user.email),
]);
loggedInUser = loggedInUser.value[0].contactid;
console.log("nextAuth Session:", thisSession);
if (_.has(thisSession, "user") == false) {
if (!thisSession) {
console.log("not has sesssion.......");
return {
redirect: {
destination: "/error",
destination: "/auth/signin",
permanent: false,
},
};
}
} else {
console.log(" has sesssion.......");
[loggedInUser] = await Promise.all([
await getPortalLogin(thisSession.user.email),
]);
loggedInUser = loggedInUser.value[0].contactid;
console.log("nextAuth Session:", thisSession);
}
//Create Storage container for logged in user
await createContainer(thisSession.user.id);
+44 -3
View File
@@ -1,7 +1,9 @@
import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import { useEffect } from "react";
import { useRouter } from "next/router";
import { connect } from "react-redux";
import { connect, useDispatch } from "react-redux";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
import Footer from "../../components/footer";
@@ -9,7 +11,17 @@ import Header from "../../components/header";
import Case from "../../components/representation";
import { wrapper } from "../../store/store";
import { getSession, useSession } from "next-auth/react";
import { getPersonalAccount } from "../../actions";
import {
consoleLogger,
getPersonalAccount,
getPortalLogin,
} from "../../actions";
import {
setRepresentationCapacity,
setRepresentationSubmit,
setSubmitBack,
setRepresentationSubmitConfirmation,
} from "../../store/currentView/action";
import {
setAccountDetails,
setContainerID,
@@ -24,6 +36,27 @@ const Home = (props) => {
const { locale } = router;
const { appealtypes } = router.query;
const dispatch = useDispatch();
useEffect(async () => {
const thisSession = await getSession();
if (thisSession) {
let [loggedInUser] = await Promise.all([
await getPortalLogin(thisSession.user.email),
]);
dispatch(
setAccountDetails(
await getPersonalAccount(loggedInUser.value[0].contactid)
)
);
dispatch(setContainerID(thisSession.user.id));
//dispatch(setRepresentationSubmit(true));
}
}, [dispatch]);
return (
<div>
<Head>
@@ -148,6 +181,14 @@ const Home = (props) => {
// }
// );
const mapDispatchToProps = (dispatch) => {
return {
setAccountDetails: (loggedInUser) => {
dispatch(setAccountDetails(loggedInUser));
},
};
};
const mapStateToProps = (state) => {
//console.log(state);
@@ -166,4 +207,4 @@ const mapStateToProps = (state) => {
};
};
export default connect(mapStateToProps)(Home);
export default connect(mapStateToProps, mapDispatchToProps)(Home);
+7
View File
@@ -29,6 +29,8 @@ import {
setWatchedCases,
setWatchedCasesDetails,
} from "../../store/watchedCases/action";
import { setShowReps } from "../../store/currentView/action";
import TimeOut from "../../components/timeout";
import { getSession, useSession } from "next-auth/react";
import {
@@ -87,6 +89,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
await getPortalLogin(thisSession.user.email),
]);
const showReps = process.env.SHOWREPRESENTATIONS || false;
console.log("env var ", process.env.SHOWREPRESENTATIONS);
store.dispatch(setShowReps(showReps));
searchResultsObj =
searchResultsObj.status == 502
? {
+1
View File
@@ -8,6 +8,7 @@ const currentViewInitialState = {
representationSubmitConfirmation: {},
linkedCaseReferences: {},
currentPage: 1,
showReps: false,
};
export default function reducer(state = currentViewInitialState, action) {
+20 -9
View File
@@ -907,11 +907,11 @@ textarea,
.app-step-nav__step--active .app-step-nav__circle--number,
.app-step-nav__step--active:after,
.app-step-nav__step--active .app-step-nav__help:after {
border-color: $lightgrey !important;
border-color: $lightgrey !important;
}
.app-step-nav__circle--number {
border-color: $lightgrey !important;
border-color: $lightgrey !important;
}
.app-step-nav__circle-background {
@@ -998,6 +998,17 @@ textarea,
}
.govuk-summary-list__value {
.multiline-elipsis {
-webkit-box-orient: vertical;
display: -webkit-box;
-webkit-line-clamp: 10;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
}
}
.documentList {
.govuk-summary-list__key:first-of-type {
width: 40%;
@@ -1039,12 +1050,12 @@ textarea,
padding: 10px 15px !important;
font-size: 16px;
float: right;
border-color: $midgrey !important;
color: $midgrey !important;
border-color: $midgrey !important;
color: $midgrey !important;
&:hover {
background-color: $midgrey !important;
color: $white !important;
background-color: $midgrey !important;
color: $white !important;
}
}
@@ -1054,7 +1065,7 @@ textarea,
font-size: 16px;
float: right;
color: $midgrey !important;
color: $midgrey !important;
@@ -1167,7 +1178,7 @@ textarea,
height: 2.5rem;
margin-top: 0;
padding: 10px 15px;
border: 1px solid $darkgrey !important;
border: 1px solid $darkgrey !important;
border-radius: 0;
-webkit-appearance: none;
appearance: none;
@@ -2024,7 +2035,7 @@ ul#sharePageLinks.active {
}
&.watched_link {
color: $black !important;
color: $black !important;
background-color: $white;
width: 13px;
display: block;