diff --git a/.env.local b/.env.local index 9a787f68..e58c1e66 100644 --- a/.env.local +++ b/.env.local @@ -32,7 +32,7 @@ CRMURL_VERSION = "v8.2" # # //New PreProd # CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a -# CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E +# CLIENT_SECRET = VWY8Q~9EtRzGXpd8Xs~5OS1fej2IyVJ8JgTMncw3 # RELAY_ROOT = https://ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-uks-01/ # RELAYURI = "ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net" # RELAYPATH = "ar-hc-lz-pedw-ppe-uks-01" @@ -53,7 +53,7 @@ CRMURL_VERSION = "v8.2" # //New Prod # CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc -# CLIENT_SECRET = tFk8Q~E.R-HFjROTu1sRKqwb_ONzy05uPYoF6awR +# CLIENT_SECRET = ULC8Q~fZiXm0.teVLlZ_7LjxBOj2vIsWSApu2bAq # RELAY_ROOT = https://ar-ns-lz-pedw-prod-uks-01.servicebus.windows.net/ar-hc-lz-pedw-prod-uks-01/ # RELAYURI = "ar-ns-lz-pedw-prod-uks-01.servicebus.windows.net" # RELAYPATH = "ar-hc-lz-pedw-prod-uks-01" @@ -113,6 +113,7 @@ CRMURL_VERSION = "v8.2" //GOOGLE_TAG_MANAGER = GTM-T78CBC3 GOOGLE_TAG_MANAGER = G-GTWW3JT03Z + SHOWLOGIN = true SHOWREPRESENTATIONS = true SHOWFILEUPLOAD = "false" diff --git a/components/case/representation/index.js b/components/case/representation/index.js index 5c894c8b..99671b52 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -140,9 +140,9 @@ let MakeRepresentation = (props) => { const pad = (num) => String(num).padStart(2, "0"); const dateStr = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad( - now.getDate() + now.getDate(), )}-${pad(now.getHours())}:${pad(now.getMinutes())}:${pad( - now.getSeconds() + now.getSeconds(), )}`; const repCap = repCapMap[values.representationCapacity] || ""; @@ -154,7 +154,7 @@ let MakeRepresentation = (props) => { const namePart = isLPA ? sanitize(values.onBehalfOfLPA || "") : `${sanitize(values.lastname || "")}_${sanitize( - values.firstname || "" + values.firstname || "", )}`; values.repfile_name = @@ -203,7 +203,7 @@ let MakeRepresentation = (props) => { if (shouldIncludeInterested) { capacityOptionsArr.push( - t("myrepresentations:capacity-options-arr-interested") + t("myrepresentations:capacity-options-arr-interested"), ); } @@ -263,25 +263,26 @@ let MakeRepresentation = (props) => { const isDNS = appealType === 846040011; const isSIPS = appealType === 846040002; + const isIP = true; // Determine key dates based on appeal type const startDate = new Date( isDNS ? detailsObj.pinswg_applicationacceptedasvalid - : detailsObj.pinswg_startdate || detailsObj.pinswg_startdates + : detailsObj.pinswg_startdate || detailsObj.pinswg_startdates, ); const questionnaireDate = new Date( isDNS ? detailsObj.pinswg_endofrepresentationperiod - : detailsObj.pinswg_questionnaireduedate + : detailsObj.pinswg_questionnaireduedate, ); questionnaireDate.setHours(23, 59, 59, 999); const finalCommentsDate = new Date( isDNS ? detailsObj.pinswg_endofrepresentationperiod - : detailsObj.pinswg_finalcommentsduedate + : detailsObj.pinswg_finalcommentsduedate, ); finalCommentsDate.setHours(23, 59, 59, 999); @@ -289,7 +290,7 @@ let MakeRepresentation = (props) => { isDNS ? detailsObj.pinswg_endofrepresentationperiod : detailsObj.pinswg_statementduedate || - detailsObj.pinswg_statementsduedate + detailsObj.pinswg_statementsduedate, ); statementDueDate.setHours(23, 59, 59, 999); @@ -446,7 +447,7 @@ let MakeRepresentation = (props) => { case "apelydd": case "apelydd": case t( - "myrepresentations:capacity-options-arr-appellant" + "myrepresentations:capacity-options-arr-appellant", ).toLowerCase(): { const Component = appealType === 846040002 @@ -456,7 +457,7 @@ let MakeRepresentation = (props) => { ); @@ -468,7 +469,7 @@ let MakeRepresentation = (props) => { { case "asiant": case "asiant": case t( - "myrepresentations:capacity-options-arr-agent" + "myrepresentations:capacity-options-arr-agent", ).toLowerCase(): { const Component = appealType === 846040002 ? ConsultationAgent : RepAgent; @@ -491,7 +492,7 @@ let MakeRepresentation = (props) => { ); @@ -499,7 +500,7 @@ let MakeRepresentation = (props) => { case "interestedparty": case t( - "myrepresentations:capacity-options-arr-interested" + "myrepresentations:capacity-options-arr-interested", ).toLowerCase(): { const Component = appealType === 846040002 @@ -509,7 +510,7 @@ let MakeRepresentation = (props) => { ); @@ -621,7 +622,7 @@ let MakeRepresentation = (props) => { const updateRepresentation = async ( values, sendSavedEmail, - useSaveStatus + useSaveStatus, ) => { const { appealType: appealTypeProp, @@ -724,7 +725,7 @@ let MakeRepresentation = (props) => { } return acc; }, - {} + {}, ); // Normalize "Yes"/"No" to booleans @@ -747,7 +748,7 @@ let MakeRepresentation = (props) => { templateId, loggedinUserEmail, personalisation, - reference + reference, ); } }; @@ -838,8 +839,8 @@ let MakeRepresentation = (props) => { router.query?.state === "edit" ? props.props.currentView.representationCapacity : isLPA - ? "LPA" - : values.representationCapacity; + ? "LPA" + : values.representationCapacity; Object.assign(values, { ...formValues, @@ -915,7 +916,7 @@ let MakeRepresentation = (props) => { showQuestionnaireSection < questionnaireCount ) { setShowQuestionnaireSection( - showQuestionnaireSection + 1 + showQuestionnaireSection + 1, ); updateRepresentation(values, false, false); } else { @@ -948,7 +949,7 @@ let MakeRepresentation = (props) => { generateRepPDF( values, props.props.accountDetails.containerID, - currentView.caseReference.currentReference + currentView.caseReference.currentReference, ).then((data) => { if (data.status === "success") { values = updateLinks(values); @@ -967,7 +968,7 @@ let MakeRepresentation = (props) => { (file) => file && typeof file === "object" && - Object.keys(file).length > 0 + Object.keys(file).length > 0, ) .filter((file) => file.name !== undefined); @@ -1002,7 +1003,7 @@ let MakeRepresentation = (props) => { dataObj, [{}], updatedValues.containerID, - `${props.caseReference}/${dataObj.repfile_name}` + `${props.caseReference}/${dataObj.repfile_name}`, ); }; @@ -1026,7 +1027,7 @@ let MakeRepresentation = (props) => { return formatDates( detailsObj.pinswg_questionnaireduedate || detailsObj.pinswg_endofrepresentationperiod || - detailsObj.pinswg_consultationclose + detailsObj.pinswg_consultationclose, ); } return "N/A"; @@ -1039,7 +1040,7 @@ let MakeRepresentation = (props) => { {formatDates( detailsObj.pinswg_statementduedate || detailsObj.pinswg_statementsduedate || - detailsObj.pinswg_endofrepresentationperiod + detailsObj.pinswg_endofrepresentationperiod, )} @@ -1113,10 +1114,10 @@ let MakeRepresentation = (props) => {

{appealIsConsultation ? t( - "myrepresentations:make-a-consultation-on-label" + "myrepresentations:make-a-consultation-on-label", ) : t( - "myrepresentations:make-a-representation-on-label" + "myrepresentations:make-a-representation-on-label", )}{" "} {currentView.caseReference.currentReference}{" "}

@@ -1130,17 +1131,17 @@ let MakeRepresentation = (props) => {

{t( - "myrepresentations:timetable-title" + "myrepresentations:timetable-title", )}

{appealIsLocalImpact ? t( - "myrepresentations:local-impact-report" + "myrepresentations:local-impact-report", ) : t( - "myrepresentations:questionnaire-due-label" + "myrepresentations:questionnaire-due-label", )} :{" "} @@ -1210,11 +1211,11 @@ const selector = formValueSelector("representationForm"); export default connect( mapStateToProps, - mapDispatchToProps + mapDispatchToProps, )( reduxForm({ form: "representationForm", destroyOnUnmount: false, enableReinitialize: true, - })(MakeRepresentation) + })(MakeRepresentation), ); diff --git a/components/case/summary.js b/components/case/summary.js index b053f450..b27b685a 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -42,6 +42,7 @@ import { hasOwnPropertyAndNotNull, linkedCasesList, showRepsEnded, + getBilingualText, } from "./summary/utils/helpers"; import CaseNoticeBanner from "./caseNoticeBanner"; @@ -115,10 +116,10 @@ const CaseSummary = (props) => { .then((data) => data) .then(() => { getWatchedCasesProxy(loggedInUser).then((data) => { - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then((data) => { setWatchedCasesDetails(data); - }); + })); }); }); @@ -129,7 +130,7 @@ const CaseSummary = (props) => { emailaddress, loggedInUser, incidentID, - appealType + appealType, ) => { let updateBody = { "pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")", @@ -144,13 +145,13 @@ const CaseSummary = (props) => { .then(() => { getWatchedCasesProxy(props.accountDetails.loggedinUserId).then( (data) => { - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); - } - ); - } + }, + )); + }, ); }); }; @@ -209,12 +210,12 @@ const CaseSummary = (props) => { var dateB = new Date(b.createdon); return dateB - dateA; }); - setWatchedCases(data), + (setWatchedCases(data), getDetailsProxy(data, "myWatchedCases").then( (data) => { setWatchedCasesDetails(data); - } - ); + }, + )); }); }); }; @@ -239,28 +240,28 @@ const CaseSummary = (props) => { eval: true, })) : currentType == "watchedCases" - ? (casesObj = jsonpath({ - path: '$..[?(@ && @.ticketnumber=="' + ticketnumber + '")]', - json: setCaseQueryObj, - eval: true, - })) - : currentType == "myCases" - ? (casesObj = jsonpath({ - path: '$..[?(@ && @.pinswg_title=="' + caseReference + '")]', - json: setCaseQueryObj, - eval: true, - })) - : currentType == "directResultsObj" - ? (casesObj = jsonpath({ - path: '$..[?(@ && @.ticketnumber=="' + ticketnumber + '")]', - json: setCaseQueryObj, - eval: true, - })) - : (casesObj = jsonpath({ - path: '$..[?(@ && @.reference=="' + caseReference + '")]', - json: setCaseQueryObj, - eval: true, - })); + ? (casesObj = jsonpath({ + path: '$..[?(@ && @.ticketnumber=="' + ticketnumber + '")]', + json: setCaseQueryObj, + eval: true, + })) + : currentType == "myCases" + ? (casesObj = jsonpath({ + path: '$..[?(@ && @.pinswg_title=="' + caseReference + '")]', + json: setCaseQueryObj, + eval: true, + })) + : currentType == "directResultsObj" + ? (casesObj = jsonpath({ + path: '$..[?(@ && @.ticketnumber=="' + ticketnumber + '")]', + json: setCaseQueryObj, + eval: true, + })) + : (casesObj = jsonpath({ + path: '$..[?(@ && @.reference=="' + caseReference + '")]', + json: setCaseQueryObj, + eval: true, + })); casesObj = Object.assign({}, ...casesObj); @@ -273,12 +274,12 @@ const CaseSummary = (props) => { eval: true, })) : currentType == "directResultsObj" - ? (detailsObj = setCaseDetailsObj[0].value[0]) - : (detailsObj = jsonpath({ - path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]', - jsopn: setCaseDetailsObj, - eval: true, - })); + ? (detailsObj = setCaseDetailsObj[0].value[0]) + : (detailsObj = jsonpath({ + path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]', + jsopn: setCaseDetailsObj, + eval: true, + })); detailsObj = typeof detailsObj == "object" ? detailsObj : detailsObj[0]; @@ -304,7 +305,7 @@ const CaseSummary = (props) => { detailsObj.pinswg_anticipatedgridreferencenorthingtext || detailsObj.pinswg_anticipatedgridrefnorthing, detailsObj.pinswg_anticipatedgridreferenceeastingtext || - detailsObj.pinswg_anticipatedgridrefeasting + detailsObj.pinswg_anticipatedgridrefeasting, ); siteCoords = point.toOSGB36(); //console.log(siteCoords); @@ -331,10 +332,10 @@ const CaseSummary = (props) => { {currentType == "searchResultsObj" ? detailsObj.pinswg_name : currentType == "directResultsObj" - ? casesObj.title - : currentType == "watchedCases" - ? casesObj.pinswg_title - : casesObj.reference} + ? casesObj.title + : currentType == "watchedCases" + ? casesObj.pinswg_title + : casesObj.reference}
@@ -373,19 +374,19 @@ const CaseSummary = (props) => { {((hasValidKey( detailsObj, - "pinswg_anticipatedgridreferencenorthingtext" + "pinswg_anticipatedgridreferencenorthingtext", ) && hasValidKey( detailsObj, - "pinswg_anticipatedgridreferenceeastingtext" + "pinswg_anticipatedgridreferenceeastingtext", )) || (hasValidKey( detailsObj, - "pinswg_anticipatedgridrefeasting" + "pinswg_anticipatedgridrefeasting", ) && hasValidKey( detailsObj, - "pinswg_anticipatedgridrefnorthing" + "pinswg_anticipatedgridrefnorthing", ))) && (
  • { {getFormCollectionByID( appealTypeID || setCaseQueryObj.value[0] - .pinswg_appealcasetype + .pinswg_appealcasetype, ).PrimaryIdAttribute == "pinswg_dnsid" ? t( - "case:summary-applicantonly-label" + "case:summary-applicantonly-label", ) : getFormCollectionByID( - appealTypeID || - setCaseQueryObj - .value[0] - .pinswg_appealcasetype - ).PrimaryIdAttribute == - "pinswg_nonvalidationid" - ? t( - "case:summary-appellantonly-label" - ) - : t( - "case:summary-applicant-label" - )} + appealTypeID || + setCaseQueryObj + .value[0] + .pinswg_appealcasetype, + ).PrimaryIdAttribute == + "pinswg_nonvalidationid" + ? t( + "case:summary-appellantonly-label", + ) + : t( + "case:summary-applicant-label", + )}
    {casesObj.pinswg_appellantagent == @@ -519,18 +520,18 @@ const CaseSummary = (props) => { null && (_.has( detailsObj, - "pinswg_agentcontactname" + "pinswg_agentcontactname", ) ? (
    {t( - "case:summary-agent-label" + "case:summary-agent-label", )}
    {_.has( detailsObj, - "pinswg_agentcontactname" + "pinswg_agentcontactname", ) ? detailsObj.pinswg_agentcontactname : ""} @@ -542,135 +543,135 @@ const CaseSummary = (props) => {
    {t( - "case:summary-site-address-label" + "case:summary-site-address-label", )}
    {getFormCollectionByID( appealTypeID || setCaseQueryObj.value[0] - .pinswg_appealcasetype + .pinswg_appealcasetype, ).PrimaryIdAttribute == "pinswg_dnsid" || getFormCollectionByID( - appealTypeID + appealTypeID, ).PrimaryIdAttribute == "pinswg_sipscase" ? detailsObj.pinswg_projectlocation != null ? detailsObj.pinswg_projectlocation.indexOf( - ";" + ";", ) < 0 ? detailsObj.pinswg_projectlocation : router.locale == - "cy" - ? detailsObj.pinswg_projectlocation.split( - ";" - )[1] - : detailsObj.pinswg_projectlocation.split( - ";" - )[0] + "cy" + ? detailsObj.pinswg_projectlocation.split( + ";", + )[1] + : detailsObj.pinswg_projectlocation.split( + ";", + )[0] : "" : ""} {_.has( detailsObj, - "pinswg_siteaddressline1" + "pinswg_siteaddressline1", ) ? detailsObj.pinswg_siteaddressline1 : ""} {_.has( detailsObj, - "pinswg_addressline1" + "pinswg_addressline1", ) ? detailsObj.pinswg_addressline1 : ""} {_.has( detailsObj, - "pinswg_siteaddressline1" + "pinswg_siteaddressline1", ) && detailsObj.pinswg_siteaddressline1 != null &&
    } {_.has( detailsObj, - "pinswg_addressline1" + "pinswg_addressline1", ) && detailsObj.pinswg_addressline1 != null &&
    } {_.has( detailsObj, - "pinswg_siteaddressline2" + "pinswg_siteaddressline2", ) ? detailsObj.pinswg_siteaddressline2 : ""} {_.has( detailsObj, - "pinswg_addressline2" + "pinswg_addressline2", ) ? detailsObj.pinswg_addressline2 : ""} {_.has( detailsObj, - "pinswg_addressline2" + "pinswg_addressline2", ) && detailsObj.pinswg_addressline2 != null &&
    } {_.has( detailsObj, - "pinswg_siteaddresstown" + "pinswg_siteaddresstown", ) ? detailsObj.pinswg_siteaddresstown : ""} {_.has( detailsObj, - "pinswg_addresstown" + "pinswg_addresstown", ) ? detailsObj.pinswg_addresstown : ""} {_.has( detailsObj, - "pinswg_siteaddresstown" + "pinswg_siteaddresstown", ) && detailsObj.pinswg_siteaddresstown != null &&
    } {_.has( detailsObj, - "pinswg_addresstown" + "pinswg_addresstown", ) && detailsObj.pinswg_addresstown != null &&
    } {_.has( detailsObj, - "pinswg_siteaddresscounty" + "pinswg_siteaddresscounty", ) ? detailsObj.pinswg_siteaddresscounty : ""} {_.has( detailsObj, - "pinswg_addresscounty" + "pinswg_addresscounty", ) ? detailsObj.pinswg_addresscounty : ""} {_.has( detailsObj, - "pinswg_siteaddresscounty" + "pinswg_siteaddresscounty", ) && detailsObj.pinswg_siteaddresscounty != null &&
    } {_.has( detailsObj, - "pinswg_addresscounty" + "pinswg_addresscounty", ) && detailsObj.pinswg_addresscounty != null &&
    } {_.has( detailsObj, - "pinswg_siteaddresspostcode" + "pinswg_siteaddresspostcode", ) ? detailsObj.pinswg_siteaddresspostcode : ""} {_.has( detailsObj, - "pinswg_postcode" + "pinswg_postcode", ) ? detailsObj.pinswg_postcode : ""} @@ -680,21 +681,14 @@ const CaseSummary = (props) => {
    {t( - "case:summary-description-label" + "case:summary-description-label", )}
    - {casesObj.description.indexOf( - ";" - ) < 0 - ? casesObj.description - : router.locale == "cy" - ? casesObj.description.split( - ";" - )[1] - : casesObj.description.split( - ";" - )[0]} + {getBilingualText( + casesObj.description, + router.locale, + )}
  • )} @@ -703,7 +697,7 @@ const CaseSummary = (props) => {
    {t( - "case:summary-case-stage-label" + "case:summary-case-stage-label", )}
    @@ -722,7 +716,7 @@ const CaseSummary = (props) => { "pinswg_casestage@OData.Community.Display.V1.FormattedValue" ] || t( - "case:summary-no-date-entered-label" + "case:summary-no-date-entered-label", )}
    @@ -733,7 +727,7 @@ const CaseSummary = (props) => {
    {t( - "case:summary-environmental-statement-label" + "case:summary-environmental-statement-label", )}
    @@ -747,17 +741,17 @@ const CaseSummary = (props) => {
    {t( - "case:summary-last-modified-label" + "case:summary-last-modified-label", )}
    {detailsObj.modifiedon > casesObj.modifiedon ? formatDates( - detailsObj.modifiedon + detailsObj.modifiedon, ) : formatDates( - casesObj.modifiedon + casesObj.modifiedon, )}
    @@ -772,29 +766,29 @@ const CaseSummary = (props) => {
    {(_.has( detailsObj, - "pinswg_startdate" + "pinswg_startdate", ) || _.has( detailsObj, - "pinswg_applicationacceptedasvalid" + "pinswg_applicationacceptedasvalid", ) || _.has( detailsObj, - "pinswg_startdates" + "pinswg_startdates", )) && showReps( detailsObj.pinswg_startdate || detailsObj.pinswg_startdates || detailsObj.pinswg_applicationacceptedasvalid, detailsObj.pinswg_finalcommentsduedate || - detailsObj.pinswg_endofrepresentationperiod + detailsObj.pinswg_endofrepresentationperiod, ) && ( <> {showRepButton( props .currentView .caseReference - .appealType + .appealType, ) ? ( <> { "searchResultsObj" ? detailsObj.ticketnumber : currentType == - "watchedCases" - ? casesObj.pinswg_title - : currentType == - "directResultsObj" - ? detailsObj.ticketnumber - : casesObj.reference, + "watchedCases" + ? casesObj.pinswg_title + : currentType == + "directResultsObj" + ? detailsObj.ticketnumber + : casesObj.reference, }, }} className="govuk-button" > {t( - "case:summary-make-representation-label" + "case:summary-make-representation-label", )} @@ -830,7 +824,7 @@ const CaseSummary = (props) => { className="govuk-button govuk-button--secondary" > {t( - "case:summary-back-button-label" + "case:summary-back-button-label", )} @@ -850,7 +844,7 @@ const CaseSummary = (props) => { { startDate: formatDates( - detailsObj.pinswg_startdate + detailsObj.pinswg_startdate, ), endDate: props @@ -859,27 +853,27 @@ const CaseSummary = (props) => { .appealType == 846040019 ? formatDates( - detailsObj.pinswg_statementduedate + detailsObj.pinswg_statementduedate, ) : formatDates( - detailsObj.pinswg_finalcommentsduedate + detailsObj.pinswg_finalcommentsduedate, ), - } + }, )}
    {" "} {t( - "case:representation-date-passed-additional-label" + "case:representation-date-passed-additional-label", )}{" "} {t( - "home:login-contact-email" + "home:login-contact-email", )}

    @@ -894,33 +888,33 @@ const CaseSummary = (props) => { (isWatchedCase( props.currentView .caseReference - .incidentid + .incidentid, ).length > 0 == true ? ( ) : ( @@ -974,14 +968,14 @@ const CaseSummary = (props) => { onClick={() => { confirm( t( - "case:you-are-watching-label" + "case:you-are-watching-label", ) + " " + props .currentView .caseReference .currentReference + - "?" + "?", ) && selectWatchedCase( props @@ -994,12 +988,12 @@ const CaseSummary = (props) => { props .currentView .caseReference - .appealType + .appealType, ); }} > {t( - "case:watch-this-case-link" + "case:watch-this-case-link", )} @@ -1008,33 +1002,33 @@ const CaseSummary = (props) => { (isEmailSignUp( props.currentView .caseReference - .incidentid + .incidentid, ).length > 0 == true ? ( ) : ( @@ -1088,14 +1082,14 @@ const CaseSummary = (props) => { onClick={() => { confirm( t( - "case:summary-subscribe-mail-label" + "case:summary-subscribe-mail-label", ) + " " + props .currentView .caseReference .currentReference + - "?" + "?", ) && selectEmailNotifications( props @@ -1112,12 +1106,12 @@ const CaseSummary = (props) => { props .currentView .caseReference - .appealType + .appealType, ); }} > {t( - "case:send-email-notifications" + "case:send-email-notifications", )} {/* {" "} @@ -1224,7 +1218,7 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_startdate" + "pinswg_startdate", ) && (detailsObj.pinswg_startdate != null || @@ -1232,7 +1226,7 @@ const CaseSummary = (props) => { null) && showRepsEnded( detailsObj.pinswg_startdate, - detailsObj.pinswg_finalcommentsduedate + detailsObj.pinswg_finalcommentsduedate, ) && (
    {props.currentView @@ -1240,10 +1234,10 @@ const CaseSummary = (props) => { .appealType == 84604002 ? t( - "case:consultation-period-ended-on-label" + "case:consultation-period-ended-on-label", ) : t( - "case:representation-period-ended-on-label" + "case:representation-period-ended-on-label", )} {props.currentView @@ -1251,10 +1245,10 @@ const CaseSummary = (props) => { .appealType == 846040019 ? formatDates( - detailsObj.pinswg_statementduedate + detailsObj.pinswg_statementduedate, ) : formatDates( - detailsObj.pinswg_finalcommentsduedate + detailsObj.pinswg_finalcommentsduedate, )}
    )} @@ -1278,25 +1272,25 @@ const CaseSummary = (props) => { formatDates, linkedCasesList, currentView, - showMap + showMap, )}
    {((hasValidKey( detailsObj, - "pinswg_anticipatedgridreferencenorthingtext" + "pinswg_anticipatedgridreferencenorthingtext", ) && hasValidKey( detailsObj, - "pinswg_anticipatedgridreferenceeastingtext" + "pinswg_anticipatedgridreferenceeastingtext", )) || (hasValidKey( detailsObj, - "pinswg_anticipatedgridrefeasting" + "pinswg_anticipatedgridrefeasting", ) && hasValidKey( detailsObj, - "pinswg_anticipatedgridrefnorthing" + "pinswg_anticipatedgridrefnorthing", ))) && (
    {
    {t( - "case:summary-site-address-label" + "case:summary-site-address-label", )}
    {getFormCollectionByID( - appealTypeID + appealTypeID, ).PrimaryIdAttribute == "pinswg_dnsid" || getFormCollectionByID( - appealTypeID + appealTypeID, ).PrimaryIdAttribute == "pinswg_sipscase" ? detailsObj.pinswg_projectlocation != null ? detailsObj.pinswg_projectlocation.indexOf( - ";" + ";", ) < 0 ? detailsObj.pinswg_projectlocation : router.locale == - "cy" - ? detailsObj.pinswg_projectlocation.split( - ";" - )[1] - : detailsObj.pinswg_projectlocation.split( - ";" - )[0] + "cy" + ? detailsObj.pinswg_projectlocation.split( + ";", + )[1] + : detailsObj.pinswg_projectlocation.split( + ";", + )[0] : "" : ""} {_.has( detailsObj, - "pinswg_siteaddressline1" + "pinswg_siteaddressline1", ) ? detailsObj.pinswg_siteaddressline1 : ""} {_.has( detailsObj, - "pinswg_addressline1" + "pinswg_addressline1", ) ? detailsObj.pinswg_addressline1 : ""} {_.has( detailsObj, - "pinswg_siteaddressline1" + "pinswg_siteaddressline1", ) && detailsObj.pinswg_siteaddressline1 != null &&
    } {_.has( detailsObj, - "pinswg_addressline1" + "pinswg_addressline1", ) && detailsObj.pinswg_addressline1 != null &&
    } {_.has( detailsObj, - "pinswg_siteaddressline2" + "pinswg_siteaddressline2", ) ? detailsObj.pinswg_siteaddressline2 : ""} {_.has( detailsObj, - "pinswg_addressline2" + "pinswg_addressline2", ) ? detailsObj.pinswg_addressline2 : ""} {_.has( detailsObj, - "pinswg_addressline2" + "pinswg_addressline2", ) && detailsObj.pinswg_addressline2 != null &&
    } {_.has( detailsObj, - "pinswg_siteaddresstown" + "pinswg_siteaddresstown", ) ? detailsObj.pinswg_siteaddresstown : ""} {_.has( detailsObj, - "pinswg_addresstown" + "pinswg_addresstown", ) ? detailsObj.pinswg_addresstown : ""} {_.has( detailsObj, - "pinswg_siteaddresstown" + "pinswg_siteaddresstown", ) && detailsObj.pinswg_siteaddresstown != null &&
    } {_.has( detailsObj, - "pinswg_addresstown" + "pinswg_addresstown", ) && detailsObj.pinswg_addresstown != null &&
    } {_.has( detailsObj, - "pinswg_siteaddresscounty" + "pinswg_siteaddresscounty", ) ? detailsObj.pinswg_siteaddresscounty : ""} {_.has( detailsObj, - "pinswg_addresscounty" + "pinswg_addresscounty", ) ? detailsObj.pinswg_addresscounty : ""} {_.has( detailsObj, - "pinswg_siteaddresscounty" + "pinswg_siteaddresscounty", ) && detailsObj.pinswg_siteaddresscounty != null &&
    } {_.has( detailsObj, - "pinswg_addresscounty" + "pinswg_addresscounty", ) && detailsObj.pinswg_addresscounty != null &&
    } {_.has( detailsObj, - "pinswg_siteaddresspostcode" + "pinswg_siteaddresspostcode", ) ? detailsObj.pinswg_siteaddresspostcode : ""} {_.has( detailsObj, - "pinswg_postcode" + "pinswg_postcode", ) ? detailsObj.pinswg_postcode : ""} @@ -1489,19 +1483,19 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_screeningstartdate" + "pinswg_screeningstartdate", ) ? !_.isEmpty( - detailsObj.pinswg_screeningstartdate + detailsObj.pinswg_screeningstartdate, ) ? formatDates( - detailsObj.pinswg_screeningstartdate + detailsObj.pinswg_screeningstartdate, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -1512,26 +1506,26 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_eiatargetdate" + "pinswg_eiatargetdate", ) ? !_.isEmpty( - detailsObj.pinswg_eiatargetdate + detailsObj.pinswg_eiatargetdate, ) ? formatDates( - detailsObj.pinswg_eiatargetdate + detailsObj.pinswg_eiatargetdate, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    {hasValidKey( detailsObj, - "pinswg_targetextended" + "pinswg_targetextended", ) && (
    @@ -1540,19 +1534,19 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_targetextended" + "pinswg_targetextended", ) ? !_.isEmpty( - detailsObj.pinswg_targetextended + detailsObj.pinswg_targetextended, ) ? formatDates( - detailsObj.pinswg_targetextended + detailsObj.pinswg_targetextended, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -1565,37 +1559,37 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_directionissueddate" + "pinswg_directionissueddate", ) ? !_.isEmpty( - detailsObj.pinswg_directionissueddate + detailsObj.pinswg_directionissueddate, ) ? formatDates( - detailsObj.pinswg_directionissueddate + detailsObj.pinswg_directionissueddate, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    {hasValidKey( detailsObj, - "pinswg_eiarequired" + "pinswg_eiarequired", ) && (
    {t( - "case:summary-eia-required-label" + "case:summary-eia-required-label", )}
    {_.has( detailsObj, - "pinswg_eiarequired" + "pinswg_eiarequired", ) ? detailsObj.pinswg_eiarequired ? router.locale == @@ -1603,11 +1597,11 @@ const CaseSummary = (props) => { ? "Ie" : "Yes" : router.locale == - "cy" - ? "Na" - : "No" + "cy" + ? "Na" + : "No" : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -1631,19 +1625,19 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_scopingstartdate" + "pinswg_scopingstartdate", ) ? !_.isEmpty( - detailsObj.pinswg_scopingstartdate + detailsObj.pinswg_scopingstartdate, ) ? formatDates( - detailsObj.pinswg_scopingstartdate + detailsObj.pinswg_scopingstartdate, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -1654,25 +1648,25 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_scopingtargetdate" + "pinswg_scopingtargetdate", ) ? !_.isEmpty( - detailsObj.pinswg_scopingtargetdate + detailsObj.pinswg_scopingtargetdate, ) ? formatDates( - detailsObj.pinswg_scopingtargetdate + detailsObj.pinswg_scopingtargetdate, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    {hasValidKey( detailsObj, - "pinswg_scopingtargetextended" + "pinswg_scopingtargetextended", ) && (
    @@ -1682,19 +1676,19 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_scopingtargetextended" + "pinswg_scopingtargetextended", ) ? !_.isEmpty( - detailsObj.pinswg_scopingtargetextended + detailsObj.pinswg_scopingtargetextended, ) ? formatDates( - detailsObj.pinswg_scopingtargetextended + detailsObj.pinswg_scopingtargetextended, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -1707,19 +1701,19 @@ const CaseSummary = (props) => {
    {_.has( detailsObj, - "pinswg_scopingoutcomeissueddate" + "pinswg_scopingoutcomeissueddate", ) ? !_.isEmpty( - detailsObj.pinswg_scopingoutcomeissueddate + detailsObj.pinswg_scopingoutcomeissueddate, ) ? formatDates( - detailsObj.pinswg_scopingoutcomeissueddate + detailsObj.pinswg_scopingoutcomeissueddate, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -1785,7 +1779,7 @@ const CaseSummary = (props) => {
    {noRepresentationLink.includes( - router.pathname + router.pathname, ) == true ? ( "" ) : ( @@ -1794,7 +1788,7 @@ const CaseSummary = (props) => { className="govuk-button" > {t( - "case:summary-make-representation-label" + "case:summary-make-representation-label", )} )} @@ -1822,10 +1816,10 @@ const CaseSummary = (props) => { formatDates, linkedCasesList, currentView, - showMap + showMap, ) { const id = getFormCollectionByID( - appealTypeID || setCaseQueryObj.value[0].pinswg_appealcasetype + appealTypeID || setCaseQueryObj.value[0].pinswg_appealcasetype, ).PrimaryIdAttribute; const Component = CaseTypes[capitalizeFirstLetter(id)]; @@ -1845,7 +1839,7 @@ const CaseSummary = (props) => { useEffect(() => { const linkCaseObj = async () => { let docObj = await getLinkedCases( - incidentid || setCaseQueryObj.value[0].incidentid + incidentid || setCaseQueryObj.value[0].incidentid, ).then((data) => { //console.log(data); setCurrentLinkedCases(data); @@ -1944,7 +1938,7 @@ const CaseSummary = (props) => { ? showReps( props.searchDetailsObj[0].value[0].pinswg_startdate, props.searchDetailsObj[0].value[0] - .pinswg_finalcommentsduedate + .pinswg_finalcommentsduedate, ) : true; @@ -1954,16 +1948,16 @@ const CaseSummary = (props) => { .pinswg_speacialistcaseprocess == 846040000 && isLPA ? true : props.searchDetailsObj[0].value[0] - .pinswg_speacialistcaseprocess == 846040001 - ? true - : false; + .pinswg_speacialistcaseprocess == 846040001 + ? true + : false; return shouldShow; case 846040019: return showReps( props.searchDetailsObj[0].value[0].pinswg_startdate, - props.searchDetailsObj[0].value[0].pinswg_statementduedate + props.searchDetailsObj[0].value[0].pinswg_statementduedate, ); default: @@ -1983,7 +1977,7 @@ const CaseSummary = (props) => { selectWatchedCase( props.accountDetails.accountDetails.contactid, incidentid, - appealTypeID + appealTypeID, ); destroyCookie({}, "pedwWatchCase", { path: "/" }); } diff --git a/components/case/summaryTypes/pinswg_dnsid.js b/components/case/summaryTypes/pinswg_dnsid.js index 16786693..d8e93f16 100644 --- a/components/case/summaryTypes/pinswg_dnsid.js +++ b/components/case/summaryTypes/pinswg_dnsid.js @@ -7,6 +7,7 @@ import transLookup from "../../../data/lookuptranslations.json"; import GoogleMapComponent from "../../mapping/"; import OSPoint from "ospoint"; +import { getBilingualText } from "../summary/utils/helpers"; const Pinswg_dnsid = (props) => { let { t } = useTranslation(); @@ -21,7 +22,7 @@ const Pinswg_dnsid = (props) => { point = new OSPoint( detailsObj.pinswg_anticipatedgridreferencenorthingtext, - detailsObj.pinswg_anticipatedgridreferenceeastingtext + detailsObj.pinswg_anticipatedgridreferenceeastingtext, ); siteCoords = point.toOSGB36(); //console.log(siteCoords); @@ -53,36 +54,11 @@ const Pinswg_dnsid = (props) => { {t("case:summary-project-details-label")}

    - {detailsObj.pinswg_projectdescription != null - ? detailsObj.pinswg_projectdescription.indexOf( - ";" - ) < 0 - ? detailsObj.pinswg_projectdescription - : router.locale == "cy" - ? detailsObj.pinswg_projectdescription.split( - ";" - )[1] - : detailsObj.pinswg_projectdescription.split( - ";" - )[0] - : ""} + {getBilingualText( + detailsObj.pinswg_projectdescription, + router.locale, + )}

    - - {/*

    - {detailsObj.pinswg_projectlocation != null - ? detailsObj.pinswg_projectlocation.indexOf( - ";" - ) < 0 - ? detailsObj.pinswg_projectlocation - : router.locale == "cy" - ? detailsObj.pinswg_projectlocation.split( - ";" - )[1] - : detailsObj.pinswg_projectlocation.split( - ";" - )[0] - : ""} -

    */}
    {showMap == "true" && (
    @@ -136,7 +112,7 @@ const Pinswg_dnsid = (props) => { "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || t( - "case:summary-no-date-entered-label" + "case:summary-no-date-entered-label", )}
    @@ -145,7 +121,7 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-case-website-label" + "case:summary-case-website-label", )}
    @@ -164,7 +140,7 @@ const Pinswg_dnsid = (props) => { rel="noreferrer" href={ detailsObj.pinswg_webaddress.indexOf( - "https://" + "https://", ) ? "https://" + detailsObj.pinswg_webaddress @@ -177,7 +153,7 @@ const Pinswg_dnsid = (props) => { ) || t( - "case:summary-no-date-entered-label" + "case:summary-no-date-entered-label", )}
    @@ -206,7 +182,7 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-eia-required-label" + "case:summary-eia-required-label", )}
    @@ -217,13 +193,13 @@ const Pinswg_dnsid = (props) => { "pinswg_eiarequired@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup + transLookup, ) : detailsObj[ "pinswg_eiarequired@OData.Community.Display.V1.FormattedValue" ] || t( - "case:summary-to-be-confirmed-label" + "case:summary-to-be-confirmed-label", )}
    @@ -247,7 +223,7 @@ const Pinswg_dnsid = (props) => { "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" ] || t( - "case:summary-to-be-confirmed-label" + "case:summary-to-be-confirmed-label", )}
    @@ -291,7 +267,7 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-type-of-event-label" + "case:summary-type-of-event-label", )}
    @@ -314,25 +290,25 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-start-event-date-label" + "case:summary-start-event-date-label", )}
    {_.has( detailsObj, - "pinswg_startdateofevent" + "pinswg_startdateofevent", ) ? !_.isEmpty( - detailsObj.pinswg_startdateofevent + detailsObj.pinswg_startdateofevent, ) ? formatDates( - detailsObj.pinswg_startdateofevent + detailsObj.pinswg_startdateofevent, ) : t( - "case:summary-no-information-to-date-label" + "case:summary-no-information-to-date-label", ) : t( - "case:summary-no-information-to-date-label" + "case:summary-no-information-to-date-label", )}
    @@ -343,19 +319,19 @@ const Pinswg_dnsid = (props) => {
    {_.has( detailsObj, - "pinswg_dateeventrequested" + "pinswg_dateeventrequested", ) ? !_.isEmpty( - detailsObj.pinswg_dateeventrequested + detailsObj.pinswg_dateeventrequested, ) ? formatDates( - detailsObj.pinswg_dateeventrequested + detailsObj.pinswg_dateeventrequested, ) : t( - "case:summary-to-be-confirmed-label" + "case:summary-to-be-confirmed-label", ) : t( - "case:summary-to-be-confirmed-label" + "case:summary-to-be-confirmed-label", )}
    @@ -379,7 +355,7 @@ const Pinswg_dnsid = (props) => { "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || t( - "case:summary-no-information-to-date-label" + "case:summary-no-information-to-date-label", )}
    @@ -394,25 +370,25 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-decision-date-label" + "case:summary-decision-date-label", )}
    {_.has( detailsObj, - "pinswg_dateofdecision" + "pinswg_dateofdecision", ) ? !_.isEmpty( - detailsObj.pinswg_dateofdecision + detailsObj.pinswg_dateofdecision, ) ? formatDates( - detailsObj.pinswg_dateofdecision + detailsObj.pinswg_dateofdecision, ) : t( - "case:summary-no-information-to-date-label" + "case:summary-no-information-to-date-label", ) : t( - "case:summary-no-information-to-date-label" + "case:summary-no-information-to-date-label", )}
    @@ -420,7 +396,7 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-case-link-status-label" + "case:summary-case-link-status-label", )}
    @@ -430,13 +406,13 @@ const Pinswg_dnsid = (props) => { ? casesObj.numberofchildincidents > 0 ? t( - "case:summary-case-link-status-linked" + "case:summary-case-link-status-linked", ) : t( - "case:summary-case-link-status-not-linked" + "case:summary-case-link-status-not-linked", ) : t( - "case:summary-case-link-status-not-linked" + "case:summary-case-link-status-not-linked", )}
    @@ -445,13 +421,13 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-linked-cases-label" + "case:summary-linked-cases-label", )}
    {linkedCasesList( props.currentView - .linkedCaseReferences + .linkedCaseReferences, )}
    @@ -515,126 +491,126 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-written-acceptance-of-notice" + "case:summary-written-acceptance-of-notice", )}
    {_.has( detailsObj, - "pinswg_writtenacceptanceofnotification" + "pinswg_writtenacceptanceofnotification", ) ? !_.isEmpty( - detailsObj.pinswg_writtenacceptanceofnotification + detailsObj.pinswg_writtenacceptanceofnotification, ) ? formatDates( - detailsObj.pinswg_writtenacceptanceofnotification + detailsObj.pinswg_writtenacceptanceofnotification, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    {t( - "case:summary-deadline-for-submission-of-application" + "case:summary-deadline-for-submission-of-application", )}
    {_.has( detailsObj, - "pinswg_deadlineforsubmissionofapplication" + "pinswg_deadlineforsubmissionofapplication", ) ? !_.isEmpty( - detailsObj.pinswg_deadlineforsubmissionofapplication + detailsObj.pinswg_deadlineforsubmissionofapplication, ) ? formatDates( - detailsObj.pinswg_deadlineforsubmissionofapplication + detailsObj.pinswg_deadlineforsubmissionofapplication, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    {t( - "case:summary-date-of-submission-of-application" + "case:summary-date-of-submission-of-application", )}
    {_.has( detailsObj, - "pinswg_dateofsubmissionofapplication" + "pinswg_dateofsubmissionofapplication", ) ? !_.isEmpty( - detailsObj.pinswg_dateofsubmissionofapplication + detailsObj.pinswg_dateofsubmissionofapplication, ) ? formatDates( - detailsObj.pinswg_dateofsubmissionofapplication + detailsObj.pinswg_dateofsubmissionofapplication, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    {_.has( detailsObj, - "pinswg_applicationacceptedasvalid" + "pinswg_applicationacceptedasvalid", ) && !_.isEmpty( - detailsObj.pinswg_applicationrejectedasinvalid + detailsObj.pinswg_applicationrejectedasinvalid, ) && (
    {t( - "case:summary-application-accepted-as-valid" + "case:summary-application-accepted-as-valid", )}
    {!_.isEmpty( - detailsObj.pinswg_applicationacceptedasvalid + detailsObj.pinswg_applicationacceptedasvalid, ) ? formatDates( - detailsObj.pinswg_applicationacceptedasvalid + detailsObj.pinswg_applicationacceptedasvalid, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    )} {_.has( detailsObj, - "pinswg_applicationrejectedasinvalid" + "pinswg_applicationrejectedasinvalid", ) && !_.isEmpty( - detailsObj.pinswg_applicationrejectedasinvalid + detailsObj.pinswg_applicationrejectedasinvalid, ) && (
    {t( - "case:summary-application-rejected-as-invalid" + "case:summary-application-rejected-as-invalid", )}
    {!_.isEmpty( - detailsObj.pinswg_applicationrejectedasinvalid + detailsObj.pinswg_applicationrejectedasinvalid, ) ? formatDates( - detailsObj.pinswg_applicationrejectedasinvalid + detailsObj.pinswg_applicationrejectedasinvalid, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -642,51 +618,51 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-end-of-representation-period" + "case:summary-end-of-representation-period", )}
    {_.has( detailsObj, - "pinswg_endofrepresentationperiod" + "pinswg_endofrepresentationperiod", ) ? !_.isEmpty( - detailsObj.pinswg_endofrepresentationperiod + detailsObj.pinswg_endofrepresentationperiod, ) ? formatDates( - detailsObj.pinswg_endofrepresentationperiod + detailsObj.pinswg_endofrepresentationperiod, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    {_.has( detailsObj, - "pinswg_dateofrequesttovarytheapplication" + "pinswg_dateofrequesttovarytheapplication", ) && !_.isEmpty( - detailsObj.pinswg_dateofrequesttovarytheapplication + detailsObj.pinswg_dateofrequesttovarytheapplication, ) && (
    {t( - "case:summary-date-of-request-to-vary" + "case:summary-date-of-request-to-vary", )}
    {!_.isEmpty( - detailsObj.pinswg_dateofrequesttovarytheapplication + detailsObj.pinswg_dateofrequesttovarytheapplication, ) ? formatDates( - detailsObj.pinswg_dateofrequesttovarytheapplication + detailsObj.pinswg_dateofrequesttovarytheapplication, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -694,33 +670,33 @@ const Pinswg_dnsid = (props) => { {_.has( detailsObj, - "pinswg_confirmrequesttovaryapplication" + "pinswg_confirmrequesttovaryapplication", ) && !_.isEmpty( - detailsObj.pinswg_confirmrequesttovaryapplication + detailsObj.pinswg_confirmrequesttovaryapplication, ) && (_.has( detailsObj, - "pinswg_rejectrequesttovaryapplication" + "pinswg_rejectrequesttovaryapplication", ) && _.isEmpty( - detailsObj.pinswg_rejectrequesttovaryapplication + detailsObj.pinswg_rejectrequesttovaryapplication, ) ? (
    {t( - "case:summary-confirm-request-to-vary-application" + "case:summary-confirm-request-to-vary-application", )}
    {!_.isEmpty( - detailsObj.pinswg_confirmrequesttovaryapplication + detailsObj.pinswg_confirmrequesttovaryapplication, ) ? formatDates( - detailsObj.pinswg_confirmrequesttovaryapplication + detailsObj.pinswg_confirmrequesttovaryapplication, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -729,33 +705,33 @@ const Pinswg_dnsid = (props) => { ))} {_.has( detailsObj, - "pinswg_rejectrequesttovaryapplication" + "pinswg_rejectrequesttovaryapplication", ) && !_.isEmpty( - detailsObj.pinswg_rejectrequesttovaryapplication + detailsObj.pinswg_rejectrequesttovaryapplication, ) && (_.has( detailsObj, - "pinswg_confirmrequesttovaryapplication" + "pinswg_confirmrequesttovaryapplication", ) && _.isEmpty( - detailsObj.pinswg_confirmrequesttovaryapplication + detailsObj.pinswg_confirmrequesttovaryapplication, ) ? (
    {t( - "case:summary-reject-request-to-vary-application" + "case:summary-reject-request-to-vary-application", )}
    {!_.isEmpty( - detailsObj.pinswg_rejectrequesttovaryapplication + detailsObj.pinswg_rejectrequesttovaryapplication, ) ? formatDates( - detailsObj.pinswg_rejectrequesttovaryapplication + detailsObj.pinswg_rejectrequesttovaryapplication, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -764,26 +740,26 @@ const Pinswg_dnsid = (props) => { ))} {_.has( detailsObj, - "pinswg_suspensionstartdates" + "pinswg_suspensionstartdates", ) && !_.isEmpty( - detailsObj.pinswg_suspensionstartdates + detailsObj.pinswg_suspensionstartdates, ) && (
    {t( - "case:summary-suspension-start-dates" + "case:summary-suspension-start-dates", )}
    {!_.isEmpty( - detailsObj.pinswg_suspensionstartdates + detailsObj.pinswg_suspensionstartdates, ) ? formatDates( - detailsObj.pinswg_suspensionstartdates + detailsObj.pinswg_suspensionstartdates, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -792,25 +768,25 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-suspension-end-dates" + "case:summary-suspension-end-dates", )}
    {_.has( detailsObj, - "pinswg_suspensionenddates" + "pinswg_suspensionenddates", ) ? !_.isEmpty( - detailsObj.pinswg_suspensionenddates + detailsObj.pinswg_suspensionenddates, ) ? formatDates( - detailsObj.pinswg_suspensionenddates + detailsObj.pinswg_suspensionenddates, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -821,19 +797,19 @@ const Pinswg_dnsid = (props) => {
    {_.has( detailsObj, - "pinswg_reportdueby" + "pinswg_reportdueby", ) ? !_.isEmpty( - detailsObj.pinswg_reportdueby + detailsObj.pinswg_reportdueby, ) ? formatDates( - detailsObj.pinswg_reportdueby + detailsObj.pinswg_reportdueby, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    @@ -863,50 +839,50 @@ const Pinswg_dnsid = (props) => {
    {t( - "case:summary-inspector-report-submission-to-welsh-government" + "case:summary-inspector-report-submission-to-welsh-government", )}
    {_.has( detailsObj, - "pinswg_inspectorreportsubmittedtowelshgovernment" + "pinswg_inspectorreportsubmittedtowelshgovernment", ) ? !_.isEmpty( - detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment + detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment, ) ? formatDates( - detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment + detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    {_.has( detailsObj, - "pinswg_withdrawndate" + "pinswg_withdrawndate", ) && !_.isEmpty( - detailsObj.pinswg_withdrawndate + detailsObj.pinswg_withdrawndate, ) && (
    {t( - "case:summary-withdrawn-date" + "case:summary-withdrawn-date", )}
    {!_.isEmpty( - detailsObj.pinswg_withdrawndate + detailsObj.pinswg_withdrawndate, ) ? formatDates( - detailsObj.pinswg_withdrawndate + detailsObj.pinswg_withdrawndate, ) : t( - "case:summary-awaiting-information-label" + "case:summary-awaiting-information-label", )}
    diff --git a/components/utils/index.js b/components/utils/index.js index bbd892dc..0f332227 100644 --- a/components/utils/index.js +++ b/components/utils/index.js @@ -100,7 +100,7 @@ export const getSearchDetails = async (searchResultsObj) => { searchResultsObj = searchResultsObj.value; const detailsObj = searchResultsObj.map((searchDetail, index) => { let formMeta = getFormCollectionByID( - searchDetail.pinswg_appealcasetype + searchDetail.pinswg_appealcasetype, ); // console.log( // "------------------- Details: ", @@ -117,11 +117,11 @@ export const getSearchDetails = async (searchResultsObj) => { "pinswg_dnses", searchDetail.title, "pinswg_dnsid", - searchDetail.incidentid + searchDetail.incidentid, ) || { "@odata.count": 1, "value": [{ "title": searchDetail.title }], - } + }, ); } else { // formMeta?.LogicalCollectionName && @@ -131,11 +131,11 @@ export const getSearchDetails = async (searchResultsObj) => { formMeta.LogicalCollectionName, searchDetail.title, formMeta.PrimaryIdAttribute, - searchDetail.incidentid + searchDetail.incidentid, ) || { "@odata.count": 1, "value": [{ "title": searchDetail.title }], - } + }, ); } }); @@ -159,7 +159,7 @@ export const getPartSavedDetails = (searchResultsObj) => { console.log(searchDetail.title); } else { let formMeta = getFormCollectionByID( - searchDetail.pinswg_appealcasetype + searchDetail.pinswg_appealcasetype, ); // console.log(formMeta); detailsArr.push( @@ -167,8 +167,8 @@ export const getPartSavedDetails = (searchResultsObj) => { formMeta.LogicalCollectionName, searchDetail.title, formMeta.PrimaryIdAttribute, - searchDetail.incidentid - ) + searchDetail.incidentid, + ), ); } }); @@ -307,7 +307,7 @@ export const getSearchDetailsPaged = async (searchResultsObj) => { formMeta.LogicalCollectionName, // appealTypeName null, // caseReference is no longer used in batch formMeta.PrimaryIdAttribute, // primaryIdAttribute - incidentIDs // pass array of incidentIDs + incidentIDs, // pass array of incidentIDs ); allDetails.push(...details); @@ -323,7 +323,7 @@ export const getProgressObj = ( formObjXML, titleList, mandatoryFieldsData, - props + props, ) => { const parser = new DOMParser(); const BuildFormObj = (formObjXML) => { @@ -336,7 +336,7 @@ export const getProgressObj = ( "//tabs/tab[" + (index + 1) + "]//rows/row/control[not(@parentField)]/..", - doc + doc, ); return BuildRowObj(sectionXML, titleList[key].value); @@ -376,7 +376,7 @@ export const getProgressObj = ( 0) || (_.has(props.props.form.appealForm, "values") && Object.keys( - props.props.form.appealForm.values + props.props.form.appealForm.values, ).filter((k) => k.startsWith("pinswg_fileUpload")) .length > 0) : rowCount == formObj[key].fieldsTotal, @@ -401,17 +401,17 @@ export const getProgressObj = ( var parentFieldShowOnValue = xpath.select( "//@parentFieldShowOnValue", - doc + doc, ); var requiredDocumentValue = xpath.select( "//@requiredDocumentValue", - doc + doc, ); var requiredDocumentLabel = xpath.select( "//@requiredDocumentLabel", - doc + doc, ); var hint = xpath.select("//label/@hint", doc); @@ -616,7 +616,7 @@ export const getDetailsProxy = (resultsObj, detailsType) => { ? searchDetail.ticketnumber : searchDetail[ "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue" - ] + ], ); } else { detailsArr.push( @@ -627,8 +627,8 @@ export const getDetailsProxy = (resultsObj, detailsType) => { ? searchDetail.ticketnumber : searchDetail[ "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue" - ] - ) + ], + ), ); } }); @@ -700,7 +700,7 @@ export const updateLinks = (jsonObj) => { // Before the URL if (match.index > lastIndex) { newNodeContent.push( - currentText.slice(lastIndex, match.index) + currentText.slice(lastIndex, match.index), ); }