reps defects
This commit is contained in:
@@ -216,7 +216,6 @@ let MakeRepresentation = (props) => {
|
||||
capacityOptionsArr.push(
|
||||
t("myrepresentations:capacity-options-arr-interested")
|
||||
);
|
||||
console.log(props.props.currentView);
|
||||
|
||||
let setCaseDetailsObj = router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
@@ -300,6 +299,7 @@ let MakeRepresentation = (props) => {
|
||||
isLPA &&
|
||||
currentView.caseReference.appealType != 846040019 &&
|
||||
currentView.caseReference.appealType != 846040011 &&
|
||||
currentView.caseReference.appealType != 846040015 &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= questionnaireDate &&
|
||||
buildArr.push("Questionnaire");
|
||||
@@ -323,6 +323,8 @@ let MakeRepresentation = (props) => {
|
||||
buildArr.push("Statement");
|
||||
|
||||
currentView.caseReference.appealType != 846040004 &&
|
||||
currentView.caseReference.appealType == 846040015 &&
|
||||
currentView.caseReference.specialistProcess != 846040001 &&
|
||||
todaysDate >= statementDueDate &&
|
||||
todaysDate <= finalCommentsDate &&
|
||||
buildArr.push("Final comments");
|
||||
@@ -333,6 +335,12 @@ let MakeRepresentation = (props) => {
|
||||
todaysDate <= finalCommentsDate &&
|
||||
buildArr.push("Final comments");
|
||||
|
||||
//is LPA Advert part 3 no statement
|
||||
isLPA &&
|
||||
currentView.caseReference.appealType == 846040018 &&
|
||||
currentView.caseReference.specialistProcess == 846040000 &&
|
||||
buildArr.pop("Statements");
|
||||
|
||||
return buildArr;
|
||||
};
|
||||
|
||||
|
||||
@@ -225,15 +225,13 @@ const RepAgent = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state, props) => {};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
updateField: (form, field, newValue) =>
|
||||
dispatch(change(form, field, newValue)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
|
||||
@@ -209,7 +209,7 @@ const RepAppellant = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state, props) => {};
|
||||
//const mapStateToProps = (state, props) => {};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
updateField: (form, field, newValue) =>
|
||||
@@ -217,7 +217,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
|
||||
@@ -2,6 +2,7 @@ import useTranslation from "next-translate/useTranslation";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect } from "react";
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import {
|
||||
@@ -68,8 +69,13 @@ const RepComplete = (props) => {
|
||||
props.props.currentView.caseReference.appealType,
|
||||
"pinswg_representationsubmitted": new Date(Date.now()),
|
||||
"pinswg_representationtype":
|
||||
props.props.currentView.caseReference.repDetails
|
||||
.representationType,
|
||||
props.props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.props.currentView.caseReference.repDetails
|
||||
.representationType
|
||||
: props.props.currentView.caseReference
|
||||
.representationType,
|
||||
}),
|
||||
setRepresentationMessageSent(true));
|
||||
});
|
||||
@@ -102,4 +108,22 @@ const RepComplete = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default RepComplete;
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
currentView: state.currentView,
|
||||
myRepresentations: state.myRepresentations,
|
||||
initialValues: state.currentView.caseReference.repDetails,
|
||||
accountDetails: state.accountDetails,
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(RepComplete);
|
||||
|
||||
@@ -6,6 +6,7 @@ import RepComplete from "./representationComplete";
|
||||
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
||||
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
||||
import { useState, useEffect } from "react";
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import {
|
||||
getFormCollectionByID,
|
||||
@@ -450,4 +451,22 @@ const RepCompleteSubmit = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default RepCompleteSubmit;
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
currentView: state.currentView,
|
||||
myRepresentations: state.myRepresentations,
|
||||
initialValues: state.currentView.caseReference.repDetails,
|
||||
accountDetails: state.accountDetails,
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(RepCompleteSubmit);
|
||||
|
||||
@@ -1007,7 +1007,16 @@ export const RenderFileUpload = (field) => {
|
||||
return (
|
||||
<>
|
||||
<Dropzone
|
||||
accept="application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/tiff,image/jpeg,application/zip"
|
||||
accept={{
|
||||
"application/pdf": [".pdf"],
|
||||
"application/msword": [".doc"],
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document":
|
||||
[".docx"],
|
||||
"image/tiff": [".tif", ".tiff"],
|
||||
"image/jpeg": [".jpg", ".jpeg"],
|
||||
"application/zip": [".zip"],
|
||||
"image/png": [".png"],
|
||||
}}
|
||||
onDrop={(filesToUpload, e) => {
|
||||
const renamedAcceptedFiles = filesToUpload.map(
|
||||
(file) =>
|
||||
|
||||
@@ -191,7 +191,7 @@ const RepInterestedPartyPerson = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state, props) => {};
|
||||
//const mapStateToProps = (state, props) => {};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
updateField: (form, field, newValue) =>
|
||||
@@ -199,7 +199,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
|
||||
+84
-50
@@ -171,8 +171,14 @@ const CaseSummary = (props) => {
|
||||
|
||||
const noRepresentationLink = ["/dnsdetails", "/dns/[developmentName]"];
|
||||
|
||||
let setCaseQueryObj = props[currentType];
|
||||
let setCaseDetailsObj = props[currentType + "Details"];
|
||||
let setCaseQueryObj =
|
||||
currentType == "directResultsObj"
|
||||
? props.searchResultsObj.searchResultsObj
|
||||
: props[currentType];
|
||||
let setCaseDetailsObj =
|
||||
currentType == "directResultsObj"
|
||||
? props.searchResultsObj.searchDetailsObj
|
||||
: props[currentType + "Details"];
|
||||
|
||||
var casesObj = {};
|
||||
|
||||
@@ -192,7 +198,10 @@ const CaseSummary = (props) => {
|
||||
setCaseQueryObj
|
||||
))
|
||||
: currentType == "directResultsObj"
|
||||
? (casesObj = directSearchResultsObj.value)
|
||||
? (casesObj = jsonpath(
|
||||
'$..[?(@.ticketnumber=="' + caseReference + '")]',
|
||||
setCaseQueryObj
|
||||
))
|
||||
: (casesObj = jsonpath(
|
||||
'$..[?(@.reference=="' + caseReference + '")]',
|
||||
setCaseQueryObj
|
||||
@@ -207,8 +216,6 @@ const CaseSummary = (props) => {
|
||||
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||
searchDetailsObj
|
||||
))
|
||||
: currentType == "directResultsObj"
|
||||
? (detailsObj = searchDetailsObj[0].value)
|
||||
: (detailsObj = jsonpath(
|
||||
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||
setCaseDetailsObj
|
||||
@@ -436,52 +443,44 @@ const CaseSummary = (props) => {
|
||||
.caseReference
|
||||
.appealType
|
||||
) ? (
|
||||
props.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040018 &&
|
||||
props.currentView
|
||||
.caseReference
|
||||
.specialistProcess ==
|
||||
846040000 ? (
|
||||
""
|
||||
) : (
|
||||
<>
|
||||
<Link
|
||||
href={{
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
query: {
|
||||
case:
|
||||
currentType ==
|
||||
"searchResultsObj"
|
||||
? detailsObj.pinswg_name
|
||||
: currentType ==
|
||||
"watchedCases"
|
||||
? casesObj.pinswg_title
|
||||
: casesObj.reference,
|
||||
},
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</Link>
|
||||
<>
|
||||
<Link
|
||||
href={{
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
query: {
|
||||
case:
|
||||
currentType ==
|
||||
"searchResultsObj"
|
||||
? detailsObj.pinswg_name
|
||||
: currentType ==
|
||||
"watchedCases"
|
||||
? casesObj.pinswg_title
|
||||
: currentType ==
|
||||
"directResultsObj"
|
||||
? detailsObj.pinswg_name
|
||||
: casesObj.reference,
|
||||
},
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</Link>
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
//spinnerState();
|
||||
router.back();
|
||||
}}
|
||||
className="govuk-button govuk-button--secondary"
|
||||
>
|
||||
{t(
|
||||
"case:summary-back-button-label"
|
||||
)}
|
||||
</a>
|
||||
</>
|
||||
)
|
||||
<a
|
||||
onClick={() => {
|
||||
//spinnerState();
|
||||
router.back();
|
||||
}}
|
||||
className="govuk-button govuk-button--secondary"
|
||||
>
|
||||
{t(
|
||||
"case:summary-back-button-label"
|
||||
)}
|
||||
</a>
|
||||
</>
|
||||
) : !isLPA &&
|
||||
props.currentView
|
||||
.caseReference
|
||||
@@ -1129,6 +1128,41 @@ const CaseSummary = (props) => {
|
||||
return false;
|
||||
case 846040004:
|
||||
return isLPA ? true : false;
|
||||
|
||||
case 846040015:
|
||||
return props.searchResultsObj.searchDetailsObj[0].value[0]
|
||||
.pinswg_specialistcaseprocess == 846040001
|
||||
? showReps(
|
||||
props.searchResultsObj.searchDetailsObj[0].value[0]
|
||||
.pinswg_startdate,
|
||||
props.searchResultsObj.searchDetailsObj[0].value[0]
|
||||
.pinswg_statementduedate
|
||||
)
|
||||
: true;
|
||||
|
||||
case 846040018:
|
||||
console.log(
|
||||
props.searchResultsObj.searchDetailsObj[0].value[0]
|
||||
.pinswg_speacialistcaseprocess,
|
||||
props.searchResultsObj.searchDetailsObj[0].value[0][
|
||||
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
isLPA
|
||||
);
|
||||
|
||||
return props.searchResultsObj.searchDetailsObj[0].value[0]
|
||||
.pinswg_speacialistcaseprocess == 846040000 && isLPA
|
||||
? true
|
||||
: false;
|
||||
|
||||
case 846040019:
|
||||
return showReps(
|
||||
props.searchResultsObj.searchDetailsObj[0].value[0]
|
||||
.pinswg_startdate,
|
||||
props.searchResultsObj.searchDetailsObj[0].value[0]
|
||||
.pinswg_statementduedate
|
||||
);
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user