Merged PR 2368: case stage ROW updates and case closed variants and adv search fix
Related work items: #23551, #23555, #23559
This commit is contained in:
@@ -28,13 +28,13 @@ export const getSelectQuery = (appealTypeName) => {
|
|||||||
return "&$select=pinswg_detailedeiascreening,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate";
|
return "&$select=pinswg_detailedeiascreening,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate";
|
||||||
break;
|
break;
|
||||||
case "pinswg_dnses":
|
case "pinswg_dnses":
|
||||||
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_electricityacts":
|
case "pinswg_electricityacts":
|
||||||
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_harbourrevisionorders":
|
case "pinswg_harbourrevisionorders":
|
||||||
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdiscription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdiscription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_householderappealhases":
|
case "pinswg_householderappealhases":
|
||||||
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstmt,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode";
|
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstmt,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode";
|
||||||
@@ -79,10 +79,10 @@ export const getSelectQuery = (appealTypeName) => {
|
|||||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,statuscode";
|
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,statuscode";
|
||||||
break;
|
break;
|
||||||
case "pinswg_transportandworkacts":
|
case "pinswg_transportandworkacts":
|
||||||
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
case "pinswg_sipses":
|
case "pinswg_sipses":
|
||||||
// return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
// return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
return "&$select=pinswg_casedeadline,_pinswg_projecttype_value,pinswg_eiarequired,pinswg_anticipatedgridrefeasting,pinswg_anticipatedgridrefnorthing,_pinswg_appellant_value,pinswg_name,_pinswg_associatedlpa_value,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,statuscode,pinswg_casestage,_pinswg_sipscase_value,pinswg_writtenacceptanceofnotification,pinswg_validnoticeofintentiontosubmit,pinswg_deadlineforsubmissionofapplication,pinswg_screeningstartdate,pinswg_eiatargetdate,pinswg_targetextended,pinswg_directionissueddate,pinswg_eiarequired,pinswg_scopingstartdate,pinswg_scopingtargetdate,pinswg_scopingtargetextended,pinswg_scopingoutcomeissueddate,pinswg_essubmitted,pinswg_deemedmarinelicenseappliedfor,pinswg_validationdeadlineextension,pinswg_consultationopen,pinswg_consultationclose,pinswg_reportissuedtowelshministers,pinswg_decisionissuedtoapplicant,pinswg_decisionoutcome,pinswg_redetermination,pinswg_redeterminationconsultationdeadline";
|
return "&$select=pinswg_casedeadline,_pinswg_projecttype_value,pinswg_eiarequired,pinswg_anticipatedgridrefeasting,pinswg_anticipatedgridrefnorthing,_pinswg_appellant_value,pinswg_name,_pinswg_associatedlpa_value,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,statuscode,_pinswg_sipscase_value,pinswg_writtenacceptanceofnotification,pinswg_validnoticeofintentiontosubmit,pinswg_deadlineforsubmissionofapplication,pinswg_screeningstartdate,pinswg_eiatargetdate,pinswg_targetextended,pinswg_directionissueddate,pinswg_eiarequired,pinswg_scopingstartdate,pinswg_scopingtargetdate,pinswg_scopingtargetextended,pinswg_scopingoutcomeissueddate,pinswg_essubmitted,pinswg_deemedmarinelicenseappliedfor,pinswg_validationdeadlineextension,pinswg_consultationopen,pinswg_consultationclose,pinswg_reportissuedtowelshministers,pinswg_decisionissuedtoapplicant,pinswg_decisionoutcome,pinswg_redetermination,pinswg_redeterminationconsultationdeadline";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -23,9 +23,16 @@ const statusTextMap = {
|
|||||||
const StatusDetails = (props) => {
|
const StatusDetails = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const specialistProcess =
|
||||||
|
props.searchResultsObj?.searchDetailsObj[0]?.value[0]
|
||||||
|
?.pinswg_specialistcaseprocess;
|
||||||
|
|
||||||
|
console.log(props.currentView?.caseReference?.statuscode);
|
||||||
|
|
||||||
const stages = getStagesForAppealType(
|
const stages = getStagesForAppealType(
|
||||||
props.currentView?.caseReference?.appealType,
|
props.currentView?.caseReference?.appealType,
|
||||||
props.currentView?.caseReference?.statuscode
|
props.currentView?.caseReference?.statuscode,
|
||||||
|
specialistProcess
|
||||||
);
|
);
|
||||||
|
|
||||||
const EventView = (eventsArr) => {
|
const EventView = (eventsArr) => {
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ export const stagesByCaseType = {
|
|||||||
descriptionKey: "final-comments-desc-callin"
|
descriptionKey: "final-comments-desc-callin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040020,
|
stageId: 846040049,
|
||||||
titleKey: "event",
|
titleKey: "event",
|
||||||
descriptionKey: "event-desc-callin"
|
descriptionKey: "event-desc-callin"
|
||||||
},
|
},
|
||||||
@@ -378,14 +378,14 @@ export const stagesByCaseType = {
|
|||||||
descriptionKey: "case-started-case-in-progress-desc"
|
descriptionKey: "case-started-case-in-progress-desc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040010,
|
stageId: 846040062,
|
||||||
titleKey: "statements",
|
titleKey: "statements",
|
||||||
descriptionKey: "statements-desc-order"
|
descriptionKey: "statements-desc-order"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040019,
|
stageId: 846040055,
|
||||||
titleKey: "final-comments",
|
titleKey: "final-comments",
|
||||||
descriptionKey: "final-comments-desc-order"
|
descriptionKey: "final-comments-desc-cpo"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040037,
|
stageId: 846040037,
|
||||||
@@ -416,7 +416,7 @@ export const stagesByCaseType = {
|
|||||||
descriptionKey: "application-registered-desc"
|
descriptionKey: "application-registered-desc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040036,
|
stageId: 846040054,
|
||||||
titleKey: "application-start-case-in-progress",
|
titleKey: "application-start-case-in-progress",
|
||||||
descriptionKey: "application-start-case-in-progress-desc"
|
descriptionKey: "application-start-case-in-progress-desc"
|
||||||
},
|
},
|
||||||
@@ -426,9 +426,9 @@ export const stagesByCaseType = {
|
|||||||
descriptionKey: "statements-desc"
|
descriptionKey: "statements-desc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040019,
|
stageId: 846040063,
|
||||||
titleKey: "final-comments",
|
titleKey: "final-comments",
|
||||||
descriptionKey: "statements-desc"
|
descriptionKey: "final-comments-desc-application"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040022,
|
stageId: 846040022,
|
||||||
@@ -814,9 +814,30 @@ const normaliseCaseType = (caseType) =>
|
|||||||
.replace(/[^A-Z0-9]+/g, "_")
|
.replace(/[^A-Z0-9]+/g, "_")
|
||||||
.replace(/^_|_$/g, "");
|
.replace(/^_|_$/g, "");
|
||||||
|
|
||||||
const resolveStages = (caseTypeOrAppealTypeId) => {
|
const specialistProcessKeyById = {
|
||||||
|
// TODO: replace these with the real CRM option-set values
|
||||||
|
846040000: "RIGHTS_OF_WAY_ORDERS",
|
||||||
|
846040100: "RIGHTS_OF_WAY_ORDERS",
|
||||||
|
846040001: "RIGHTS_OF_WAY_ORDERS",
|
||||||
|
846040101: "RIGHTS_OF_WAY_ORDERS",
|
||||||
|
846040002: "RIGHTS_OF_WAY_SCHEDULE_14",
|
||||||
|
846040102: "RIGHTS_OF_WAY_SCHEDULE_14",
|
||||||
|
846040003: "REQUESTS_FOR_DIRECTION",
|
||||||
|
846040103: "REQUESTS_FOR_DIRECTION"
|
||||||
|
};
|
||||||
|
|
||||||
|
const appealTypeSpecialistProcessStageMap = {
|
||||||
|
846040015: specialistProcessKeyById
|
||||||
|
};
|
||||||
|
|
||||||
|
const resolveStages = (caseTypeOrAppealTypeId, specialistProcess) => {
|
||||||
|
const appealTypeId = Number(caseTypeOrAppealTypeId);
|
||||||
|
|
||||||
|
const specialistProcessKey =
|
||||||
|
appealTypeSpecialistProcessStageMap[appealTypeId]?.[specialistProcess];
|
||||||
|
|
||||||
const appealTypeKey =
|
const appealTypeKey =
|
||||||
caseTypeKeyByAppealTypeId[Number(caseTypeOrAppealTypeId)];
|
specialistProcessKey || caseTypeKeyByAppealTypeId[appealTypeId];
|
||||||
|
|
||||||
const normalised = normaliseCaseType(caseTypeOrAppealTypeId);
|
const normalised = normaliseCaseType(caseTypeOrAppealTypeId);
|
||||||
|
|
||||||
@@ -833,14 +854,35 @@ const resolveStages = (caseTypeOrAppealTypeId) => {
|
|||||||
return entry;
|
return entry;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getStagesForAppealType = (caseType, currentStageId) => {
|
const caseClosedStatusIds = [1000, 5, 6, 846040013, 846040060, 846040059];
|
||||||
const stages = resolveStages(caseType);
|
|
||||||
const currentStageNumber = Number(currentStageId);
|
|
||||||
|
|
||||||
const currentIndex = stages.findIndex(
|
const isCaseClosedStatus = (stageId) =>
|
||||||
|
caseClosedStatusIds.includes(Number(stageId));
|
||||||
|
|
||||||
|
const getStageIndex = (stages, currentStageNumber) => {
|
||||||
|
const exactIndex = stages.findIndex(
|
||||||
(stage) => Number(stage.stageId) === currentStageNumber
|
(stage) => Number(stage.stageId) === currentStageNumber
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (exactIndex !== -1) return exactIndex;
|
||||||
|
|
||||||
|
if (isCaseClosedStatus(currentStageNumber)) {
|
||||||
|
return stages.findIndex((stage) => stage.titleKey === "case-closed");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getStagesForAppealType = (
|
||||||
|
caseType,
|
||||||
|
currentStageId,
|
||||||
|
specialistProcess
|
||||||
|
) => {
|
||||||
|
const stages = resolveStages(caseType, specialistProcess);
|
||||||
|
const currentStageNumber = Number(currentStageId);
|
||||||
|
|
||||||
|
const currentIndex = getStageIndex(stages, currentStageNumber);
|
||||||
|
|
||||||
return stages.map((stage, index) => ({
|
return stages.map((stage, index) => ({
|
||||||
...stage,
|
...stage,
|
||||||
status:
|
status:
|
||||||
|
|||||||
@@ -673,6 +673,28 @@ const SearchResults = (props) => {
|
|||||||
: item[
|
: item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] || "N/A"}
|
] || "N/A"}
|
||||||
|
|
||||||
|
{detailsObj?.pinswg_specialistcaseprocess && (
|
||||||
|
<>
|
||||||
|
<br /> <br />
|
||||||
|
<span>
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"}
|
||||||
|
</span>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
|
|||||||
@@ -120,6 +120,22 @@
|
|||||||
"stringmapid": "c056f05c-7f90-eb11-aac2-00224800be9c",
|
"stringmapid": "c056f05c-7f90-eb11-aac2-00224800be9c",
|
||||||
"attributevalue": 846040015
|
"attributevalue": 846040015
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"value": "RoW Orders (Wreps)",
|
||||||
|
"value_cy": "Gorchmynion RoW (Wreps)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "RoW Orders (Inquiry)",
|
||||||
|
"value_cy": "Gorchmynion RoW (Ymholiad)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "RoW (Requests for a Direction)",
|
||||||
|
"value_cy": "Ceisiadau am Gyfarwyddyd (RoW)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "RoW (Schedule 14 Appeals)",
|
||||||
|
"value_cy": "RoW (Apeliadau Atodlen 14)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"value": "Common Land",
|
"value": "Common Land",
|
||||||
"value_cy": "Tir Comin",
|
"value_cy": "Tir Comin",
|
||||||
@@ -189,6 +205,11 @@
|
|||||||
],
|
],
|
||||||
"statusCodes": [
|
"statusCodes": [
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
"value": "Case Submitted",
|
||||||
|
"value_cy": "Achos a Gyflwynwyd",
|
||||||
|
"statuscode": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"value": "Pre-Application",
|
"value": "Pre-Application",
|
||||||
"value_cy": "Cyn Ymgeisio",
|
"value_cy": "Cyn Ymgeisio",
|
||||||
@@ -447,7 +468,32 @@
|
|||||||
{
|
{
|
||||||
"value": "Case Closed - Decision Issued",
|
"value": "Case Closed - Decision Issued",
|
||||||
"value_cy": "Achos Ar Gau - Penderfyniad Wedi'i Gyhoeddi",
|
"value_cy": "Achos Ar Gau - Penderfyniad Wedi'i Gyhoeddi",
|
||||||
"statuscode": "52"
|
"statuscode": 52
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Information Provided",
|
||||||
|
"value_cy": "Gwybodaeth a Ddarparwyd",
|
||||||
|
"statuscode": 53
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Problem Solved",
|
||||||
|
"value_cy": "Problem wedi'i Datrys",
|
||||||
|
"statuscode": 54
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Case Closed - Invalid",
|
||||||
|
"value_cy": "Achos Ar Gau - Annilys",
|
||||||
|
"statuscode": 55
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Case Closed - Withdrawn",
|
||||||
|
"value_cy": "Achos Ar Gau - Tynnwyd yn ôl",
|
||||||
|
"statuscode": 56
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Case Closed - Cancelled",
|
||||||
|
"value_cy": "Achos Ar Gau - Wedi'i ganslo",
|
||||||
|
"statuscode": 57
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
"final-comments-desc": "Gellir cyflwyno sylwadau terfynol nawr ar gyfer y gorchymyn.",
|
"final-comments-desc": "Gellir cyflwyno sylwadau terfynol nawr ar gyfer y gorchymyn.",
|
||||||
"final-comments-desc-callin": "Gellir cyflwyno sylwadau terfynol nawr ar gyfer y cais a alwyd i mewn.",
|
"final-comments-desc-callin": "Gellir cyflwyno sylwadau terfynol nawr ar gyfer y cais a alwyd i mewn.",
|
||||||
"final-comments-desc-cpo": "Gellir cyflwyno sylwadau terfynol ar gyfer y gorchymyn nawr.",
|
"final-comments-desc-cpo": "Gellir cyflwyno sylwadau terfynol ar gyfer y gorchymyn nawr.",
|
||||||
|
"final-comments-desc-application": "Gellir cyflwyno sylwadau terfynol ar gyfer y cais nawr.",
|
||||||
"event": "Digwyddiad",
|
"event": "Digwyddiad",
|
||||||
"event-desc": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer yr apêl hon.",
|
"event-desc": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer yr apêl hon.",
|
||||||
"event-desc-order": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer y gorchymyn hwn.",
|
"event-desc-order": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer y gorchymyn hwn.",
|
||||||
|
|||||||
@@ -47,10 +47,11 @@
|
|||||||
"final-comments-desc": "Final comments may now be submitted for the appeal.",
|
"final-comments-desc": "Final comments may now be submitted for the appeal.",
|
||||||
"final-comments-desc-callin": "Final comments may now be submitted for the called-in application.",
|
"final-comments-desc-callin": "Final comments may now be submitted for the called-in application.",
|
||||||
"final-comments-desc-cpo": "Final comments may now be submitted for the order.",
|
"final-comments-desc-cpo": "Final comments may now be submitted for the order.",
|
||||||
|
"final-comments-desc-application": "Final comments may now be submitted for the appplication.",
|
||||||
"event": "Event",
|
"event": "Event",
|
||||||
"event-desc": "PEDW is arranging the Hearing / Inquiry event for this appeal.",
|
"event-desc": "PEDW is arranging the Hearing / Inquiry event for this appeal.",
|
||||||
"event-desc-order": "PEDW is arranging the Hearing / Inquiry event for this order.",
|
"event-desc-order": "PEDW is arranging the Hearing / Inquiry event for this order.",
|
||||||
"event-desc-callin": "PEDW is arranging the Hearing / Inquiry event for this appeal-in application.",
|
"event-desc-callin": "PEDW is arranging the Hearing / Inquiry event for this Called-In application.",
|
||||||
"site-visit": "Site Visit",
|
"site-visit": "Site Visit",
|
||||||
"site-visit-desc": "The Inspector is conducting their visit to the site.",
|
"site-visit-desc": "The Inspector is conducting their visit to the site.",
|
||||||
"decision-issued": "Decision Issued",
|
"decision-issued": "Decision Issued",
|
||||||
|
|||||||
@@ -223,13 +223,13 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
"showLoginCheck": true,
|
"showLoginCheck": true,
|
||||||
"specialistProcess":
|
"specialistProcess":
|
||||||
searchDetailsObj[0].value[0]
|
searchDetailsObj[0].value[0]
|
||||||
.pinswg_speacialistcaseprocess != null ||
|
?.pinswg_speacialistcaseprocess != null ||
|
||||||
searchDetailsObj[0].value[0]
|
searchDetailsObj[0].value[0]
|
||||||
.pinswg_specialistcaseprocess != null
|
?.pinswg_specialistcaseprocess != null
|
||||||
? searchDetailsObj[0].value[0]
|
? searchDetailsObj[0].value[0]
|
||||||
.pinswg_speacialistcaseprocess ||
|
?.pinswg_speacialistcaseprocess ||
|
||||||
searchDetailsObj[0].value[0]
|
searchDetailsObj[0].value[0]
|
||||||
.pinswg_specialistcaseprocess
|
?.pinswg_specialistcaseprocess
|
||||||
: ""
|
: ""
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -24,9 +24,10 @@ import {
|
|||||||
setLoggedInUserId
|
setLoggedInUserId
|
||||||
} from "../../store/accountDetails/action";
|
} from "../../store/accountDetails/action";
|
||||||
import { setAppealType, setProjectType } from "../../store/appealType/action";
|
import { setAppealType, setProjectType } from "../../store/appealType/action";
|
||||||
import { setLPA } from "../../store/lpa/action";
|
import { setLPA, setCaseStatus } from "../../store/lpa/action";
|
||||||
import { wrapper } from "../../store/store";
|
import { wrapper } from "../../store/store";
|
||||||
import ServiceBanner from "../../components/myportal/servicebanner";
|
import ServiceBanner from "../../components/myportal/servicebanner";
|
||||||
|
import { getCaseStatus } from "../../actions/services/caseDirectService";
|
||||||
|
|
||||||
const Home = (props) => {
|
const Home = (props) => {
|
||||||
const { footerLinks, pages } = props;
|
const { footerLinks, pages } = props;
|
||||||
@@ -95,13 +96,19 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
const [accountDetails, appealTypeData, lpaData, projectTypeData] =
|
const [
|
||||||
await Promise.all([
|
accountDetails,
|
||||||
await getPersonalAccount(loggedInUser),
|
appealTypeData,
|
||||||
await getAppealsTypes(),
|
lpaData,
|
||||||
await getLPA(),
|
projectTypeData,
|
||||||
await getProjectTypes()
|
caseStatusObj
|
||||||
]);
|
] = await Promise.all([
|
||||||
|
await getPersonalAccount(loggedInUser),
|
||||||
|
await getAppealsTypes(),
|
||||||
|
await getLPA(),
|
||||||
|
await getProjectTypes(),
|
||||||
|
await getCaseStatus()
|
||||||
|
]);
|
||||||
|
|
||||||
//const lpaData = require("../../data/lpa.json");
|
//const lpaData = require("../../data/lpa.json");
|
||||||
//const appealTypeData = require("../../data/appealtypes.json");
|
//const appealTypeData = require("../../data/appealtypes.json");
|
||||||
@@ -111,6 +118,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
store.dispatch(setProjectType(projectTypeData));
|
store.dispatch(setProjectType(projectTypeData));
|
||||||
store.dispatch(setLPA(lpaData));
|
store.dispatch(setLPA(lpaData));
|
||||||
store.dispatch(setLoggedInUserId(loggedInUser));
|
store.dispatch(setLoggedInUserId(loggedInUser));
|
||||||
|
store.dispatch(setCaseStatus(caseStatusObj));
|
||||||
|
|
||||||
thisSession != false &&
|
thisSession != false &&
|
||||||
store.dispatch(setContainerID(thisSession.user.id));
|
store.dispatch(setContainerID(thisSession.user.id));
|
||||||
|
|||||||
Reference in New Issue
Block a user