diff --git a/.env.local b/.env.local index 51c64c55..20a158b8 100644 --- a/.env.local +++ b/.env.local @@ -21,20 +21,23 @@ HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136 # CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS" # //New Test -CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1 -CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM -RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/ -RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net" -RELAYPATH = "ar-hc-lz-pedw-test-uks-01" -CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS" +# CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1 +# CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM +# RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/ +# RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net" +# RELAYPATH = "ar-hc-lz-pedw-test-uks-01" +# CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS" # //New PreProd -# CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a -# CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E +CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a +CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E # 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" -# CRMURL = "ppcrm2016.llcdt.gov.wales/UATPINS" +RELAY_ROOT = https://ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-ukw-01/ +RELAYURI = "ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net" +RELAYPATH = "ar-hc-lz-pedw-ppe-ukw-01" +CRMURL = "ppcrm2016.llcdt.gov.wales/UATPINS" # //Prod Oauth WGO @@ -69,10 +72,10 @@ NEXTAUTH_SECRET = SuperSecret // dev test sql server # DATABASE_URL = sqlserver://pedw-dev-test-sql-svr.database.windows.net:1433;database=PEDWDev;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword -DATABASE_URL = sqlserver://sql-srv-plt-pedw-dev-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword +# DATABASE_URL = sqlserver://sql-srv-plt-pedw-dev-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword // Pre prod sql server -# DATABASE_URL = sqlserver://sql-srv-plt-pedw-ppe-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustservercertificate=true;hostnameincertificate=*.database.windows.net;logintimeout=30;authentication=SqlPassword +DATABASE_URL = sqlserver://sql-srv-plt-pedw-ppe-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustservercertificate=true;hostnameincertificate=*.database.windows.net;logintimeout=30;authentication=SqlPassword // Prod sql server # DATABASE_URL = sqlserver://pp-pedw-sql.database.windows.net:1433;database=PEDWPreProd;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword @@ -98,20 +101,20 @@ AZURE_CLIENT_SECRET = $CLIENT_SECRET # AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwdevuks.blob.core.windows.net // New test key -AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks" -AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg== -AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net +# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks" +# AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg== +# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net // New preprod key -# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwppeuks" -# AZURE_STORAGE_ACCOUNT_KEY = B4GRKr+cA9b9mNM/GHFivzhzflJIZltG8bMmooXlYvGYySPAspTTHistAT30sHipnR+hh6dqUc9q+ASttAjPRQ== -# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwppeuks.blob.core.windows.net +AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwppeuks" +AZURE_STORAGE_ACCOUNT_KEY = B4GRKr+cA9b9mNM/GHFivzhzflJIZltG8bMmooXlYvGYySPAspTTHistAT30sHipnR+hh6dqUc9q+ASttAjPRQ== +AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwppeuks.blob.core.windows.net // PROD key -//AZURE_STORAGE_ACCOUNT_NAME = "pedwprod" -//AZURE_STORAGE_ACCOUNT_KEY = koZ46STRqapSa2Dod8MLL6aju1eYLhhyJ6DXpCLMTnFLJvbDT6CHUv/jwr5U/Ta8a60MWzwToHQy+AStADO7sg== -//AZURE_PEDW_STORAGE_ENDPOINT = https://pedwprod.blob.core.windows.net +# AZURE_STORAGE_ACCOUNT_NAME = "pedwprod" +# AZURE_STORAGE_ACCOUNT_KEY = koZ46STRqapSa2Dod8MLL6aju1eYLhhyJ6DXpCLMTnFLJvbDT6CHUv/jwr5U/Ta8a60MWzwToHQy+AStADO7sg== +# AZURE_PEDW_STORAGE_ENDPOINT = https://pedwprod.blob.core.windows.net AZURE_PEDW_CONTAINER = "pedwapplications" diff --git a/components/case/representation/representationAgent.js b/components/case/representation/representationAgent.js index 1c15dd93..d8957c52 100644 --- a/components/case/representation/representationAgent.js +++ b/components/case/representation/representationAgent.js @@ -33,14 +33,17 @@ const RepAgent = (props) => { setRepFileName(formObj.representationForm.values); - let filterFilesList = - props.currentView.caseReference.repDetails.hasOwnProperty("filesList") + let filterFilesList = props.currentView.caseReference.hasOwnProperty( + "repDetails" + ) + ? props.currentView.caseReference.repDetails.hasOwnProperty("filesList") ? props.currentView.caseReference.repDetails.filesList.filter( function (el) { return el != null; } ) - : []; + : [] + : []; const files = acceptedFiles.map((file) => (
  • @@ -181,33 +184,37 @@ const RepAgent = (props) => { {props.currentView.caseReference.hasOwnProperty( "repDetails" - ) && - props.currentView.caseReference.repDetails.hasOwnProperty( - "filesList" - ) && - props.currentView.caseReference.repDetails - .filesList.length > 0 ? ( -
    - {filterFilesList.map((blob, i) => ( -
    - {blob.name} + ) ? ( + props.currentView.caseReference.repDetails.hasOwnProperty( + "filesList" + ) && + props.currentView.caseReference.repDetails + .filesList.length > 0 ? ( +
    + {filterFilesList.map((blob, i) => ( +
    + {blob.name} - - {blob.name} ( - {bytesToSize(blob.size)}) - -
    - ))} -
    + + {blob.name} ( + {bytesToSize(blob.size)} + ) + +
    + ))} +
    + ) : ( + "" + ) ) : ( "" )} diff --git a/components/case/representation/representationAppellant.js b/components/case/representation/representationAppellant.js index 8479b053..b2d8a5fd 100644 --- a/components/case/representation/representationAppellant.js +++ b/components/case/representation/representationAppellant.js @@ -1,6 +1,5 @@ import useTranslation from "next-translate/useTranslation"; import { useRouter } from "next/router"; -import React from "react"; import { connect } from "react-redux"; import { Field, change, reduxForm } from "redux-form"; import { useState } from "react"; @@ -37,14 +36,17 @@ const RepAppellant = (props) => { setRepFileName(formObj.representationForm.values); - let filterFilesList = - props.currentView.caseReference.repDetails.hasOwnProperty("filesList") + let filterFilesList = props.currentView.caseReference.hasOwnProperty( + "repDetails" + ) + ? props.currentView.caseReference.repDetails.hasOwnProperty("filesList") ? props.currentView.caseReference.repDetails.filesList.filter( function (el) { return el != null; } ) - : []; + : [] + : []; return ( <> @@ -160,33 +162,36 @@ const RepAppellant = (props) => { {props.currentView.caseReference.hasOwnProperty( "repDetails" - ) && - props.currentView.caseReference.repDetails.hasOwnProperty( - "filesList" - ) && - props.currentView.caseReference.repDetails.filesList - .length > 0 ? ( -
    - {filterFilesList.map((blob, i) => ( -
    - {blob.name} + ) ? ( + props.currentView.caseReference.repDetails.hasOwnProperty( + "filesList" + ) && + props.currentView.caseReference.repDetails + .filesList.length > 0 ? ( +
    + {filterFilesList.map((blob, i) => ( +
    + {blob.name} - - {blob.name} ( - {bytesToSize(blob.size)}) - -
    - ))} -
    + + {blob.name} ( + {bytesToSize(blob.size)}) + +
    + ))} +
    + ) : ( + "" + ) ) : ( "" )} diff --git a/components/case/representation/representationInterestedPartyPerson.js b/components/case/representation/representationInterestedPartyPerson.js index 9bdb8383..2904bbf5 100644 --- a/components/case/representation/representationInterestedPartyPerson.js +++ b/components/case/representation/representationInterestedPartyPerson.js @@ -1,10 +1,10 @@ import useTranslation from "next-translate/useTranslation"; import { useRouter } from "next/router"; -import { useDropzone } from "react-dropzone"; import { connect } from "react-redux"; import { Field, change, reduxForm } from "redux-form"; import { useState } from "react"; +import { bytesToSize, getThumbnailIconByExtension } from "../../utils"; import { FileUploadField, RenderCondtionalRadioList, @@ -12,6 +12,8 @@ import { RenderRichMultiline, } from "./representationElements"; +import { useDropzone } from "react-dropzone"; + const RepInterestedPartyPerson = (props) => { let { t } = useTranslation(); @@ -32,12 +34,17 @@ const RepInterestedPartyPerson = (props) => { setRepFileName(formObj.representationForm.values); - let filterFilesList = - props.currentView.caseReference.repDetails.filesList.filter(function ( - el - ) { - return el != null; - }); + let filterFilesList = props.currentView.caseReference.hasOwnProperty( + "repDetails" + ) + ? props.currentView.caseReference.repDetails.hasOwnProperty("filesList") + ? props.currentView.caseReference.repDetails.filesList.filter( + function (el) { + return el != null; + } + ) + : [] + : []; const files = acceptedFiles.map((file) => (
  • @@ -171,6 +178,42 @@ const RepInterestedPartyPerson = (props) => { filenamePrefix={props} /> + {props.currentView.caseReference.hasOwnProperty( + "repDetails" + ) ? ( + props.currentView.caseReference.repDetails.hasOwnProperty( + "filesList" + ) && + props.currentView.caseReference.repDetails + .filesList.length > 0 ? ( +
    + {filterFilesList.map((blob, i) => ( +
    + {blob.name} + + + {blob.name} ( + {bytesToSize(blob.size)} + ) + +
    + ))} +
    + ) : ( + "" + ) + ) : ( + "" + )} {" "} diff --git a/locales/cy/myrepresentations.json b/locales/cy/myrepresentations.json index dce3288f..40e41705 100644 --- a/locales/cy/myrepresentations.json +++ b/locales/cy/myrepresentations.json @@ -123,6 +123,7 @@ "enf-section-question-8": "A ydych yn ymwybodol o unrhyw faterion iechyd a diogelwch y byddai angen eu hystyried pan fydd yr Arolygydd yn ymweld â'r safle?", "enf-section-question-8-hint": "Os Oes, disgrifiwch y materion iechyd a diogelwch i'w hystyried", "enf-section-question-9": "Cyswllt ACLl ar gyfer trefniadau ymweliad safle, gwrandawiad neu ymholiad:", + "enf-section-question-9-hint": "Os Oes, disgrifiwch y materion iechyd a diogelwch i'w hystyried", "enf-section-heading-two": "Ffi Ymgeisio Tybiedig", "enf-section-question-10": "A yw'r awdurdod cynllunio lleol wedi derbyn y ffi gywir sy'n daladwy mewn perthynas â'r apêl hon er mwyn i'r cais cynllunio tybiedig/sail (a) gael ei ystyried?", "enf-section-question-11": "A yw ffi'r apêl wedi'i heithrio?",