Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5ada29cdb | ||
|
|
64dc4e78d2 |
+125
-32
@@ -33,13 +33,18 @@ CRMURL = "ts-pedw.crm11.dynamics.com"
|
|||||||
CRMURL_VERSION = "v9.2"
|
CRMURL_VERSION = "v9.2"
|
||||||
|
|
||||||
# //New PreProd
|
# //New PreProd
|
||||||
CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
# CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
||||||
CLIENT_SECRET = VWY8Q~9EtRzGXpd8Xs~5OS1fej2IyVJ8JgTMncw3
|
# 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/
|
# 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"
|
# RELAYURI = "ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net"
|
||||||
RELAYPATH = "ar-hc-lz-pedw-ppe-uks-01"
|
# RELAYPATH = "ar-hc-lz-pedw-ppe-uks-01"
|
||||||
CRMURL = "wg-pp-pedw.crm11.dynamics.com"
|
# # RELAY_ROOT = https://ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-ukw-01/
|
||||||
CRMURL_VERSION = "v9.2"
|
# # RELAYURI = "ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net"
|
||||||
|
# # RELAYPATH = "ar-hc-lz-pedw-ppe-ukw-01"
|
||||||
|
# # CRMURL = "ppcrm2016.llcdt.gov.wales/PPPINSWales"
|
||||||
|
# # CRMURL_VERSION = "v8.2"
|
||||||
|
# CRMURL = "wg-pp-pedw.crm11.dynamics.com"
|
||||||
|
# CRMURL_VERSION = "v9.2"
|
||||||
|
|
||||||
|
|
||||||
# //Prod Oauth WGO
|
# //Prod Oauth WGO
|
||||||
@@ -56,11 +61,61 @@ CRMURL_VERSION = "v9.2"
|
|||||||
# RELAY_ROOT = https://ar-ns-lz-pedw-prod-uks-01.servicebus.windows.net/ar-hc-lz-pedw-prod-uks-01/
|
# 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"
|
# RELAYURI = "ar-ns-lz-pedw-prod-uks-01.servicebus.windows.net"
|
||||||
# RELAYPATH = "ar-hc-lz-pedw-prod-uks-01"
|
# RELAYPATH = "ar-hc-lz-pedw-prod-uks-01"
|
||||||
|
# # RELAY_ROOT = https://ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net/ar-hc-lz-pedw-prod-ukw-01/
|
||||||
|
# # RELAYURI = "ar-ns-lz-pedw-prod-ukw-01.servicebus.windows.net"
|
||||||
|
# # RELAYPATH = "ar-hc-lz-pedw-prod-ukw-01"
|
||||||
# CRMURL = "crm2016.llc.gov.wales/PEDW"
|
# CRMURL = "crm2016.llc.gov.wales/PEDW"
|
||||||
# CRMURL_VERSION = "v8.2"
|
# CRMURL_VERSION = "v8.2"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# D365 cnr WGO
|
||||||
|
# CLIENT_ID = 3125ac03-91ac-46a7-a166-0086f0ed90b3
|
||||||
|
# CLIENT_SECRET = bFq8Q~9VX5Ra3lKnGGIXsB.G6-ZGMx7LqyqXjdr4
|
||||||
|
# RELAY_ROOT = https://ar-ns-lz-pedw-d365cnr-uks-01.servicebus.windows.net/ar-hc-lz-pedw-d365cnr-uks-01/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-d365cnr-uks-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-d365cnr-uks-01"
|
||||||
|
# CRMURL = "dv-pedw.crm11.dynamics.com"
|
||||||
|
# CRMURL_VERSION = "v9.2"
|
||||||
|
|
||||||
|
# D365 Dev WGO
|
||||||
|
# CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
||||||
|
# CLIENT_SECRET = .Jf8Q~tKMObCJjhh_hy3J5AIctFrBalU4FS~tdxk
|
||||||
|
# RELAY_ROOT = https://ar-ns-lz-pedw-d365dev-uks-01.servicebus.windows.net/ar-hc-lz-pedw-d365dev-uks-01/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-d365dev-uks-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-d365dev-uks-01"
|
||||||
|
# CRMURL = "dv-pedw.crm11.dynamics.com"
|
||||||
|
# CRMURL_VERSION = "v9.2"
|
||||||
|
|
||||||
|
# D365 Test WGO
|
||||||
|
# CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
||||||
|
# CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM
|
||||||
|
# RELAY_ROOT = https://ar-ns-lz-pedw-d365test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-d365test-uks-01/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-d365test-uks-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-d365test-uks-01"
|
||||||
|
# CRMURL = "ts-pedw.crm11.dynamics.com"
|
||||||
|
# CRMURL_VERSION = "v9.2"
|
||||||
|
|
||||||
|
# D365 PP WGO
|
||||||
|
# CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
||||||
|
# CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E
|
||||||
|
# RELAY_ROOT = https://ar-ns-lz-pedw-d365ppe-uks-01.servicebus.windows.net/ar-hc-lz-pedw-d365ppe-uks-01/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-d365ppe-uks-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-d365ppe-uks-01"
|
||||||
|
# CRMURL = "wg-pp-pedw.crm11.dynamics.com"
|
||||||
|
# CRMURL_VERSION = "v9.2"
|
||||||
|
|
||||||
|
# D365 Prod WGO
|
||||||
|
# CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc
|
||||||
|
# CLIENT_SECRET = ULC8Q~fZiXm0.teVLlZ_7LjxBOj2vIsWSApu2bAq
|
||||||
|
# RELAY_ROOT = https://ar-ns-lz-pedw-d365prod-uks-01.servicebus.windows.net/ar-hc-lz-pedw-d365prod-uks-01/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-d365prod-uks-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-d365prod-uks-01"
|
||||||
|
# CRMURL = "wg-prod-pedw.crm11.dynamics.com"
|
||||||
|
# CRMURL_VERSION = "v9.2"
|
||||||
|
|
||||||
|
|
||||||
|
//GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||||
GOOGLE_TAG_MANAGER = G-GTWW3JT03Z
|
GOOGLE_TAG_MANAGER = G-GTWW3JT03Z
|
||||||
|
|
||||||
SHOWLOGIN = true
|
SHOWLOGIN = true
|
||||||
@@ -80,24 +135,38 @@ NEXTAUTH_URL = $API_ROOT
|
|||||||
NEXTAUTH_URL_INTERNAL = $API_ROOT
|
NEXTAUTH_URL_INTERNAL = $API_ROOT
|
||||||
NEXTAUTH_SECRET = SuperSecret
|
NEXTAUTH_SECRET = SuperSecret
|
||||||
|
|
||||||
# CNR sql server
|
// CNR sql server
|
||||||
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-cnr-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-cnr-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
# dev test sql server
|
// dev test sql server
|
||||||
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
|
||||||
|
|
||||||
# test sql server
|
// test sql server
|
||||||
DATABASE_URL = sqlserver://sql-srv-plt-pedw-test-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-test-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
|
// 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
|
// 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
|
# 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
|
||||||
|
|
||||||
# Prod sql server
|
// Prod sql server
|
||||||
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-prod-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-prod-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
|
// D365 CNR sql server
|
||||||
|
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-d365cnr-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
|
// D365 Dev sql server
|
||||||
|
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-d365dev-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
|
// D365 Test sql server
|
||||||
|
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-d365test-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
|
// D365 PPE sql server
|
||||||
|
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-d365ppe-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
|
// D365 Prod sql server
|
||||||
|
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-d365prod-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -105,31 +174,31 @@ SECRET = SuperSecret
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Azure Storage Account
|
//Azure Storage Account
|
||||||
AZURE_CLIENT_ID = $CLIENT_ID
|
AZURE_CLIENT_ID = $CLIENT_ID
|
||||||
AZURE_TENANT_ID = $TENANT
|
AZURE_TENANT_ID = $TENANT
|
||||||
AZURE_CLIENT_SECRET = $CLIENT_SECRET
|
AZURE_CLIENT_SECRET = $CLIENT_SECRET
|
||||||
|
|
||||||
# CNR key
|
// CNR key
|
||||||
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwcnruks"
|
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwcnruks"
|
||||||
AZURE_STORAGE_ACCOUNT_KEY = hRffHq4IwctpaTKdS/U33Xq6nyTDF1t++WJgIwsw7gzstktZin/rRwbTIAL9KKqesVsK7EHrTTG6+ASt4+7skw==
|
AZURE_STORAGE_ACCOUNT_KEY = hRffHq4IwctpaTKdS/U33Xq6nyTDF1t++WJgIwsw7gzstktZin/rRwbTIAL9KKqesVsK7EHrTTG6+ASt4+7skw==
|
||||||
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwcnruks.blob.core.windows.net
|
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwcnruks.blob.core.windows.net
|
||||||
|
|
||||||
# new dev key
|
// new dev key
|
||||||
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwdevuks"
|
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwdevuks"
|
||||||
AZURE_STORAGE_ACCOUNT_KEY = MmrsrCjBfop9pI2oImsP/+lJUWU2DrXsAB8nq5bOVROTmPovSGxjCjKw9+TAFr00k8WDUK9r6mVx+AStcMLyAA==
|
AZURE_STORAGE_ACCOUNT_KEY = MmrsrCjBfop9pI2oImsP/+lJUWU2DrXsAB8nq5bOVROTmPovSGxjCjKw9+TAFr00k8WDUK9r6mVx+AStcMLyAA==
|
||||||
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwdevuks.blob.core.windows.net
|
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwdevuks.blob.core.windows.net
|
||||||
|
|
||||||
# New test key
|
// New test key
|
||||||
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks"
|
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks"
|
||||||
# AZURE_STORAGE_ACCOUNT_KEY = 5NdDO9GGlbTFLHFOXZRw8H2C0Ow5bFTvHwUHEbStyzg2mbd1uwHSeBSvM/dkN+HfdwrFzqAkwL5P+AStdO6cig==
|
# AZURE_STORAGE_ACCOUNT_KEY = 5NdDO9GGlbTFLHFOXZRw8H2C0Ow5bFTvHwUHEbStyzg2mbd1uwHSeBSvM/dkN+HfdwrFzqAkwL5P+AStdO6cig==
|
||||||
AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg==
|
AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg==
|
||||||
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net
|
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net
|
||||||
|
|
||||||
# New preprod key
|
// New preprod key
|
||||||
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwppeuks"
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwppeuks"
|
||||||
AZURE_STORAGE_ACCOUNT_KEY = B4GRKr+cA9b9mNM/GHFivzhzflJIZltG8bMmooXlYvGYySPAspTTHistAT30sHipnR+hh6dqUc9q+ASttAjPRQ==
|
# AZURE_STORAGE_ACCOUNT_KEY = B4GRKr+cA9b9mNM/GHFivzhzflJIZltG8bMmooXlYvGYySPAspTTHistAT30sHipnR+hh6dqUc9q+ASttAjPRQ==
|
||||||
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwppeuks.blob.core.windows.net
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwppeuks.blob.core.windows.net
|
||||||
|
|
||||||
|
|
||||||
# PROD key
|
# PROD key
|
||||||
@@ -142,32 +211,58 @@ AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwppeuks.blob.core.windows.net
|
|||||||
# AZURE_STORAGE_ACCOUNT_KEY = OfV9MFqXcLLPam9GhEdMWadIOwIzhc5hd5TUqzIuQoswFdtV4ybaemjatSv+Kht0Ny1qQKjLplwY+AStUTZJrg==
|
# AZURE_STORAGE_ACCOUNT_KEY = OfV9MFqXcLLPam9GhEdMWadIOwIzhc5hd5TUqzIuQoswFdtV4ybaemjatSv+Kht0Ny1qQKjLplwY+AStUTZJrg==
|
||||||
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwproduks.blob.core.windows.net
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwproduks.blob.core.windows.net
|
||||||
|
|
||||||
|
# D365 CNR key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwd365cnruks"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = nEwCp+4FuVf/9a4DOyKuQO2yRRV4Ypigg20ch1YaiL09YmEhWMEO5pNLpYtI3WnQCkIqeu1CUqwM+AStCLW01g==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwd365cnruks.blob.core.windows.net
|
||||||
|
|
||||||
|
# D365 DEV key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwd365devuks"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = XzwQxuZXSwYrVgemDUD2ymTpYTIfWqhypbmEALw1ZEEP0M4D3b3Gh28clSymxwFu7Gu9mhwkW4/V+AStZ6RF8Q==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwd365devuks.blob.core.windows.net
|
||||||
|
|
||||||
|
# D365 TEST key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwd365testuks"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = 5NdDO9GGlbTFLHFOXZRw8H2C0Ow5bFTvHwUHEbStyzg2mbd1uwHSeBSvM/dkN+HfdwrFzqAkwL5P+AStdO6cig==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwd365testuks.blob.core.windows.net
|
||||||
|
|
||||||
|
# D365 PP key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwd365ppeuks"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = xQz4FWDnQDE09uPOCj1t7axRiquvZG9vbxL88ywzVsJnTsAgewrHnuAGkxGPBCp2xGE53ffYOme6+AStSr8OoQ==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwd365ppeuks.blob.core.windows.net
|
||||||
|
|
||||||
|
# D365 Prod key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwd365produks"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = DvKcWhDpFKMFdVXFF2SqDG0sYQ3AkNCmJUBG0cvgzi5NBHS4Ahd2hPAlfA3hGi2EbohUag3vCucK+ASt1IdBhA==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwd365produks.blob.core.windows.net
|
||||||
|
|
||||||
|
|
||||||
AZURE_PEDW_CONTAINER = "pedwapplications"
|
AZURE_PEDW_CONTAINER = "pedwapplications"
|
||||||
AZURE_PEDW_QUEUE_ENDPOINT = https://$AZURE_STORAGE_ACCOUNT_NAME.queue.core.windows.net
|
AZURE_PEDW_QUEUE_ENDPOINT = https://$AZURE_STORAGE_ACCOUNT_NAME.queue.core.windows.net
|
||||||
|
|
||||||
# gov.notify
|
//gov.notify
|
||||||
# NOTIFY_API_KEY = pedwnextauthkey-90f93710-9dae-423e-aea1-11eccd0dc132-0c9469d9-d671-444d-9e9d-3e5a62001043
|
//NOTIFY_API_KEY = pedwnextauthkey-90f93710-9dae-423e-aea1-11eccd0dc132-0c9469d9-d671-444d-9e9d-3e5a62001043
|
||||||
# NOTIFY_API_KEY = pedwnextauthlivekey-90f93710-9dae-423e-aea1-11eccd0dc132-5c0ed187-754a-4b04-8c99-978e5710c2c1
|
NOTIFY_API_KEY = pedwnextauthlivekey-90f93710-9dae-423e-aea1-11eccd0dc132-5c0ed187-754a-4b04-8c99-978e5710c2c1
|
||||||
NOTIFY_API_KEY = pedwnextauthlive01key-90f93710-9dae-423e-aea1-11eccd0dc132-72bfb1e1-c0b7-47cb-9887-3d47a4b11ad4
|
|
||||||
|
|
||||||
SHOW_DEBUG = true
|
SHOW_DEBUG = true
|
||||||
|
|
||||||
|
|
||||||
# DEV Connection string
|
// DEV Connection string
|
||||||
NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=4b7568b3-70bd-4591-9dc2-267c0a6501d1;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=447d38b5-5d40-4238-8fb3-0ef4741b3db1
|
NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=4b7568b3-70bd-4591-9dc2-267c0a6501d1;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=447d38b5-5d40-4238-8fb3-0ef4741b3db1
|
||||||
|
|
||||||
|
|
||||||
APPLICATIONINSIGHTS_CONNECTIONSTRING = InstrumentationKey=7a06e24a-793c-47bc-8987-ce80f180e035;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=9906b6d0-b791-4add-8d53-c827a534e1d4
|
APPLICATIONINSIGHTS_CONNECTIONSTRING = InstrumentationKey=7a06e24a-793c-47bc-8987-ce80f180e035;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=9906b6d0-b791-4add-8d53-c827a534e1d4
|
||||||
|
|
||||||
# Test Connection string
|
|
||||||
|
// Test Connection string
|
||||||
NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=cc60e8e7-5b30-4c2b-a176-8b96b21b12df;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=2a4094be-6fd1-46ab-a67d-5f241692b129
|
NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=cc60e8e7-5b30-4c2b-a176-8b96b21b12df;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=2a4094be-6fd1-46ab-a67d-5f241692b129
|
||||||
|
|
||||||
# Preprod Connection string
|
// Preprod Connection string
|
||||||
# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=7370f0f9-834d-4c7a-b3c4-9951fcad5ad2;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=04362cb7-6dfc-469e-8274-12243e8be851
|
# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=7370f0f9-834d-4c7a-b3c4-9951fcad5ad2;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=04362cb7-6dfc-469e-8274-12243e8be851
|
||||||
|
|
||||||
# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=a41b91bf-f7dc-4f44-bb66-a67df4eee435;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=473d0632-16f1-4065-8984-d6bac62402c0
|
# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=a41b91bf-f7dc-4f44-bb66-a67df4eee435;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=473d0632-16f1-4065-8984-d6bac62402c0
|
||||||
|
|
||||||
# Prod Connection string
|
// Prod Connection string
|
||||||
# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=61f358c2-8075-4164-b897-17bc6dd31fee;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=0c297349-396b-4dc6-8b56-85f5c680adc6
|
# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=61f358c2-8075-4164-b897-17bc6dd31fee;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=0c297349-396b-4dc6-8b56-85f5c680adc6
|
||||||
|
|
||||||
|
|
||||||
@@ -179,5 +274,3 @@ ALLOWED_IPS=::1,203.0.113.42,198.51.100.17
|
|||||||
UPLOAD_BATCH_COUNT = 5
|
UPLOAD_BATCH_COUNT = 5
|
||||||
|
|
||||||
NRWDOMAIN = rdbmedia.co.uk
|
NRWDOMAIN = rdbmedia.co.uk
|
||||||
|
|
||||||
MAP_TARGET = pedw-dev
|
|
||||||
@@ -78,8 +78,6 @@ Minimum required before merge:
|
|||||||
|
|
||||||
- `.clinerules`
|
- `.clinerules`
|
||||||
- `CONTRIBUTING_AI.md`
|
- `CONTRIBUTING_AI.md`
|
||||||
- `context/implementation-governance.md`
|
|
||||||
- `context/maintainability-adoption-programme.md`
|
|
||||||
- `context/runbook.md`
|
- `context/runbook.md`
|
||||||
- `context/integration-map.md`
|
- `context/integration-map.md`
|
||||||
- `memory-bank/README.md`
|
- `memory-bank/README.md`
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { hashAPIPath, consoleLogger } from ".";
|
import { hashAPIPath, consoleLogger } from ".";
|
||||||
import { getDocumentTypeFromFilename, hasOwn } from "../components/utils";
|
import { getDocumentTypeFromFilename } from "../components/utils";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
ContainerClient,
|
ContainerClient,
|
||||||
@@ -316,7 +316,7 @@ export const createBlob = async (formContent, containerName, caseref) => {
|
|||||||
formContent = JSON.parse(formContent);
|
formContent = JSON.parse(formContent);
|
||||||
let caseID = "";
|
let caseID = "";
|
||||||
|
|
||||||
caseID = hasOwn(formContent, "pinswg_name")
|
caseID = _.has(formContent, "pinswg_name")
|
||||||
? formContent.pinswg_name
|
? formContent.pinswg_name
|
||||||
: caseref;
|
: caseref;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ export const BASE_URL =
|
|||||||
? window.apiRoot
|
? window.apiRoot
|
||||||
: process.env.API_ROOT || `http://localhost:${port}`;
|
: process.env.API_ROOT || `http://localhost:${port}`;
|
||||||
|
|
||||||
export const API_PATH = "/api/data/v9.2/";
|
export const API_PATH = "/api/data/v8.2/";
|
||||||
|
|
||||||
export const WEBAPI_URL =
|
export const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
|
|||||||
+32
-26
@@ -1,4 +1,4 @@
|
|||||||
import { hasOwn } from "../../components/utils";
|
import _ from "lodash";
|
||||||
|
|
||||||
const MASK = "[REDACTED]";
|
const MASK = "[REDACTED]";
|
||||||
|
|
||||||
@@ -50,38 +50,44 @@ export const consoleLogger = (err) => {
|
|||||||
redactSensitive(err) +
|
redactSensitive(err) +
|
||||||
"\n\n/////////////////////////////////////////////////\n"
|
"\n\n/////////////////////////////////////////////////\n"
|
||||||
);
|
);
|
||||||
|
var errStr =
|
||||||
const errStr =
|
"\n\n/////////////////////////////////////////////////\nServer Error " +
|
||||||
"\n\n/////////////////////////////////////////////////\nServer Error\n" +
|
"\n" +
|
||||||
(hasOwn(err, "name") ? `Name: ${err.name}\n` : "") +
|
(_.has(err, "name") ? "Name: " + err.name + "\n" : "") +
|
||||||
(hasOwn(err, "code") ? `Code: ${err.code}\n` : "") +
|
(_.has(err, "code") ? "Code: " + err.code + "\n" : "") +
|
||||||
(hasOwn(err, "query") ? `Query: ${err.query}\n` : "") +
|
(_.has(err, "query") ? "Query: " + err.query + "\n" : "") +
|
||||||
(hasOwn(err, "message") ? `Message: ${err.message}\n` : "") +
|
(_.has(err, "message") ? "Message: " + err.message + "\n" : "") +
|
||||||
(err?.request?.url ? `request.url: ${err.request.url}\n` : "") +
|
(_.has(err, "request.url")
|
||||||
(err?.response?.status ? `Status: ${err.response.status}\n` : "") +
|
? "request.url: " + err.request.url + "\n"
|
||||||
(err?.response?.statusText
|
|
||||||
? `StatusText: ${err.response.statusText}\n`
|
|
||||||
: "") +
|
: "") +
|
||||||
(err?.response?.request?.socket?.remoteAddress
|
(_.has(err, "response.status") ? "Status: " + err.code + "\n" : "") +
|
||||||
? `Request IP: ${err.response.request.socket.remoteAddress}\n`
|
(_.has(err, "response.statusText")
|
||||||
|
? "\nStatusText: " + err.response.status + "\n"
|
||||||
: "") +
|
: "") +
|
||||||
(err?.response?.data?.error?.message
|
(_.has(err, "response.request.socket.remoteAddress")
|
||||||
? `Message: ${redactSensitive(err.response.data.error.message)}\n`
|
? "\nRequest IP: " +
|
||||||
|
err.response.request.socket.remoteAddress +
|
||||||
|
"\n"
|
||||||
: "") +
|
: "") +
|
||||||
(err?.response?.config?.url
|
(_.has(err, "response.data.error.message")
|
||||||
? `Request URL: ${redactSensitive(err.response.config.url)}\n`
|
? "\nMessage: " +
|
||||||
|
redactSensitive(err.response.data.error.message) +
|
||||||
|
"\n"
|
||||||
: "") +
|
: "") +
|
||||||
(err?.response?.headers?.date
|
(_.has(err, "response.config.url")
|
||||||
? `Request Time: ${err.response.headers.date}\n`
|
? "\nRequest URL: " + redactSensitive(err.config.url) + "\n"
|
||||||
: "") +
|
: "") +
|
||||||
(err?.config?.url
|
(_.has(err, "response.headers.date")
|
||||||
? `Axios config url: ${redactSensitive(err.config.url)}\n`
|
? "\nRequest Time: " + err.response.headers.date + "\n"
|
||||||
: "") +
|
: "") +
|
||||||
(err?.message
|
(_.has(err, "config.url")
|
||||||
? `Axios message: ${redactSensitive(err.message)}\n`
|
? "\nAxios config url: " + redactSensitive(err.config.url) + "\n"
|
||||||
: "") +
|
: "") +
|
||||||
(err?.config?.data
|
(_.has(err, "config.url")
|
||||||
? `Request payload: ${redactSensitive(err.config.data)}\n`
|
? "\nAxios message url: " + redactSensitive(err.message) + "\n"
|
||||||
|
: "") +
|
||||||
|
(_.has(err, "config.data")
|
||||||
|
? "\nRequest payload: " + redactSensitive(err.config.data) + "\n"
|
||||||
: "") +
|
: "") +
|
||||||
"\n/////////////////////////////////////////////////\n";
|
"\n/////////////////////////////////////////////////\n";
|
||||||
|
|
||||||
|
|||||||
@@ -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_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_casestage,_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_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_casestage,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_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_casestage,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_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_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
return "&$select=pinswg_casedeadline,pinswg_sipseiarequired,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_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,pinswg_reportdeadline,pinswg_casesubmissiondate,pinswg_preexaminationmeetingneeded,pinswg_consultaionpublicitydeadline,pinswg_endofexaminationstartofreporting,pinswg_compulsoryacquisitionvariationsubmitted,pinswg_compulsoryacquisitionvariationaccepted,pinswg_schemeorderamendmentrequestaccepted,pinswg_schemeorderamendmentrequestsubmitted";
|
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";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -65,23 +65,3 @@ export const getNewDocumentsPaged = async (
|
|||||||
return logAndReturnResponse(error);
|
return logAndReturnResponse(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getStatusByAppeal = async () => {
|
|
||||||
try {
|
|
||||||
return await getJson(
|
|
||||||
BASE_URL + "/api/admin/getStatusCountsByAppeal_api"
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
return logAndReturnResponse(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getStatusByAppealLPA = async () => {
|
|
||||||
try {
|
|
||||||
return await getJson(
|
|
||||||
BASE_URL + "/api/admin/getStatusCountsByAppealAndLPA_api"
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
return logAndReturnResponse(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
getNewAppeals,
|
getNewAppeals,
|
||||||
getNewAppealsPage,
|
getNewAppealsPage,
|
||||||
getNewDocumentsPaged,
|
getNewDocumentsPaged
|
||||||
getStatusByAppeal,
|
|
||||||
getStatusByAppealLPA
|
|
||||||
} from "./adminDirectService";
|
} from "./adminDirectService";
|
||||||
|
|
||||||
export {
|
export { getNewAppeals, getNewAppealsPage, getNewDocumentsPaged };
|
||||||
getNewAppeals,
|
|
||||||
getNewAppealsPage,
|
|
||||||
getNewDocumentsPaged,
|
|
||||||
getStatusByAppeal,
|
|
||||||
getStatusByAppealLPA
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { getJson, requestJson } from "../clients/endpointClient";
|
|||||||
import { buildFileQuery, withBaseUrl } from "../clients/fileRouteBuilder";
|
import { buildFileQuery, withBaseUrl } from "../clients/fileRouteBuilder";
|
||||||
|
|
||||||
export const getCaseMessage = (searchString) => {
|
export const getCaseMessage = (searchString) => {
|
||||||
const route = buildFileQuery("/api/cases/get-case-message", {
|
const route = buildFileQuery("/api/endpoint/getcasemessage_api", {
|
||||||
id: searchString
|
id: searchString
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ export const getCaseMessage = (searchString) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getIncidentbyID = (searchString) => {
|
export const getIncidentbyID = (searchString) => {
|
||||||
const route = buildFileQuery("/api/cases/get-incident-by-id", {
|
const route = buildFileQuery("/api/endpoint/getincidentbyid_api", {
|
||||||
searchString
|
searchString
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ export const getPartSavedAppeal = (searchString) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getSIPSEvents = async (caseid) => {
|
export const getSIPSEvents = async (caseid) => {
|
||||||
const route = buildFileQuery("/api/cases/get-sips-events", {
|
const route = buildFileQuery("/api/endpoint/getsipsevents_api", {
|
||||||
caseid
|
caseid
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ export const getSIPSEvents = async (caseid) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getSIPSMedia = async (caseid) => {
|
export const getSIPSMedia = async (caseid) => {
|
||||||
const route = buildFileQuery("/api/cases/get-sips-media", {
|
const route = buildFileQuery("/api/endpoint/getsipsmedia_api", {
|
||||||
caseid
|
caseid
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ export const getAppealPDFDocument = async (incidentid) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getPortalModuleDetails = async (appealType, caseReference) => {
|
export const getPortalModuleDetails = async (appealType, caseReference) => {
|
||||||
const route = buildFileQuery("/api/myportal/get-portal-module-details", {
|
const route = buildFileQuery("/api/endpoint/getportalmoduledetails_api", {
|
||||||
appealType,
|
appealType,
|
||||||
caseReference: encodeURI(caseReference)
|
caseReference: encodeURI(caseReference)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
} from "../clients/fileRouteBuilder";
|
} from "../clients/fileRouteBuilder";
|
||||||
|
|
||||||
export const getMyCases = (loggedInUserId) => {
|
export const getMyCases = (loggedInUserId) => {
|
||||||
const route = buildFileQuery("/api/myportal/get-my-cases", {
|
const route = buildFileQuery("/api/endpoint/getmycases_api", {
|
||||||
loggedInUserId
|
loggedInUserId
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ export const getMyInvolvements = async (loggedInUserId) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getMyLPACases = (lpaid) => {
|
export const getMyLPACases = (lpaid) => {
|
||||||
const route = buildFileQuery("/api/myportal/get-my-lpa-cases", {
|
const route = buildFileQuery("/api/endpoint/getmylpacases_api", {
|
||||||
lpaid
|
lpaid
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ export const getRepresentationsProxy = (incidentID) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getWatchedCases = (loggedInUserId) => {
|
export const getWatchedCases = (loggedInUserId) => {
|
||||||
const route = buildFileQuery("/api/subscriptions/get-watched-cases", {
|
const route = buildFileQuery("/api/endpoint/getwatchedcases_api", {
|
||||||
loggedInUserId
|
loggedInUserId
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ export const getWatchedCases = (loggedInUserId) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getWatchedCasesProxy = (loggedInUserId) => {
|
export const getWatchedCasesProxy = (loggedInUserId) => {
|
||||||
const route = buildFileQuery("/api/subscriptions/get-watched-cases-proxy", {
|
const route = buildFileQuery("/api/endpoint/getwatchedcasesproxy_api", {
|
||||||
loggedInUserId
|
loggedInUserId
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ export const getAwaitingSubmission = (loggedInUserId) => {
|
|||||||
|
|
||||||
export const createWatchedCases = async (formValues) => {
|
export const createWatchedCases = async (formValues) => {
|
||||||
var data = formValues;
|
var data = formValues;
|
||||||
var queryUrl = buildFileQuery("/api/subscriptions/create-watched-case");
|
var queryUrl = buildFileQuery("/api/endpoint/createwatchedcases_api");
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
method: "post",
|
method: "post",
|
||||||
@@ -181,7 +181,7 @@ export const deleteAwaitingSubmissions = (incidentID) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const deleteWatchedCases = async (watchedCaseID) => {
|
export const deleteWatchedCases = async (watchedCaseID) => {
|
||||||
var queryUrl = buildFileQuery("/api/subscriptions/delete-watched-case", {
|
var queryUrl = buildFileQuery("/api/endpoint/deletewatchedcases_api", {
|
||||||
watchedCaseID
|
watchedCaseID
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const getBasicSearchPaged = (
|
|||||||
showNumberOfRecords
|
showNumberOfRecords
|
||||||
) => {
|
) => {
|
||||||
return getJson(
|
return getJson(
|
||||||
"/api/search/basic-paged?searchString=" +
|
"/api/endpoint/getbasicsearchpaged_api?searchString=" +
|
||||||
searchString +
|
searchString +
|
||||||
"&pageNumber=" +
|
"&pageNumber=" +
|
||||||
pageNumber +
|
pageNumber +
|
||||||
@@ -103,7 +103,7 @@ export const getBasicDNSSearchPaged = (
|
|||||||
export const getAdvancedSearch = (searchString) => {
|
export const getAdvancedSearch = (searchString) => {
|
||||||
return getJson(
|
return getJson(
|
||||||
BASE_URL +
|
BASE_URL +
|
||||||
"/api/search/advanced?searchstring=" +
|
"/api/endpoint/getadvancedsearch_api?searchstring=" +
|
||||||
JSON.stringify(searchString)
|
JSON.stringify(searchString)
|
||||||
).catch(logAndReturnEmptyValueErrorResponse);
|
).catch(logAndReturnEmptyValueErrorResponse);
|
||||||
};
|
};
|
||||||
@@ -116,7 +116,7 @@ export const getAdvancedSearchPaged = (
|
|||||||
showNumberOfRecords
|
showNumberOfRecords
|
||||||
) => {
|
) => {
|
||||||
return getJson(
|
return getJson(
|
||||||
"/api/search/advanced-paged?searchstring=" +
|
"/api/endpoint/getadvancedsearchpaged_api?searchstring=" +
|
||||||
JSON.stringify(searchString) +
|
JSON.stringify(searchString) +
|
||||||
"&pageNumber=" +
|
"&pageNumber=" +
|
||||||
pageNumber +
|
pageNumber +
|
||||||
@@ -186,12 +186,12 @@ export const getBasicSearchDetailsPaged = async (
|
|||||||
})
|
})
|
||||||
.join(" or ");
|
.join(" or ");
|
||||||
|
|
||||||
const groupedUrl = `/api/search/basic-details-paged?appealTypeName=${appealTypeName}&primaryIdAttribute=${primaryIdAttribute}&incidentID=${encodeURIComponent(
|
const url = `/api/endpoint/getbasicsearchdetailspaged_api?appealTypeName=${appealTypeName}&primaryIdAttribute=${primaryIdAttribute}&incidentID=${encodeURIComponent(
|
||||||
filter
|
filter
|
||||||
)}`;
|
)}`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await getJson(groupedUrl);
|
const data = await getJson(url);
|
||||||
return data.value || [];
|
return data.value || [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
@@ -201,7 +201,7 @@ export const getBasicSearchDetailsPaged = async (
|
|||||||
|
|
||||||
export const getSearchDocumentDetails = (incidentID) => {
|
export const getSearchDocumentDetails = (incidentID) => {
|
||||||
return getJson(
|
return getJson(
|
||||||
"/api/documents/get-search-document-details?incidentid=" + incidentID
|
"/api/endpoint/getsearchdocumentdetails_api?incidentid=" + incidentID
|
||||||
).catch((error) => {
|
).catch((error) => {
|
||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
throw error;
|
throw error;
|
||||||
@@ -210,7 +210,7 @@ export const getSearchDocumentDetails = (incidentID) => {
|
|||||||
|
|
||||||
export const getSearchDocumentTypes = (incidentID) => {
|
export const getSearchDocumentTypes = (incidentID) => {
|
||||||
return getJson(
|
return getJson(
|
||||||
"/api/documents/get-search-document-types?incidentid=" + incidentID
|
"/api/endpoint/getsearchdocumentTypes_api?incidentid=" + incidentID
|
||||||
).catch((error) => {
|
).catch((error) => {
|
||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
@@ -225,7 +225,7 @@ export const getSearchDocumentDetailsPaged = (
|
|||||||
documentType
|
documentType
|
||||||
) => {
|
) => {
|
||||||
return getJson(
|
return getJson(
|
||||||
"/api/documents/get-search-document-details-paged?incidentid=" +
|
"/api/endpoint/getsearchdocumentdetailspaged_api?incidentid=" +
|
||||||
incidentID +
|
incidentID +
|
||||||
"&pageNumber=" +
|
"&pageNumber=" +
|
||||||
pageNumber +
|
pageNumber +
|
||||||
@@ -244,7 +244,7 @@ export const getSearchDocumentDetailsPaged = (
|
|||||||
|
|
||||||
export const getLinkedCases = (parentIncidentid) => {
|
export const getLinkedCases = (parentIncidentid) => {
|
||||||
return getJson(
|
return getJson(
|
||||||
"/api/cases/get-linked-cases?parentincidentid=" + parentIncidentid
|
"/api/endpoint/getlinkedcases_api?parentincidentid=" + parentIncidentid
|
||||||
).catch((error) => {
|
).catch((error) => {
|
||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -72,17 +72,7 @@ export default function AIPolicyNotice() {
|
|||||||
{t("home:ai-policy-notice-paragraph-one")}
|
{t("home:ai-policy-notice-paragraph-one")}
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body govuk-!-margin-bottom-4">
|
<p className="govuk-body govuk-!-margin-bottom-4">
|
||||||
{t("home:ai-policy-notice-paragraph-two")}{" "}
|
{t("home:ai-policy-notice-paragraph-two")}
|
||||||
<a
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
href={t(
|
|
||||||
"home:ai-policy-notice-paragraph-two-a-link"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{t("home:ai-policy-notice-paragraph-two-a-label")}
|
|
||||||
</a>{" "}
|
|
||||||
{t("home:ai-policy-notice-paragraph-two-b")}
|
|
||||||
</p>
|
</p>
|
||||||
<button
|
<button
|
||||||
ref={dismissButtonRef}
|
ref={dismissButtonRef}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import CRMError from "./crmError";
|
import CRMError from "./crmError";
|
||||||
import SearchResults from "./search/addresssearchresults";
|
import SearchResults from "./search/addresssearchresults";
|
||||||
import { hasOwn } from "./utils";
|
|
||||||
|
|
||||||
export default function Search(props) {
|
export default function Search(props) {
|
||||||
const {
|
const {
|
||||||
@@ -13,14 +12,14 @@ export default function Search(props) {
|
|||||||
myportal,
|
myportal,
|
||||||
watchedCases,
|
watchedCases,
|
||||||
isLinkedCase,
|
isLinkedCase,
|
||||||
showLoginCheck
|
showLoginCheck,
|
||||||
} = props;
|
} = props;
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
var hasError = hasOwn(searchResultsObj.searchResultsObj, "errorCode")
|
var hasError = _.has(searchResultsObj.searchResultsObj, "errorCode")
|
||||||
? true
|
? true
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
|
|||||||
@@ -6,17 +6,15 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import PaginationControl from "../../../components/search/pagination";
|
import PaginationControl from "../../../components/search/pagination";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
setSearchResults,
|
setSearchResults,
|
||||||
setSearchDetails
|
setSearchDetails
|
||||||
} from "../../../store/searchOutput/action";
|
} from "../../../store/searchOutput/action";
|
||||||
|
|
||||||
import { getDetailsProxy, getSearchDetailsPaged, hasOwn } from "../../utils";
|
import { getDetailsProxy, getSearchDetailsPaged } from "../../utils";
|
||||||
import { getAdvancedSearchPaged } from "../../../actions/services/searchService";
|
import { getAdvancedSearchPaged } from "../../../actions/services/searchService";
|
||||||
import { getNewAppealsPage } from "../../../actions/services/adminService";
|
import { getNewAppealsPage } from "../../../actions/services/adminService";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import {
|
import {
|
||||||
setCurrentPage,
|
setCurrentPage,
|
||||||
setCurrentReference
|
setCurrentReference
|
||||||
@@ -308,7 +306,7 @@ function AppealsTab(props) {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_projectlocation"
|
"pinswg_projectlocation"
|
||||||
)
|
)
|
||||||
@@ -327,7 +325,7 @@ function AppealsTab(props) {
|
|||||||
)[0]
|
)[0]
|
||||||
: ""
|
: ""
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
@@ -337,52 +335,52 @@ function AppealsTab(props) {
|
|||||||
{/* {detailsObj.pinswg_siteaddressline1 !=
|
{/* {detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />} */}
|
null && <br />} */}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline1 !=
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline2"
|
"pinswg_siteaddressline2"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline2 !=
|
detailsObj.pinswg_siteaddressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresstown !=
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresscounty !=
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresspostcode"
|
"pinswg_siteaddresspostcode"
|
||||||
)
|
)
|
||||||
@@ -400,7 +398,7 @@ function AppealsTab(props) {
|
|||||||
? item.pinswg_appellantfirstname +
|
? item.pinswg_appellantfirstname +
|
||||||
" " +
|
" " +
|
||||||
item.pinswg_appellantlastname
|
item.pinswg_appellantlastname
|
||||||
: hasOwn(detailsObj, [
|
: _.has(detailsObj, [
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
])
|
])
|
||||||
? detailsObj[
|
? detailsObj[
|
||||||
@@ -415,17 +413,23 @@ function AppealsTab(props) {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(item, [
|
{_.has(item, [
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
])
|
])
|
||||||
? resolveCrmDisplayValue({
|
? router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})
|
})
|
||||||
|
: item[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"
|
||||||
: ""}
|
: ""}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -435,14 +439,20 @@ function AppealsTab(props) {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: item[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"}
|
||||||
</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">
|
||||||
@@ -452,14 +462,20 @@ function AppealsTab(props) {
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: item[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
{item[
|
{item[
|
||||||
|
|||||||
@@ -1,273 +0,0 @@
|
|||||||
import { useMemo, useState } from "react";
|
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
export default function AppealStatusDashboard({ statusObj = [] }) {
|
|
||||||
const [openSections, setOpenSections] = useState({});
|
|
||||||
|
|
||||||
const sortedAppeals = useMemo(
|
|
||||||
() =>
|
|
||||||
[...statusObj].sort(
|
|
||||||
(a, b) => (b.caseCount || 0) - (a.caseCount || 0)
|
|
||||||
),
|
|
||||||
[statusObj]
|
|
||||||
);
|
|
||||||
|
|
||||||
const percentageOf = (value, total) =>
|
|
||||||
total ? `${(((value || 0) / total) * 100).toFixed(1)}%` : "0.0%";
|
|
||||||
|
|
||||||
const totalCases = sortedAppeals.reduce(
|
|
||||||
(sum, appeal) => sum + (appeal.caseCount || 0),
|
|
||||||
0
|
|
||||||
);
|
|
||||||
|
|
||||||
const largestAppeal = sortedAppeals[0];
|
|
||||||
|
|
||||||
const allStatuses = sortedAppeals.flatMap((appeal) =>
|
|
||||||
(appeal.statuses || []).map((status) => ({
|
|
||||||
...status,
|
|
||||||
appealType: appeal.value
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
|
|
||||||
const statusTotals = allStatuses.reduce((acc, status) => {
|
|
||||||
if (!acc[status.statuscode]) {
|
|
||||||
acc[status.statuscode] = {
|
|
||||||
value: status.value,
|
|
||||||
statuscode: status.statuscode,
|
|
||||||
caseCount: 0
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
acc[status.statuscode].caseCount += status.caseCount || 0;
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
const mostCommonStatus = Object.values(statusTotals).sort(
|
|
||||||
(a, b) => b.caseCount - a.caseCount
|
|
||||||
)[0];
|
|
||||||
|
|
||||||
const maxAppealCount = largestAppeal?.caseCount || 1;
|
|
||||||
|
|
||||||
const allExpanded =
|
|
||||||
sortedAppeals.length > 0 &&
|
|
||||||
sortedAppeals.every((_, index) => openSections[index]);
|
|
||||||
|
|
||||||
const toggleSection = (index) => {
|
|
||||||
setOpenSections((current) => ({
|
|
||||||
...current,
|
|
||||||
[index]: !current[index]
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const showAll = () => {
|
|
||||||
const allOpen = {};
|
|
||||||
sortedAppeals.forEach((_, index) => {
|
|
||||||
allOpen[index] = true;
|
|
||||||
});
|
|
||||||
setOpenSections(allOpen);
|
|
||||||
};
|
|
||||||
|
|
||||||
const hideAll = () => {
|
|
||||||
setOpenSections({});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<h1>Appeal case status dashboard</h1>
|
|
||||||
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<DashboardCard title="Total cases" value={totalCases} />
|
|
||||||
<DashboardCard
|
|
||||||
title="Appeal types"
|
|
||||||
value={sortedAppeals.length}
|
|
||||||
/>
|
|
||||||
<DashboardCard
|
|
||||||
title="Largest appeal type"
|
|
||||||
value={largestAppeal?.caseCount || 0}
|
|
||||||
caption={largestAppeal?.value}
|
|
||||||
/>
|
|
||||||
<DashboardCard
|
|
||||||
title="Most common status"
|
|
||||||
value={mostCommonStatus?.caseCount || 0}
|
|
||||||
caption={mostCommonStatus?.value}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section className="govuk-!-margin-top-8">
|
|
||||||
<h2 className="govuk-heading-m">
|
|
||||||
Case counts and stage breakdown by appeal type
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<p className="govuk-body-s">
|
|
||||||
Select an appeal type row to show the case stage
|
|
||||||
breakdown.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="govuk-accordion__controls">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-accordion__show-all"
|
|
||||||
onClick={allExpanded ? hideAll : showAll}
|
|
||||||
>
|
|
||||||
<span className="govuk-accordion__show-all-text">
|
|
||||||
{allExpanded
|
|
||||||
? "Hide all sections"
|
|
||||||
: "Show all sections"}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
className="govuk-accordion appeal-stage-chart"
|
|
||||||
id="appeals-with-status-accordion"
|
|
||||||
>
|
|
||||||
{sortedAppeals.map((appeal, index) => {
|
|
||||||
const isOpen = !!openSections[index];
|
|
||||||
|
|
||||||
const barWidth =
|
|
||||||
((appeal.caseCount || 0) / maxAppealCount) *
|
|
||||||
100;
|
|
||||||
|
|
||||||
const sortedStatuses = [...(appeal.statuses || [])]
|
|
||||||
.filter((status) => (status.caseCount || 0) > 0)
|
|
||||||
.sort(
|
|
||||||
(a, b) =>
|
|
||||||
(b.caseCount || 0) - (a.caseCount || 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
isOpen
|
|
||||||
? "govuk-accordion__section govuk-accordion__section--expanded appeal-stage-chart__accordion-section"
|
|
||||||
: "govuk-accordion__section appeal-stage-chart__accordion-section"
|
|
||||||
}
|
|
||||||
key={appeal.appealType || index}
|
|
||||||
>
|
|
||||||
<div className="govuk-accordion__section-header">
|
|
||||||
<h2 className="govuk-accordion__section-heading">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-accordion__section-button appeal-stage-chart__button"
|
|
||||||
id={`appeal-status-heading-${index}`}
|
|
||||||
aria-expanded={isOpen}
|
|
||||||
aria-controls={`appeal-status-content-${index}`}
|
|
||||||
onClick={() =>
|
|
||||||
toggleSection(index)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span className="appeal-stage-chart__row">
|
|
||||||
<span className="appeal-stage-chart__label">
|
|
||||||
{appeal.value} (
|
|
||||||
{percentageOf(
|
|
||||||
appeal.caseCount,
|
|
||||||
totalCases
|
|
||||||
)}
|
|
||||||
)
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span className="appeal-stage-chart__bar-wrapper">
|
|
||||||
<span
|
|
||||||
className="appeal-stage-chart__bar"
|
|
||||||
style={{
|
|
||||||
width: `${barWidth}%`
|
|
||||||
}}
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
{sortedStatuses.map(
|
|
||||||
(
|
|
||||||
status,
|
|
||||||
statusIndex
|
|
||||||
) => (
|
|
||||||
<span
|
|
||||||
key={`${status.statuscode}-${statusIndex}`}
|
|
||||||
className={`appeal-stage-chart__segment appeal-stage-chart__segment--${
|
|
||||||
statusIndex %
|
|
||||||
6
|
|
||||||
}`}
|
|
||||||
style={{
|
|
||||||
width: `${
|
|
||||||
((status.caseCount ||
|
|
||||||
0) /
|
|
||||||
(appeal.caseCount ||
|
|
||||||
1)) *
|
|
||||||
100
|
|
||||||
}%`
|
|
||||||
}}
|
|
||||||
title={`${status.value}: ${status.caseCount}`}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span className="appeal-stage-chart__count">
|
|
||||||
{appeal.caseCount ||
|
|
||||||
0}{" "}
|
|
||||||
cases
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
id={`appeal-status-content-${index}`}
|
|
||||||
className="govuk-accordion__section-content"
|
|
||||||
aria-labelledby={`appeal-status-heading-${index}`}
|
|
||||||
hidden={!isOpen}
|
|
||||||
>
|
|
||||||
<dl className="govuk-summary-list">
|
|
||||||
{sortedStatuses.map((status) => (
|
|
||||||
<div
|
|
||||||
className="govuk-summary-list__row"
|
|
||||||
key={status.statuscode}
|
|
||||||
>
|
|
||||||
<dt className="govuk-summary-list__key">
|
|
||||||
<Link
|
|
||||||
target="_blank"
|
|
||||||
href={`/advancedsearchresults?apt=${appeal.appealType}&statuscode=${status.statuscode}`}
|
|
||||||
>
|
|
||||||
{status.value}
|
|
||||||
</Link>
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{status.caseCount || 0}{" "}
|
|
||||||
cases (
|
|
||||||
{percentageOf(
|
|
||||||
status.caseCount,
|
|
||||||
appeal.caseCount
|
|
||||||
)}{" "}
|
|
||||||
of this appeal type)
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function DashboardCard({ title, value, caption }) {
|
|
||||||
return (
|
|
||||||
<div className="govuk-grid-column-one-quarter">
|
|
||||||
<div className="dashboard-card">
|
|
||||||
<p className="govuk-body-s dashboard-card__title">{title}</p>
|
|
||||||
<p className="govuk-heading-l dashboard-card__value">{value}</p>
|
|
||||||
{caption && (
|
|
||||||
<p className="govuk-body-s dashboard-card__caption">
|
|
||||||
{caption}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,571 +0,0 @@
|
|||||||
import { useMemo, useState } from "react";
|
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
export default function AppealLpaStatusDashboard({ statusObj = [] }) {
|
|
||||||
const [openAppeals, setOpenAppeals] = useState({});
|
|
||||||
const [openLpaSections, setOpenLpaSections] = useState({});
|
|
||||||
const [openAppealLpas, setOpenAppealLpas] = useState({});
|
|
||||||
const [openLpaAppeals, setOpenLpaAppeals] = useState({});
|
|
||||||
|
|
||||||
const percentageOf = (value, total) =>
|
|
||||||
total ? `${(((value || 0) / total) * 100).toFixed(1)}%` : "0.0%";
|
|
||||||
|
|
||||||
const totalCases = useMemo(
|
|
||||||
() =>
|
|
||||||
statusObj.reduce((total, item) => total + (item.caseCount || 0), 0),
|
|
||||||
[statusObj]
|
|
||||||
);
|
|
||||||
|
|
||||||
const groupedAppeals = useMemo(() => {
|
|
||||||
const grouped = statusObj.reduce((acc, item) => {
|
|
||||||
const appealKey = item.appealType;
|
|
||||||
|
|
||||||
if (!acc[appealKey]) {
|
|
||||||
acc[appealKey] = {
|
|
||||||
appealType: item.appealType,
|
|
||||||
appealTypeName: item.appealTypeName,
|
|
||||||
caseCount: 0,
|
|
||||||
lpas: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
acc[appealKey].caseCount += item.caseCount || 0;
|
|
||||||
|
|
||||||
const lpaKey = item.lpaId || "unknown-lpa";
|
|
||||||
|
|
||||||
if (!acc[appealKey].lpas[lpaKey]) {
|
|
||||||
acc[appealKey].lpas[lpaKey] = {
|
|
||||||
lpaId: item.lpaId,
|
|
||||||
lpaName: item.lpaName || "Unknown LPA",
|
|
||||||
caseCount: 0,
|
|
||||||
statuses: []
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
acc[appealKey].lpas[lpaKey].caseCount += item.caseCount || 0;
|
|
||||||
acc[appealKey].lpas[lpaKey].statuses.push({
|
|
||||||
statuscode: item.statuscode,
|
|
||||||
status: item.status,
|
|
||||||
caseCount: item.caseCount || 0
|
|
||||||
});
|
|
||||||
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
return Object.values(grouped)
|
|
||||||
.map((appeal) => ({
|
|
||||||
...appeal,
|
|
||||||
lpas: Object.values(appeal.lpas)
|
|
||||||
.map((lpa) => ({
|
|
||||||
...lpa,
|
|
||||||
statuses: lpa.statuses.sort(
|
|
||||||
(a, b) => (b.caseCount || 0) - (a.caseCount || 0)
|
|
||||||
)
|
|
||||||
}))
|
|
||||||
.sort((a, b) => (b.caseCount || 0) - (a.caseCount || 0))
|
|
||||||
}))
|
|
||||||
.sort((a, b) => (b.caseCount || 0) - (a.caseCount || 0));
|
|
||||||
}, [statusObj]);
|
|
||||||
|
|
||||||
const groupedLpas = useMemo(() => {
|
|
||||||
const grouped = statusObj.reduce((acc, item) => {
|
|
||||||
const lpaKey = item.lpaId || "unknown-lpa";
|
|
||||||
|
|
||||||
if (!acc[lpaKey]) {
|
|
||||||
acc[lpaKey] = {
|
|
||||||
lpaId: item.lpaId,
|
|
||||||
lpaName: item.lpaName || "Unknown LPA",
|
|
||||||
caseCount: 0,
|
|
||||||
appeals: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
acc[lpaKey].caseCount += item.caseCount || 0;
|
|
||||||
|
|
||||||
const appealKey = item.appealType;
|
|
||||||
|
|
||||||
if (!acc[lpaKey].appeals[appealKey]) {
|
|
||||||
acc[lpaKey].appeals[appealKey] = {
|
|
||||||
appealType: item.appealType,
|
|
||||||
appealTypeName: item.appealTypeName,
|
|
||||||
caseCount: 0,
|
|
||||||
statuses: []
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
acc[lpaKey].appeals[appealKey].caseCount += item.caseCount || 0;
|
|
||||||
acc[lpaKey].appeals[appealKey].statuses.push({
|
|
||||||
statuscode: item.statuscode,
|
|
||||||
status: item.status,
|
|
||||||
caseCount: item.caseCount || 0
|
|
||||||
});
|
|
||||||
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
return Object.values(grouped)
|
|
||||||
.map((lpa) => ({
|
|
||||||
...lpa,
|
|
||||||
appeals: Object.values(lpa.appeals)
|
|
||||||
.map((appeal) => ({
|
|
||||||
...appeal,
|
|
||||||
statuses: appeal.statuses.sort(
|
|
||||||
(a, b) => (b.caseCount || 0) - (a.caseCount || 0)
|
|
||||||
)
|
|
||||||
}))
|
|
||||||
.sort((a, b) => (b.caseCount || 0) - (a.caseCount || 0))
|
|
||||||
}))
|
|
||||||
.sort((a, b) => (b.caseCount || 0) - (a.caseCount || 0));
|
|
||||||
}, [statusObj]);
|
|
||||||
|
|
||||||
const toggleAppeal = (appealType) => {
|
|
||||||
setOpenAppeals((current) => ({
|
|
||||||
...current,
|
|
||||||
[appealType]: !current[appealType]
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const toggleLpaSection = (lpaId) => {
|
|
||||||
setOpenLpaSections((current) => ({
|
|
||||||
...current,
|
|
||||||
[lpaId]: !current[lpaId]
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const toggleAppealLpa = (key) => {
|
|
||||||
setOpenAppealLpas((current) => ({
|
|
||||||
...current,
|
|
||||||
[key]: !current[key]
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const toggleLpaAppeal = (key) => {
|
|
||||||
setOpenLpaAppeals((current) => ({
|
|
||||||
...current,
|
|
||||||
[key]: !current[key]
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const sortedAppeals = useMemo(
|
|
||||||
() => [...statusObj].sort((a, b) => (b.lpaId || 0) - (a.lpaId || 0)),
|
|
||||||
[statusObj]
|
|
||||||
);
|
|
||||||
|
|
||||||
const allStatuses = sortedAppeals.flatMap((appeal) =>
|
|
||||||
(appeal.statuses || []).map((status) => ({
|
|
||||||
...status,
|
|
||||||
lpaId: appeal.lpaId,
|
|
||||||
lpaName: appeal.lpaName
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
|
|
||||||
const statusTotals = allStatuses.reduce((acc, status) => {
|
|
||||||
if (!acc[status.statuscode]) {
|
|
||||||
acc[status.statuscode] = {
|
|
||||||
value: status.value,
|
|
||||||
statuscode: status.statuscode,
|
|
||||||
caseCount: 0
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
acc[status.statuscode].caseCount += status.caseCount || 0;
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
const largestAppeal = groupedLpas[0];
|
|
||||||
|
|
||||||
const mostCommonStatus = Object.values(groupedAppeals).sort(
|
|
||||||
(a, b) => b.caseCount - a.caseCount
|
|
||||||
)[0];
|
|
||||||
|
|
||||||
const maxAppealCount = largestAppeal?.caseCount || 1;
|
|
||||||
const maxGroupedAppealCount = groupedAppeals[0]?.caseCount || 1;
|
|
||||||
|
|
||||||
const allAppealsExpanded =
|
|
||||||
groupedAppeals.length > 0 &&
|
|
||||||
groupedAppeals.every((appeal) => openAppeals[appeal.appealType]);
|
|
||||||
|
|
||||||
const allLpasExpanded =
|
|
||||||
groupedLpas.length > 0 &&
|
|
||||||
groupedLpas.every((lpa) => openLpaSections[lpa.lpaId]);
|
|
||||||
|
|
||||||
const showAllAppeals = () => {
|
|
||||||
const allOpen = {};
|
|
||||||
groupedAppeals.forEach((appeal) => {
|
|
||||||
allOpen[appeal.appealType] = true;
|
|
||||||
});
|
|
||||||
setOpenAppeals(allOpen);
|
|
||||||
};
|
|
||||||
|
|
||||||
const showAllLpas = () => {
|
|
||||||
const allOpen = {};
|
|
||||||
groupedLpas.forEach((lpa) => {
|
|
||||||
allOpen[lpa.lpaId] = true;
|
|
||||||
});
|
|
||||||
setOpenLpaSections(allOpen);
|
|
||||||
};
|
|
||||||
|
|
||||||
const hideAllAppeals = () => {
|
|
||||||
setOpenAppeals({});
|
|
||||||
setOpenAppealLpas({});
|
|
||||||
};
|
|
||||||
|
|
||||||
const hideAllLpas = () => {
|
|
||||||
setOpenLpaSections({});
|
|
||||||
setOpenLpaAppeals({});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<h1 className="">LPA Appeal case status dashboard</h1>
|
|
||||||
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<DashboardCard title="Total cases" value={totalCases} />
|
|
||||||
<DashboardCard title="LPAs" value={groupedLpas.length} />
|
|
||||||
<DashboardCard
|
|
||||||
title="Largest number of appeals"
|
|
||||||
value={largestAppeal?.caseCount || 0}
|
|
||||||
caption={largestAppeal?.lpaName}
|
|
||||||
/>
|
|
||||||
<DashboardCard
|
|
||||||
title="Most common appeal"
|
|
||||||
value={mostCommonStatus?.caseCount || 0}
|
|
||||||
caption={mostCommonStatus?.appealTypeName}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section className="govuk-!-margin-top-8">
|
|
||||||
<h2 className="govuk-heading-m">
|
|
||||||
Appeal types and case stages by LPA
|
|
||||||
</h2>
|
|
||||||
<div className="govuk-accordion__controls">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-accordion__show-all"
|
|
||||||
onClick={allLpasExpanded ? hideAllLpas : showAllLpas}
|
|
||||||
>
|
|
||||||
<span className="govuk-accordion__show-all-text">
|
|
||||||
{allLpasExpanded
|
|
||||||
? "Hide all sections"
|
|
||||||
: "Show all sections"}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="govuk-accordion"
|
|
||||||
id="lpa-appeal-status-accordion"
|
|
||||||
>
|
|
||||||
{groupedLpas.map((lpa) => {
|
|
||||||
const lpaOpen = !!openLpaSections[lpa.lpaId];
|
|
||||||
|
|
||||||
const width =
|
|
||||||
((lpa.caseCount || 0) / maxAppealCount) * 100;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
lpaOpen
|
|
||||||
? "govuk-accordion__section govuk-accordion__section--expanded"
|
|
||||||
: "govuk-accordion__section"
|
|
||||||
}
|
|
||||||
key={lpa.lpaId}
|
|
||||||
>
|
|
||||||
<div className="govuk-accordion__section-header">
|
|
||||||
<h3 className="govuk-accordion__section-heading">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-accordion__section-button"
|
|
||||||
aria-expanded={lpaOpen}
|
|
||||||
onClick={() =>
|
|
||||||
toggleLpaSection(lpa.lpaId)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div className="appeal-count-chart__row">
|
|
||||||
<div className="appeal-count-chart__label">
|
|
||||||
{lpa.lpaName} (
|
|
||||||
{percentageOf(
|
|
||||||
lpa.caseCount,
|
|
||||||
totalCases
|
|
||||||
)}
|
|
||||||
)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="appeal-count-chart__bar-wrapper">
|
|
||||||
<span
|
|
||||||
className="appeal-count-chart__bar"
|
|
||||||
style={{
|
|
||||||
width: `${width}%`
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<span className="appeal-count-chart__count">
|
|
||||||
{lpa.caseCount}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
className="govuk-accordion__section-content"
|
|
||||||
hidden={!lpaOpen}
|
|
||||||
>
|
|
||||||
{lpa.appeals.map((appeal) => {
|
|
||||||
const key = `${lpa.lpaId}-${appeal.appealType}`;
|
|
||||||
const appealOpen =
|
|
||||||
!!openLpaAppeals[key];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className="lpa-status-block"
|
|
||||||
key={key}
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="lpa-status-block__button"
|
|
||||||
aria-expanded={appealOpen}
|
|
||||||
onClick={() =>
|
|
||||||
toggleLpaAppeal(key)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span className="govuk-body-m">
|
|
||||||
{appeal.appealTypeName}
|
|
||||||
</span>
|
|
||||||
<span className="govuk-body-m">
|
|
||||||
{appeal.caseCount} cases
|
|
||||||
(
|
|
||||||
{percentageOf(
|
|
||||||
appeal.caseCount,
|
|
||||||
lpa.caseCount
|
|
||||||
)}
|
|
||||||
)
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div hidden={!appealOpen}>
|
|
||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-4">
|
|
||||||
{appeal.statuses.map(
|
|
||||||
(status) => (
|
|
||||||
<div
|
|
||||||
className="govuk-summary-list__row"
|
|
||||||
key={
|
|
||||||
status.statuscode
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<dt className="govuk-summary-list__key">
|
|
||||||
<Link
|
|
||||||
target="_blank"
|
|
||||||
href={`/advancedsearchresults?apt=${appeal.appealType}&lpa=${lpa.lpaId}&statuscode=${status.statuscode}`}
|
|
||||||
>
|
|
||||||
{
|
|
||||||
status.status
|
|
||||||
}
|
|
||||||
</Link>
|
|
||||||
</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{
|
|
||||||
status.caseCount
|
|
||||||
}{" "}
|
|
||||||
(
|
|
||||||
{percentageOf(
|
|
||||||
status.caseCount,
|
|
||||||
appeal.caseCount
|
|
||||||
)}
|
|
||||||
)
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section className="govuk-!-margin-top-8">
|
|
||||||
<h2 className="govuk-heading-m">
|
|
||||||
Case stage by LPA and Appeal Type
|
|
||||||
</h2>
|
|
||||||
<p className="govuk-body-s">
|
|
||||||
Select an appeal type row to show the LPA and then case
|
|
||||||
stage breakdown.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="govuk-accordion__controls">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-accordion__show-all"
|
|
||||||
onClick={
|
|
||||||
allAppealsExpanded ? hideAllAppeals : showAllAppeals
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span className="govuk-accordion__show-all-text">
|
|
||||||
{allAppealsExpanded
|
|
||||||
? "Hide all sections"
|
|
||||||
: "Show all sections"}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="govuk-accordion"
|
|
||||||
id="appeal-lpa-status-accordion"
|
|
||||||
>
|
|
||||||
{groupedAppeals.map((appeal) => {
|
|
||||||
const appealOpen = !!openAppeals[appeal.appealType];
|
|
||||||
|
|
||||||
const width =
|
|
||||||
((appeal.caseCount || 0) / maxGroupedAppealCount) *
|
|
||||||
100;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
appealOpen
|
|
||||||
? "govuk-accordion__section govuk-accordion__section--expanded"
|
|
||||||
: "govuk-accordion__section"
|
|
||||||
}
|
|
||||||
key={appeal.appealType}
|
|
||||||
>
|
|
||||||
<div className="govuk-accordion__section-header">
|
|
||||||
<h2 className="govuk-accordion__section-heading">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-accordion__section-button"
|
|
||||||
aria-expanded={appealOpen}
|
|
||||||
onClick={() =>
|
|
||||||
toggleAppeal(appeal.appealType)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div className="appeal-count-chart__row">
|
|
||||||
<div className="appeal-count-chart__label">
|
|
||||||
{appeal.appealTypeName}{" "}
|
|
||||||
{/* {appeal.caseCount} cases */}
|
|
||||||
(
|
|
||||||
{percentageOf(
|
|
||||||
appeal.caseCount,
|
|
||||||
totalCases
|
|
||||||
)}
|
|
||||||
)
|
|
||||||
</div>
|
|
||||||
<div className="appeal-count-chart__bar-wrapper">
|
|
||||||
<span
|
|
||||||
className="appeal-count-chart__bar"
|
|
||||||
style={{
|
|
||||||
width: `${width}%`
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<span className="appeal-count-chart__count">
|
|
||||||
{appeal.caseCount}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
className="govuk-accordion__section-content"
|
|
||||||
hidden={!appealOpen}
|
|
||||||
>
|
|
||||||
{appeal.lpas.map((lpa) => {
|
|
||||||
const lpaKey = `${appeal.appealType}-${lpa.lpaId}`;
|
|
||||||
const lpaOpen =
|
|
||||||
!!openAppealLpas[lpaKey];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className="lpa-status-block"
|
|
||||||
key={lpaKey}
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="lpa-status-block__button"
|
|
||||||
aria-expanded={lpaOpen}
|
|
||||||
onClick={() =>
|
|
||||||
toggleAppealLpa(lpaKey)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span className="govuk-body-m">
|
|
||||||
{lpa.lpaName}
|
|
||||||
</span>
|
|
||||||
<span className="govuk-body-m">
|
|
||||||
{lpa.caseCount} cases (
|
|
||||||
{percentageOf(
|
|
||||||
lpa.caseCount,
|
|
||||||
appeal.caseCount
|
|
||||||
)}
|
|
||||||
)
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div hidden={!lpaOpen}>
|
|
||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-4">
|
|
||||||
{lpa.statuses.map(
|
|
||||||
(status) => (
|
|
||||||
<div
|
|
||||||
className="govuk-summary-list__row"
|
|
||||||
key={
|
|
||||||
status.statuscode
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<dt className="govuk-summary-list__key">
|
|
||||||
<Link
|
|
||||||
target="_blank"
|
|
||||||
href={`/advancedsearchresults?apt=${appeal.appealType}&lpa=${lpa.lpaId}&statuscode=${status.statuscode}`}
|
|
||||||
>
|
|
||||||
{
|
|
||||||
status.status
|
|
||||||
}
|
|
||||||
</Link>
|
|
||||||
</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{
|
|
||||||
status.caseCount
|
|
||||||
}{" "}
|
|
||||||
(
|
|
||||||
{percentageOf(
|
|
||||||
status.caseCount,
|
|
||||||
lpa.caseCount
|
|
||||||
)}
|
|
||||||
)
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function DashboardCard({ title, value, caption }) {
|
|
||||||
return (
|
|
||||||
<div className="govuk-grid-column-one-quarter">
|
|
||||||
<div className="dashboard-card">
|
|
||||||
<p className="govuk-body-s dashboard-card__title">{title}</p>
|
|
||||||
<p className="govuk-heading-l dashboard-card__value">{value}</p>
|
|
||||||
{caption && (
|
|
||||||
<p className="govuk-body-s dashboard-card__caption">
|
|
||||||
{caption}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,294 +0,0 @@
|
|||||||
// // components/admin/tabs/AccountsTab.js
|
|
||||||
// import Link from "next/link";
|
|
||||||
|
|
||||||
// export default function AppealsWithStatusTab({ statusObj }) {
|
|
||||||
// return (
|
|
||||||
// <div>
|
|
||||||
// <h1>User Accounts</h1>
|
|
||||||
|
|
||||||
// <dl className="govuk-summary-list govuk-!-margin-bottom-9 results">
|
|
||||||
// <div className="govuk-summary-list__row results-headings">
|
|
||||||
// <dd className="govuk-summary-list__key govuk-!-font-size-16">
|
|
||||||
// Name
|
|
||||||
// </dd>
|
|
||||||
// <dd className="govuk-summary-list__key govuk-!-font-size-16">
|
|
||||||
// Last accessed
|
|
||||||
// </dd>
|
|
||||||
// </div>
|
|
||||||
|
|
||||||
// {statusObj.map((appeal) => (
|
|
||||||
// <div key={appeal.id} className="govuk-summary-list__row">
|
|
||||||
// <dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
|
||||||
// <Link
|
|
||||||
// target="_blank"
|
|
||||||
// href={`/auth/signin2?email=${appeal.value}`}
|
|
||||||
// >
|
|
||||||
// {appeal.value}
|
|
||||||
// </Link>
|
|
||||||
// <br />
|
|
||||||
|
|
||||||
// <dl className="govuk-summary-list govuk-!-margin-bottom-9 govuk-!-margin-left-9 results">
|
|
||||||
// <div className="govuk-summary-list__row results-headings">
|
|
||||||
// <dd className="govuk-summary-list__key govuk-!-font-size-16">
|
|
||||||
// Name
|
|
||||||
// </dd>
|
|
||||||
// <dd className="govuk-summary-list__key govuk-!-font-size-16">
|
|
||||||
// Last accessed
|
|
||||||
// </dd>
|
|
||||||
// </div>
|
|
||||||
|
|
||||||
// {appeal.statuses.map((statuses) => (
|
|
||||||
// <div
|
|
||||||
// key={appeal.id}
|
|
||||||
// className="govuk-summary-list__row"
|
|
||||||
// >
|
|
||||||
// <dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
|
||||||
// {statuses.value}
|
|
||||||
// </dd>
|
|
||||||
// <dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
|
||||||
// Total: {statuses.caseCount}
|
|
||||||
// </dd>
|
|
||||||
// </div>
|
|
||||||
// ))}
|
|
||||||
// </dl>
|
|
||||||
// </dd>
|
|
||||||
// <dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
|
||||||
// Total: {appeal.caseCount}
|
|
||||||
// </dd>
|
|
||||||
// </div>
|
|
||||||
// ))}
|
|
||||||
// </dl>
|
|
||||||
// </div>
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
import { useState } from "react";
|
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
export default function AppealsWithStatusTab({ statusObj = [] }) {
|
|
||||||
const [openSections, setOpenSections] = useState({});
|
|
||||||
|
|
||||||
const toggleSection = (index) => {
|
|
||||||
setOpenSections((current) => ({
|
|
||||||
...current,
|
|
||||||
[index]: !current[index]
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const showAll = () => {
|
|
||||||
const allOpen = {};
|
|
||||||
|
|
||||||
statusObj.forEach((_, index) => {
|
|
||||||
allOpen[index] = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
setOpenSections(allOpen);
|
|
||||||
};
|
|
||||||
|
|
||||||
const hideAll = () => {
|
|
||||||
setOpenSections({});
|
|
||||||
};
|
|
||||||
|
|
||||||
const allExpanded =
|
|
||||||
statusObj.length > 0 &&
|
|
||||||
statusObj.every((_, index) => openSections[index]);
|
|
||||||
|
|
||||||
const sortedAppeals = [...statusObj].sort(
|
|
||||||
(a, b) => (b.caseCount || 0) - (a.caseCount || 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
const maxCount = sortedAppeals[0]?.caseCount || 1;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<h1 className="govuk-heading-l">Case status by appeal type</h1>
|
|
||||||
|
|
||||||
<div className="govuk-!-margin-bottom-6">
|
|
||||||
<h2 className="govuk-heading-m">Case counts by appeal type</h2>
|
|
||||||
|
|
||||||
<dl className="appeal-count-chart">
|
|
||||||
{sortedAppeals.map((appeal) => {
|
|
||||||
const maxCount = sortedAppeals[0]?.caseCount || 1;
|
|
||||||
const width =
|
|
||||||
((appeal.caseCount || 0) / maxCount) * 100;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className="appeal-count-chart__row"
|
|
||||||
key={appeal.appealType}
|
|
||||||
>
|
|
||||||
<dt className="appeal-count-chart__label">
|
|
||||||
{appeal.value}
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<dd className="appeal-count-chart__bar-wrapper">
|
|
||||||
<span
|
|
||||||
className="appeal-count-chart__bar"
|
|
||||||
style={{ width: `${width}%` }}
|
|
||||||
/>
|
|
||||||
<span className="appeal-count-chart__count">
|
|
||||||
{appeal.caseCount || 0}
|
|
||||||
</span>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="govuk-!-margin-bottom-6">
|
|
||||||
<h2 className="govuk-heading-m">Case stages by appeal type</h2>
|
|
||||||
|
|
||||||
<dl className="appeal-stage-chart">
|
|
||||||
{sortedAppeals.map((appeal) => (
|
|
||||||
<div
|
|
||||||
className="appeal-stage-chart__row"
|
|
||||||
key={appeal.appealType}
|
|
||||||
>
|
|
||||||
<dt className="appeal-stage-chart__label">
|
|
||||||
{appeal.value}
|
|
||||||
</dt>
|
|
||||||
|
|
||||||
<dd className="appeal-stage-chart__bar-wrapper">
|
|
||||||
<div
|
|
||||||
className="appeal-stage-chart__bar"
|
|
||||||
style={{
|
|
||||||
width: `${((appeal.caseCount || 0) / maxCount) * 100}%`
|
|
||||||
}}
|
|
||||||
aria-label={`${appeal.value}, ${appeal.caseCount || 0} cases`}
|
|
||||||
>
|
|
||||||
{(appeal.statuses || [])
|
|
||||||
.filter(
|
|
||||||
(status) => status.caseCount > 0
|
|
||||||
)
|
|
||||||
.sort(
|
|
||||||
(a, b) => b.caseCount - a.caseCount
|
|
||||||
)
|
|
||||||
.map((status, index) => (
|
|
||||||
<span
|
|
||||||
key={status.statuscode}
|
|
||||||
className={`appeal-stage-chart__segment appeal-stage-chart__segment--${index % 6}`}
|
|
||||||
style={{
|
|
||||||
width: `${((status.caseCount || 0) / (appeal.caseCount || 1)) * 100}%`
|
|
||||||
}}
|
|
||||||
title={`${status.value}: ${status.caseCount}`}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span className="appeal-stage-chart__count">
|
|
||||||
{appeal.caseCount || 0}
|
|
||||||
</span>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="govuk-accordion__controls">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-accordion__show-all"
|
|
||||||
onClick={allExpanded ? hideAll : showAll}
|
|
||||||
>
|
|
||||||
<span className="govuk-accordion__show-all-text">
|
|
||||||
{allExpanded
|
|
||||||
? "Hide all sections"
|
|
||||||
: "Show all sections"}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="govuk-accordion" id="appeals-with-status-accordion">
|
|
||||||
{[...statusObj]
|
|
||||||
.sort((a, b) => (b.caseCount || 0) - (a.caseCount || 0))
|
|
||||||
.map((appeal, index) => {
|
|
||||||
const isOpen = !!openSections[index];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
isOpen
|
|
||||||
? "govuk-accordion__section govuk-accordion__section--expanded"
|
|
||||||
: "govuk-accordion__section"
|
|
||||||
}
|
|
||||||
key={appeal.appealType || index}
|
|
||||||
>
|
|
||||||
<div className="govuk-accordion__section-header ">
|
|
||||||
<h2 className="govuk-accordion__section-heading">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-accordion__section-button "
|
|
||||||
id={`appeal-status-heading-${index}`}
|
|
||||||
aria-expanded={isOpen}
|
|
||||||
aria-controls={`appeal-status-content-${index}`}
|
|
||||||
onClick={() => toggleSection(index)}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
justifyContent:
|
|
||||||
"space-between",
|
|
||||||
alignItems: "center",
|
|
||||||
width: "100%",
|
|
||||||
paddingRight: "20px" // leaves room for accordion icon
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span className="govuk-heading-s ">
|
|
||||||
{appeal.value}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span
|
|
||||||
className="govuk-body-s"
|
|
||||||
style={{
|
|
||||||
fontWeight: "normal"
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{appeal.caseCount || 0}{" "}
|
|
||||||
cases
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
id={`appeal-status-content-${index}`}
|
|
||||||
className="govuk-accordion__section-content"
|
|
||||||
aria-labelledby={`appeal-status-heading-${index}`}
|
|
||||||
hidden={!isOpen}
|
|
||||||
>
|
|
||||||
<dl className="govuk-summary-list govuk-!-margin-left-9">
|
|
||||||
{(appeal.statuses || [])
|
|
||||||
.sort(
|
|
||||||
(a, b) =>
|
|
||||||
(b.caseCount || 0) -
|
|
||||||
(a.caseCount || 0)
|
|
||||||
)
|
|
||||||
.map((status) => (
|
|
||||||
<div
|
|
||||||
className="govuk-summary-list__row"
|
|
||||||
key={status.statuscode}
|
|
||||||
>
|
|
||||||
<dt className="govuk-summary-list__key">
|
|
||||||
<Link
|
|
||||||
target="_blank"
|
|
||||||
href={`/advancedsearchresults?apt=${appeal.appealType}&statuscode=${status.statuscode}`}
|
|
||||||
>
|
|
||||||
{status.value}
|
|
||||||
</Link>
|
|
||||||
</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{status.caseCount || 0}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import { formatDates, getDocLink, hasOwn } from "../../utils";
|
import { formatDates, getDocLink } from "../../utils";
|
||||||
import PaginationControl from "../../../components/case/pagination";
|
import PaginationControl from "../../../components/case/pagination";
|
||||||
import DocumentLink from "../../utils/downloads";
|
import DocumentLink from "../../utils/downloads";
|
||||||
import { useDownloadQueue } from "../../utils/downloadmanager";
|
import { useDownloadQueue } from "../../utils/downloadmanager";
|
||||||
@@ -21,8 +21,6 @@ import { getNewDocumentsPaged } from "../../../actions/services/adminService";
|
|||||||
import { setCurrentPage } from "../../../store/currentView/action";
|
import { setCurrentPage } from "../../../store/currentView/action";
|
||||||
|
|
||||||
import { setDocumentDetails } from "../../../store/searchOutput/action";
|
import { setDocumentDetails } from "../../../store/searchOutput/action";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const getDocumentTypes = [
|
const getDocumentTypes = [
|
||||||
{
|
{
|
||||||
"Value": 846040009,
|
"Value": 846040009,
|
||||||
@@ -399,11 +397,19 @@ const DocumentsTab = (props) => {
|
|||||||
className="govuk-label-s govuk-checkboxes__label"
|
className="govuk-label-s govuk-checkboxes__label"
|
||||||
htmlFor={item.Value}
|
htmlFor={item.Value}
|
||||||
>
|
>
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item.Label,
|
? jsonpath({
|
||||||
locale,
|
path:
|
||||||
translations: transLookup
|
'$..[?(@ && @.value=="' +
|
||||||
})}
|
item.Label +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: item.Label ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}{" "}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -464,11 +470,19 @@ const DocumentsTab = (props) => {
|
|||||||
className="govuk-label-s govuk-checkboxes__label"
|
className="govuk-label-s govuk-checkboxes__label"
|
||||||
htmlFor={"origin_" + item.Value}
|
htmlFor={"origin_" + item.Value}
|
||||||
>
|
>
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item.Label,
|
? jsonpath({
|
||||||
locale,
|
path:
|
||||||
translations: transLookup
|
'$..[?(@ && @.value=="' +
|
||||||
})}
|
item.Label +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: item.Label ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}{" "}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -740,7 +754,7 @@ const DocumentsTab = (props) => {
|
|||||||
// )}
|
// )}
|
||||||
// :
|
// :
|
||||||
// </span>
|
// </span>
|
||||||
// {hasOwn(
|
// {_.has(
|
||||||
// detailsObj,
|
// detailsObj,
|
||||||
// "pinswg_name"
|
// "pinswg_name"
|
||||||
// )
|
// )
|
||||||
@@ -775,7 +789,7 @@ const DocumentsTab = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_name"
|
"pinswg_name"
|
||||||
)
|
)
|
||||||
@@ -791,7 +805,7 @@ const DocumentsTab = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_name"
|
"pinswg_name"
|
||||||
)
|
)
|
||||||
@@ -808,15 +822,22 @@ const DocumentsTab = (props) => {
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{resolveCrmDisplayValue(
|
{router.locale == "cy"
|
||||||
{
|
? jsonpath({
|
||||||
value: detailsObj[
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations:
|
json: transLookup,
|
||||||
transLookup
|
eval: true
|
||||||
}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
@@ -827,7 +848,7 @@ const DocumentsTab = (props) => {
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"createdon"
|
"createdon"
|
||||||
)
|
)
|
||||||
@@ -1083,7 +1104,9 @@ const DocumentsTab = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h1 className="">{t("case:documents-heading-label")}</h1>
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t("case:documents-heading-label")}
|
||||||
|
</h2>
|
||||||
{/* <div className="">
|
{/* <div className="">
|
||||||
MDU :{" "}
|
MDU :{" "}
|
||||||
{countFieldValue(
|
{countFieldValue(
|
||||||
|
|||||||
@@ -4,12 +4,9 @@ import Link from "next/link";
|
|||||||
import { bytesToSize } from "../../../components/utils";
|
import { bytesToSize } from "../../../components/utils";
|
||||||
import {
|
import {
|
||||||
deleteMyRepresentationsFromBlob,
|
deleteMyRepresentationsFromBlob,
|
||||||
deleteAwaitingSubmissionsFromBlob,
|
deleteAwaitingSubmissionsFromBlob
|
||||||
getRepsFromBlobProxy
|
|
||||||
} from "../../../actions/services/documentService";
|
} from "../../../actions/services/documentService";
|
||||||
import { sendRepCompleteMessage } from "../../../actions/services/portalService";
|
import { sendRepCompleteMessage } from "../../../actions/services/portalService";
|
||||||
import { parseCookies } from "nookies";
|
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
|
||||||
|
|
||||||
import { formatBlobDates } from "../utils/adminHelper";
|
import { formatBlobDates } from "../utils/adminHelper";
|
||||||
|
|
||||||
@@ -24,33 +21,6 @@ export default function StorageTab({ data, repCompleteCount }) {
|
|||||||
setShowTmpFile(newState);
|
setShowTmpFile(newState);
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteRepItem = (containerID, caseID, repfile) => {
|
|
||||||
let cookies = parseCookies();
|
|
||||||
//console.log("sssss", containerID, caseID, repfile);
|
|
||||||
|
|
||||||
deleteMyRepresentationsFromBlob(containerID, caseID, repfile)
|
|
||||||
.then((data) => {
|
|
||||||
return data;
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
getRepsFromBlobProxy(containerID)
|
|
||||||
.then((data) => {
|
|
||||||
setMyRepresentations(data);
|
|
||||||
setMyRepresentationsDetails(data);
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
consoleLogger(error);
|
|
||||||
return null;
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
setCurrentView({
|
|
||||||
"viewName": "My Representations",
|
|
||||||
"viewKey": "myRepresentations"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>Storage Account Contents</h1>
|
<h1>Storage Account Contents</h1>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export async function fetchAdminStorageData() {
|
|||||||
const limit = pLimit(5);
|
const limit = pLimit(5);
|
||||||
let data = await Promise.all(
|
let data = await Promise.all(
|
||||||
users.map(async (user) => {
|
users.map(async (user) => {
|
||||||
return limit(async () => {
|
limit(async () => {
|
||||||
const containers = await listContainersForUser(
|
const containers = await listContainersForUser(
|
||||||
blobServiceClient,
|
blobServiceClient,
|
||||||
`${user.id}`,
|
`${user.id}`,
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ const Breadcrumbs = (props) => {
|
|||||||
watchedCases: () => t("myportal:watchedcases-card-title"),
|
watchedCases: () => t("myportal:watchedcases-card-title"),
|
||||||
myCases: () => t("myportal:mycases-card-title"),
|
myCases: () => t("myportal:mycases-card-title"),
|
||||||
myRepresentations: () => t("myportal:myrepresentations-card-title"),
|
myRepresentations: () => t("myportal:myrepresentations-card-title"),
|
||||||
mySubmittedReps: () => t("myportal:submitted-reps-card-title")
|
mySubmittedReps: "Submitted representations"
|
||||||
};
|
};
|
||||||
|
|
||||||
const viewAllLabelResolver = labelsByKey[viewKey];
|
const viewAllLabelResolver = labelsByKey[viewKey];
|
||||||
@@ -186,7 +186,7 @@ const Breadcrumbs = (props) => {
|
|||||||
<>
|
<>
|
||||||
{renderLinkCrumb(
|
{renderLinkCrumb(
|
||||||
isWelsh
|
isWelsh
|
||||||
? `/${router.locale}/dnsapplications`
|
? `${router.locale}/dnsapplications`
|
||||||
: "/dnsapplications",
|
: "/dnsapplications",
|
||||||
t("dnsCommon:service-name")
|
t("dnsCommon:service-name")
|
||||||
)}
|
)}
|
||||||
|
|||||||
+8
-1
@@ -44,8 +44,15 @@ const Case = (props) => {
|
|||||||
showLoginCheck={props.showLoginCheck}
|
showLoginCheck={props.showLoginCheck}
|
||||||
eventsObj={props.eventsObj}
|
eventsObj={props.eventsObj}
|
||||||
mediaObj={props.mediaObj}
|
mediaObj={props.mediaObj}
|
||||||
mapTarget={props.mapTarget}
|
|
||||||
/>
|
/>
|
||||||
|
{showRepresentations == true && (
|
||||||
|
<RepresentationList
|
||||||
|
incidentid={props.incidentid}
|
||||||
|
caseReference={props.caseReference}
|
||||||
|
representationsObj={props.representationsObj}
|
||||||
|
documentDetailsObj={props.documentDetailsObj}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
+383
-24
@@ -5,7 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import { formatDates, getDocLink, hasOwn } from "../utils";
|
import { formatDates, getDocLink } from "../utils";
|
||||||
import PaginationControl from "./pagination";
|
import PaginationControl from "./pagination";
|
||||||
import { sendGAEvent } from "@next/third-parties/google";
|
import { sendGAEvent } from "@next/third-parties/google";
|
||||||
|
|
||||||
@@ -19,7 +19,6 @@ import { setCurrentPage } from "../../store/currentView/action";
|
|||||||
import { setDocumentDetails } from "../../store/searchOutput/action";
|
import { setDocumentDetails } from "../../store/searchOutput/action";
|
||||||
import DocumentLink from "../utils/downloads";
|
import DocumentLink from "../utils/downloads";
|
||||||
import { useDownloadQueue } from "../utils/downloadmanager";
|
import { useDownloadQueue } from "../utils/downloadmanager";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const DocumentDetails = (props) => {
|
const DocumentDetails = (props) => {
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
@@ -39,8 +38,6 @@ const DocumentDetails = (props) => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
const appealType = props.currentView?.caseReference?.appealType;
|
|
||||||
|
|
||||||
var documentDetailsArr = documentDetailsObj || [];
|
var documentDetailsArr = documentDetailsObj || [];
|
||||||
const { startDownload, getStatus } = useDownloadQueue(3);
|
const { startDownload, getStatus } = useDownloadQueue(3);
|
||||||
const [selectedOption, setSelectedOption] = useState(10);
|
const [selectedOption, setSelectedOption] = useState(10);
|
||||||
@@ -95,6 +92,352 @@ const DocumentDetails = (props) => {
|
|||||||
};
|
};
|
||||||
let ShowDocLinks = getDocLink(docsOffline);
|
let ShowDocLinks = getDocLink(docsOffline);
|
||||||
|
|
||||||
|
const DocumentView = (documentDetailsArr) => {
|
||||||
|
documentDetailsArr = documentDetailsArr.value;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<p>
|
||||||
|
{documentDetailsObj["@odata.count"] > 1
|
||||||
|
? t("case:documents-count-label-1")
|
||||||
|
: t("case:documents-count-label-1a")}{" "}
|
||||||
|
{documentDetailsObj["@odata.count"]}{" "}
|
||||||
|
{documentDetailsObj["@odata.count"] > 1
|
||||||
|
? t("case:documents-count-label-2")
|
||||||
|
: t("case:documents-count-label-2a")}
|
||||||
|
</p>
|
||||||
|
<div className="documentFilters govuk-!-margin-top-5">
|
||||||
|
<div
|
||||||
|
id="recordDocumentTypeSelect"
|
||||||
|
className="govuk-grid-row govuk-!-margin-left-0"
|
||||||
|
>
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<label
|
||||||
|
className="govuk-label-s "
|
||||||
|
htmlFor="showDocumentType"
|
||||||
|
>
|
||||||
|
{t("case:documents-show-label")}
|
||||||
|
<select
|
||||||
|
onChange={(e) => {
|
||||||
|
setSelectedDocumentType(e.target.value);
|
||||||
|
setCurrentPage(1);
|
||||||
|
}}
|
||||||
|
value={selectedDocumentType}
|
||||||
|
className="govuk-select"
|
||||||
|
id="showDocumentType"
|
||||||
|
name="showDocumentType"
|
||||||
|
>
|
||||||
|
<option value="all" key="00">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path: '$..[?(@ && @.value=="All")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: "All"}
|
||||||
|
</option>
|
||||||
|
{documentTypes.map((item, key) => {
|
||||||
|
return (
|
||||||
|
<option
|
||||||
|
key={key}
|
||||||
|
value={
|
||||||
|
item.pinswg_isharedocumentlocations
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item.pinswg_isharedocumentlocationsLabel +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: item.pinswg_isharedocumentlocationsLabel ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
</option>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</select>
|
||||||
|
{t("case:documents-count-label-2")}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{documentDetailsObj["@odata.count"] > 5 && (
|
||||||
|
<div
|
||||||
|
id="recordCountSelect"
|
||||||
|
className="govuk-grid-row govuk-!-margin-left-0"
|
||||||
|
>
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<label
|
||||||
|
className="govuk-label-s "
|
||||||
|
htmlFor="showNumberOfRecords"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"search:searchresults-show-records-label-a"
|
||||||
|
)}
|
||||||
|
<select
|
||||||
|
onChange={(e) => {
|
||||||
|
setSelectedOption(e.target.value);
|
||||||
|
setCurrentPage(1);
|
||||||
|
}}
|
||||||
|
value={selectedOption}
|
||||||
|
className="govuk-select"
|
||||||
|
id="showNumberOfRecords"
|
||||||
|
name="showNumberOfRecords"
|
||||||
|
>
|
||||||
|
<option value="5">5</option>
|
||||||
|
<option value="10">10</option>
|
||||||
|
<option value="20">20</option>
|
||||||
|
<option value="30">30</option>
|
||||||
|
<option value="50">50</option>
|
||||||
|
</select>{" "}
|
||||||
|
{t(
|
||||||
|
"search:searchresults-show-records-label-b"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{ShowDocLinks && (
|
||||||
|
<div className="govuk-warning-text ">
|
||||||
|
<span
|
||||||
|
className="govuk-warning-text__icon"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
!
|
||||||
|
</span>
|
||||||
|
<strong className="govuk-warning-text__text govuk-!-margin-top-2">
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
Notice
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{t("case:documents-not-available-label")}
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<dl className="documentList govuk-summary-list govuk-!-margin-bottom-9 results">
|
||||||
|
<div className="govuk-summary-list__row results-headings">
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-16 ">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => sortDataBy("pinswg_name")}
|
||||||
|
className={
|
||||||
|
orderByState == "pinswg_name"
|
||||||
|
? fieldSortState == "asc"
|
||||||
|
? `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortAsc`
|
||||||
|
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortDesc`
|
||||||
|
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16`
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{t("case:documents-name-label")}
|
||||||
|
</button>
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||||
|
{/* {t("case:documents-doc-type-label")} */}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() =>
|
||||||
|
sortDataBy("pinswg_isharedocumentlocations")
|
||||||
|
}
|
||||||
|
className={
|
||||||
|
orderByState ==
|
||||||
|
"pinswg_isharedocumentlocations"
|
||||||
|
? fieldSortState == "asc"
|
||||||
|
? `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortAsc`
|
||||||
|
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortDesc`
|
||||||
|
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16`
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{t("case:documents-doc-type-label")}
|
||||||
|
</button>
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||||
|
{/* {t("case:documents-date-published-label")} */}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => sortDataBy("createdon")}
|
||||||
|
className={
|
||||||
|
orderByState == "createdon"
|
||||||
|
? fieldSortState == "asc"
|
||||||
|
? `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortAsc`
|
||||||
|
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortDesc`
|
||||||
|
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16`
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{t("case:documents-date-published-label")}
|
||||||
|
</button>
|
||||||
|
</dd>
|
||||||
|
{/* <dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||||
|
{t("case:documents-size-label")}
|
||||||
|
</dd> */}
|
||||||
|
</div>
|
||||||
|
{showSpinnerState == true ? (
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<div className="govuk-!-margin-top-4 govuk-!-margin-bottom-4 govuk-!-font-weight-bold govuk-!-font-size-20 ">
|
||||||
|
{t("common:spinner-fetching-data")}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Fetching data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
documentDetailsArr.map((item, key) => {
|
||||||
|
let detailsObj = jsonpath({
|
||||||
|
path:
|
||||||
|
"$..[?(@ && @._pinswg_documentids_value=='" +
|
||||||
|
incidentid +
|
||||||
|
"')]",
|
||||||
|
json: item,
|
||||||
|
sanbox: {}
|
||||||
|
});
|
||||||
|
detailsObj = item;
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="govuk-summary-list__row"
|
||||||
|
key={key}
|
||||||
|
>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
||||||
|
{showDownloadingState === key && (
|
||||||
|
<div className="coverLoadingLink downloading">
|
||||||
|
{/* <img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale ==
|
||||||
|
"cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Fetching data"
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{!ShowDocLinks ? (
|
||||||
|
<Link
|
||||||
|
scroll={false}
|
||||||
|
href={
|
||||||
|
detailsObj.pinswg_hashlink
|
||||||
|
}
|
||||||
|
key={key}
|
||||||
|
onClick={() => {
|
||||||
|
(toggleDownLoadLink(key),
|
||||||
|
sendGAEvent(
|
||||||
|
"event",
|
||||||
|
"DownloadedFile",
|
||||||
|
{
|
||||||
|
caseReference:
|
||||||
|
props.caseReference,
|
||||||
|
filename:
|
||||||
|
detailsObj.pinswg_name
|
||||||
|
}
|
||||||
|
));
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
{t(
|
||||||
|
"case:documents-name-label"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_name"
|
||||||
|
)
|
||||||
|
? detailsObj.pinswg_name
|
||||||
|
: ""}
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
{t(
|
||||||
|
"case:documents-name-label"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_name"
|
||||||
|
)
|
||||||
|
? detailsObj.pinswg_name
|
||||||
|
: ""}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
{t("case:documents-doc-type-label")}
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
{t(
|
||||||
|
"case:documents-date-published-label"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_latestpublisheddate"
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_latestpublisheddate
|
||||||
|
)
|
||||||
|
: ""}
|
||||||
|
</dd>
|
||||||
|
{/* <dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
{t("case:documents-size-label")}:
|
||||||
|
</span>
|
||||||
|
92
|
||||||
|
</dd> */}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
)}
|
||||||
|
</dl>
|
||||||
|
<PaginationControl
|
||||||
|
showNoOfRecords={selectedOption}
|
||||||
|
currentPage={currentPage}
|
||||||
|
searchResultsObj={documentDetailsObj}
|
||||||
|
spinnerState={spinnerState}
|
||||||
|
orderBy={orderByState}
|
||||||
|
fieldSort={fieldSortState}
|
||||||
|
getDocumentResults={getDocumentResults}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const FilteredDocumentView = (documentDetailsArr) => {
|
const FilteredDocumentView = (documentDetailsArr) => {
|
||||||
documentDetailsArr = documentDetailsArr.value;
|
documentDetailsArr = documentDetailsArr.value;
|
||||||
|
|
||||||
@@ -204,11 +547,19 @@ const DocumentDetails = (props) => {
|
|||||||
item.pinswg_isharedocumentlocations
|
item.pinswg_isharedocumentlocations
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item.pinswg_isharedocumentlocationsLabel,
|
? jsonpath({
|
||||||
locale,
|
path:
|
||||||
translations: transLookup
|
'$..[?(@ && @.value=="' +
|
||||||
})}{" "}
|
item.pinswg_isharedocumentlocationsLabel +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: item.pinswg_isharedocumentlocationsLabel ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}{" "}
|
||||||
- ({item.count})
|
- ({item.count})
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -434,7 +785,7 @@ const DocumentDetails = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_name"
|
"pinswg_name"
|
||||||
)
|
)
|
||||||
@@ -450,7 +801,7 @@ const DocumentDetails = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_name"
|
"pinswg_name"
|
||||||
)
|
)
|
||||||
@@ -466,13 +817,24 @@ const DocumentDetails = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{resolveCrmDisplayValue({
|
|
||||||
value: detailsObj[
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
})}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
</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">
|
||||||
@@ -482,7 +844,7 @@ const DocumentDetails = (props) => {
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_latestpublisheddate"
|
"pinswg_latestpublisheddate"
|
||||||
)
|
)
|
||||||
@@ -681,17 +1043,14 @@ const DocumentDetails = (props) => {
|
|||||||
<h3>
|
<h3>
|
||||||
{showDocumentSearchState == false
|
{showDocumentSearchState == false
|
||||||
? t("case:documents-checking-label")
|
? t("case:documents-checking-label")
|
||||||
: appealType === 846040002 ||
|
|
||||||
appealType === 846040011
|
|
||||||
? t(
|
|
||||||
"case:documents-non-available-app-label"
|
|
||||||
)
|
|
||||||
: t("case:documents-non-available-label")}
|
: t("case:documents-non-available-label")}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : showFilteredDocs == "true" ? (
|
||||||
FilteredDocumentView(documentDetailsArr)
|
FilteredDocumentView(documentDetailsArr)
|
||||||
|
) : (
|
||||||
|
DocumentView(documentDetailsArr)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+403
-17
@@ -1,7 +1,404 @@
|
|||||||
|
// // import { setEventDetails } from "../../store/searchOutput/action";
|
||||||
|
// // import { setCurrentPage } from "../../store/currentView/action";
|
||||||
|
// // import { connect } from "react-redux";
|
||||||
|
// // import useTranslation from "next-translate/useTranslation";
|
||||||
|
// // import { formatDates } from "../utils";
|
||||||
|
|
||||||
|
// // const MediaDetails = (props) => {
|
||||||
|
// // let { t } = useTranslation();
|
||||||
|
|
||||||
|
// // const MediaView = (mediaArr) => {
|
||||||
|
// // mediaArr = mediaArr.value;
|
||||||
|
|
||||||
|
// // return mediaArr.map((item, key) => {
|
||||||
|
// // <div>{item.pinswg_name}</div>;
|
||||||
|
// // });
|
||||||
|
// // };
|
||||||
|
|
||||||
|
// // const mediaArr = props.mediaObj?.value || [];
|
||||||
|
|
||||||
|
// // // event publishiing flag set to true displa
|
||||||
|
|
||||||
|
// // function hasOwnPropertyAndNotNull(obj, property) {
|
||||||
|
// // return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // //console.log(eventsArr.length > 0);
|
||||||
|
|
||||||
|
// // return (
|
||||||
|
// // mediaArr.length > 0 && (
|
||||||
|
// // <div className="govuk-grid-row">
|
||||||
|
// // <div className="card">
|
||||||
|
// // <div className="card-body">
|
||||||
|
// // <h2 className="govuk-heading-m ">
|
||||||
|
// // {t("case:event-title")}Media
|
||||||
|
// // </h2>
|
||||||
|
// // {mediaArr.map(
|
||||||
|
// // (item, key) =>
|
||||||
|
// // item.pinswg_publishtoweb && (
|
||||||
|
// // <>
|
||||||
|
// // {" "}
|
||||||
|
// // <div className="">
|
||||||
|
// // <div className="">
|
||||||
|
// // <div>
|
||||||
|
// // <b>
|
||||||
|
// // {" "}
|
||||||
|
// // {t(
|
||||||
|
// // "case:event-name-label",
|
||||||
|
// // )}
|
||||||
|
// // </b>
|
||||||
|
// // : {item.pinswg_name}
|
||||||
|
// // </div>
|
||||||
|
// // {hasOwnPropertyAndNotNull(
|
||||||
|
// // item,
|
||||||
|
// // "pinswg_description",
|
||||||
|
// // ) && (
|
||||||
|
// // <div>
|
||||||
|
// // <b>
|
||||||
|
// // {t(
|
||||||
|
// // "case:event-event-name-label",
|
||||||
|
// // )}
|
||||||
|
// // </b>
|
||||||
|
// // :{" "}
|
||||||
|
// // {
|
||||||
|
// // item.pinswg_description
|
||||||
|
// // }
|
||||||
|
// // </div>
|
||||||
|
// // )}
|
||||||
|
// // </div>
|
||||||
|
// // </div>
|
||||||
|
// // </>
|
||||||
|
// // ),
|
||||||
|
// // )}{" "}
|
||||||
|
// // </div>
|
||||||
|
// // </div>
|
||||||
|
// // </div>
|
||||||
|
// // )
|
||||||
|
// // );
|
||||||
|
// // };
|
||||||
|
|
||||||
|
// // const mapStateToProps = (state) => {
|
||||||
|
// // return {
|
||||||
|
// // ...state,
|
||||||
|
// // };
|
||||||
|
// // };
|
||||||
|
|
||||||
|
// // const mapDispatchToProps = (dispatch) => {
|
||||||
|
// // return {
|
||||||
|
// // setEventDetails: (mediaObj) => {
|
||||||
|
// // dispatch(setEventDetails(mediaObj));
|
||||||
|
// // },
|
||||||
|
// // setCurrentPage: (currentPage) => {
|
||||||
|
// // dispatch(setCurrentPage(currentPage));
|
||||||
|
// // },
|
||||||
|
// // };
|
||||||
|
// // };
|
||||||
|
|
||||||
|
// // export default connect(mapStateToProps, mapDispatchToProps)(MediaDetails);
|
||||||
|
// import { useEffect, useMemo, useState } from "react";
|
||||||
|
// import { connect } from "react-redux";
|
||||||
|
// import useTranslation from "next-translate/useTranslation";
|
||||||
|
// import { useRouter } from "next/router";
|
||||||
|
|
||||||
|
// const extractYouTubeId = (input) => {
|
||||||
|
// if (!input) return null;
|
||||||
|
// if (/^[a-zA-Z0-9_-]{11}$/.test(input)) return input;
|
||||||
|
|
||||||
|
// try {
|
||||||
|
// const url = new URL(input);
|
||||||
|
// if (url.hostname.includes("youtu.be"))
|
||||||
|
// return url.pathname.slice(1) || null;
|
||||||
|
|
||||||
|
// const v = url.searchParams.get("v");
|
||||||
|
// if (v) return v;
|
||||||
|
|
||||||
|
// const embedMatch = url.pathname.match(/\/embed\/([^/]+)/);
|
||||||
|
// if (embedMatch?.[1]) return embedMatch[1];
|
||||||
|
|
||||||
|
// const shortsMatch = url.pathname.match(/\/shorts\/([^/]+)/);
|
||||||
|
// if (shortsMatch?.[1]) return shortsMatch[1];
|
||||||
|
|
||||||
|
// return null;
|
||||||
|
// } catch {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
|
// export default function MediaDetails({ mediaObj, whichTab }) {
|
||||||
|
// const router = useRouter();
|
||||||
|
// const mediaArr = mediaObj?.value || [];
|
||||||
|
|
||||||
|
// const videoItems = useMemo(() => {
|
||||||
|
// const isWelsh = router.locale === "cy";
|
||||||
|
|
||||||
|
// return (mediaArr || [])
|
||||||
|
// .filter((x) => x?.pinswg_publishtoweb)
|
||||||
|
// .map((item) => {
|
||||||
|
// const url = isWelsh
|
||||||
|
// ? item.pinswg_mediaLinkCY
|
||||||
|
// : item.pinswg_mediaLinkEN;
|
||||||
|
// const videoId = extractYouTubeId(url);
|
||||||
|
// if (!videoId) return null;
|
||||||
|
|
||||||
|
// return {
|
||||||
|
// key:
|
||||||
|
// item.pinswg_documentid ||
|
||||||
|
// `${item.pinswg_name}-${videoId}`,
|
||||||
|
// videoId,
|
||||||
|
// name: item.pinswg_name || "Video",
|
||||||
|
// description: item.pinswg_description || "",
|
||||||
|
// thumbnail: `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`,
|
||||||
|
// };
|
||||||
|
// })
|
||||||
|
// .filter(Boolean);
|
||||||
|
// }, [mediaArr, router.locale]);
|
||||||
|
|
||||||
|
// const [watchedIds, setWatchedIds] = useState(new Set());
|
||||||
|
// const [selectedIndex, setSelectedIndex] = useState(0);
|
||||||
|
|
||||||
|
// // Forces a fresh iframe instance whenever we need to hard-stop playback
|
||||||
|
// const [playerInstance, setPlayerInstance] = useState(0);
|
||||||
|
|
||||||
|
// const isActive = whichTab === "case-media";
|
||||||
|
// const selected = videoItems[selectedIndex] || null;
|
||||||
|
|
||||||
|
// // When leaving the media tab, hard-stop playback by unmounting (and bumping instance)
|
||||||
|
// useEffect(() => {
|
||||||
|
// if (!isActive) {
|
||||||
|
// setPlayerInstance((n) => n + 1);
|
||||||
|
// }
|
||||||
|
// }, [isActive]);
|
||||||
|
|
||||||
|
// // When list/locale changes, reset to first (no autoplay)
|
||||||
|
// useEffect(() => {
|
||||||
|
// setSelectedIndex(0);
|
||||||
|
// setPlayerInstance((n) => n + 1);
|
||||||
|
// }, [videoItems.length, router.locale]);
|
||||||
|
|
||||||
|
// if (!videoItems.length) return null;
|
||||||
|
|
||||||
|
// const embedBase = "https://www.youtube-nocookie.com/embed";
|
||||||
|
|
||||||
|
// // IMPORTANT:
|
||||||
|
// // - autoplay=0 for initial load
|
||||||
|
// // - autoplay=1 only when user clicks an item
|
||||||
|
// const [autoplay, setAutoplay] = useState(false);
|
||||||
|
|
||||||
|
// useEffect(() => {
|
||||||
|
// // whenever we leave tab or reset player, don't autoplay next time
|
||||||
|
// if (!isActive) setAutoplay(false);
|
||||||
|
// }, [isActive]);
|
||||||
|
|
||||||
|
// const embedSrc = selected
|
||||||
|
// ? `${embedBase}/${selected.videoId}?rel=0&modestbranding=1&playsinline=1&autoplay=${autoplay ? "1" : "0"}`
|
||||||
|
// : "";
|
||||||
|
|
||||||
|
// return (
|
||||||
|
// <div className="govuk-grid-row">
|
||||||
|
// <div className="card">
|
||||||
|
// <div className="card-body">
|
||||||
|
// <h2 className="govuk-heading-m">Media</h2>
|
||||||
|
|
||||||
|
// {/* Player: only render when tab is active */}
|
||||||
|
// {isActive && (
|
||||||
|
// <div className="videoWrapper govuk-!-margin-bottom-4">
|
||||||
|
// <iframe
|
||||||
|
// key={`${selected?.videoId}-${playerInstance}`}
|
||||||
|
// src={embedSrc}
|
||||||
|
// title={selected?.name || "YouTube video"}
|
||||||
|
// frameBorder="0"
|
||||||
|
// allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
|
// allowFullScreen
|
||||||
|
// />
|
||||||
|
// </div>
|
||||||
|
// )}
|
||||||
|
|
||||||
|
// <h3 className="govuk-heading-s">Videos</h3>
|
||||||
|
// <ul className="govuk-list govuk-list--spaced">
|
||||||
|
// {videoItems.map((v, idx) => {
|
||||||
|
// const isSelected = idx === selectedIndex;
|
||||||
|
// return (
|
||||||
|
// <li key={v.key}>
|
||||||
|
// <button
|
||||||
|
// type="button"
|
||||||
|
// className={`videoTabButton ${isSelected ? "active" : ""}`}
|
||||||
|
// onClick={() => {
|
||||||
|
// setSelectedIndex(idx);
|
||||||
|
// setAutoplay(true); // play only on user action
|
||||||
|
// setPlayerInstance((n) => n + 1); // ensure clean switch / stop previous
|
||||||
|
// setWatchedIds((prev) =>
|
||||||
|
// new Set(prev).add(v.videoId),
|
||||||
|
// );
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// <div className="videoTabContent">
|
||||||
|
// <div className="thumbnailWrapper">
|
||||||
|
// <img
|
||||||
|
// src={v.thumbnail}
|
||||||
|
// alt=""
|
||||||
|
// className="videoThumbnail"
|
||||||
|
// loading="lazy"
|
||||||
|
// />
|
||||||
|
// <span
|
||||||
|
// className="playIcon"
|
||||||
|
// aria-hidden="true"
|
||||||
|
// >
|
||||||
|
// ▶
|
||||||
|
// </span>
|
||||||
|
|
||||||
|
// {/* Duration badge (see section 2) */}
|
||||||
|
// {v.duration && (
|
||||||
|
// <span className="durationBadge">
|
||||||
|
// {v.duration}
|
||||||
|
// </span>
|
||||||
|
// )}
|
||||||
|
|
||||||
|
// {/* Watched indicator (see section 3) */}
|
||||||
|
// {watchedIds.has(v.videoId) && (
|
||||||
|
// <span className="watchedBadge">
|
||||||
|
// Watched
|
||||||
|
// </span>
|
||||||
|
// )}
|
||||||
|
// </div>
|
||||||
|
|
||||||
|
// <span className="videoTitle">
|
||||||
|
// {v.name}
|
||||||
|
// </span>
|
||||||
|
// </div>
|
||||||
|
// </button>
|
||||||
|
// </li>
|
||||||
|
// );
|
||||||
|
// })}
|
||||||
|
// </ul>
|
||||||
|
// </div>
|
||||||
|
// </div>
|
||||||
|
|
||||||
|
// <style jsx>{`
|
||||||
|
// .videoWrapper {
|
||||||
|
// position: relative;
|
||||||
|
// padding-bottom: 56.25%;
|
||||||
|
// height: 0;
|
||||||
|
// overflow: hidden;
|
||||||
|
// border: 1px solid #b1b4b6;
|
||||||
|
// border-radius: 4px;
|
||||||
|
// }
|
||||||
|
// .videoWrapper iframe {
|
||||||
|
// position: absolute;
|
||||||
|
// top: 0;
|
||||||
|
// left: 0;
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100%;
|
||||||
|
// }
|
||||||
|
// .videoTabButton {
|
||||||
|
// width: 100%;
|
||||||
|
// text-align: left;
|
||||||
|
// background: transparent;
|
||||||
|
// border: 1px solid #b1b4b6;
|
||||||
|
// border-radius: 4px;
|
||||||
|
// padding: 10px 12px;
|
||||||
|
// cursor: pointer;
|
||||||
|
// }
|
||||||
|
// .videoTabButton:hover {
|
||||||
|
// background: #f3f2f1;
|
||||||
|
// }
|
||||||
|
// .videoTabButton.active {
|
||||||
|
// border-color: #1d70b8;
|
||||||
|
// box-shadow: inset 0 0 0 1px #1d70b8;
|
||||||
|
// background: #eef4ff;
|
||||||
|
// }
|
||||||
|
// .videoTabContent {
|
||||||
|
// display: flex;
|
||||||
|
// gap: 12px;
|
||||||
|
// align-items: center;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .videoThumbnail {
|
||||||
|
// width: 120px;
|
||||||
|
// aspect-ratio: 16 / 9;
|
||||||
|
// object-fit: cover;
|
||||||
|
// border-radius: 4px;
|
||||||
|
// border: 1px solid #b1b4b6;
|
||||||
|
// background: #000;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .videoTitle {
|
||||||
|
// font-weight: 600;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 40.0625em) {
|
||||||
|
// .videoThumbnail {
|
||||||
|
// width: 90px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// .thumbnailWrapper {
|
||||||
|
// position: relative;
|
||||||
|
// width: 120px;
|
||||||
|
// flex-shrink: 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .videoThumbnail {
|
||||||
|
// width: 100%;
|
||||||
|
// aspect-ratio: 16 / 9;
|
||||||
|
// object-fit: cover;
|
||||||
|
// border-radius: 4px;
|
||||||
|
// border: 1px solid #b1b4b6;
|
||||||
|
// background: #000;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ▶ Play icon */
|
||||||
|
// .playIcon {
|
||||||
|
// position: absolute;
|
||||||
|
// inset: 0;
|
||||||
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
// justify-content: center;
|
||||||
|
// font-size: 32px;
|
||||||
|
// color: white;
|
||||||
|
// text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
|
||||||
|
// pointer-events: none;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ⏱ Duration badge */
|
||||||
|
// .durationBadge {
|
||||||
|
// position: absolute;
|
||||||
|
// bottom: 6px;
|
||||||
|
// right: 6px;
|
||||||
|
// background: rgba(0, 0, 0, 0.8);
|
||||||
|
// color: white;
|
||||||
|
// font-size: 12px;
|
||||||
|
// padding: 2px 6px;
|
||||||
|
// border-radius: 3px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* 👁 Watched badge */
|
||||||
|
// .watchedBadge {
|
||||||
|
// position: absolute;
|
||||||
|
// top: 6px;
|
||||||
|
// left: 6px;
|
||||||
|
// background: #00703c; /* GOV green */
|
||||||
|
// color: white;
|
||||||
|
// font-size: 11px;
|
||||||
|
// padding: 2px 6px;
|
||||||
|
// border-radius: 3px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .videoTabContent {
|
||||||
|
// display: flex;
|
||||||
|
// gap: 12px;
|
||||||
|
// align-items: center;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .videoTitle {
|
||||||
|
// font-weight: 600;
|
||||||
|
// }
|
||||||
|
// `}</style>
|
||||||
|
// </div>
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { getBilingualText } from "./summary/utils/helpers";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MediaDetails
|
* MediaDetails
|
||||||
@@ -149,22 +546,14 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => {
|
|||||||
{selected && (
|
{selected && (
|
||||||
<div className="govuk-!-margin-bottom-4">
|
<div className="govuk-!-margin-bottom-4">
|
||||||
<div className="govuk-body">
|
<div className="govuk-body">
|
||||||
<b>{t("case:event-recording-name-label")}</b>:{" "}
|
<b>{t("case:event-name-label")}</b>:{" "}
|
||||||
{getBilingualText(selected.name, router.locale)}
|
{selected.name}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!!selected.description && (
|
{!!selected.description && (
|
||||||
<div className="govuk-body">
|
<div className="govuk-body">
|
||||||
<b>
|
<b>{t("case:event-event-name-label")}</b>:{" "}
|
||||||
{t(
|
{selected.description}
|
||||||
"case:event-recording-description-label"
|
|
||||||
)}
|
|
||||||
</b>
|
|
||||||
:{" "}
|
|
||||||
{getBilingualText(
|
|
||||||
selected.description,
|
|
||||||
router.locale
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -240,10 +629,7 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span className="videoTitle">
|
<span className="videoTitle">
|
||||||
{getBilingualText(
|
{v.name}
|
||||||
v.name,
|
|
||||||
router.locale
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -215,8 +215,7 @@ const ConsultationAgent = (props) => {
|
|||||||
"myrepresentations:add-files-label"
|
"myrepresentations:add-files-label"
|
||||||
)}
|
)}
|
||||||
ticketnumber={
|
ticketnumber={
|
||||||
props.currentView.caseReference
|
props.props.caseReference
|
||||||
.ticketnumber
|
|
||||||
}
|
}
|
||||||
hint={"sdsd"}
|
hint={"sdsd"}
|
||||||
fileList={
|
fileList={
|
||||||
|
|||||||
@@ -189,10 +189,7 @@ const ConsultationAppellant = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"myrepresentations:add-files-label"
|
"myrepresentations:add-files-label"
|
||||||
)}
|
)}
|
||||||
ticketnumber={
|
ticketnumber={props.props.caseReference}
|
||||||
props.currentView.caseReference
|
|
||||||
.ticketnumber
|
|
||||||
}
|
|
||||||
hint={"sdsd"}
|
hint={"sdsd"}
|
||||||
fileList={
|
fileList={
|
||||||
props.currentView.fileList
|
props.currentView.fileList
|
||||||
|
|||||||
@@ -223,8 +223,7 @@ const ConsultationInterestedPartyPerson = (props) => {
|
|||||||
"myrepresentations:add-files-label"
|
"myrepresentations:add-files-label"
|
||||||
)}
|
)}
|
||||||
ticketnumber={
|
ticketnumber={
|
||||||
props.currentView.caseReference
|
props.props.caseReference
|
||||||
.ticketnumber
|
|
||||||
}
|
}
|
||||||
hint={"sdsd"}
|
hint={"sdsd"}
|
||||||
fileList={
|
fileList={
|
||||||
|
|||||||
@@ -52,8 +52,10 @@ import {
|
|||||||
buildSubmitEnrichedValues,
|
buildSubmitEnrichedValues,
|
||||||
runFinalisationSequence
|
runFinalisationSequence
|
||||||
} from "./utils/finalisationBoundary";
|
} from "./utils/finalisationBoundary";
|
||||||
import { buildRepresentationContext } from "./utils/buildRepsArrRules";
|
import {
|
||||||
import { getAvailableRepresentationTypes } from "../../../lib/domain/representation-type-policy/getAvailableRepresentationTypes";
|
buildRepresentationContext,
|
||||||
|
buildRepsArrFromContext
|
||||||
|
} from "./utils/buildRepsArrRules";
|
||||||
|
|
||||||
let MakeRepresentation = (props) => {
|
let MakeRepresentation = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -332,7 +334,7 @@ let MakeRepresentation = (props) => {
|
|||||||
isNRW
|
isNRW
|
||||||
});
|
});
|
||||||
|
|
||||||
return getAvailableRepresentationTypes(ctx);
|
return buildRepsArrFromContext(ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
const repCapacityType = () => {
|
const repCapacityType = () => {
|
||||||
@@ -571,7 +573,7 @@ let MakeRepresentation = (props) => {
|
|||||||
loggedinUserEmail
|
loggedinUserEmail
|
||||||
} = props.props;
|
} = props.props;
|
||||||
const incidentID = props.appealType.caseReference.incidentid;
|
const incidentID = props.appealType.caseReference.incidentid;
|
||||||
const currentRef = caseReferenceObj.ticketnumber;
|
const currentRef = caseReferenceObj.currentReference;
|
||||||
const containerID = accountDetails.containerID;
|
const containerID = accountDetails.containerID;
|
||||||
|
|
||||||
setSavingStatus(useSaveStatus);
|
setSavingStatus(useSaveStatus);
|
||||||
@@ -1004,12 +1006,8 @@ let MakeRepresentation = (props) => {
|
|||||||
<RepresentationFlowFormStage
|
<RepresentationFlowFormStage
|
||||||
t={t}
|
t={t}
|
||||||
appealIsConsultation={appealIsConsultation}
|
appealIsConsultation={appealIsConsultation}
|
||||||
currentReference={ticketnumber}
|
currentReference={
|
||||||
caseTitle={
|
currentView.caseReference.currentReference
|
||||||
currentView?.caseReference?.repDetails
|
|
||||||
?.pinswg_name ||
|
|
||||||
currentView?.currentReference ||
|
|
||||||
currentView?.caseReference.currentReference
|
|
||||||
}
|
}
|
||||||
whichControl={whichControl}
|
whichControl={whichControl}
|
||||||
appealIsLocalImpact={appealIsLocalImpact}
|
appealIsLocalImpact={appealIsLocalImpact}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
@@ -12,7 +13,6 @@ import {
|
|||||||
bytesToSize,
|
bytesToSize,
|
||||||
getThumbnailIconByExtension,
|
getThumbnailIconByExtension,
|
||||||
formatDates,
|
formatDates,
|
||||||
hasOwn,
|
|
||||||
updateLinks,
|
updateLinks,
|
||||||
getDocLink
|
getDocLink
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
@@ -233,41 +233,35 @@ const RepCompleteSubmit = (props) => {
|
|||||||
let filterFiles = [];
|
let filterFiles = [];
|
||||||
|
|
||||||
function showRepsEnded(endDate) {
|
function showRepsEnded(endDate) {
|
||||||
if (!endDate) {
|
let date = new Date();
|
||||||
return false;
|
date = new Date(date.toDateString());
|
||||||
}
|
let end = new Date(endDate);
|
||||||
|
end.setUTCHours(23);
|
||||||
|
end.setUTCMinutes(59);
|
||||||
|
end.setUTCSeconds(59);
|
||||||
|
end.toISOString();
|
||||||
|
|
||||||
const end = new Date(endDate);
|
return end > date ? false : true;
|
||||||
|
|
||||||
if (Number.isNaN(end.getTime())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const today = new Date();
|
|
||||||
today.setHours(0, 0, 0, 0);
|
|
||||||
|
|
||||||
end.setHours(23, 59, 59, 999);
|
|
||||||
|
|
||||||
return end <= today;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkRepDatePassed = () => {
|
const checkRepDatePassed = () => {
|
||||||
if (repFormData.representationType === "Questionnaire") {
|
if (repFormData.representationType == "Questionnaire") {
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
if (repFormData.representationType == "Final comments") {
|
||||||
|
return repFormData.hasOwnProperty(
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
) && showRepsEnded(repFormData.pinswg_finalcommentsduedate)
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
}
|
}
|
||||||
|
if (repFormData.representationType == "Statement") {
|
||||||
if (repFormData.representationType === "Final comments") {
|
return repFormData.hasOwnProperty("pinswg_statementduedate") &&
|
||||||
return showRepsEnded(repFormData.pinswg_finalcommentsduedate);
|
showRepsEnded(repFormData.pinswg_statementduedate)
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (repFormData.representationType === "Statement") {
|
|
||||||
return (
|
|
||||||
showRepsEnded(repFormData.pinswg_statementduedate) ||
|
|
||||||
showRepsEnded(repFormData.pinswg_endofrepresentationperiod)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const triggerQuestionnaireDownload = async () => {
|
const triggerQuestionnaireDownload = async () => {
|
||||||
@@ -405,7 +399,7 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</a> */}
|
</a> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
repFormData,
|
repFormData,
|
||||||
"representationOnBehalfOf"
|
"representationOnBehalfOf"
|
||||||
) && (
|
) && (
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const RepDetails = (props) => {
|
const RepDetails = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -32,7 +31,7 @@ const RepDetails = (props) => {
|
|||||||
detailsObj = jsonpath({
|
detailsObj = jsonpath({
|
||||||
path: '$..[?(@ && @.ticketnumber=="' + ticketnumber + '")]',
|
path: '$..[?(@ && @.ticketnumber=="' + ticketnumber + '")]',
|
||||||
json: setCaseDetailsObj,
|
json: setCaseDetailsObj,
|
||||||
eval: true
|
eval: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
@@ -62,43 +61,34 @@ const RepDetails = (props) => {
|
|||||||
{t("case:summary-site-address-label")}
|
{t("case:summary-site-address-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddressline1")
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
? detailsObj.pinswg_siteaddressline1
|
? detailsObj.pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(detailsObj, "pinswg_siteaddressline1") &&
|
||||||
detailsObj,
|
|
||||||
"pinswg_siteaddressline1"
|
|
||||||
) &&
|
|
||||||
detailsObj.pinswg_siteaddressline1 !=
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddressline2")
|
{_.has(detailsObj, "pinswg_siteaddressline2")
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(detailsObj, "pinswg_siteaddressline2") &&
|
||||||
detailsObj,
|
|
||||||
"pinswg_siteaddressline2"
|
|
||||||
) &&
|
|
||||||
detailsObj.pinswg_siteaddressline2 !=
|
detailsObj.pinswg_siteaddressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddresstown")
|
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddresstown") &&
|
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
||||||
detailsObj.pinswg_siteaddresstown !=
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddresscounty")
|
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresscounty !=
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(detailsObj, "pinswg_siteaddresspostcode")
|
||||||
detailsObj,
|
|
||||||
"pinswg_siteaddresspostcode"
|
|
||||||
)
|
|
||||||
? detailsObj.pinswg_siteaddresspostcode
|
? detailsObj.pinswg_siteaddresspostcode
|
||||||
: ""}
|
: ""}
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
<RepresentationTypeSelectorBlock
|
<RepresentationTypeSelectorBlock
|
||||||
t={t}
|
t={t}
|
||||||
headingText={t(
|
headingText={t(
|
||||||
"myrepresentations:representation-from-an-interested-person-heading"
|
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||||
)}
|
)}
|
||||||
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
||||||
isTypeSelected={isTypeConfirmed}
|
isTypeSelected={isTypeConfirmed}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const RepLPADetails = (props) => {
|
const RepLPADetails = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,7 +23,7 @@ const RepLPADetails = (props) => {
|
|||||||
detailsObj = jsonpath({
|
detailsObj = jsonpath({
|
||||||
path: '$..[?(@ && @.ticketnumber=="' + ticketnumber + '")]',
|
path: '$..[?(@ && @.ticketnumber=="' + ticketnumber + '")]',
|
||||||
json: setCaseDetailsObj,
|
json: setCaseDetailsObj,
|
||||||
eval: true
|
eval: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
@@ -52,43 +51,34 @@ const RepLPADetails = (props) => {
|
|||||||
{t("case:summary-site-address-label")}
|
{t("case:summary-site-address-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddressline1")
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
? detailsObj.pinswg_siteaddressline1
|
? detailsObj.pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(detailsObj, "pinswg_siteaddressline1") &&
|
||||||
detailsObj,
|
|
||||||
"pinswg_siteaddressline1"
|
|
||||||
) &&
|
|
||||||
detailsObj.pinswg_siteaddressline1 !=
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddressline2")
|
{_.has(detailsObj, "pinswg_siteaddressline2")
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(detailsObj, "pinswg_siteaddressline2") &&
|
||||||
detailsObj,
|
|
||||||
"pinswg_siteaddressline2"
|
|
||||||
) &&
|
|
||||||
detailsObj.pinswg_siteaddressline2 !=
|
detailsObj.pinswg_siteaddressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddresstown")
|
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddresstown") &&
|
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
||||||
detailsObj.pinswg_siteaddresstown !=
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(detailsObj, "pinswg_siteaddresscounty")
|
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresscounty !=
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(detailsObj, "pinswg_siteaddresspostcode")
|
||||||
detailsObj,
|
|
||||||
"pinswg_siteaddresspostcode"
|
|
||||||
)
|
|
||||||
? detailsObj.pinswg_siteaddresspostcode
|
? detailsObj.pinswg_siteaddresspostcode
|
||||||
: ""}
|
: ""}
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
+63
-62
@@ -1,5 +1,6 @@
|
|||||||
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { formatDates, hasOwn, updateLinks } from "../../../utils";
|
import { formatDates, updateLinks } from "../../../utils";
|
||||||
|
|
||||||
let RepLPAQuestionnaireCheck_s78 = (props) => {
|
let RepLPAQuestionnaireCheck_s78 = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -10,7 +11,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
showQuestionnaireSection,
|
showQuestionnaireSection,
|
||||||
setShowQuestionnaireSection,
|
setShowQuestionnaireSection,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
questionnaireCount
|
questionnaireCount,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
let repFormData = formObj.representationForm.values;
|
let repFormData = formObj.representationForm.values;
|
||||||
@@ -21,7 +22,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<>
|
<>
|
||||||
{showQuestionnaireSection}
|
{showQuestionnaireSection}
|
||||||
|
|
||||||
{hasOwn(repFormData, "procedureType") && (
|
{_.has(repFormData, "procedureType") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -83,7 +84,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "enterToView") && (
|
{_.has(repFormData, "enterToView") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -116,7 +117,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "enterNeighbouringLandToViewSite") && (
|
{_.has(repFormData, "enterNeighbouringLandToViewSite") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -159,7 +160,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.enterNeighbouringLandToViewSiteEvidence
|
__html: repFormData.enterNeighbouringLandToViewSiteEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -186,7 +187,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "enterNeighbouringLandAccessRequired") && (
|
{_.has(repFormData, "enterNeighbouringLandAccessRequired") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -230,7 +231,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.enterNeighbouringLandAccessRequiredEvidence
|
__html: repFormData.enterNeighbouringLandAccessRequiredEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -257,7 +258,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "healthAndSafetyIssues") && (
|
{_.has(repFormData, "healthAndSafetyIssues") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -300,7 +301,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.healthAndSafetyIssuesEvidence
|
__html: repFormData.healthAndSafetyIssuesEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -336,11 +337,11 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(repFormData, "LPAcontactDetails") ? (
|
{_.has(repFormData, "LPAcontactDetails") ? (
|
||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.LPAcontactDetails
|
__html: repFormData.LPAcontactDetails,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -377,11 +378,11 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(repFormData, "LPAcaseFileAndReps") ? (
|
{_.has(repFormData, "LPAcaseFileAndReps") ? (
|
||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.LPAcaseFileAndReps
|
__html: repFormData.LPAcaseFileAndReps,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -418,11 +419,11 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(repFormData, "LPAldpAndMap") ? (
|
{_.has(repFormData, "LPAldpAndMap") ? (
|
||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.LPAldpAndMap
|
__html: repFormData.LPAldpAndMap,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -459,11 +460,11 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(repFormData, "LPAlocalGuidance") ? (
|
{_.has(repFormData, "LPAlocalGuidance") ? (
|
||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.LPAlocalGuidance
|
__html: repFormData.LPAlocalGuidance,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -492,7 +493,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
||||||
{hasOwn(repFormData, "LPAintentionToSubmitFullStatement") && (
|
{_.has(repFormData, "LPAintentionToSubmitFullStatement") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -525,7 +526,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "AONB") && (
|
{_.has(repFormData, "AONB") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -557,7 +558,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "ROW") && (
|
{_.has(repFormData, "ROW") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -599,7 +600,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.ROWEvidence
|
__html: repFormData.ROWEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -626,7 +627,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "conservationArea") && (
|
{_.has(repFormData, "conservationArea") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -669,7 +670,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.conservationAreaEvidence
|
__html: repFormData.conservationAreaEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -696,7 +697,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "affectListedBuilding") && (
|
{_.has(repFormData, "affectListedBuilding") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -739,7 +740,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.affectListedBuildingEvidence
|
__html: repFormData.affectListedBuildingEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -766,7 +767,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "TPO") && (
|
{_.has(repFormData, "TPO") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -809,7 +810,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.TPOEvidence
|
__html: repFormData.TPOEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -836,7 +837,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "natureConservationSite") && (
|
{_.has(repFormData, "natureConservationSite") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -879,7 +880,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.natureConservationSiteEvidence
|
__html: repFormData.natureConservationSiteEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -906,7 +907,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "protectedSpecies") && (
|
{_.has(repFormData, "protectedSpecies") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -949,7 +950,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.protectedSpeciesEvidence
|
__html: repFormData.protectedSpeciesEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -976,7 +977,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "gypsyTravellerInvolvment") && (
|
{_.has(repFormData, "gypsyTravellerInvolvment") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1009,7 +1010,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "governmentDepartmentComments") && (
|
{_.has(repFormData, "governmentDepartmentComments") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1052,7 +1053,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.governmentDepartmentCommentsEvidence
|
__html: repFormData.governmentDepartmentCommentsEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1079,7 +1080,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "developmentNotBeginLaterThanFiveYears") && (
|
{_.has(repFormData, "developmentNotBeginLaterThanFiveYears") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1112,7 +1113,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "developmentCarriedOutInAccordance") && (
|
{_.has(repFormData, "developmentCarriedOutInAccordance") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1155,7 +1156,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.developmentCarriedOutInAccordanceEvidence
|
__html: repFormData.developmentCarriedOutInAccordanceEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1182,7 +1183,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "developmentNotTakePlaceBiodiversity") && (
|
{_.has(repFormData, "developmentNotTakePlaceBiodiversity") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1215,7 +1216,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "developmentNotTakePlaceBroadband") && (
|
{_.has(repFormData, "developmentNotTakePlaceBroadband") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1258,7 +1259,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.developmentNotTakePlaceBroadbandEvidence
|
__html: repFormData.developmentNotTakePlaceBroadbandEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1285,7 +1286,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "developmentAnyOtherConditions") && (
|
{_.has(repFormData, "developmentAnyOtherConditions") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1328,7 +1329,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.developmentAnyOtherConditionsEvidence
|
__html: repFormData.developmentAnyOtherConditionsEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1355,7 +1356,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "copyOfApplicantsCertificate") && (
|
{_.has(repFormData, "copyOfApplicantsCertificate") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1398,7 +1399,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.copyOfApplicantsCertificateEvidence
|
__html: repFormData.copyOfApplicantsCertificateEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1425,7 +1426,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "advertismentGiven") && (
|
{_.has(repFormData, "advertismentGiven") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1468,7 +1469,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.advertismentGivenEvidence
|
__html: repFormData.advertismentGivenEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1495,7 +1496,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "copyOfLetterOfAppealNotification") && (
|
{_.has(repFormData, "copyOfLetterOfAppealNotification") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1538,7 +1539,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.copyOfLetterOfAppealNotificationEvidence
|
__html: repFormData.copyOfLetterOfAppealNotificationEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1565,7 +1566,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "lpaEIAOS") && (
|
{_.has(repFormData, "lpaEIAOS") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1608,7 +1609,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.lpaEIAOSEvidence
|
__html: repFormData.lpaEIAOSEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1635,7 +1636,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "advertismentConsentDiscontinuanceNotice") && (
|
{_.has(repFormData, "advertismentConsentDiscontinuanceNotice") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1680,7 +1681,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.advertismentConsentDiscontinuanceNoticeEvidence
|
__html: repFormData.advertismentConsentDiscontinuanceNoticeEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1707,7 +1708,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "detailsOfOtherAppeals") && (
|
{_.has(repFormData, "detailsOfOtherAppeals") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1750,7 +1751,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.detailsOfOtherAppeals
|
__html: repFormData.detailsOfOtherAppeals,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1777,7 +1778,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "detailsOfPreviousAppeals") && (
|
{_.has(repFormData, "detailsOfPreviousAppeals") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1820,7 +1821,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.detailsOfPreviousAppealsEvidence
|
__html: repFormData.detailsOfPreviousAppealsEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1847,7 +1848,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "otherRelevantInformation") && (
|
{_.has(repFormData, "otherRelevantInformation") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1890,7 +1891,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
<div
|
<div
|
||||||
className="govuk-summary-list-check-ellipsis"
|
className="govuk-summary-list-check-ellipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.otherRelevantInformationEvidence
|
__html: repFormData.otherRelevantInformationEvidence,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -1917,7 +1918,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "signedDate") && (
|
{_.has(repFormData, "signedDate") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1949,7 +1950,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "caseOfficer") && (
|
{_.has(repFormData, "caseOfficer") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -1982,7 +1983,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{hasOwn(repFormData, "onBehalfOfLPA") && (
|
{_.has(repFormData, "onBehalfOfLPA") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ const RepresentationFlowFormStage = ({
|
|||||||
t,
|
t,
|
||||||
appealIsConsultation,
|
appealIsConsultation,
|
||||||
currentReference,
|
currentReference,
|
||||||
caseTitle,
|
|
||||||
whichControl,
|
whichControl,
|
||||||
appealIsLocalImpact,
|
appealIsLocalImpact,
|
||||||
renderDueDate,
|
renderDueDate,
|
||||||
@@ -23,7 +22,7 @@ const RepresentationFlowFormStage = ({
|
|||||||
: t(
|
: t(
|
||||||
"myrepresentations:make-a-representation-on-label"
|
"myrepresentations:make-a-representation-on-label"
|
||||||
)}{" "}
|
)}{" "}
|
||||||
{caseTitle}{" "}
|
{currentReference}{" "}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div id="rep-form">
|
<div id="rep-form">
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
const {
|
|
||||||
getAvailableRepresentationTypes
|
|
||||||
} = require("../../../../lib/domain/representation-type-policy/getAvailableRepresentationTypes");
|
|
||||||
|
|
||||||
export const APPEAL_TYPES = {
|
export const APPEAL_TYPES = {
|
||||||
SIPS: 846040002,
|
SIPS: 846040002,
|
||||||
DNS: 846040011,
|
DNS: 846040011,
|
||||||
@@ -114,6 +110,115 @@ export const buildRepresentationContext = ({
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const buildRepsArrFromContext = (ctx) => {
|
export const addQuestionnaire = (options, ctx) => {
|
||||||
return getAvailableRepresentationTypes(ctx);
|
const excludedTypes = [
|
||||||
|
APPEAL_TYPES.EXCLUDE_QUESTIONNAIRE_1,
|
||||||
|
APPEAL_TYPES.DNS,
|
||||||
|
APPEAL_TYPES.EXCLUDE_QUESTIONNAIRE_2,
|
||||||
|
APPEAL_TYPES.EXCLUDE_QUESTIONNAIRE_3
|
||||||
|
];
|
||||||
|
|
||||||
|
const canAdd =
|
||||||
|
ctx.isLPA &&
|
||||||
|
!excludedTypes.includes(ctx.appealType) &&
|
||||||
|
isWithinWindow(ctx.now, ctx.startDate, ctx.finalCommentsDueDate);
|
||||||
|
|
||||||
|
if (canAdd) {
|
||||||
|
options.add(REPRESENTATION_OPTIONS.QUESTIONNAIRE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const addStatements = (options, ctx) => {
|
||||||
|
const isLpaAdvertPart3NoStatement =
|
||||||
|
ctx.isLPA &&
|
||||||
|
ctx.appealType === APPEAL_TYPES.ADVERT &&
|
||||||
|
ctx.specialistProcess === SPECIALIST_PROCESS.WRITTEN_REPS;
|
||||||
|
|
||||||
|
const canAddDnsLpaDocs =
|
||||||
|
ctx.isLPA &&
|
||||||
|
ctx.isDNS &&
|
||||||
|
ctx.appealType !== APPEAL_TYPES.EXCLUDE_QUESTIONNAIRE_1 &&
|
||||||
|
!ctx.isCaseOwner &&
|
||||||
|
isWithinWindow(ctx.now, ctx.startDate, ctx.finalCommentsDueDate);
|
||||||
|
|
||||||
|
if (canAddDnsLpaDocs) {
|
||||||
|
options.add(REPRESENTATION_OPTIONS.LOCAL_IMPACT_REPORT);
|
||||||
|
options.add(REPRESENTATION_OPTIONS.STATEMENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
const canAddStatementForNonDns =
|
||||||
|
!ctx.isDNS &&
|
||||||
|
ctx.appealType !== APPEAL_TYPES.HOUSEHOLDER &&
|
||||||
|
!isLpaAdvertPart3NoStatement &&
|
||||||
|
!ctx.isCaseOwner &&
|
||||||
|
isWithinWindow(ctx.now, ctx.startDate, ctx.statementDueDate);
|
||||||
|
|
||||||
|
if (canAddStatementForNonDns) {
|
||||||
|
options.add(REPRESENTATION_OPTIONS.STATEMENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
const canAddStatementForDnsNonLpa =
|
||||||
|
ctx.isDNS &&
|
||||||
|
!ctx.isLPA &&
|
||||||
|
!ctx.isCaseOwner &&
|
||||||
|
isWithinWindow(ctx.now, ctx.startDate, ctx.statementDueDate);
|
||||||
|
|
||||||
|
if (canAddStatementForDnsNonLpa) {
|
||||||
|
options.add(REPRESENTATION_OPTIONS.STATEMENT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const addFinalComments = (options, ctx) => {
|
||||||
|
const canSubmitFinalCommentsDefault =
|
||||||
|
ctx.isSelectedAppellant ||
|
||||||
|
ctx.isSelectedAgent ||
|
||||||
|
ctx.isSelectedInterestedParty ||
|
||||||
|
ctx.isLPA;
|
||||||
|
|
||||||
|
const canSubmitFinalComments = ctx.isDNS
|
||||||
|
? ctx.isLPA
|
||||||
|
: canSubmitFinalCommentsDefault;
|
||||||
|
|
||||||
|
const isSpecialistNonHearing =
|
||||||
|
ctx.specialistProcess !== SPECIALIST_PROCESS.HEARING;
|
||||||
|
|
||||||
|
const finalCommentsWindowStart = ctx.isDNS
|
||||||
|
? ctx.startDate
|
||||||
|
: ctx.statementDueDate;
|
||||||
|
|
||||||
|
const canAdd =
|
||||||
|
canSubmitFinalComments &&
|
||||||
|
isWithinWindow(
|
||||||
|
ctx.now,
|
||||||
|
finalCommentsWindowStart,
|
||||||
|
ctx.finalCommentsDueDate
|
||||||
|
) &&
|
||||||
|
(ctx.appealType !== APPEAL_TYPES.HOUSEHOLDER || isSpecialistNonHearing);
|
||||||
|
|
||||||
|
if (canAdd) {
|
||||||
|
options.add(REPRESENTATION_OPTIONS.FINAL_COMMENTS);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const addConsultation = (options, ctx) => {
|
||||||
|
if (!ctx.isSIPS) return;
|
||||||
|
|
||||||
|
options.add(REPRESENTATION_OPTIONS.CONSULTATION_RESPONSE);
|
||||||
|
|
||||||
|
if (!ctx.isSelectedAppellant) {
|
||||||
|
options.add(REPRESENTATION_OPTIONS.LOCAL_IMPACT_REPORT);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ctx.isNRW) {
|
||||||
|
options.add(REPRESENTATION_OPTIONS.MARINE_IMPACT_REPORT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const buildRepsArrFromContext = (ctx) => {
|
||||||
|
const options = new Set();
|
||||||
|
addQuestionnaire(options, ctx);
|
||||||
|
addStatements(options, ctx);
|
||||||
|
addFinalComments(options, ctx);
|
||||||
|
addConsultation(options, ctx);
|
||||||
|
return [...options];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export const buildSubmitEnrichedValues = ({
|
|||||||
incidentID:
|
incidentID:
|
||||||
caseReferenceObj.incidentid ||
|
caseReferenceObj.incidentid ||
|
||||||
caseReferenceObj.repDetails.incidentid,
|
caseReferenceObj.repDetails.incidentid,
|
||||||
caseRef: caseReferenceObj.ticketnumber,
|
caseRef: caseReferenceObj.currentReference,
|
||||||
casereference: caseReferenceObj.currentReference,
|
casereference: caseReferenceObj.currentReference,
|
||||||
pinswg_questionnaireduedate: detailsObj.pinswg_questionnaireduedate,
|
pinswg_questionnaireduedate: detailsObj.pinswg_questionnaireduedate,
|
||||||
pinswg_endofrepresentationperiod:
|
pinswg_endofrepresentationperiod:
|
||||||
|
|||||||
@@ -88,13 +88,23 @@ const RepresentationList = (props) => {
|
|||||||
{t("case:documents-doc-type-label")}:
|
{t("case:documents-doc-type-label")}:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
})}
|
sanbox: {}
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
</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">
|
||||||
|
|||||||
+38
-14
@@ -1,6 +1,10 @@
|
|||||||
|
import { setEventDetails } from "../../store/searchOutput/action";
|
||||||
|
import { setCurrentPage } from "../../store/currentView/action";
|
||||||
|
import { connect } from "react-redux";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { formatDates } from "../utils";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { getLifecycleStagesForCase } from "../../lib/domain/case-lifecycle";
|
import { getStagesForAppealType } from "./summary/utils/caseStagesByAppealType";
|
||||||
|
|
||||||
const statusClassMap = {
|
const statusClassMap = {
|
||||||
complete: "govuk-tag govuk-!-margin-top-2",
|
complete: "govuk-tag govuk-!-margin-top-2",
|
||||||
@@ -19,20 +23,23 @@ const statusTextMap = {
|
|||||||
const StatusDetails = (props) => {
|
const StatusDetails = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const caseResult = props.searchResultsObj?.value?.[0];
|
const stages = getStagesForAppealType(
|
||||||
const caseDetails = props.searchDetailsObj?.[0]?.value?.[0];
|
props.currentView?.caseReference?.appealType,
|
||||||
|
props.currentView?.caseReference?.statuscode
|
||||||
const statusCode = Number(caseResult?.statuscode);
|
|
||||||
const appealType = Number(caseResult?.pinswg_appealcasetype);
|
|
||||||
|
|
||||||
const specialistProcess = caseDetails?.pinswg_specialistcaseprocess;
|
|
||||||
|
|
||||||
const stages = getLifecycleStagesForCase(
|
|
||||||
appealType,
|
|
||||||
statusCode,
|
|
||||||
specialistProcess
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const EventView = (eventsArr) => {
|
||||||
|
eventsArr = eventsArr.value;
|
||||||
|
|
||||||
|
return eventsArr.map((item, key) => {
|
||||||
|
<div>{item.pinswg_name}</div>;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const eventsArr = props.eventsObj?.value || [];
|
||||||
|
|
||||||
|
// event publishiing flag set to true displa
|
||||||
|
|
||||||
function hasOwnPropertyAndNotNull(obj, property) {
|
function hasOwnPropertyAndNotNull(obj, property) {
|
||||||
return obj.hasOwnProperty(property) && obj[property] !== null;
|
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||||
}
|
}
|
||||||
@@ -127,4 +134,21 @@ const StatusDetails = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default StatusDetails;
|
const mapStateToProps = (state) => {
|
||||||
|
return {
|
||||||
|
...state
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
setEventDetails: (eventsObj) => {
|
||||||
|
dispatch(setEventDetails(eventsObj));
|
||||||
|
},
|
||||||
|
setCurrentPage: (currentPage) => {
|
||||||
|
dispatch(setCurrentPage(currentPage));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(StatusDetails);
|
||||||
|
|||||||
+85
-176
@@ -24,7 +24,6 @@ import {
|
|||||||
setCurrentReference,
|
setCurrentReference,
|
||||||
setCurrentView
|
setCurrentView
|
||||||
} from "../../store/currentView/action";
|
} from "../../store/currentView/action";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
setWatchedCases,
|
setWatchedCases,
|
||||||
@@ -33,7 +32,7 @@ import {
|
|||||||
|
|
||||||
import { signIn, useSession } from "next-auth/react";
|
import { signIn, useSession } from "next-auth/react";
|
||||||
import { destroyCookie, parseCookies, setCookie } from "nookies";
|
import { destroyCookie, parseCookies, setCookie } from "nookies";
|
||||||
import { getFormCollectionByID, getDetailsProxy, hasOwn } from "../utils";
|
import { getFormCollectionByID, getDetailsProxy } from "../utils";
|
||||||
import {
|
import {
|
||||||
getLivePublishedEvent,
|
getLivePublishedEvent,
|
||||||
isEventLiveNow
|
isEventLiveNow
|
||||||
@@ -67,7 +66,7 @@ import CaseNoticeBanner from "./caseNoticeBanner";
|
|||||||
import WatchModal from "./watchmodal";
|
import WatchModal from "./watchmodal";
|
||||||
import EIADetails from "./eia";
|
import EIADetails from "./eia";
|
||||||
|
|
||||||
import MapComponent from "../mapping";
|
import GoogleMapComponent from "../mapping";
|
||||||
import OSPoint from "ospoint";
|
import OSPoint from "ospoint";
|
||||||
|
|
||||||
const CaseSummary = (props) => {
|
const CaseSummary = (props) => {
|
||||||
@@ -96,8 +95,7 @@ const CaseSummary = (props) => {
|
|||||||
currentView,
|
currentView,
|
||||||
messagesObj,
|
messagesObj,
|
||||||
docsOffline,
|
docsOffline,
|
||||||
ticketnumber,
|
ticketnumber
|
||||||
mapTarget
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const showLoginCheck =
|
const showLoginCheck =
|
||||||
@@ -203,10 +201,6 @@ const CaseSummary = (props) => {
|
|||||||
return isEmail;
|
return isEmail;
|
||||||
};
|
};
|
||||||
|
|
||||||
const primaryId = getFormCollectionByID(
|
|
||||||
appealTypeID || setCaseQueryObj.value[0].pinswg_appealcasetype
|
|
||||||
).PrimaryIdAttribute;
|
|
||||||
|
|
||||||
const deleteItem = (caseID, topThreeType) => {
|
const deleteItem = (caseID, topThreeType) => {
|
||||||
let cookies = parseCookies();
|
let cookies = parseCookies();
|
||||||
topThreeType == "watchedCases" &&
|
topThreeType == "watchedCases" &&
|
||||||
@@ -510,7 +504,8 @@ const CaseSummary = (props) => {
|
|||||||
href="#case-eia"
|
href="#case-eia"
|
||||||
onClick={() => setWhichTab("case-eia")}
|
onClick={() => setWhichTab("case-eia")}
|
||||||
>
|
>
|
||||||
{router.locale == "cy" ? "AEA" : "EIA"}
|
{" "}
|
||||||
|
EIA
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
@@ -607,15 +602,27 @@ const CaseSummary = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{primaryId === "pinswg_dnsid" ||
|
{getFormCollectionByID(
|
||||||
primaryId ===
|
appealTypeID ||
|
||||||
"pinswg_nonvalidationid" ||
|
setCaseQueryObj.value[0]
|
||||||
primaryId === "pinswg_sipscase"
|
.pinswg_appealcasetype
|
||||||
|
).PrimaryIdAttribute ==
|
||||||
|
"pinswg_dnsid"
|
||||||
? t(
|
? t(
|
||||||
"case:summary-applicantonly-label"
|
"case:summary-applicantonly-label"
|
||||||
)
|
)
|
||||||
: t(
|
: getFormCollectionByID(
|
||||||
|
appealTypeID ||
|
||||||
|
setCaseQueryObj
|
||||||
|
.value[0]
|
||||||
|
.pinswg_appealcasetype
|
||||||
|
).PrimaryIdAttribute ==
|
||||||
|
"pinswg_nonvalidationid"
|
||||||
|
? t(
|
||||||
"case:summary-appellantonly-label"
|
"case:summary-appellantonly-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-applicant-label"
|
||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
@@ -631,7 +638,7 @@ const CaseSummary = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
{detailsObj.pinswg_agentcontactname !=
|
{detailsObj.pinswg_agentcontactname !=
|
||||||
null &&
|
null &&
|
||||||
(hasOwn(
|
(_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_agentcontactname"
|
"pinswg_agentcontactname"
|
||||||
) ? (
|
) ? (
|
||||||
@@ -642,7 +649,7 @@ const CaseSummary = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_agentcontactname"
|
"pinswg_agentcontactname"
|
||||||
)
|
)
|
||||||
@@ -686,103 +693,103 @@ const CaseSummary = (props) => {
|
|||||||
)[0]
|
)[0]
|
||||||
: ""
|
: ""
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddressline1
|
? detailsObj.pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline1"
|
"pinswg_addressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_addressline1
|
? detailsObj.pinswg_addressline1
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline1 !=
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline1"
|
"pinswg_addressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addressline1 !=
|
detailsObj.pinswg_addressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline2"
|
"pinswg_siteaddressline2"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline2"
|
"pinswg_addressline2"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_addressline2
|
? detailsObj.pinswg_addressline2
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline2"
|
"pinswg_addressline2"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addressline2 !=
|
detailsObj.pinswg_addressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresstown"
|
"pinswg_addresstown"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_addresstown
|
? detailsObj.pinswg_addresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresstown !=
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresstown"
|
"pinswg_addresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addresstown !=
|
detailsObj.pinswg_addresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresscounty"
|
"pinswg_addresscounty"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_addresscounty
|
? detailsObj.pinswg_addresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresscounty !=
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresscounty"
|
"pinswg_addresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addresscounty !=
|
detailsObj.pinswg_addresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresspostcode"
|
"pinswg_siteaddresspostcode"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresspostcode
|
? detailsObj.pinswg_siteaddresspostcode
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_postcode"
|
"pinswg_postcode"
|
||||||
)
|
)
|
||||||
@@ -877,52 +884,6 @@ const CaseSummary = (props) => {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="">
|
<div className="">
|
||||||
{getFormCollectionByID(
|
|
||||||
appealTypeID
|
|
||||||
).PrimaryIdAttribute ==
|
|
||||||
"pinswg_sipscase" &&
|
|
||||||
isConsultationWindowOpen(
|
|
||||||
detailsObj
|
|
||||||
) && (
|
|
||||||
<p>
|
|
||||||
{t(
|
|
||||||
"case:summary-make-consultation-response-para-a"
|
|
||||||
)}
|
|
||||||
<Link
|
|
||||||
target="_blank"
|
|
||||||
className="govuk-link"
|
|
||||||
href={t(
|
|
||||||
"case:summary-make-representation-para-a-link"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
"case:summary-make-representation-para-a-label"
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
{isGeneralRepresentationWindowOpen(
|
|
||||||
detailsObj
|
|
||||||
) && (
|
|
||||||
<div className="govuk-button-group">
|
|
||||||
<p>
|
|
||||||
{t(
|
|
||||||
"case:summary-make-representation-para-a"
|
|
||||||
)}
|
|
||||||
<Link
|
|
||||||
target="_blank"
|
|
||||||
className="govuk-link"
|
|
||||||
href={t(
|
|
||||||
"case:summary-make-representation-para-a-link"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
"case:summary-make-representation-para-a-label"
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
{getFormCollectionByID(
|
{getFormCollectionByID(
|
||||||
appealTypeID
|
appealTypeID
|
||||||
@@ -954,13 +915,13 @@ const CaseSummary = (props) => {
|
|||||||
case:
|
case:
|
||||||
currentType ==
|
currentType ==
|
||||||
"searchResultsObj"
|
"searchResultsObj"
|
||||||
? detailsObj.ticketnumber
|
? detailsObj.pinswg_name
|
||||||
: currentType ==
|
: currentType ==
|
||||||
"watchedCases"
|
"watchedCases"
|
||||||
? casesObj.pinswg_title
|
? casesObj.pinswg_title
|
||||||
: currentType ==
|
: currentType ==
|
||||||
"directResultsObj"
|
"directResultsObj"
|
||||||
? detailsObj.ticketnumber
|
? detailsObj.pinswg_name
|
||||||
: casesObj.reference
|
: casesObj.reference
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -1029,7 +990,6 @@ const CaseSummary = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isGeneralRepresentationWindowOpen(
|
{isGeneralRepresentationWindowOpen(
|
||||||
detailsObj
|
detailsObj
|
||||||
) && (
|
) && (
|
||||||
@@ -1483,7 +1443,7 @@ const CaseSummary = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdate"
|
"pinswg_startdate"
|
||||||
) &&
|
) &&
|
||||||
@@ -1573,11 +1533,9 @@ const CaseSummary = (props) => {
|
|||||||
width: "100%"
|
width: "100%"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MapComponent
|
<GoogleMapComponent
|
||||||
center={center}
|
center={center}
|
||||||
zoom={zoom}
|
zoom={zoom}
|
||||||
locale={router.locale}
|
|
||||||
mapTarget={mapTarget}
|
|
||||||
/>
|
/>
|
||||||
{/* <OSMapComponent center={center} zoom={zoom} /> */}
|
{/* <OSMapComponent center={center} zoom={zoom} /> */}
|
||||||
</div>
|
</div>
|
||||||
@@ -1616,103 +1574,103 @@ const CaseSummary = (props) => {
|
|||||||
)[0]
|
)[0]
|
||||||
: ""
|
: ""
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddressline1
|
? detailsObj.pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline1"
|
"pinswg_addressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_addressline1
|
? detailsObj.pinswg_addressline1
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline1 !=
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline1"
|
"pinswg_addressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addressline1 !=
|
detailsObj.pinswg_addressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline2"
|
"pinswg_siteaddressline2"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline2"
|
"pinswg_addressline2"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_addressline2
|
? detailsObj.pinswg_addressline2
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline2"
|
"pinswg_addressline2"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addressline2 !=
|
detailsObj.pinswg_addressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresstown"
|
"pinswg_addresstown"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_addresstown
|
? detailsObj.pinswg_addresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresstown !=
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresstown"
|
"pinswg_addresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addresstown !=
|
detailsObj.pinswg_addresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresscounty"
|
"pinswg_addresscounty"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_addresscounty
|
? detailsObj.pinswg_addresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresscounty !=
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresscounty"
|
"pinswg_addresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addresscounty !=
|
detailsObj.pinswg_addresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresspostcode"
|
"pinswg_siteaddresspostcode"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresspostcode
|
? detailsObj.pinswg_siteaddresspostcode
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_postcode"
|
"pinswg_postcode"
|
||||||
)
|
)
|
||||||
@@ -1740,20 +1698,16 @@ const CaseSummary = (props) => {
|
|||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div>
|
<div>
|
||||||
<h4 className="govuk-heading-s ">
|
<h4 className="govuk-heading-s ">
|
||||||
{t(
|
EIA Screening
|
||||||
"case:summary-eia-screening-heading"
|
|
||||||
)}
|
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
Screening start date
|
||||||
"case:summary-eia-screening-start-date-label"
|
|
||||||
)}
|
|
||||||
</dt>{" "}
|
</dt>{" "}
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_screeningstartdate"
|
"pinswg_screeningstartdate"
|
||||||
)
|
)
|
||||||
@@ -1773,12 +1727,10 @@ const CaseSummary = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
EIA target date
|
||||||
"case:summary-eia-screening-target-date-label"
|
|
||||||
)}
|
|
||||||
</dt>{" "}
|
</dt>{" "}
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_eiatargetdate"
|
"pinswg_eiatargetdate"
|
||||||
)
|
)
|
||||||
@@ -1803,12 +1755,10 @@ const CaseSummary = (props) => {
|
|||||||
) && (
|
) && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
Target Extended
|
||||||
"case:summary-eia-screening-target-extended-label"
|
|
||||||
)}
|
|
||||||
</dt>{" "}
|
</dt>{" "}
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_targetextended"
|
"pinswg_targetextended"
|
||||||
)
|
)
|
||||||
@@ -1829,12 +1779,11 @@ const CaseSummary = (props) => {
|
|||||||
)}
|
)}
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
Direction Issued
|
||||||
"case:summary-eia-screening-direction-issued-label"
|
Date
|
||||||
)}
|
|
||||||
</dt>{" "}
|
</dt>{" "}
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_directionissueddate"
|
"pinswg_directionissueddate"
|
||||||
)
|
)
|
||||||
@@ -1864,7 +1813,7 @@ const CaseSummary = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_eiarequired"
|
"pinswg_eiarequired"
|
||||||
)
|
)
|
||||||
@@ -1883,35 +1832,6 @@ const CaseSummary = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{hasValidKey(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_sipseiarequired"
|
|
||||||
) && (
|
|
||||||
<div className="govuk-summary-list__row">
|
|
||||||
<dt className="govuk-summary-list__key">
|
|
||||||
{t(
|
|
||||||
"case:summary-eia-required-label"
|
|
||||||
)}
|
|
||||||
</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{resolveCrmDisplayValue(
|
|
||||||
{
|
|
||||||
value: detailsObj[
|
|
||||||
"pinswg_sipseiarequired@OData.Community.Display.V1.FormattedValue"
|
|
||||||
],
|
|
||||||
locale,
|
|
||||||
translations:
|
|
||||||
transLookup,
|
|
||||||
fallbackValue:
|
|
||||||
t(
|
|
||||||
"case:summary-awaiting-information-label"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1920,20 +1840,16 @@ const CaseSummary = (props) => {
|
|||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div>
|
<div>
|
||||||
<h4 className="govuk-heading-s ">
|
<h4 className="govuk-heading-s ">
|
||||||
{t(
|
EIA Scoping
|
||||||
"case:summary-eia-scoping-heading"
|
|
||||||
)}
|
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
Scoping Start Date
|
||||||
"case:summary-eia-scoping-start-date-label"
|
|
||||||
)}
|
|
||||||
</dt>{" "}
|
</dt>{" "}
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_scopingstartdate"
|
"pinswg_scopingstartdate"
|
||||||
)
|
)
|
||||||
@@ -1953,12 +1869,10 @@ const CaseSummary = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
Scoping Target Date
|
||||||
"case:summary-eia-scoping-target-date-label"
|
|
||||||
)}
|
|
||||||
</dt>{" "}
|
</dt>{" "}
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_scopingtargetdate"
|
"pinswg_scopingtargetdate"
|
||||||
)
|
)
|
||||||
@@ -1982,12 +1896,11 @@ const CaseSummary = (props) => {
|
|||||||
) && (
|
) && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
Scoping Target
|
||||||
"case:summary-eia-scoping-target-extended-label"
|
Extended
|
||||||
)}
|
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_scopingtargetextended"
|
"pinswg_scopingtargetextended"
|
||||||
)
|
)
|
||||||
@@ -2008,12 +1921,11 @@ const CaseSummary = (props) => {
|
|||||||
)}
|
)}
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
Scoping Outcome
|
||||||
"case:summary-eia-scoping-direction-issued-date-label"
|
Issued Date
|
||||||
)}
|
|
||||||
</dt>{" "}
|
</dt>{" "}
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_scopingoutcomeissueddate"
|
"pinswg_scopingoutcomeissueddate"
|
||||||
)
|
)
|
||||||
@@ -2100,10 +2012,7 @@ const CaseSummary = (props) => {
|
|||||||
}
|
}
|
||||||
id="case-status"
|
id="case-status"
|
||||||
>
|
>
|
||||||
<StatusDetails
|
<StatusDetails />
|
||||||
searchResultsObj={props.searchResultsObj}
|
|
||||||
searchDetailsObj={props.searchDetailsObj}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
import { getStageCaseTypeKey } from "../../../../lib/domain/case-lifecycle/getStageCaseTypeKey";
|
|
||||||
import { getStagesForCaseTypeKey } from "../../../../lib/domain/case-lifecycle/getStagesForCaseTypeKey";
|
|
||||||
import { getLifecycleStageIndex } from "../../../../lib/domain/case-lifecycle/getLifecycleStageIndex";
|
|
||||||
import { getLifecycleStageStatus } from "../../../../lib/domain/case-lifecycle/getLifecycleStageStatus";
|
|
||||||
|
|
||||||
const slugify = (value) =>
|
const slugify = (value) =>
|
||||||
value
|
value
|
||||||
.toString()
|
.toString()
|
||||||
@@ -76,67 +71,11 @@ export const stagesByCaseType = {
|
|||||||
{
|
{
|
||||||
stageId: 846040013,
|
stageId: 846040013,
|
||||||
titleKey: "case-closed",
|
titleKey: "case-closed",
|
||||||
descriptionKey: "case-closed-desc-dnssips"
|
descriptionKey: "case-closed-desc-application"
|
||||||
}
|
}
|
||||||
]),
|
]),
|
||||||
|
|
||||||
SIP: buildStages([
|
SIP: "DNS",
|
||||||
{
|
|
||||||
stageId: 846040001,
|
|
||||||
titleKey: "pre-application",
|
|
||||||
descriptionKey: "pre-application-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040002,
|
|
||||||
titleKey: "environmental-impact-assessment-scoping",
|
|
||||||
descriptionKey: "environmental-impact-assessment-scoping-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040003,
|
|
||||||
titleKey: "notification",
|
|
||||||
descriptionKey: "notification-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040004,
|
|
||||||
titleKey: "acceptance-checking",
|
|
||||||
descriptionKey: "acceptance-checking-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040005,
|
|
||||||
titleKey: "invalid-submission",
|
|
||||||
descriptionKey: "invalid-submission-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040006,
|
|
||||||
titleKey: "consultation",
|
|
||||||
descriptionKey: "consultation-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040007,
|
|
||||||
titleKey: "re-consultation",
|
|
||||||
descriptionKey: "re-consultation-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040008,
|
|
||||||
titleKey: "reporting",
|
|
||||||
descriptionKey: "reporting-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040011,
|
|
||||||
titleKey: "report-to-ministers",
|
|
||||||
descriptionKey: "report-to-ministers-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040012,
|
|
||||||
titleKey: "minister-s-decision",
|
|
||||||
descriptionKey: "minister-s-decision-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-dnssips"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
PLANNING_S78: buildStages([
|
PLANNING_S78: buildStages([
|
||||||
{
|
{
|
||||||
@@ -269,7 +208,7 @@ export const stagesByCaseType = {
|
|||||||
{
|
{
|
||||||
stageId: 846040018,
|
stageId: 846040018,
|
||||||
titleKey: "representations-period",
|
titleKey: "representations-period",
|
||||||
descriptionKey: "representations-period-desc"
|
descriptionKey: "representations-period-desc-callin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040019,
|
stageId: 846040019,
|
||||||
@@ -277,7 +216,7 @@ export const stagesByCaseType = {
|
|||||||
descriptionKey: "final-comments-desc-callin"
|
descriptionKey: "final-comments-desc-callin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040049,
|
stageId: 846040020,
|
||||||
titleKey: "event",
|
titleKey: "event",
|
||||||
descriptionKey: "event-desc-callin"
|
descriptionKey: "event-desc-callin"
|
||||||
},
|
},
|
||||||
@@ -413,7 +352,7 @@ export const stagesByCaseType = {
|
|||||||
{
|
{
|
||||||
stageId: 846040013,
|
stageId: 846040013,
|
||||||
titleKey: "case-closed",
|
titleKey: "case-closed",
|
||||||
descriptionKey: "case-closed-desc"
|
descriptionKey: "case-closed-desc-application"
|
||||||
}
|
}
|
||||||
]),
|
]),
|
||||||
|
|
||||||
@@ -439,14 +378,14 @@ export const stagesByCaseType = {
|
|||||||
descriptionKey: "case-started-case-in-progress-desc"
|
descriptionKey: "case-started-case-in-progress-desc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040062,
|
stageId: 846040010,
|
||||||
titleKey: "statements",
|
titleKey: "statements",
|
||||||
descriptionKey: "statements-desc-order"
|
descriptionKey: "statements-desc-order"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040055,
|
stageId: 846040019,
|
||||||
titleKey: "final-comments",
|
titleKey: "final-comments",
|
||||||
descriptionKey: "final-comments-desc-cpo"
|
descriptionKey: "final-comments-desc-order"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040037,
|
stageId: 846040037,
|
||||||
@@ -477,19 +416,19 @@ export const stagesByCaseType = {
|
|||||||
descriptionKey: "application-registered-desc"
|
descriptionKey: "application-registered-desc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040054,
|
stageId: 846040036,
|
||||||
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"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040010,
|
stageId: 846040010,
|
||||||
titleKey: "statements",
|
titleKey: "statements",
|
||||||
descriptionKey: "statements-desc-application"
|
descriptionKey: "statements-desc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040063,
|
stageId: 846040019,
|
||||||
titleKey: "final-comments",
|
titleKey: "final-comments",
|
||||||
descriptionKey: "final-comments-desc-application"
|
descriptionKey: "statements-desc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040022,
|
stageId: 846040022,
|
||||||
@@ -626,7 +565,7 @@ export const stagesByCaseType = {
|
|||||||
descriptionKey: "application-validated-desc"
|
descriptionKey: "application-validated-desc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageId: 846040054,
|
stageId: 846040031,
|
||||||
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"
|
||||||
},
|
},
|
||||||
@@ -832,22 +771,112 @@ export const stagesByCaseType = {
|
|||||||
])
|
])
|
||||||
};
|
};
|
||||||
|
|
||||||
const resolveStages = (caseTypeOrAppealTypeId, specialistProcess) => {
|
export const caseTypeAliases = {
|
||||||
const key = getStageCaseTypeKey(caseTypeOrAppealTypeId, specialistProcess);
|
// Planning S78 group
|
||||||
|
S78: "PLANNING_S78",
|
||||||
|
PLANNING_78: "PLANNING_S78",
|
||||||
|
PLANNING_S78: "PLANNING_S78",
|
||||||
|
CONDITIONS_73_79: "CONDITIONS_73_79",
|
||||||
|
LBCAC: "LBCAC",
|
||||||
|
LDCS: "LDCS",
|
||||||
|
PLANNING_OBLIGATIONS_S106: "PLANNING_OBLIGATIONS_S106",
|
||||||
|
PRIOR_NOTIFICATION: "PRIOR_NOTIFICATION",
|
||||||
|
|
||||||
return getStagesForCaseTypeKey(key);
|
// Other types
|
||||||
|
HAS: "HAS",
|
||||||
|
CALL_INS: "CALL_INS",
|
||||||
|
CALL_IN: "CALL_INS",
|
||||||
|
ENFORCEMENT: "ENFORCEMENT",
|
||||||
|
ENFORCEMENT_LISTED_BUILDING: "ENFORCEMENT_LISTED_BUILDING",
|
||||||
|
MAINTENANCE_OF_LAND: "MAINTENANCE_OF_LAND",
|
||||||
|
RIGHTS_OF_WAY_SCHEDULE_14: "RIGHTS_OF_WAY_SCHEDULE_14",
|
||||||
|
RIGHTS_OF_WAY_ORDERS: "RIGHTS_OF_WAY_ORDERS",
|
||||||
|
REQUESTS_FOR_DIRECTION: "REQUESTS_FOR_DIRECTION",
|
||||||
|
ADVERTS: "ADVERTS",
|
||||||
|
HEDGEROW_TPO: "HEDGEROW_TPO",
|
||||||
|
COMMON_LAND: "COMMON_LAND",
|
||||||
|
COMPULSORY_PURCHASE_ORDERS: "COMPULSORY_PURCHASE_ORDERS",
|
||||||
|
ELECTRICITY_ACT: "ELECTRICITY_ACT",
|
||||||
|
HARBOUR_REVISION_ORDER: "HARBOUR_REVISION_ORDER",
|
||||||
|
TRANSPORT_WORKS: "TRANSPORT_WORKS",
|
||||||
|
WAYLEAVE: "WAYLEAVE",
|
||||||
|
NON_VALIDATION: "NON_VALIDATION",
|
||||||
|
DNS: "DNS",
|
||||||
|
SIP: "SIP"
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getStagesForAppealType = (
|
const normaliseCaseType = (caseType) =>
|
||||||
caseType,
|
caseType
|
||||||
currentStageId,
|
?.toString()
|
||||||
specialistProcess
|
.trim()
|
||||||
) => {
|
.toUpperCase()
|
||||||
const stages = resolveStages(caseType, specialistProcess);
|
.replace(/&/g, "AND")
|
||||||
const currentIndex = getLifecycleStageIndex(stages, currentStageId);
|
.replace(/[^A-Z0-9]+/g, "_")
|
||||||
|
.replace(/^_|_$/g, "");
|
||||||
|
|
||||||
|
const resolveStages = (caseTypeOrAppealTypeId) => {
|
||||||
|
const appealTypeKey =
|
||||||
|
caseTypeKeyByAppealTypeId[Number(caseTypeOrAppealTypeId)];
|
||||||
|
|
||||||
|
const normalised = normaliseCaseType(caseTypeOrAppealTypeId);
|
||||||
|
|
||||||
|
const key = appealTypeKey || caseTypeAliases[normalised] || normalised;
|
||||||
|
|
||||||
|
const entry = stagesByCaseType[key];
|
||||||
|
|
||||||
|
if (!entry) return [];
|
||||||
|
|
||||||
|
if (typeof entry === "string") {
|
||||||
|
return stagesByCaseType[entry] || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return entry;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getStagesForAppealType = (caseType, currentStageId) => {
|
||||||
|
const stages = resolveStages(caseType);
|
||||||
|
const currentStageNumber = Number(currentStageId);
|
||||||
|
|
||||||
|
const currentIndex = stages.findIndex(
|
||||||
|
(stage) => Number(stage.stageId) === currentStageNumber
|
||||||
|
);
|
||||||
|
|
||||||
return stages.map((stage, index) => ({
|
return stages.map((stage, index) => ({
|
||||||
...stage,
|
...stage,
|
||||||
status: getLifecycleStageStatus(index, currentIndex)
|
status:
|
||||||
|
currentIndex === -1
|
||||||
|
? "not-started"
|
||||||
|
: index < currentIndex
|
||||||
|
? "complete"
|
||||||
|
: index === currentIndex
|
||||||
|
? "in-progress"
|
||||||
|
: "not-started"
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const caseTypeKeyByAppealTypeId = {
|
||||||
|
846040000: "PLANNING_S78",
|
||||||
|
846040001: "CONDITIONS_73_79",
|
||||||
|
846040002: "SIP",
|
||||||
|
846040003: "PLANNING_OBLIGATIONS_S106",
|
||||||
|
846040004: "HAS",
|
||||||
|
846040005: "ENFORCEMENT",
|
||||||
|
846040006: "ENFORCEMENT_LISTED_BUILDING",
|
||||||
|
846040007: "MAINTENANCE_OF_LAND",
|
||||||
|
846040008: "LDCS",
|
||||||
|
846040009: "PLANNING_S78",
|
||||||
|
846040010: "CALL_INS",
|
||||||
|
846040011: "DNS",
|
||||||
|
846040012: "ELECTRICITY_ACT",
|
||||||
|
846040013: "TRANSPORT_WORKS",
|
||||||
|
846040014: "HARBOUR_REVISION_ORDER",
|
||||||
|
846040015: "RIGHTS_OF_WAY_SCHEDULE_14",
|
||||||
|
846040016: "COMMON_LAND",
|
||||||
|
846040017: "HEDGEROW_TPO",
|
||||||
|
846040018: "ADVERTS",
|
||||||
|
846040019: "COMPULSORY_PURCHASE_ORDERS",
|
||||||
|
846040020: "PLANNING_S78",
|
||||||
|
846040021: "WAYLEAVE",
|
||||||
|
846040024: "NON_VALIDATION",
|
||||||
|
846040025: "LBCAC"
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
import {
|
|
||||||
resolveRepresentationWindow,
|
|
||||||
isRepresentationWindowOpen,
|
|
||||||
isRepresentationWindowClosed,
|
|
||||||
canShowRepresentationButtonForAppealType,
|
|
||||||
canStartHouseholderRepresentation,
|
|
||||||
canStartCpoRepresentation,
|
|
||||||
canStartRowRepresentation,
|
|
||||||
canStartAdvertRepresentation
|
|
||||||
} from "../../../../lib/domain/representation-policy";
|
|
||||||
|
|
||||||
export function showRepsLocal(startDate, endDate) {
|
export function showRepsLocal(startDate, endDate) {
|
||||||
return isRepresentationWindowOpen(startDate, endDate);
|
let date = new Date();
|
||||||
|
date = new Date(date.toDateString());
|
||||||
|
const start = new Date(startDate);
|
||||||
|
const end = new Date(endDate);
|
||||||
|
|
||||||
|
return date >= start && date <= end ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function showRepsEndedLocal(startDate, endDate) {
|
export function showRepsEndedLocal(startDate, endDate) {
|
||||||
return isRepresentationWindowClosed(startDate, endDate);
|
let date = new Date();
|
||||||
|
date = new Date(date.toDateString());
|
||||||
|
const start = new Date(startDate);
|
||||||
|
const end = new Date(endDate);
|
||||||
|
return date > start && date > end ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isConsultationWindowOpen(detailsObj) {
|
export function isConsultationWindowOpen(detailsObj) {
|
||||||
@@ -25,7 +23,24 @@ export function isConsultationWindowOpen(detailsObj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function isGeneralRepresentationWindowOpen(detailsObj) {
|
export function isGeneralRepresentationWindowOpen(detailsObj) {
|
||||||
return resolveRepresentationWindow(detailsObj).isOpen;
|
return (
|
||||||
|
(Object.prototype.hasOwnProperty.call(detailsObj, "pinswg_startdate") ||
|
||||||
|
Object.prototype.hasOwnProperty.call(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_applicationacceptedasvalid"
|
||||||
|
) ||
|
||||||
|
Object.prototype.hasOwnProperty.call(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)) &&
|
||||||
|
showRepsLocal(
|
||||||
|
detailsObj.pinswg_startdate ||
|
||||||
|
detailsObj.pinswg_startdates ||
|
||||||
|
detailsObj.pinswg_applicationacceptedasvalid,
|
||||||
|
detailsObj.pinswg_finalcommentsduedate ||
|
||||||
|
detailsObj.pinswg_endofrepresentationperiod
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function canShowRepButtonForAppealType({
|
export function canShowRepButtonForAppealType({
|
||||||
@@ -33,31 +48,44 @@ export function canShowRepButtonForAppealType({
|
|||||||
isLPA,
|
isLPA,
|
||||||
searchDetailsObj
|
searchDetailsObj
|
||||||
}) {
|
}) {
|
||||||
if (!canShowRepresentationButtonForAppealType(appealType)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (appealType) {
|
switch (appealType) {
|
||||||
|
case 846040012:
|
||||||
|
case 846040013:
|
||||||
|
case 846040014:
|
||||||
|
//for ROW case 846040015:
|
||||||
|
case 846040020:
|
||||||
|
case 846040021:
|
||||||
|
case 846040023:
|
||||||
|
case 846040024:
|
||||||
|
return false;
|
||||||
case 846040004:
|
case 846040004:
|
||||||
return canStartHouseholderRepresentation(appealType, isLPA);
|
return isLPA ? true : false;
|
||||||
|
|
||||||
case 846040015:
|
case 846040015:
|
||||||
return canStartRowRepresentation(
|
return searchDetailsObj[0].value[0].pinswg_specialistcaseprocess ==
|
||||||
appealType,
|
846040001
|
||||||
searchDetailsObj[0].value[0]
|
? showRepsLocal(
|
||||||
);
|
searchDetailsObj[0].value[0].pinswg_startdate,
|
||||||
|
searchDetailsObj[0].value[0].pinswg_finalcommentsduedate
|
||||||
|
)
|
||||||
|
: true;
|
||||||
|
|
||||||
case 846040018:
|
case 846040018:
|
||||||
return canStartAdvertRepresentation(
|
let shouldShow =
|
||||||
appealType,
|
searchDetailsObj[0].value[0].pinswg_speacialistcaseprocess ==
|
||||||
searchDetailsObj[0].value[0],
|
846040000 && isLPA
|
||||||
isLPA
|
? true
|
||||||
);
|
: searchDetailsObj[0].value[0]
|
||||||
|
.pinswg_speacialistcaseprocess == 846040001
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
|
||||||
|
return shouldShow;
|
||||||
|
|
||||||
case 846040019:
|
case 846040019:
|
||||||
return canStartCpoRepresentation(
|
return showRepsLocal(
|
||||||
appealType,
|
searchDetailsObj[0].value[0].pinswg_startdate,
|
||||||
searchDetailsObj[0].value[0]
|
searchDetailsObj[0].value[0].pinswg_statementduedate
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -72,9 +100,6 @@ export function getEntryCtaLabelKey(appealType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function shouldSuppressBlockedMessage({ appealType, isLPA }) {
|
export function shouldSuppressBlockedMessage({ appealType, isLPA }) {
|
||||||
if (!canShowRepresentationButtonForAppealType(appealType)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return !isLPA && appealType == 846040004;
|
return !isLPA && appealType == 846040004;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_advertsid = (props) => {
|
const Pinswg_advertsid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,30 +23,43 @@ const Pinswg_advertsid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={"Specialist Case Process"}
|
||||||
"case:summary-specialist-case-process-label"
|
value={
|
||||||
)}
|
router.locale == "cy"
|
||||||
value={resolveCrmDisplayValue({
|
? jsonpath({
|
||||||
value: detailsObj[
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
@@ -67,51 +79,79 @@ const Pinswg_advertsid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -119,16 +159,23 @@ const Pinswg_advertsid = (props) => {
|
|||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
@@ -145,9 +192,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -186,7 +231,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -194,7 +239,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -211,10 +256,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -233,7 +275,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -246,7 +288,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -266,7 +308,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -283,7 +325,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateoftheevent")
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -299,7 +341,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_callinss77id = (props) => {
|
const Pinswg_callinss77id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -164,7 +209,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -172,7 +217,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -188,10 +233,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -204,11 +246,36 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t(
|
||||||
|
"case:summary-date-exported-to-iss-label"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateexportedtoiss"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateexportedtoiss
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateexportedtoiss
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</div> */}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementsduedate")
|
_.has(detailsObj, "pinswg_statementsduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementsduedate
|
detailsObj.pinswg_statementsduedate
|
||||||
)
|
)
|
||||||
@@ -226,7 +293,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -239,7 +306,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -260,10 +327,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -276,11 +340,35 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</div> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -296,7 +384,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -312,7 +400,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_commonlandid = (props) => {
|
const Pinswg_commonlandid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -157,14 +202,26 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
"pinswg_relevantauthorityname"
|
? jsonpath({
|
||||||
],
|
path:
|
||||||
locale,
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
translations: transLookup,
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
fallbackValue: ""
|
'")].value_cy',
|
||||||
})}
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
}) ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -177,7 +234,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -185,7 +242,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -202,10 +259,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -222,7 +276,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementsduedate")
|
_.has(detailsObj, "pinswg_statementsduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementsduedate
|
detailsObj.pinswg_statementsduedate
|
||||||
)
|
)
|
||||||
@@ -241,7 +295,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -254,7 +308,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -276,10 +330,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -292,11 +343,35 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</div> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -313,7 +388,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_starttimeoftheevent")
|
_.has(detailsObj, "pinswg_starttimeoftheevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_starttimeoftheevent
|
detailsObj.pinswg_starttimeoftheevent
|
||||||
)
|
)
|
||||||
@@ -329,7 +404,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_communityinfrastructurelevyid = (props) => {
|
const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -164,7 +209,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -172,7 +217,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -188,7 +233,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -201,7 +246,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -223,10 +268,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -243,7 +285,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -260,7 +302,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateoftheevent")
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -276,7 +318,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_compulsorypurchaseordersid = (props) => {
|
const Pinswg_compulsorypurchaseordersid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,81 +22,131 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -105,9 +155,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -139,12 +187,26 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj.pinswg_relevantauthorityname,
|
router.locale == "cy"
|
||||||
locale: router.locale,
|
? jsonpath({
|
||||||
translations: transLookup,
|
path:
|
||||||
fallbackValue: ""
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
})}
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
}) ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -157,7 +219,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -165,7 +227,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -182,10 +244,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -202,7 +261,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -221,7 +280,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -234,7 +293,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -256,10 +315,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -279,7 +335,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
)
|
)
|
||||||
@@ -300,7 +356,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -317,7 +373,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -333,7 +389,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,13 +3,11 @@ import { JSONPath as jsonpath } from "jsonpath-plus";
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
import MapComponent from "../../mapping/";
|
import GoogleMapComponent from "../../mapping/";
|
||||||
|
|
||||||
import OSPoint from "ospoint";
|
import OSPoint from "ospoint";
|
||||||
import { getBilingualText } from "../summary/utils/helpers";
|
import { getBilingualText } from "../summary/utils/helpers";
|
||||||
@@ -73,7 +71,11 @@ const Pinswg_dnsid = (props) => {
|
|||||||
width: "100%"
|
width: "100%"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MapComponent center={center} zoom={zoom} />
|
<GoogleMapComponent
|
||||||
|
center={center}
|
||||||
|
zoom={zoom}
|
||||||
|
/>
|
||||||
|
{/* <OSMapComponent center={center} zoom={zoom} /> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -97,16 +99,25 @@ const Pinswg_dnsid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-type-label"
|
"case:summary-case-type-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
@@ -167,59 +178,107 @@ const Pinswg_dnsid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-procedure-label"
|
"case:summary-procedure-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
detailsObj.pinswg_choiceofprocedure !==
|
router.locale == "cy"
|
||||||
null
|
? jsonpath({
|
||||||
? resolveCrmDisplayValue({
|
path:
|
||||||
value: detailsObj[
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
: t(
|
: detailsObj[
|
||||||
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t("case:summary-status-label")}
|
||||||
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
|
? jsonpath({path:
|
||||||
|
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',transLookup
|
||||||
|
)
|
||||||
|
: casesObj[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-case-officer-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(casesObj, "_ownerid_value")
|
||||||
|
? casesObj[
|
||||||
|
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-type-of-event-label"
|
"case:summary-type-of-event-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-start-event-date-label"
|
"case:summary-start-event-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdateofevent"
|
"pinswg_startdateofevent"
|
||||||
)
|
)
|
||||||
@@ -242,7 +301,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
"case:summary-event-date-label"
|
"case:summary-event-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
)
|
)
|
||||||
@@ -265,22 +324,31 @@ const Pinswg_dnsid = (props) => {
|
|||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{detailsObj.pinswg_decision !== null
|
{router.locale == "cy"
|
||||||
? resolveCrmDisplayValue({
|
? jsonpath({
|
||||||
value: detailsObj[
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-information-to-date-label"
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
: t(
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
@@ -288,7 +356,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
)
|
)
|
||||||
@@ -314,7 +382,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents"
|
"numberofchildincidents"
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
@@ -348,6 +416,22 @@ const Pinswg_dnsid = (props) => {
|
|||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-case-recommendation-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
|
? jsonpath({path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj.pinswg_recommendation +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup,
|
||||||
|
|
||||||
|
)
|
||||||
|
: detailsObj.pinswg_recommendation
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -359,12 +443,35 @@ const Pinswg_dnsid = (props) => {
|
|||||||
{t("case:summary-dates-label")}
|
{t("case:summary-dates-label")}
|
||||||
</h3>
|
</h3>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-awaiting-information-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-awaiting-information-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
)
|
)
|
||||||
@@ -387,7 +494,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
)
|
)
|
||||||
@@ -410,7 +517,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication"
|
||||||
)
|
)
|
||||||
@@ -428,7 +535,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid"
|
||||||
) &&
|
) &&
|
||||||
@@ -452,7 +559,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid"
|
||||||
) &&
|
) &&
|
||||||
@@ -481,7 +588,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
)
|
)
|
||||||
@@ -500,7 +607,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
) &&
|
) &&
|
||||||
@@ -525,14 +632,14 @@ const Pinswg_dnsid = (props) => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||||
) &&
|
) &&
|
||||||
(hasOwn(
|
(_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
) &&
|
) &&
|
||||||
@@ -558,14 +665,14 @@ const Pinswg_dnsid = (props) => {
|
|||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
))}
|
))}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||||
) &&
|
) &&
|
||||||
(hasOwn(
|
(_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
) &&
|
) &&
|
||||||
@@ -591,7 +698,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
))}
|
))}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates"
|
||||||
) &&
|
) &&
|
||||||
@@ -621,7 +728,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates"
|
||||||
)
|
)
|
||||||
@@ -642,7 +749,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby"
|
||||||
)
|
)
|
||||||
@@ -660,13 +767,33 @@ const Pinswg_dnsid = (props) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t("case:summary-suspension-dates")}
|
||||||
|
value={
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_suspensiondates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_suspensiondates
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_suspensiondates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
)
|
)
|
||||||
@@ -684,7 +811,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate"
|
||||||
) &&
|
) &&
|
||||||
|
|||||||
@@ -3,11 +3,9 @@ import _ from "lodash";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_electricityactid = (props) => {
|
const Pinswg_electricityactid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -68,16 +66,25 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-type-label"
|
"case:summary-case-type-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -98,16 +105,23 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -116,7 +130,10 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, "_ownerid_value")
|
{" "}
|
||||||
|
{/* {casesObj.caseDetails.caseOfficer ||
|
||||||
|
""} */}
|
||||||
|
{_.has(casesObj, "_ownerid_value")
|
||||||
? casesObj[
|
? casesObj[
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
@@ -127,56 +144,96 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-procedure-label"
|
"case:summary-procedure-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-type-of-event-label"
|
"case:summary-type-of-event-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -187,7 +244,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents"
|
"numberofchildincidents"
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
@@ -225,16 +282,21 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-recommendation-label"
|
"case:summary-case-recommendation-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
"pinswg_recommendation"
|
? jsonpath({
|
||||||
],
|
path:
|
||||||
locale,
|
'$..[?(@ && @.value=="' +
|
||||||
translations: transLookup,
|
detailsObj.pinswg_recommendation +
|
||||||
fallbackValue: t(
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj.pinswg_recommendation ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
@@ -274,7 +336,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-event-date-label"
|
"case:summary-event-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
)
|
)
|
||||||
@@ -297,7 +359,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casedecisiondate"
|
"pinswg_casedecisiondate"
|
||||||
)
|
)
|
||||||
@@ -321,7 +383,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-application-accepted-as-valid"
|
"case:summary-application-accepted-as-valid"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid"
|
||||||
)
|
)
|
||||||
@@ -344,7 +406,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-application-rejected-as-invalid"
|
"case:summary-application-rejected-as-invalid"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid"
|
||||||
)
|
)
|
||||||
@@ -367,7 +429,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-confirm-request-to-vary-application"
|
"case:summary-confirm-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
)
|
)
|
||||||
@@ -390,7 +452,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-date-of-decisions"
|
"case:summary-date-of-decisions"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
)
|
)
|
||||||
@@ -413,7 +475,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-date-of-request-to-vary"
|
"case:summary-date-of-request-to-vary"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
)
|
)
|
||||||
@@ -436,7 +498,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication"
|
||||||
)
|
)
|
||||||
@@ -459,7 +521,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-date-project-published-to-website"
|
"case:summary-date-project-published-to-website"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateprojectpublishedonwebsite"
|
"pinswg_dateprojectpublishedonwebsite"
|
||||||
)
|
)
|
||||||
@@ -482,7 +544,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
)
|
)
|
||||||
@@ -505,7 +567,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
)
|
)
|
||||||
@@ -528,7 +590,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
)
|
)
|
||||||
@@ -551,7 +613,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-procedure-confirmed"
|
"case:summary-procedure-confirmed"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_procedureconfirmed"
|
"pinswg_procedureconfirmed"
|
||||||
)
|
)
|
||||||
@@ -574,7 +636,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-reject-request-to-vary-application"
|
"case:summary-reject-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
)
|
)
|
||||||
@@ -595,7 +657,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby"
|
||||||
)
|
)
|
||||||
@@ -618,7 +680,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-suspension-dates"
|
"case:summary-suspension-dates"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensiondates"
|
"pinswg_suspensiondates"
|
||||||
)
|
)
|
||||||
@@ -641,7 +703,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates"
|
||||||
)
|
)
|
||||||
@@ -664,7 +726,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-suspension-start-dates"
|
"case:summary-suspension-start-dates"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates"
|
||||||
)
|
)
|
||||||
@@ -687,7 +749,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||||
)
|
)
|
||||||
@@ -708,7 +770,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-withdrawn-date")}
|
label={t("case:summary-withdrawn-date")}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate"
|
||||||
)
|
)
|
||||||
@@ -731,7 +793,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -164,7 +209,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -172,7 +217,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -189,10 +234,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -209,7 +251,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -228,7 +270,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -241,7 +283,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -263,10 +305,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -279,11 +318,35 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</div> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -300,7 +363,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -316,7 +379,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_enforcementnoticeappeals174id = (props) => {
|
const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -164,7 +209,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -172,7 +217,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -189,10 +234,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -209,7 +251,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -228,7 +270,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -241,7 +283,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -263,10 +305,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -279,11 +318,31 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -300,7 +359,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateoftheevent")
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -316,7 +375,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_environmentalpermittingid = (props) => {
|
const Pinswg_environmentalpermittingid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -157,12 +202,26 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj.pinswg_relevantauthorityname,
|
router.locale == "cy"
|
||||||
locale: router.locale,
|
? jsonpath({
|
||||||
translations: transLookup,
|
path:
|
||||||
fallbackValue: ""
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
})}
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
}) ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -175,7 +234,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -183,7 +242,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -200,10 +259,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -220,7 +276,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -239,7 +295,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -252,7 +308,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -274,10 +330,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -294,7 +347,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
value={hasOwn(
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
)
|
)
|
||||||
@@ -314,7 +367,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -331,7 +384,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -347,7 +400,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import transLookup from "../../../data/lookuptranslations.json";
|
|||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_harbourrevisionorderid = (props) => {
|
const Pinswg_harbourrevisionorderid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -68,16 +66,25 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-type-label"
|
"case:summary-case-type-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -98,16 +105,23 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -116,7 +130,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, "_ownerid_value")
|
{" "}
|
||||||
|
{/* {casesObj.caseDetails.caseOfficer ||
|
||||||
|
""} */}
|
||||||
|
{_.has(casesObj, "_ownerid_value")
|
||||||
? casesObj[
|
? casesObj[
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
@@ -127,43 +144,75 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-procedure-label"
|
"case:summary-procedure-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -174,7 +223,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents"
|
"numberofchildincidents"
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
@@ -212,14 +261,21 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-recommendation-label"
|
"case:summary-case-recommendation-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj.pinswg_recommendation,
|
router.locale == "cy"
|
||||||
locale,
|
? jsonpath({
|
||||||
translations: transLookup,
|
path:
|
||||||
fallbackValue: t(
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj.pinswg_recommendation +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj.pinswg_recommendation ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
@@ -259,7 +315,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-event-date-label"
|
"case:summary-event-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
)
|
)
|
||||||
@@ -282,7 +338,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casedecisiondate"
|
"pinswg_casedecisiondate"
|
||||||
)
|
)
|
||||||
@@ -306,7 +362,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-application-accepted-as-valid"
|
"case:summary-application-accepted-as-valid"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid"
|
||||||
)
|
)
|
||||||
@@ -329,7 +385,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-application-rejected-as-invalid"
|
"case:summary-application-rejected-as-invalid"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid"
|
||||||
)
|
)
|
||||||
@@ -352,7 +408,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-confirm-request-to-vary-application"
|
"case:summary-confirm-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
)
|
)
|
||||||
@@ -375,7 +431,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-date-of-decisions"
|
"case:summary-date-of-decisions"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
)
|
)
|
||||||
@@ -398,7 +454,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-date-of-request-to-vary"
|
"case:summary-date-of-request-to-vary"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
)
|
)
|
||||||
@@ -421,7 +477,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication"
|
||||||
)
|
)
|
||||||
@@ -444,7 +500,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-date-project-published-to-website"
|
"case:summary-date-project-published-to-website"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateprojectpublishedonwebsite"
|
"pinswg_dateprojectpublishedonwebsite"
|
||||||
)
|
)
|
||||||
@@ -467,7 +523,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
)
|
)
|
||||||
@@ -490,7 +546,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
)
|
)
|
||||||
@@ -513,7 +569,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
)
|
)
|
||||||
@@ -536,7 +592,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-procedure-confirmed"
|
"case:summary-procedure-confirmed"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_procedureconfirmed"
|
"pinswg_procedureconfirmed"
|
||||||
)
|
)
|
||||||
@@ -559,7 +615,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-reject-request-to-vary-application"
|
"case:summary-reject-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
)
|
)
|
||||||
@@ -580,7 +636,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby"
|
||||||
)
|
)
|
||||||
@@ -603,7 +659,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-suspension-dates"
|
"case:summary-suspension-dates"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensiondates"
|
"pinswg_suspensiondates"
|
||||||
)
|
)
|
||||||
@@ -626,7 +682,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates"
|
||||||
)
|
)
|
||||||
@@ -649,7 +705,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-suspension-start-dates"
|
"case:summary-suspension-start-dates"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates"
|
||||||
)
|
)
|
||||||
@@ -672,7 +728,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||||
)
|
)
|
||||||
@@ -693,7 +749,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-withdrawn-date")}
|
label={t("case:summary-withdrawn-date")}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate"
|
||||||
)
|
)
|
||||||
@@ -716,7 +772,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,30 +23,43 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={"Specialist Case Process"}
|
||||||
"case:summary-specialist-case-process-label"
|
value={
|
||||||
)}
|
router.locale == "cy"
|
||||||
value={resolveCrmDisplayValue({
|
? jsonpath({
|
||||||
value: detailsObj[
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
@@ -67,69 +79,110 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -138,9 +191,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -172,12 +223,26 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj.pinswg_relevantauthorityname,
|
router.locale == "cy"
|
||||||
locale: router.locale,
|
? jsonpath({
|
||||||
translations: transLookup,
|
path:
|
||||||
fallbackValue: ""
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
})}
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
}) ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -190,7 +255,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -198,7 +263,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -215,10 +280,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -235,7 +297,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -254,7 +316,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -267,7 +329,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -289,10 +351,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -305,11 +364,31 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -326,7 +405,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateoftheevent")
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -342,7 +421,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_householderappealhasid = (props) => {
|
const Pinswg_householderappealhasid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,58 +58,91 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -112,9 +151,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -153,7 +190,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -161,7 +198,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -178,10 +215,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -198,7 +232,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -217,7 +251,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_otherpartiesstmt")
|
_.has(detailsObj, "pinswg_otherpartiesstmt")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_otherpartiesstmt
|
detailsObj.pinswg_otherpartiesstmt
|
||||||
)
|
)
|
||||||
@@ -227,7 +261,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstmt"
|
"pinswg_otherpartiesstmt"
|
||||||
)
|
)
|
||||||
@@ -246,7 +280,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -263,7 +297,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -279,7 +313,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,67 +58,110 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -121,9 +170,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -162,7 +209,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -170,7 +217,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -187,10 +234,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -207,7 +251,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -226,7 +270,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -239,7 +283,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -261,10 +305,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -277,11 +318,31 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -298,7 +359,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateoftheevent")
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -314,7 +375,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_ldpid = (props) => {
|
const Pinswg_ldpid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_ldpid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -53,56 +59,92 @@ const Pinswg_ldpid = (props) => {
|
|||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -111,9 +153,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -152,7 +192,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -160,7 +200,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -177,10 +217,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -197,7 +234,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -216,7 +253,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -229,7 +266,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -251,10 +288,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -267,11 +301,31 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -288,7 +342,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -304,7 +358,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_listedbuildingandconservationrid = (props) => {
|
const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -164,7 +209,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -172,7 +217,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -189,10 +234,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -209,7 +251,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -228,7 +270,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -241,7 +283,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -263,10 +305,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -279,11 +318,31 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -300,7 +359,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_starttimeofevent")
|
_.has(detailsObj, "pinswg_starttimeofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_starttimeofevent
|
detailsObj.pinswg_starttimeofevent
|
||||||
)
|
)
|
||||||
@@ -316,7 +375,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_maintenanceoflands217id = (props) => {
|
const Pinswg_maintenanceoflands217id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -164,7 +209,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -172,7 +217,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -189,10 +234,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -209,7 +251,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -228,7 +270,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -241,7 +283,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -263,10 +305,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -283,7 +322,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
value={hasOwn(
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
)
|
)
|
||||||
@@ -303,7 +342,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -320,7 +359,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -336,7 +375,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_miscellaneouscasewordid = (props) => {
|
const Pinswg_miscellaneouscasewordid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -157,12 +202,26 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj.pinswg_relevantauthorityname,
|
router.locale == "cy"
|
||||||
locale: router.locale,
|
? jsonpath({
|
||||||
translations: transLookup,
|
path:
|
||||||
fallbackValue: ""
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
})}
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
}) ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -175,7 +234,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -183,7 +242,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -200,10 +259,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -220,7 +276,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -239,7 +295,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -252,7 +308,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -274,10 +330,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -294,7 +347,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
value={hasOwn(
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
)
|
)
|
||||||
@@ -314,7 +367,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -331,7 +384,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -347,7 +400,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_nonvalidationid = (props) => {
|
const Pinswg_nonvalidationid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -53,34 +59,54 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -94,7 +120,7 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_validdate")
|
_.has(detailsObj, "pinswg_validdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_validdate)
|
? !_.isEmpty(detailsObj.pinswg_validdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_validdate
|
detailsObj.pinswg_validdate
|
||||||
@@ -102,7 +128,7 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -117,7 +143,7 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_decisionissueddate")
|
_.has(detailsObj, "pinswg_decisionissueddate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_decisionissueddate
|
detailsObj.pinswg_decisionissueddate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import pickListLookup from "../../../data/picklistLookups.json";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import {
|
import { getCaseLpaDisplayValue, getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
getCaseLpaDisplayValue,
|
|
||||||
getCaseLpaDisplayLines
|
|
||||||
} from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_planningappeals78id = (props) => {
|
const Pinswg_planningappeals78id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -28,16 +23,23 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -54,79 +56,121 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: pickListLookup
|
json: transLookup,
|
||||||
})}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
})}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -145,9 +189,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -186,7 +228,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -194,7 +236,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -211,10 +253,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -233,7 +272,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-statement-interested-party-due-date-label"
|
"case:summary-statement-interested-party-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -247,13 +286,47 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_otherpartiesstatements"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-final-comments-date-label")}
|
label={t("case:summary-final-comments-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -266,11 +339,55 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdatetimeiftheevent"
|
"pinswg_startdatetimeiftheevent"
|
||||||
)
|
)
|
||||||
@@ -293,7 +410,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-time-label")}
|
label={t("case:summary-start-event-time-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdatetimeiftheevent"
|
"pinswg_startdatetimeiftheevent"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_planningconditionss73s79id = (props) => {
|
const Pinswg_planningconditionss73s79id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -164,7 +209,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -172,7 +217,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -189,10 +234,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -209,7 +251,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -228,7 +270,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -241,7 +283,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -263,10 +305,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -279,11 +318,33 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -300,7 +361,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -316,7 +377,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_planningobligationappeals106id = (props) => {
|
const Pinswg_planningobligationappeals106id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -164,7 +209,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -172,7 +217,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -189,10 +234,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -209,7 +251,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -228,7 +270,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -241,7 +283,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -263,10 +305,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -283,7 +322,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
value={hasOwn(
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
)
|
)
|
||||||
@@ -303,7 +342,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -320,7 +359,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateoftheevent")
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -336,7 +375,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -5,8 +6,6 @@ import transLookup from "../../../data/lookuptranslations.json";
|
|||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_rowid = (props) => {
|
const Pinswg_rowid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,30 +23,43 @@ const Pinswg_rowid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
label={"Specialist Case Process"}
|
||||||
"case:summary-specialist-case-process-label"
|
value={
|
||||||
)}
|
router.locale == "cy"
|
||||||
value={resolveCrmDisplayValue({
|
? jsonpath({
|
||||||
value: detailsObj[
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
@@ -67,67 +79,110 @@ const Pinswg_rowid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
t("case:summary-to-be-confirmed-label")
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
})}
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -136,9 +191,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -170,12 +223,26 @@ const Pinswg_rowid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj.pinswg_relevantauthorityname,
|
router.locale == "cy"
|
||||||
locale: router.locale,
|
? jsonpath({
|
||||||
translations: transLookup,
|
path:
|
||||||
fallbackValue: ""
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
})}
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
}) ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -188,7 +255,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -196,7 +263,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -213,10 +280,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -233,7 +297,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -252,7 +316,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -265,7 +329,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -287,10 +351,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -303,11 +364,31 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -324,7 +405,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateoftheevent")
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -340,7 +421,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_transportandworkactid = (props) => {
|
const Pinswg_transportandworkactid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -63,53 +62,99 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-case-type-label"
|
label={t("case:summary-case-type-label")}
|
||||||
)}
|
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
|
||||||
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true,
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
})}
|
|
||||||
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
|
||||||
value: detailsObj[
|
value={
|
||||||
|
|
||||||
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
})}
|
|
||||||
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-recommendation-label"
|
"case:summary-case-recommendation-label"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
|
||||||
value: detailsObj.pinswg_recommendation,
|
|
||||||
locale: router.locale,
|
value={
|
||||||
translations: transLookup,
|
|
||||||
fallbackValue: ""
|
|
||||||
})}
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj.pinswg_recommendation +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: detailsObj.pinswg_recommendation ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label"
|
"case:summary-case-website-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -117,13 +162,15 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -138,11 +185,12 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-event-date-label"
|
label={t("case:summary-event-date-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
)
|
)
|
||||||
@@ -158,14 +206,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casedecisiondate"
|
"pinswg_casedecisiondate"
|
||||||
)
|
)
|
||||||
@@ -181,15 +234,23 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-accepted-as-valid"
|
"case:summary-application-accepted-as-valid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid"
|
||||||
)
|
)
|
||||||
@@ -205,14 +266,21 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-rejected-as-invalid"
|
"case:summary-application-rejected-as-invalid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid"
|
||||||
)
|
)
|
||||||
@@ -228,14 +296,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-confirm-request-to-vary-application"
|
"case:summary-confirm-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
)
|
)
|
||||||
@@ -251,14 +324,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-decisions"
|
"case:summary-date-of-decisions"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
)
|
)
|
||||||
@@ -274,14 +352,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-request-to-vary"
|
"case:summary-date-of-request-to-vary"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
)
|
)
|
||||||
@@ -297,14 +380,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication"
|
||||||
)
|
)
|
||||||
@@ -320,14 +408,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-project-published-to-website"
|
"case:summary-date-project-published-to-website"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateprojectpublishedonwebsite"
|
"pinswg_dateprojectpublishedonwebsite"
|
||||||
)
|
)
|
||||||
@@ -343,14 +436,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
)
|
)
|
||||||
@@ -366,14 +464,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
)
|
)
|
||||||
@@ -389,14 +492,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
)
|
)
|
||||||
@@ -412,14 +520,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-procedure-confirmed"
|
"case:summary-procedure-confirmed"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_procedureconfirmed"
|
"pinswg_procedureconfirmed"
|
||||||
)
|
)
|
||||||
@@ -435,14 +548,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-reject-request-to-vary-application"
|
"case:summary-reject-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
)
|
)
|
||||||
@@ -458,12 +576,17 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby"
|
||||||
)
|
)
|
||||||
@@ -479,14 +602,17 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-suspension-dates"
|
label={t("case:summary-suspension-dates")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensiondates"
|
"pinswg_suspensiondates"
|
||||||
)
|
)
|
||||||
@@ -502,14 +628,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates"
|
||||||
)
|
)
|
||||||
@@ -525,14 +656,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-start-dates"
|
"case:summary-suspension-start-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates"
|
||||||
)
|
)
|
||||||
@@ -548,14 +684,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||||
)
|
)
|
||||||
@@ -571,12 +712,17 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-withdrawn-date")}
|
label={t("case:summary-withdrawn-date")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate"
|
||||||
)
|
)
|
||||||
@@ -592,14 +738,19 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
|
||||||
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
)
|
)
|
||||||
@@ -615,7 +766,9 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const Pinswg_wayleaveid = (props) => {
|
const Pinswg_wayleaveid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,16 +23,23 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
@@ -52,69 +58,110 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
transLookup
|
||||||
fallbackValue: t(
|
|
||||||
"case:summary-to-be-confirmed-label"
|
|
||||||
)
|
)
|
||||||
})}
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: ""
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: casesObj[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
"case:summary-no-date-entered-label"
|
})
|
||||||
)
|
: casesObj[
|
||||||
})}
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: t(
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)}
|
||||||
})}
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
{/* <Link href="/">
|
||||||
|
<a>
|
||||||
|
{casesObj.caseDetails
|
||||||
|
.outcome_document || ""}
|
||||||
|
</a>
|
||||||
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
@@ -123,9 +170,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
{t("case:summary-case-link-status-label")}
|
{t("case:summary-case-link-status-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{hasOwn(casesObj, [
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
"numberofchildincidents"
|
|
||||||
])
|
|
||||||
? casesObj.numberofchildincidents > 0
|
? casesObj.numberofchildincidents > 0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
@@ -157,12 +202,26 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={resolveCrmDisplayValue({
|
value={
|
||||||
value: detailsObj.pinswg_relevantauthorityname,
|
router.locale == "cy"
|
||||||
locale: router.locale,
|
? jsonpath({
|
||||||
translations: transLookup,
|
path:
|
||||||
fallbackValue: ""
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
})}
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
}) ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -175,7 +234,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
@@ -183,7 +242,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(detailsObj, "pinswg_startdates")
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
@@ -200,10 +259,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -220,7 +276,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -239,7 +295,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -252,7 +308,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: hasOwn(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
@@ -274,10 +330,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
value={
|
||||||
hasOwn(
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -290,11 +343,31 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-inquiry-evidence-date-label"
|
||||||
|
)}
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -311,7 +384,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -327,7 +400,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
hasOwn(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { hasOwn } from "./utils";
|
|
||||||
|
|
||||||
const CRMError = (props) => {
|
const CRMError = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -10,7 +9,7 @@ const CRMError = (props) => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
const errorSwitch = hasOwn(props, "whichError")
|
const errorSwitch = _.has(props, "whichError")
|
||||||
? "LPAData"
|
? "LPAData"
|
||||||
: "searchResultsObj";
|
: "searchResultsObj";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import CRMError from "./crmError";
|
import CRMError from "./crmError";
|
||||||
import DNSSearchResults from "./search/dnssearchresults";
|
import DNSSearchResults from "./search/dnssearchresults";
|
||||||
import { hasOwn } from "./utils";
|
|
||||||
|
|
||||||
export default function Search(props) {
|
export default function Search(props) {
|
||||||
const {
|
const {
|
||||||
@@ -12,14 +11,13 @@ export default function Search(props) {
|
|||||||
watchedCases,
|
watchedCases,
|
||||||
showMap,
|
showMap,
|
||||||
showLoginCheck,
|
showLoginCheck,
|
||||||
mapTarget
|
|
||||||
} = props;
|
} = props;
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
var hasError = hasOwn(searchResultsObj.searchResultsObj, "errorCode")
|
var hasError = _.has(searchResultsObj.searchResultsObj, "errorCode")
|
||||||
? true
|
? true
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
@@ -50,7 +48,6 @@ export default function Search(props) {
|
|||||||
watchedCases={watchedCases}
|
watchedCases={watchedCases}
|
||||||
showMap={showMap}
|
showMap={showMap}
|
||||||
showLoginCheck={showLoginCheck}
|
showLoginCheck={showLoginCheck}
|
||||||
mapTarget={mapTarget}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { Field } from "redux-form";
|
import { Field } from "redux-form";
|
||||||
import { RenderDatePicker } from "./renderDatePicker";
|
import { RenderDatePicker } from "./renderDatePicker";
|
||||||
import { validateField } from "../validationUtils";
|
import { validateField } from "../validationUtils";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const dateDiffInDays = (a, b) => {
|
const dateDiffInDays = (a, b) => {
|
||||||
const _MS_PER_DAY = 1000 * 60 * 60 * 24;
|
const _MS_PER_DAY = 1000 * 60 * 60 * 24;
|
||||||
@@ -32,7 +31,7 @@ export function DateFieldPicker(props) {
|
|||||||
const showIfHasParentShowValue =
|
const showIfHasParentShowValue =
|
||||||
parentField != false &&
|
parentField != false &&
|
||||||
!_.isEmpty(formProps[form]) &&
|
!_.isEmpty(formProps[form]) &&
|
||||||
hasOwn(formProps[form].values, parentField) &&
|
_.has(formProps[form].values, parentField) &&
|
||||||
formProps[form].values[parentField] == parentFieldShowOnValue;
|
formProps[form].values[parentField] == parentFieldShowOnValue;
|
||||||
|
|
||||||
const requiredMessage = t("newappeal:is-required-label");
|
const requiredMessage = t("newappeal:is-required-label");
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Field } from "redux-form";
|
|||||||
import { RenderTextfield } from "./renderTextfield";
|
import { RenderTextfield } from "./renderTextfield";
|
||||||
import { RenderDecimalField } from "./renderDecimalField";
|
import { RenderDecimalField } from "./renderDecimalField";
|
||||||
import { validateField } from "../validationUtils";
|
import { validateField } from "../validationUtils";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
const isVisibleByInclusion = ({
|
const isVisibleByInclusion = ({
|
||||||
parentField,
|
parentField,
|
||||||
form,
|
form,
|
||||||
@@ -14,7 +14,7 @@ const isVisibleByInclusion = ({
|
|||||||
}) =>
|
}) =>
|
||||||
parentField != false &&
|
parentField != false &&
|
||||||
!_.isEmpty(formProps[form]) &&
|
!_.isEmpty(formProps[form]) &&
|
||||||
hasOwn(formProps[form].values, parentField) &&
|
_.has(formProps[form].values, parentField) &&
|
||||||
parentFieldShowOnValue.indexOf(
|
parentFieldShowOnValue.indexOf(
|
||||||
formProps[form].values[parentField].toString()
|
formProps[form].values[parentField].toString()
|
||||||
) > -1;
|
) > -1;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from "lodash";
|
|||||||
import { FieldArray, change } from "redux-form";
|
import { FieldArray, change } from "redux-form";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { RenderSubFields } from "./renderSubFields";
|
import { RenderSubFields } from "./renderSubFields";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
export const FieldArrayForm = (props) => {
|
export const FieldArrayForm = (props) => {
|
||||||
const {
|
const {
|
||||||
name,
|
name,
|
||||||
@@ -19,7 +19,7 @@ export const FieldArrayForm = (props) => {
|
|||||||
var showIfHasParentShowValue =
|
var showIfHasParentShowValue =
|
||||||
parentField != false &&
|
parentField != false &&
|
||||||
!_.isEmpty(formProps[form]) &&
|
!_.isEmpty(formProps[form]) &&
|
||||||
hasOwn(formProps[form].values, parentField) &&
|
_.has(formProps[form].values, parentField) &&
|
||||||
parentFieldShowOnValue.indexOf(
|
parentFieldShowOnValue.indexOf(
|
||||||
formProps[form].values[parentField].toString()
|
formProps[form].values[parentField].toString()
|
||||||
) > -1;
|
) > -1;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { Field } from "redux-form";
|
import { Field } from "redux-form";
|
||||||
import { RenderTextfield } from "./renderTextfield";
|
import { RenderTextfield } from "./renderTextfield";
|
||||||
import { validateField } from "../validationUtils";
|
import { validateField } from "../validationUtils";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
const isVisibleByInclusion = ({
|
const isVisibleByInclusion = ({
|
||||||
parentField,
|
parentField,
|
||||||
form,
|
form,
|
||||||
@@ -13,7 +13,7 @@ const isVisibleByInclusion = ({
|
|||||||
}) =>
|
}) =>
|
||||||
parentField != false &&
|
parentField != false &&
|
||||||
!_.isEmpty(formProps[form]) &&
|
!_.isEmpty(formProps[form]) &&
|
||||||
hasOwn(formProps[form].values, parentField) &&
|
_.has(formProps[form].values, parentField) &&
|
||||||
parentFieldShowOnValue.indexOf(
|
parentFieldShowOnValue.indexOf(
|
||||||
formProps[form].values[parentField].toString()
|
formProps[form].values[parentField].toString()
|
||||||
) > -1;
|
) > -1;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { Field } from "redux-form";
|
import { Field } from "redux-form";
|
||||||
import { RenderRadio } from "./renderRadio";
|
import { RenderRadio } from "./renderRadio";
|
||||||
import { validateField } from "../validationUtils";
|
import { validateField } from "../validationUtils";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
const isVisibleByInclusion = ({
|
const isVisibleByInclusion = ({
|
||||||
parentField,
|
parentField,
|
||||||
@@ -14,7 +13,7 @@ const isVisibleByInclusion = ({
|
|||||||
}) =>
|
}) =>
|
||||||
parentField != false &&
|
parentField != false &&
|
||||||
!_.isEmpty(formProps[form]) &&
|
!_.isEmpty(formProps[form]) &&
|
||||||
hasOwn(formProps[form].values, parentField) &&
|
_.has(formProps[form].values, parentField) &&
|
||||||
parentFieldShowOnValue.indexOf(
|
parentFieldShowOnValue.indexOf(
|
||||||
formProps[form].values[parentField].toString()
|
formProps[form].values[parentField].toString()
|
||||||
) > -1;
|
) > -1;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { Field } from "redux-form";
|
import { Field } from "redux-form";
|
||||||
import { RenderYesNo } from "./renderYesNo";
|
import { RenderYesNo } from "./renderYesNo";
|
||||||
import { hasOwn } from "../../utils";
|
|
||||||
|
|
||||||
export function YesNofield(props) {
|
export function YesNofield(props) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -18,7 +17,7 @@ export function YesNofield(props) {
|
|||||||
const showIfHasParentShowValue =
|
const showIfHasParentShowValue =
|
||||||
parentField != false &&
|
parentField != false &&
|
||||||
!_.isEmpty(formProps[form]) &&
|
!_.isEmpty(formProps[form]) &&
|
||||||
hasOwn(formProps[form].values, parentField) &&
|
_.has(formProps[form].values, parentField) &&
|
||||||
parentFieldShowOnValue.indexOf(
|
parentFieldShowOnValue.indexOf(
|
||||||
formProps[form].values[parentField].toString()
|
formProps[form].values[parentField].toString()
|
||||||
) > -1;
|
) > -1;
|
||||||
@@ -37,7 +36,7 @@ export function YesNofield(props) {
|
|||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg={t("newappeal:select-an-option-label")}
|
errorMsg={t("newappeal:select-an-option-label")}
|
||||||
component={RenderYesNo}
|
component={RenderYesNo}
|
||||||
inline={hasOwn(props, "inline") ? props.inline : "true"}
|
inline={_.has(props, "inline") ? props.inline : "true"}
|
||||||
requiredDocumentLabel={props.requiredDocumentLabel}
|
requiredDocumentLabel={props.requiredDocumentLabel}
|
||||||
requiredDocumentValue={props.requiredDocumentValue}
|
requiredDocumentValue={props.requiredDocumentValue}
|
||||||
setDocumentsList={props.setDocumentsList}
|
setDocumentsList={props.setDocumentsList}
|
||||||
@@ -55,7 +54,7 @@ export function YesNofield(props) {
|
|||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg={t("newappeal:select-an-option-label")}
|
errorMsg={t("newappeal:select-an-option-label")}
|
||||||
component={RenderYesNo}
|
component={RenderYesNo}
|
||||||
inline={hasOwn(props, "inline") ? props.inline : "true"}
|
inline={_.has(props, "inline") ? props.inline : "true"}
|
||||||
requiredDocumentLabel={props.requiredDocumentLabel}
|
requiredDocumentLabel={props.requiredDocumentLabel}
|
||||||
requiredDocumentValue={props.requiredDocumentValue}
|
requiredDocumentValue={props.requiredDocumentValue}
|
||||||
setDocumentsList={props.setDocumentsList}
|
setDocumentsList={props.setDocumentsList}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { hasOwn } from "../utils";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
@@ -41,7 +40,7 @@ const getValidationMessages = (t) => ({
|
|||||||
const hasParentFieldValue = ({ parentField, form, formProps }) =>
|
const hasParentFieldValue = ({ parentField, form, formProps }) =>
|
||||||
parentField != false &&
|
parentField != false &&
|
||||||
!_.isEmpty(formProps[form]) &&
|
!_.isEmpty(formProps[form]) &&
|
||||||
hasOwn(formProps[form].values, parentField);
|
_.has(formProps[form].values, parentField);
|
||||||
|
|
||||||
const isVisibleByEquality = ({
|
const isVisibleByEquality = ({
|
||||||
parentField,
|
parentField,
|
||||||
|
|||||||
+14
-27
@@ -108,7 +108,7 @@ export default function Footer(props) {
|
|||||||
>
|
>
|
||||||
<span className="vo_hidden">
|
<span className="vo_hidden">
|
||||||
{t(
|
{t(
|
||||||
"common:social-bar-share-via-link"
|
"common:social-bar-share-via-link",
|
||||||
)}{" "}
|
)}{" "}
|
||||||
</span>
|
</span>
|
||||||
Twitter
|
Twitter
|
||||||
@@ -186,37 +186,37 @@ export default function Footer(props) {
|
|||||||
<li className="govuk-footer__inline-list-item govuk-!-font-weight-bold govuk-!-margin-right-7">
|
<li className="govuk-footer__inline-list-item govuk-!-font-weight-bold govuk-!-margin-right-7">
|
||||||
<a
|
<a
|
||||||
href={t(
|
href={t(
|
||||||
"common:footer-guidance-link"
|
"common:footer-guidance-link",
|
||||||
)}
|
)}
|
||||||
className="nav-link"
|
className="nav-link"
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
"common:footer-guidance-link-label"
|
"common:footer-guidance-link-label",
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li className="govuk-footer__inline-list-item govuk-!-font-weight-bold govuk-!-margin-right-7">
|
<li className="govuk-footer__inline-list-item govuk-!-font-weight-bold govuk-!-margin-right-7">
|
||||||
<a
|
<a
|
||||||
href={t(
|
href={t(
|
||||||
"common:footer-announcements-link"
|
"common:footer-announcements-link",
|
||||||
)}
|
)}
|
||||||
className="nav-link"
|
className="nav-link"
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
"common:footer-announcements-link-label"
|
"common:footer-announcements-link-label",
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li className="govuk-footer__inline-list-item govuk-!-font-weight-bold">
|
<li className="govuk-footer__inline-list-item govuk-!-font-weight-bold">
|
||||||
<a
|
<a
|
||||||
href={t(
|
href={t(
|
||||||
"common:footer-contact-us-link"
|
"common:footer-contact-us-link",
|
||||||
)}
|
)}
|
||||||
className="govuk-footer__link"
|
className="govuk-footer__link"
|
||||||
id="aContactUs"
|
id="aContactUs"
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
"common:footer-contact-us-link-label"
|
"common:footer-contact-us-link-label",
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -236,7 +236,7 @@ export default function Footer(props) {
|
|||||||
id="aAccessibility"
|
id="aAccessibility"
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
"common:footer-accessibility-link-label"
|
"common:footer-accessibility-link-label",
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
@@ -257,13 +257,13 @@ export default function Footer(props) {
|
|||||||
<li className="govuk-footer__inline-list-item">
|
<li className="govuk-footer__inline-list-item">
|
||||||
<a
|
<a
|
||||||
href={t(
|
href={t(
|
||||||
"common:footer-copyright-link"
|
"common:footer-copyright-link",
|
||||||
)}
|
)}
|
||||||
className="govuk-footer__link"
|
className="govuk-footer__link"
|
||||||
id="Access"
|
id="Access"
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
"common:footer-copyright-link-label"
|
"common:footer-copyright-link-label",
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -271,13 +271,13 @@ export default function Footer(props) {
|
|||||||
<li className="govuk-footer__inline-list-item">
|
<li className="govuk-footer__inline-list-item">
|
||||||
<Link
|
<Link
|
||||||
href={t(
|
href={t(
|
||||||
"common:footer-privacy-link"
|
"common:footer-privacy-link",
|
||||||
)}
|
)}
|
||||||
id="aPrivacy"
|
id="aPrivacy"
|
||||||
className="govuk-footer__link"
|
className="govuk-footer__link"
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
"common:footer-privacy-link-label"
|
"common:footer-privacy-link-label",
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
@@ -285,26 +285,13 @@ export default function Footer(props) {
|
|||||||
<li className="govuk-footer__inline-list-item">
|
<li className="govuk-footer__inline-list-item">
|
||||||
<Link
|
<Link
|
||||||
href={t(
|
href={t(
|
||||||
"common:footer-terms-conditions-link"
|
"common:footer-terms-conditions-link",
|
||||||
)}
|
)}
|
||||||
id="aTermsConds"
|
id="aTermsConds"
|
||||||
className="govuk-footer__link"
|
className="govuk-footer__link"
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
"common:footer-terms-conditions-link-label"
|
"common:footer-terms-conditions-link-label",
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="govuk-footer__inline-list-item">
|
|
||||||
<Link
|
|
||||||
href={t(
|
|
||||||
"common:footer-pedw-use-ai-link"
|
|
||||||
)}
|
|
||||||
id="aHowToAI"
|
|
||||||
className="govuk-footer__link"
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
"common:footer-pedw-use-ai-label"
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -41,12 +41,12 @@ export default function Dns() {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<h3 className="heading-small card-heading">
|
<h3 className="heading-small card-heading">Contact us</h3>
|
||||||
{t("home:contact-us-heading")}
|
|
||||||
</h3>
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<p className="govuk-body-s">
|
<p className="govuk-body-s">
|
||||||
{t("home:contact-us-paragraph")}
|
If you have any queries on an appeal, application or
|
||||||
|
anything else regarding Planning Caserwork you can
|
||||||
|
contact us.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -58,7 +58,7 @@ export default function Dns() {
|
|||||||
}
|
}
|
||||||
className="govuk-button govuk-button--secondary-cta"
|
className="govuk-button govuk-button--secondary-cta"
|
||||||
>
|
>
|
||||||
{t("home:contact-us-button")}
|
Contact us
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { he } from "date-fns/locale";
|
import { he } from "date-fns/locale";
|
||||||
import GoogleMapReact from "google-map-react";
|
import GoogleMapReact from "google-map-react";
|
||||||
const MapComponent = (props) => {
|
const GoogleMapComponent = (props) => {
|
||||||
const { center, zoom, locale, mapTarget } = props;
|
const { center, zoom } = props;
|
||||||
|
|
||||||
let data = [center];
|
let data = [center];
|
||||||
|
|
||||||
@@ -23,26 +23,60 @@ const MapComponent = (props) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// "https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||||
|
// props.center.lng +
|
||||||
|
// "," +
|
||||||
|
// props.center.lat +
|
||||||
|
// "&zoom=12#/"
|
||||||
|
// );
|
||||||
return (
|
return (
|
||||||
|
// <GoogleMapReact
|
||||||
|
// options={function (maps) {
|
||||||
|
// return {
|
||||||
|
// overviewMapControl: true,
|
||||||
|
// mapTypeControl: true,
|
||||||
|
// };
|
||||||
|
// }}
|
||||||
|
// bootstrapURLKeys={{
|
||||||
|
// key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||||
|
// }}
|
||||||
|
// defaultCenter={center}
|
||||||
|
// defaultZoom={zoom}
|
||||||
|
// yesIWantToUseGoogleMapApiInternals
|
||||||
|
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
||||||
|
// ></GoogleMapReact>
|
||||||
<>
|
<>
|
||||||
|
{" "}
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<a
|
<a
|
||||||
href={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=${center.lng},${center.lat}&zoom=7#/`}
|
href={
|
||||||
|
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||||
|
props.center.lng +
|
||||||
|
"," +
|
||||||
|
props.center.lat +
|
||||||
|
"&zoom=7#/"
|
||||||
|
}
|
||||||
rel="noreferrer noopener"
|
rel="noreferrer noopener"
|
||||||
className="govuk-link govuk-link--no-underline govuk-!-font-size-14 "
|
className="govuk-link govuk-link--no-underline govuk-!-font-size-14 "
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
{locale === "cy"
|
See this map on Datamap Wales
|
||||||
? "Gweler y map hwn ar Datamap Cymru"
|
|
||||||
: "See this map on Datamap Wales "}
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<iframe
|
<iframe
|
||||||
src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=${center.lng},${center.lat}&zoom=7#/`}
|
src={
|
||||||
|
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||||
|
props.center.lng +
|
||||||
|
"," +
|
||||||
|
props.center.lat +
|
||||||
|
"&zoom=7#/"
|
||||||
|
}
|
||||||
|
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||||
width={"100%"}
|
width={"100%"}
|
||||||
style={{ maxHeight: "400px" }}
|
style={{ maxHeight: "400px" }}
|
||||||
height={"500px"}
|
height={"500px"}
|
||||||
@@ -54,4 +88,4 @@ const MapComponent = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default MapComponent;
|
export default GoogleMapComponent;
|
||||||
|
|||||||
+79
-9
@@ -4,7 +4,8 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import TimeOut from "../components/timeout";
|
import TimeOut from "../components/timeout";
|
||||||
import AwaitingSubmissionFromBlob from "./myportal/awaitingsubmissionfromblob";
|
import AwaitingSubmissionFromBlob from "./myportal/awaitingsubmissionfromblob";
|
||||||
import { hasOwn } from "./utils";
|
|
||||||
|
import _ from "lodash";
|
||||||
import Dns from "./myportal/dns";
|
import Dns from "./myportal/dns";
|
||||||
import MakeNewAppeal from "./myportal/makenewappeal";
|
import MakeNewAppeal from "./myportal/makenewappeal";
|
||||||
import MyCases from "./myportal/mycases";
|
import MyCases from "./myportal/mycases";
|
||||||
@@ -13,10 +14,9 @@ import SearchCases from "./myportal/searchcases";
|
|||||||
import WatchedCases from "./myportal/watchedcases";
|
import WatchedCases from "./myportal/watchedcases";
|
||||||
import MySubmittedReps from "./myportal/mysubmittedrepresentations";
|
import MySubmittedReps from "./myportal/mysubmittedrepresentations";
|
||||||
import ServiceBanner from "./myportal/servicebanner";
|
import ServiceBanner from "./myportal/servicebanner";
|
||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import transLookup from "../data/lookuptranslations.json";
|
import transLookup from "../data/lookuptranslations.json";
|
||||||
import { performPortalSignOut } from "../lib/auth/sessionClient";
|
import { performPortalSignOut } from "../lib/auth/sessionClient";
|
||||||
import resolveCrmDisplayValue from "../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import _ from "lodash";
|
|
||||||
|
|
||||||
const MyPortal = (props) => {
|
const MyPortal = (props) => {
|
||||||
const { showFileUpload, showLoginCheck, docsOffline } = props;
|
const { showFileUpload, showLoginCheck, docsOffline } = props;
|
||||||
@@ -39,17 +39,78 @@ const MyPortal = (props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<main className="" id="main-content" role="main">
|
<main className="" id="main-content" role="main">
|
||||||
|
{/* <div className="servicebanner myportal govuk-!-margin-bottom-4">
|
||||||
|
<h1>
|
||||||
|
<img
|
||||||
|
src={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "/assets/images/planning-casework-cy.svg"
|
||||||
|
: "/assets/images/planning-casework-en.svg"
|
||||||
|
}
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Fy mhorth"
|
||||||
|
: "My Portal"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<div className="serviceBanner_userDetails">
|
||||||
|
<img
|
||||||
|
className="user_logo"
|
||||||
|
src="/assets/images/user.svg"
|
||||||
|
alt={router.locale == "cy" ? "Defnyddiwr" : "User"}
|
||||||
|
/>{" "}
|
||||||
|
<div className="serviceBanner_userDetails_name">
|
||||||
|
<Link
|
||||||
|
href="/account/personaldetails"
|
||||||
|
className="govuk-button-secondary"
|
||||||
|
>
|
||||||
|
{props.accountDetails.accountDetails.firstname}{" "}
|
||||||
|
{props.accountDetails.accountDetails.lastname}
|
||||||
|
{" - "}
|
||||||
|
{
|
||||||
|
props.accountDetails.accountDetails[
|
||||||
|
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "/allgofnodi"
|
||||||
|
: "/logout"
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
handleLogout();
|
||||||
|
}}
|
||||||
|
className="govuk-header__link "
|
||||||
|
>
|
||||||
|
{t("common:signout-label")}
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> */}
|
||||||
<ServiceBanner props={props} />
|
<ServiceBanner props={props} />
|
||||||
{isLPA && (
|
{isLPA && (
|
||||||
<div>
|
<div>
|
||||||
<h2 className="heading-small card-heading">
|
<h2 className="heading-small card-heading">
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: props.accountDetails.accountDetails[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
props.accountDetails.accountDetails[
|
||||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
})}{" "}
|
eval: true
|
||||||
|
})
|
||||||
|
: props.accountDetails.accountDetails[
|
||||||
|
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]}{" "}
|
||||||
{t("myportal:lpa-portal-heading")}
|
{t("myportal:lpa-portal-heading")}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,6 +122,15 @@ const MyPortal = (props) => {
|
|||||||
{!isLPA && (
|
{!isLPA && (
|
||||||
<MakeNewAppeal docsOffline={docsOffline} />
|
<MakeNewAppeal docsOffline={docsOffline} />
|
||||||
)}
|
)}
|
||||||
|
{/* {props.awaitingSubmission.awaitingSubmission[
|
||||||
|
"@odata.count"
|
||||||
|
] > 0 && (
|
||||||
|
<AwaitingSubmission
|
||||||
|
awaitingSubmission={
|
||||||
|
props.awaitingSubmission
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)} */}
|
||||||
|
|
||||||
{!isLPA &&
|
{!isLPA &&
|
||||||
_.has(props.awaitingSubmission, [
|
_.has(props.awaitingSubmission, [
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, formValueSelector, reduxForm } from "redux-form";
|
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||||
|
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const required = (errorMsg) => (value) =>
|
const required = (errorMsg) => (value) =>
|
||||||
value || typeof value === "number" ? undefined : errorMsg;
|
value || typeof value === "number" ? undefined : errorMsg;
|
||||||
@@ -133,11 +133,22 @@ let AdvancedSearch = (props) => {
|
|||||||
key={key}
|
key={key}
|
||||||
value={optionsObj[key].accountid}
|
value={optionsObj[key].accountid}
|
||||||
>
|
>
|
||||||
{resolveCrmDisplayValue({
|
{/* {optionsObj[key].name} */}
|
||||||
value: optionsObj[key].name,
|
|
||||||
locale,
|
{router.locale == "cy"
|
||||||
translations: transLookup
|
? jsonpath({
|
||||||
})}
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
optionsObj[key]
|
||||||
|
.name +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: optionsObj[key].name ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -223,11 +234,31 @@ let AdvancedSearch = (props) => {
|
|||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{resolveCrmDisplayValue({
|
{_.isEmpty(optionsObj[key])
|
||||||
value: optionsObj[key].value,
|
? ""
|
||||||
locale,
|
: _.isEmpty(optionsObj[key])
|
||||||
translations: transLookup
|
? ""
|
||||||
})}
|
: _.isEmpty(
|
||||||
|
optionsObj[key]
|
||||||
|
.value
|
||||||
|
)
|
||||||
|
? ""
|
||||||
|
: router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
optionsObj[
|
||||||
|
key
|
||||||
|
].value +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: optionsObj[key]
|
||||||
|
.value ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -17,7 +18,6 @@ import {
|
|||||||
setCurrentReference,
|
setCurrentReference,
|
||||||
setCurrentView
|
setCurrentView
|
||||||
} from "../../store/currentView/action";
|
} from "../../store/currentView/action";
|
||||||
import { resolveCrmDisplayValue } from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const AwaitingSubmissionFromBlob = (props) => {
|
const AwaitingSubmissionFromBlob = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -201,14 +201,22 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: getFormCollectionByID(
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
getFormCollectionByID(
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_appealcasetype
|
.pinswg_appealcasetype
|
||||||
).value,
|
).value +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
})}
|
eval: true
|
||||||
|
})
|
||||||
|
: getFormCollectionByID(
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_appealcasetype
|
||||||
|
).value || ""}
|
||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:case-address")}:</b>{" "}
|
<b>{t("myportal:case-address")}:</b>{" "}
|
||||||
@@ -294,14 +302,20 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
{router.locale == "cy" ? "ACLl" : "LPA"}
|
{router.locale == "cy" ? "ACLl" : "LPA"}
|
||||||
:
|
:
|
||||||
</b>
|
</b>
|
||||||
|
{router.locale == "cy"
|
||||||
{resolveCrmDisplayValue({
|
? jsonpath({
|
||||||
value: showTopThreeArr[key][
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
showTopThreeArr[key][
|
||||||
"pinswg_lpaname"
|
"pinswg_lpaname"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
})}
|
eval: true
|
||||||
|
})
|
||||||
|
: showTopThreeArr[key][
|
||||||
|
"pinswg_lpaname"
|
||||||
|
] || ""}
|
||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:date-raised")}:</b>
|
<b>{t("myportal:date-raised")}:</b>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
@@ -11,7 +12,6 @@ import {
|
|||||||
getPortalModuleDetailsProxy,
|
getPortalModuleDetailsProxy,
|
||||||
getWatchedCasesProxy
|
getWatchedCasesProxy
|
||||||
} from "../../actions/services/portalService";
|
} from "../../actions/services/portalService";
|
||||||
import { splitWatchedCasesBySubmissionState } from "../../lib/domain/dashboard-policy";
|
|
||||||
import { getFormCollectionByID, getDetailsProxy } from "../../components/utils";
|
import { getFormCollectionByID, getDetailsProxy } from "../../components/utils";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import {
|
import {
|
||||||
@@ -32,7 +32,6 @@ import { planningappeals78_pdf } from "../../components/pdftemplates/planningapp
|
|||||||
import { other_pdf } from "../../components/pdftemplates/other_pdf";
|
import { other_pdf } from "../../components/pdftemplates/other_pdf";
|
||||||
|
|
||||||
import { PDFDownloadLink, pdf } from "@react-pdf/renderer";
|
import { PDFDownloadLink, pdf } from "@react-pdf/renderer";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const TopThree = (props) => {
|
const TopThree = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -123,10 +122,21 @@ const TopThree = (props) => {
|
|||||||
getWatchedCasesProxy(
|
getWatchedCasesProxy(
|
||||||
props.accountDetails.loggedinUserId
|
props.accountDetails.loggedinUserId
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
let filteredWatchedCases =
|
let showWatchedCases = (submittedArr) => {
|
||||||
splitWatchedCasesBySubmissionState(
|
const required = submittedArr.value.filter((el) => {
|
||||||
data.value
|
return (
|
||||||
).watchedCases;
|
el.pinswg_representationsubmitted == null
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
let newObj = {};
|
||||||
|
return Object.assign(newObj, {
|
||||||
|
"@odata.count": required.length,
|
||||||
|
"value": required
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
let filteredWatchedCases = showWatchedCases(data);
|
||||||
|
|
||||||
(setWatchedCases(filteredWatchedCases),
|
(setWatchedCases(filteredWatchedCases),
|
||||||
getDetailsProxy(
|
getDetailsProxy(
|
||||||
@@ -406,13 +416,20 @@ const TopThree = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: showTopThreeArr[key][
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
showTopThreeArr[key][
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
})}
|
eval: true
|
||||||
|
})
|
||||||
|
: showTopThreeArr[key][
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
</div>
|
</div>
|
||||||
{/* )} */}
|
{/* )} */}
|
||||||
{/* {topThreeType != "awaitingSubmission" ? ( */}
|
{/* {topThreeType != "awaitingSubmission" ? ( */}
|
||||||
@@ -477,13 +494,20 @@ const TopThree = (props) => {
|
|||||||
)}
|
)}
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: showTopThreeArr[key][
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
showTopThreeArr[key][
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
})}
|
eval: true
|
||||||
|
})
|
||||||
|
: showTopThreeArr[key][
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
</div>
|
</div>
|
||||||
{topThreeType == "awaitingSubmission" ? (
|
{topThreeType == "awaitingSubmission" ? (
|
||||||
<div className="carModuleAddress">
|
<div className="carModuleAddress">
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -33,7 +34,6 @@ import {
|
|||||||
setWatchedCasesDetails
|
setWatchedCasesDetails
|
||||||
} from "../../store/watchedCases/action";
|
} from "../../store/watchedCases/action";
|
||||||
import { getFormCollectionByID, getDetailsProxy } from "../utils";
|
import { getFormCollectionByID, getDetailsProxy } from "../utils";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const TopThree = (props) => {
|
const TopThree = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -196,6 +196,19 @@ const TopThree = (props) => {
|
|||||||
<b>{showTopThreeArr[key].pinswg_name}</b>
|
<b>{showTopThreeArr[key].pinswg_name}</b>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
|
// href="#"
|
||||||
|
// href={{
|
||||||
|
// pathname:
|
||||||
|
// router.locale == "cy"
|
||||||
|
// ? "/fymhorth/representation"
|
||||||
|
// : "/myportal/representation",
|
||||||
|
// query: {
|
||||||
|
// case: showTopThreeArr[key].ticketnumber,
|
||||||
|
// state: "edit",
|
||||||
|
// created:
|
||||||
|
// showTopThreeArr[key].repfile_name,
|
||||||
|
// },
|
||||||
|
// }}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
style={{
|
style={{
|
||||||
color: "#0360a6",
|
color: "#0360a6",
|
||||||
@@ -279,19 +292,54 @@ const TopThree = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:representation-type")}:</b>
|
<b>{t("myportal:representation-type")}:</b>
|
||||||
{resolveCrmDisplayValue({
|
{" "}
|
||||||
value: showTopThreeArr[key].representationType,
|
|
||||||
locale,
|
{router.locale == "cy"
|
||||||
translations: transLookup
|
? jsonpath({
|
||||||
})}
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
showTopThreeArr[key].representationType +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: showTopThreeArr[key].representationType || ""}
|
||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:capacity")}:</b>
|
<b>{t("myportal:capacity")}:</b>
|
||||||
{resolveCrmDisplayValue({
|
{" "}
|
||||||
value: showTopThreeArr[key].representationCapacity,
|
{router.locale == "cy"
|
||||||
locale,
|
? jsonpath({
|
||||||
translations: transLookup
|
path:
|
||||||
})}
|
'$..[?(@ && @.value=="' +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.representationCapacity +
|
||||||
|
'" ||@.value_cy=="' +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.representationCapacity +
|
||||||
|
'" )].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value_cy=="' +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.representationCapacity +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
}).length > 0
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value_cy=="' +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.representationCapacity +
|
||||||
|
'")].value',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: showTopThreeArr[key].representationCapacity}
|
||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:date-raised")}:</b>
|
<b>{t("myportal:date-raised")}:</b>
|
||||||
@@ -300,13 +348,22 @@ const TopThree = (props) => {
|
|||||||
</div>{" "}
|
</div>{" "}
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
||||||
{resolveCrmDisplayValue({
|
{" "}
|
||||||
value: showTopThreeArr[key][
|
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
showTopThreeArr[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
})}
|
eval: true
|
||||||
|
})
|
||||||
|
: showTopThreeArr[key][
|
||||||
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
</div>
|
</div>
|
||||||
{showTopThreeArr[key].hasOwnProperty("repComplete") && (
|
{showTopThreeArr[key].hasOwnProperty("repComplete") && (
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
|
|||||||
+175
-88
@@ -18,13 +18,8 @@ import {
|
|||||||
getWatchedCases,
|
getWatchedCases,
|
||||||
getWatchedCasesProxy
|
getWatchedCasesProxy
|
||||||
} from "../../actions/services/portalService";
|
} from "../../actions/services/portalService";
|
||||||
import { splitWatchedCasesBySubmissionState } from "../../lib/domain/dashboard-policy";
|
|
||||||
import { consoleLogger } from "../../actions/core/logger";
|
import { consoleLogger } from "../../actions/core/logger";
|
||||||
import {
|
import { getDetailsProxy, getFormCollectionByID } from "../../components/utils";
|
||||||
getDetailsProxy,
|
|
||||||
getFormCollectionByID,
|
|
||||||
hasOwn
|
|
||||||
} from "../../components/utils";
|
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import { setAwaitingSubmissionFromBlob } from "../../store/awaitingSubmission/action";
|
import { setAwaitingSubmissionFromBlob } from "../../store/awaitingSubmission/action";
|
||||||
import {
|
import {
|
||||||
@@ -46,7 +41,6 @@ import {
|
|||||||
setMyRepresentations,
|
setMyRepresentations,
|
||||||
setMyRepresentationsDetails
|
setMyRepresentationsDetails
|
||||||
} from "../../store/myRepresentations/action";
|
} from "../../store/myRepresentations/action";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const ViewAllResults = (props) => {
|
const ViewAllResults = (props) => {
|
||||||
const {
|
const {
|
||||||
@@ -212,8 +206,12 @@ const ViewAllResults = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isAwaitingSubmissionDetails) {
|
if (isAwaitingSubmissionDetails) {
|
||||||
|
if (router.locale === "cy") {
|
||||||
|
return "/fymhorth/parhauigyflwyno";
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
(router.locale === "cy" ? "/fymhorth" : "/myportal") +
|
"/myportal" +
|
||||||
"/" +
|
"/" +
|
||||||
getFormCollectionByID(item.pinswg_appealcasetype).UrlName +
|
getFormCollectionByID(item.pinswg_appealcasetype).UrlName +
|
||||||
"?lpa=" +
|
"?lpa=" +
|
||||||
@@ -231,7 +229,7 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
if (router.locale === "cy") {
|
if (router.locale === "cy") {
|
||||||
return myportal === true
|
return myportal === true
|
||||||
? "/fymhorth/achos/" +
|
? "/fymhorth/achos" +
|
||||||
item.ticketnumber +
|
item.ticketnumber +
|
||||||
"?key=" +
|
"?key=" +
|
||||||
currentViewKey +
|
currentViewKey +
|
||||||
@@ -470,7 +468,7 @@ const ViewAllResults = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
{isAwaitingSubmissionDetails
|
{isAwaitingSubmissionDetails
|
||||||
? formatDates(item.createdon)
|
? formatDates(item.createdon)
|
||||||
: hasOwn(detailsObj, [
|
: _.has(detailsObj, [
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
])
|
])
|
||||||
? detailsObj[
|
? detailsObj[
|
||||||
@@ -489,67 +487,87 @@ const ViewAllResults = (props) => {
|
|||||||
{t("search:searchresults-authority-label")}:
|
{t("search:searchresults-authority-label")}:
|
||||||
</span>
|
</span>
|
||||||
{isAwaitingSubmissionDetails &&
|
{isAwaitingSubmissionDetails &&
|
||||||
hasOwn(resultItem, "pinswg_lpaname")
|
_.has(resultItem, "pinswg_lpaname")
|
||||||
? resolveCrmDisplayValue({
|
? router.locale === "cy"
|
||||||
value: resultItem.pinswg_lpaname,
|
? jsonpath({
|
||||||
locale: router.locale,
|
path:
|
||||||
translations: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
fallbackValue: "N/A"
|
resultItem.pinswg_lpaname +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
})
|
})
|
||||||
|
: resultItem.pinswg_lpaname || "N/A"
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(resultItem, [
|
{_.has(resultItem, [
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
])
|
])
|
||||||
? resolveCrmDisplayValue({
|
? router.locale === "cy"
|
||||||
value: resultItem[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
resultItem[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})
|
})
|
||||||
|
: resultItem[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(searchDetailsObj[key], [
|
{_.has(searchDetailsObj[key], [
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
])
|
])
|
||||||
? resolveCrmDisplayValue({
|
? router.locale === "cy"
|
||||||
value:
|
? jsonpath({
|
||||||
searchDetailsObj[key][
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
(searchDetailsObj[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
searchDetailsObj[key]?.value[0][
|
searchDetailsObj[key]?.value[0][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
]) +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: isMyRepresentations
|
eval: true
|
||||||
|
})
|
||||||
|
: isMyRepresentations
|
||||||
? searchDetailsObj[key].value
|
? searchDetailsObj[key].value
|
||||||
: searchDetailsObj[key].value[0][
|
: searchDetailsObj[key].value[0][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || "N/A"
|
] || "N/A"
|
||||||
})
|
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(resultItem, [
|
{_.has(resultItem, [
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
])
|
])
|
||||||
? resolveCrmDisplayValue({
|
? router.locale === "cy"
|
||||||
value: resultItem[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
resultItem[
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: isMyRepresentations
|
eval: true
|
||||||
? ""
|
|
||||||
: "N/A"
|
|
||||||
})
|
})
|
||||||
|
: resultItem[
|
||||||
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || (isMyRepresentations ? "" : "N/A")
|
||||||
: isMyRepresentations &&
|
: isMyRepresentations &&
|
||||||
router.locale === "cy" &&
|
router.locale === "cy" &&
|
||||||
resolveCrmDisplayValue({
|
jsonpath({
|
||||||
value: searchDetailsObj[key][
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
searchDetailsObj[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
})}
|
})}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -558,37 +576,51 @@ const ViewAllResults = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{isAwaitingSubmissionDetails
|
{isAwaitingSubmissionDetails
|
||||||
? resolveCrmDisplayValue({
|
? router.locale === "cy"
|
||||||
value: getFormCollectionByID(
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
getFormCollectionByID(
|
||||||
item.pinswg_appealcasetype
|
item.pinswg_appealcasetype
|
||||||
).value,
|
).value +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})
|
})
|
||||||
: resolveCrmDisplayValue({
|
: getFormCollectionByID(
|
||||||
value: item[
|
item.pinswg_appealcasetype
|
||||||
|
).value || "N/A"
|
||||||
|
: router.locale === "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: isMyRepresentations
|
eval: true
|
||||||
? ""
|
})
|
||||||
: "N/A"
|
: item[
|
||||||
})}
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || (isMyRepresentations ? "" : "N/A")}
|
||||||
|
|
||||||
{isMyRepresentations &&
|
{isMyRepresentations &&
|
||||||
resolveCrmDisplayValue({
|
(router.locale === "cy"
|
||||||
value: getFormCollectionByID(
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
getFormCollectionByID(
|
||||||
searchDetailsObj[key].appealType
|
searchDetailsObj[key].appealType
|
||||||
).value,
|
).value +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: getFormCollectionByID(
|
eval: true
|
||||||
|
})[0]
|
||||||
|
: getFormCollectionByID(
|
||||||
searchDetailsObj[key].appealType
|
searchDetailsObj[key].appealType
|
||||||
).value
|
).value)}
|
||||||
})}
|
{_.has(
|
||||||
{hasOwn(
|
|
||||||
searchDetailsObj[key],
|
searchDetailsObj[key],
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)}
|
)}
|
||||||
@@ -621,14 +653,41 @@ const ViewAllResults = (props) => {
|
|||||||
}) || "N/A"
|
}) || "N/A"
|
||||||
: isMyRepresentations
|
: isMyRepresentations
|
||||||
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
||||||
: resolveCrmDisplayValue({
|
: // ? jsonpath({path:
|
||||||
value: item[
|
//
|
||||||
|
// '$..[?(@ && @.value=="' +
|
||||||
|
// searchDetailsObj[key].value[0][
|
||||||
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
// ] +
|
||||||
|
// '")].value_cy',transLookup,
|
||||||
|
// )
|
||||||
|
// : searchDetailsObj[key].value[0][
|
||||||
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
// ] || "N/A"
|
||||||
|
// : router.locale == "cy"
|
||||||
|
// ? jsonpath({path:
|
||||||
|
//
|
||||||
|
// '$..[?(@ && @.value=="' +
|
||||||
|
// item[
|
||||||
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
// ] +
|
||||||
|
// '")].value_cy',transLookup,
|
||||||
|
// )
|
||||||
|
|
||||||
|
router.locale === "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: item[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"}
|
||||||
</dd>
|
</dd>
|
||||||
{isAwaitingSubmissionDetails && (
|
{isAwaitingSubmissionDetails && (
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
||||||
@@ -691,7 +750,9 @@ const ViewAllResults = (props) => {
|
|||||||
{isWatchedCases && (
|
{isWatchedCases && (
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
||||||
<button
|
<button
|
||||||
title={t("case:stop-watching-case-link")}
|
title={t(
|
||||||
|
"case:do-you-want-to-delete-case-label"
|
||||||
|
)}
|
||||||
className=" cardModuleRemoveCase govuk-summary-list__actionLink watched_link"
|
className=" cardModuleRemoveCase govuk-summary-list__actionLink watched_link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
confirm(
|
confirm(
|
||||||
@@ -712,12 +773,12 @@ const ViewAllResults = (props) => {
|
|||||||
</button>
|
</button>
|
||||||
{item.pinswg_emailnotifications === true ? (
|
{item.pinswg_emailnotifications === true ? (
|
||||||
<button
|
<button
|
||||||
className="govuk-summary-list__actionLink mailLink watched_link"
|
className="govuk-summary-list__actionLink mailLink"
|
||||||
title={t("common:unsubscribe-title-label")}
|
title={t("common:unsubscribe-title-label")}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
confirm(
|
confirm(
|
||||||
t(
|
t(
|
||||||
"case:summary-unsubscribe-mail-label "
|
"case:summary-unsubscribe-mail-label"
|
||||||
) +
|
) +
|
||||||
item.pinswg_title +
|
item.pinswg_title +
|
||||||
"?"
|
"?"
|
||||||
@@ -738,7 +799,7 @@ const ViewAllResults = (props) => {
|
|||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
className="govuk-summary-list__actionLink mailLink "
|
className="govuk-summary-list__actionLink mailLink"
|
||||||
title={t("common:subscribe-title-label")}
|
title={t("common:subscribe-title-label")}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
confirm(
|
confirm(
|
||||||
@@ -868,10 +929,21 @@ const ViewAllResults = (props) => {
|
|||||||
.then((data) => data)
|
.then((data) => data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
||||||
let filteredWatchedCases =
|
let showWatchedCases = (submittedArr) => {
|
||||||
splitWatchedCasesBySubmissionState(
|
const required = submittedArr.value.filter((el) => {
|
||||||
data.value
|
return (
|
||||||
).watchedCases;
|
el.pinswg_representationsubmitted == null
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
let newObj = {};
|
||||||
|
return Object.assign(newObj, {
|
||||||
|
"@odata.count": required.length,
|
||||||
|
"value": required
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
let filteredWatchedCases = showWatchedCases(data);
|
||||||
(setWatchedCases(filteredWatchedCases),
|
(setWatchedCases(filteredWatchedCases),
|
||||||
getDetailsProxy(
|
getDetailsProxy(
|
||||||
filteredWatchedCases,
|
filteredWatchedCases,
|
||||||
@@ -923,9 +995,24 @@ const ViewAllResults = (props) => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
getWatchedCasesProxy(props.accountDetails.loggedinUserId).then(
|
getWatchedCasesProxy(props.accountDetails.loggedinUserId).then(
|
||||||
(data) => {
|
(data) => {
|
||||||
data = splitWatchedCasesBySubmissionState(
|
let showWatchedCases = (submittedArr) => {
|
||||||
data.value
|
const required = submittedArr.value.filter((el) => {
|
||||||
).watchedCases;
|
return (
|
||||||
|
el.pinswg_representationsubmitted ===
|
||||||
|
null ||
|
||||||
|
el.pinswg_representationsubmitted ===
|
||||||
|
undefined
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
let newObj = {};
|
||||||
|
return Object.assign(newObj, {
|
||||||
|
"@odata.count": required.length,
|
||||||
|
"value": required
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
data = showWatchedCases(data);
|
||||||
|
|
||||||
data.value.sort(function compare(a, b) {
|
data.value.sort(function compare(a, b) {
|
||||||
var dateA = new Date(a.createdon);
|
var dateA = new Date(a.createdon);
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ function Radiofield(props) {
|
|||||||
//debugger;
|
//debugger;
|
||||||
// parentField != false &&
|
// parentField != false &&
|
||||||
// !_.isEmpty(formProps[form]) &&
|
// !_.isEmpty(formProps[form]) &&
|
||||||
// hasOwn(formProps[form].values, parentField) &&
|
// _.has(formProps[form].values, parentField) &&
|
||||||
// parentFieldShowOnValue.indexOf(
|
// parentFieldShowOnValue.indexOf(
|
||||||
// formProps[form].values[parentField].toString()
|
// formProps[form].values[parentField].toString()
|
||||||
// ) > -1;
|
// ) > -1;
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import {
|
|||||||
selectRowFieldType,
|
selectRowFieldType,
|
||||||
selectRowLabelDescriptions
|
selectRowLabelDescriptions
|
||||||
} from "../../lib/newappeal/formDerivation";
|
} from "../../lib/newappeal/formDerivation";
|
||||||
import { resolveCrmDisplayValue } from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
let BuildCheckRow = (props) => {
|
let BuildCheckRow = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -75,12 +74,14 @@ let BuildCheckRow = (props) => {
|
|||||||
eval: true
|
eval: true
|
||||||
});
|
});
|
||||||
|
|
||||||
let labelTrans = resolveCrmDisplayValue({
|
let labelTrans =
|
||||||
value: label,
|
router.locale == "cy"
|
||||||
locale,
|
? jsonpath({
|
||||||
translations: formObj
|
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
|
||||||
});
|
json: formObj,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: label;
|
||||||
return labelTrans;
|
return labelTrans;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import DocsOfflineNotice from "./buildCheckSection/DocsOfflineNotice";
|
|||||||
import FinalisingStatePanel from "./buildCheckSection/FinalisingStatePanel";
|
import FinalisingStatePanel from "./buildCheckSection/FinalisingStatePanel";
|
||||||
import SectionReviewList from "./buildCheckSection/SectionReviewList";
|
import SectionReviewList from "./buildCheckSection/SectionReviewList";
|
||||||
import SubmitActionsPanel from "./buildCheckSection/SubmitActionsPanel";
|
import SubmitActionsPanel from "./buildCheckSection/SubmitActionsPanel";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
let BuildCheckSection = (props) => {
|
let BuildCheckSection = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -145,11 +144,14 @@ let BuildCheckSection = (props) => {
|
|||||||
eval: true
|
eval: true
|
||||||
});
|
});
|
||||||
|
|
||||||
let labelTrans = resolveCrmDisplayValue({
|
let labelTrans =
|
||||||
value: label,
|
router.locale == "cy"
|
||||||
locale,
|
? jsonpath({
|
||||||
translations: formObj
|
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
|
||||||
});
|
json: formObj,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: label;
|
||||||
return labelTrans;
|
return labelTrans;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -21,12 +21,7 @@ import {
|
|||||||
setNewAppealProgress,
|
setNewAppealProgress,
|
||||||
setFileCount
|
setFileCount
|
||||||
} from "../../store/appealType/action";
|
} from "../../store/appealType/action";
|
||||||
import {
|
import { getFormCollectionByID, getProgressObj, updateLinks } from "../utils";
|
||||||
getFormCollectionByID,
|
|
||||||
getProgressObj,
|
|
||||||
updateLinks,
|
|
||||||
hasOwn
|
|
||||||
} from "../utils";
|
|
||||||
import BuildRow from "./buildrow";
|
import BuildRow from "./buildrow";
|
||||||
import {
|
import {
|
||||||
parseXml,
|
parseXml,
|
||||||
@@ -441,7 +436,7 @@ let BuildSection = (props) => {
|
|||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
getErrors();
|
getErrors();
|
||||||
let valuesObj = hasOwn(
|
let valuesObj = _.has(
|
||||||
legacyFormState[props.form],
|
legacyFormState[props.form],
|
||||||
"values"
|
"values"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
@@ -12,9 +13,8 @@ import {
|
|||||||
setAppealTypeID,
|
setAppealTypeID,
|
||||||
setAppealTypeTitle
|
setAppealTypeTitle
|
||||||
} from "../../store/appealType/action";
|
} from "../../store/appealType/action";
|
||||||
import { getFormCollectionByID, hasOwn } from "../utils";
|
import { getFormCollectionByID } from "../utils";
|
||||||
import Aboutyou from "./aboutyou";
|
import Aboutyou from "./aboutyou";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const RenderLPAList = ({
|
const RenderLPAList = ({
|
||||||
name,
|
name,
|
||||||
@@ -52,26 +52,29 @@ const RenderLPAList = ({
|
|||||||
className="govuk-select govuk-input--error"
|
className="govuk-select govuk-input--error"
|
||||||
id="lpatypes"
|
id="lpatypes"
|
||||||
name="lpatypes"
|
name="lpatypes"
|
||||||
|
//onChange={(e) => props.onChangeSelectLPA(e)}
|
||||||
>
|
>
|
||||||
<option value="" disabled defaultValue>
|
<option value="" disabled defaultValue>
|
||||||
{t("common:drop-down-select")}
|
{t("common:drop-down-select")}
|
||||||
</option>
|
</option>
|
||||||
|
{_.isEmpty(optionsObj)
|
||||||
{Object.keys(optionsObj || {}).map((key) => {
|
? ""
|
||||||
const option = optionsObj[key];
|
: Object.keys(optionsObj).map((key, index) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<option
|
<option
|
||||||
key={key}
|
key={key}
|
||||||
value={option?.accountid || ""}
|
value={optionsObj[key].accountid}
|
||||||
>
|
>
|
||||||
{option?.name
|
{router.locale == "cy"
|
||||||
? resolveCrmDisplayValue({
|
? jsonpath({
|
||||||
value: option.name,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
translations: transLookup
|
optionsObj[key].name +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
})
|
})
|
||||||
: ""}
|
: optionsObj[key].name}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -116,30 +119,50 @@ const RenderAppealTypeList = ({
|
|||||||
className="govuk-select"
|
className="govuk-select"
|
||||||
id="appealTypes"
|
id="appealTypes"
|
||||||
name={name}
|
name={name}
|
||||||
|
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||||
>
|
>
|
||||||
<option value="" disabled defaultValue>
|
<option value="" disabled defaultValue>
|
||||||
{t("common:drop-down-select")}
|
{t("common:drop-down-select")}
|
||||||
</option>
|
</option>
|
||||||
|
{_.isEmpty(optionsObj)
|
||||||
{Object.keys(optionsObj || {}).map((key) => {
|
? ""
|
||||||
const option = optionsObj[key];
|
: Object.keys(optionsObj).map((key, index) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<option
|
<option
|
||||||
key={key}
|
key={key}
|
||||||
value={
|
value={
|
||||||
option?.value
|
_.isEmpty(optionsObj[key])
|
||||||
? option.attributevalue
|
? ""
|
||||||
: ""
|
: _.isEmpty(optionsObj[key])
|
||||||
|
? ""
|
||||||
|
: _.isEmpty(
|
||||||
|
optionsObj[key]
|
||||||
|
.value
|
||||||
|
)
|
||||||
|
? ""
|
||||||
|
: optionsObj[key]
|
||||||
|
.attributevalue
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{option?.value
|
{_.isEmpty(optionsObj[key])
|
||||||
? resolveCrmDisplayValue({
|
? ""
|
||||||
value: option.value,
|
: _.isEmpty(optionsObj[key])
|
||||||
locale: router.locale,
|
? ""
|
||||||
translations: transLookup
|
: _.isEmpty(
|
||||||
|
optionsObj[key].value
|
||||||
|
)
|
||||||
|
? ""
|
||||||
|
: router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
optionsObj[key]
|
||||||
|
.value +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
})
|
})
|
||||||
: ""}
|
: optionsObj[key].value}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -282,11 +305,25 @@ function Radiofield(props) {
|
|||||||
.slice(1, props.options.length - 1)
|
.slice(1, props.options.length - 1)
|
||||||
.split(",");
|
.split(",");
|
||||||
|
|
||||||
|
//parentFieldShowOnValue
|
||||||
var showIfHasParentShowValue = parentField != false;
|
var showIfHasParentShowValue = parentField != false;
|
||||||
|
//debugger;
|
||||||
|
// parentField != false &&
|
||||||
|
// !_.isEmpty(formProps[form]) &&
|
||||||
|
// _.has(formProps[form].values, parentField) &&
|
||||||
|
// parentFieldShowOnValue.indexOf(
|
||||||
|
// formProps[form].values[parentField].toString()
|
||||||
|
// ) > -1;
|
||||||
|
|
||||||
(showIfHasParentShowValue == parentField) != false &&
|
(showIfHasParentShowValue == parentField) != false &&
|
||||||
showIfHasParentShowValue;
|
showIfHasParentShowValue;
|
||||||
|
|
||||||
|
//console.log(
|
||||||
|
// datafieldname,
|
||||||
|
// showIfHasParentShowValue,
|
||||||
|
// formProps[form].values[parentField]
|
||||||
|
// );
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{parentField != false ? (
|
{parentField != false ? (
|
||||||
@@ -429,6 +466,20 @@ let CreateCase = (props) => {
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// router.replace(
|
||||||
|
// "/newappeal" +
|
||||||
|
// "/" +
|
||||||
|
// appTypeCollection.UrlName +
|
||||||
|
// "?lpa=" +
|
||||||
|
// values.lpaTypes +
|
||||||
|
// "&apt=" +
|
||||||
|
// values.appealTypes.split(",")[0],
|
||||||
|
// null,
|
||||||
|
// {
|
||||||
|
// shallow: true,
|
||||||
|
// }
|
||||||
|
// );
|
||||||
};
|
};
|
||||||
const yesNo = isWelsh ? ["Ydw", "Na"] : ["Yes", "No"];
|
const yesNo = isWelsh ? ["Ydw", "Na"] : ["Yes", "No"];
|
||||||
|
|
||||||
@@ -437,13 +488,13 @@ let CreateCase = (props) => {
|
|||||||
form = "caseForm",
|
form = "caseForm",
|
||||||
parentFieldShowOnValue = "846040004";
|
parentFieldShowOnValue = "846040004";
|
||||||
|
|
||||||
const values = formProps[form]?.values;
|
var showIfHasParentShowValue =
|
||||||
|
parentField != false &&
|
||||||
const showIfHasParentShowValue =
|
!_.isEmpty(formProps[form]) &&
|
||||||
parentField !== false &&
|
_.has(formProps[form].values, parentField) &&
|
||||||
values &&
|
parentFieldShowOnValue.indexOf(
|
||||||
hasOwn(values, parentField) &&
|
formProps[form].values[parentField].toString()
|
||||||
parentFieldShowOnValue.includes(values[parentField].toString());
|
) > -1;
|
||||||
|
|
||||||
(showIfHasParentShowValue == parentField) != false &&
|
(showIfHasParentShowValue == parentField) != false &&
|
||||||
showIfHasParentShowValue;
|
showIfHasParentShowValue;
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ import { StyleSheet, Text, View, Font } from "@react-pdf/renderer";
|
|||||||
import Html from "react-pdf-html";
|
import Html from "react-pdf-html";
|
||||||
|
|
||||||
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
export const AppealRow_pdf = (props) => {
|
export const AppealRow_pdf = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -326,9 +324,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
: fieldCopy;
|
: fieldCopy;
|
||||||
|
|
||||||
const transData = require(
|
const transData = require(
|
||||||
"../../locales/" +
|
"../../locales/en/" +
|
||||||
locale +
|
|
||||||
"/" +
|
|
||||||
(typeof fieldCopy != "undefined"
|
(typeof fieldCopy != "undefined"
|
||||||
? fieldCopy.split(":")[0]
|
? fieldCopy.split(":")[0]
|
||||||
: "common") +
|
: "common") +
|
||||||
@@ -436,18 +432,13 @@ export const AppealRow_pdf = (props) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswer}>
|
<Text style={styles.questionAnswer}>
|
||||||
{resolveCrmDisplayValue({
|
{getPickListLabel(
|
||||||
value: getPickListLabel(
|
|
||||||
props.pickListData,
|
props.pickListData,
|
||||||
datafieldname[0].value,
|
datafieldname[0].value,
|
||||||
props.props[
|
props.props[
|
||||||
datafieldname[0]
|
datafieldname[0].value
|
||||||
.value
|
|
||||||
]
|
]
|
||||||
),
|
)}
|
||||||
locale,
|
|
||||||
translations: transLookup
|
|
||||||
})}
|
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
@@ -696,11 +687,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
{props.props[
|
{props.props[
|
||||||
datafieldname[0].value
|
datafieldname[0].value
|
||||||
] == "true"
|
] == "true"
|
||||||
? locale == "cy"
|
? "Yes"
|
||||||
? "Ydw"
|
|
||||||
: "Yes"
|
|
||||||
: locale == "cy"
|
|
||||||
? "Na"
|
|
||||||
: "No"}
|
: "No"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -19,10 +19,8 @@ import { AppealRow_pdf } from "./appealRow_pdf";
|
|||||||
|
|
||||||
import transLookupCY from "../../locales/cy/newappeal.json";
|
import transLookupCY from "../../locales/cy/newappeal.json";
|
||||||
import transLookupEN from "../../locales/en/newappeal.json";
|
import transLookupEN from "../../locales/en/newappeal.json";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
|
||||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const getTrans = (locale, key) => {
|
const getTrans = (locale, key) => {
|
||||||
let jsonQuery = `$.${key}`;
|
let jsonQuery = `$.${key}`;
|
||||||
@@ -367,11 +365,7 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
{values.caseObj
|
{values.caseObj
|
||||||
.pinswg_appellantagent ==
|
.pinswg_appellantagent ==
|
||||||
"846040000"
|
"846040000"
|
||||||
? locale == "cy"
|
? "Appellant"
|
||||||
? "Apelydd"
|
|
||||||
: "Appellant"
|
|
||||||
: locale == "cy"
|
|
||||||
? "Asiant"
|
|
||||||
: "Agent"}
|
: "Agent"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -446,7 +440,7 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
<Text style={styles.questionText}>
|
<Text style={styles.questionText}>
|
||||||
{getTrans(
|
{getTrans(
|
||||||
locale,
|
locale,
|
||||||
"pdf-case-details-label-6"
|
"pdf-case-details-label-3"
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswer}>
|
<Text style={styles.questionAnswer}>
|
||||||
@@ -457,32 +451,6 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
}
|
}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View
|
|
||||||
wrap={false}
|
|
||||||
style={{
|
|
||||||
flexDirection: "row",
|
|
||||||
marginBottom: 10
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text style={styles.questionText}>
|
|
||||||
{getTrans(
|
|
||||||
locale,
|
|
||||||
"pdf-case-details-label-8"
|
|
||||||
)}
|
|
||||||
</Text>
|
|
||||||
<Text style={styles.questionAnswer}>
|
|
||||||
{" "}
|
|
||||||
{values.caseObj
|
|
||||||
.pinswg_languagepreference ==
|
|
||||||
"846040000"
|
|
||||||
? locale == "cy"
|
|
||||||
? "Saesneg"
|
|
||||||
: "English"
|
|
||||||
: locale == "cy"
|
|
||||||
? "Cymraeg"
|
|
||||||
: "Welsh"}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
{values.caseObj.pinswg_appellantagent !=
|
{values.caseObj.pinswg_appellantagent !=
|
||||||
"846040000" && (
|
"846040000" && (
|
||||||
<>
|
<>
|
||||||
@@ -614,43 +582,13 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
styles.questionAnswer
|
styles.questionAnswer
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
{" "}
|
||||||
{
|
{
|
||||||
values.caseObj
|
values.caseObj
|
||||||
.pinswg_agentphonenumber
|
.pinswg_agentphonenumber
|
||||||
}
|
}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View
|
|
||||||
wrap={false}
|
|
||||||
style={{
|
|
||||||
flexDirection: "row",
|
|
||||||
marginBottom: 10
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text
|
|
||||||
style={styles.questionText}
|
|
||||||
>
|
|
||||||
{getTrans(
|
|
||||||
locale,
|
|
||||||
"pdf-case-details-agent-label-6"
|
|
||||||
)}
|
|
||||||
</Text>
|
|
||||||
<Text
|
|
||||||
style={
|
|
||||||
styles.questionAnswer
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{values.caseObj
|
|
||||||
.pinswg_agentlanguagepreference ==
|
|
||||||
"846040000"
|
|
||||||
? locale == "cy"
|
|
||||||
? "Saesneg"
|
|
||||||
: "English"
|
|
||||||
: locale == "cy"
|
|
||||||
? "Cymraeg"
|
|
||||||
: "Welsh"}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<View
|
<View
|
||||||
@@ -667,12 +605,10 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswer}>
|
<Text style={styles.questionAnswer}>
|
||||||
{resolveCrmDisplayValue({
|
{values.caseObj.pinswg_lpaname ||
|
||||||
value: values.caseObj
|
values.caseObj[
|
||||||
.pinswg_lpaname,
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
locale,
|
]}
|
||||||
translations: transLookup
|
|
||||||
})}
|
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
{/* <View
|
{/* <View
|
||||||
@@ -693,6 +629,27 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
: "Post"}
|
: "Post"}
|
||||||
</Text>
|
</Text>
|
||||||
</View> */}
|
</View> */}
|
||||||
|
<View
|
||||||
|
wrap={false}
|
||||||
|
style={{
|
||||||
|
flexDirection: "row",
|
||||||
|
marginBottom: 10
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={styles.questionText}>
|
||||||
|
{getTrans(
|
||||||
|
locale,
|
||||||
|
"pdf-case-details-label-8"
|
||||||
|
)}
|
||||||
|
</Text>
|
||||||
|
<Text style={styles.questionAnswer}>
|
||||||
|
{values.caseObj
|
||||||
|
.pinswg_contactprefs ==
|
||||||
|
"846040000"
|
||||||
|
? "English"
|
||||||
|
: "Welsh"}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
setWatchedCasesDetails
|
setWatchedCasesDetails
|
||||||
} from "../../store/watchedCases/action";
|
} from "../../store/watchedCases/action";
|
||||||
|
|
||||||
import { getDetailsProxy, hasOwn } from "../utils";
|
import { getDetailsProxy } from "../utils";
|
||||||
import PaginationControl from "./pagination";
|
import PaginationControl from "./pagination";
|
||||||
|
|
||||||
import { signIn, useSession } from "next-auth/react";
|
import { signIn, useSession } from "next-auth/react";
|
||||||
@@ -29,7 +29,6 @@ import {
|
|||||||
deleteWatchedCases,
|
deleteWatchedCases,
|
||||||
getWatchedCasesProxy
|
getWatchedCasesProxy
|
||||||
} from "../../actions/services/portalService";
|
} from "../../actions/services/portalService";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import RepsOnResults from "./repsonresults";
|
import RepsOnResults from "./repsonresults";
|
||||||
import LiveLink from "./liveLink";
|
import LiveLink from "./liveLink";
|
||||||
|
|
||||||
@@ -411,7 +410,7 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_projectlocation"
|
"pinswg_projectlocation"
|
||||||
)
|
)
|
||||||
@@ -434,7 +433,7 @@ const SearchResults = (props) => {
|
|||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
@@ -443,7 +442,7 @@ const SearchResults = (props) => {
|
|||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline1"
|
"pinswg_addressline1"
|
||||||
)
|
)
|
||||||
@@ -454,19 +453,19 @@ const SearchResults = (props) => {
|
|||||||
: ""}
|
: ""}
|
||||||
{/* {detailsObj.pinswg_siteaddressline1 !=
|
{/* {detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />} */}
|
null && <br />} */}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline1 !=
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline1"
|
"pinswg_addressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addressline1 !=
|
detailsObj.pinswg_addressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
@@ -475,7 +474,7 @@ const SearchResults = (props) => {
|
|||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline1"
|
"pinswg_addressline1"
|
||||||
)
|
)
|
||||||
@@ -484,19 +483,19 @@ const SearchResults = (props) => {
|
|||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline2"
|
"pinswg_siteaddressline2"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline2 !=
|
detailsObj.pinswg_siteaddressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addressline2"
|
"pinswg_addressline2"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addressline2 !=
|
detailsObj.pinswg_addressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
)
|
)
|
||||||
@@ -505,28 +504,25 @@ const SearchResults = (props) => {
|
|||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(detailsObj, "pinswg_addresstown")
|
||||||
detailsObj,
|
|
||||||
"pinswg_addresstown"
|
|
||||||
)
|
|
||||||
? highlightText(
|
? highlightText(
|
||||||
detailsObj.pinswg_addresstown,
|
detailsObj.pinswg_addresstown,
|
||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresstown !=
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresstown"
|
"pinswg_addresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addresstown !=
|
detailsObj.pinswg_addresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
)
|
)
|
||||||
@@ -535,7 +531,7 @@ const SearchResults = (props) => {
|
|||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresscounty"
|
"pinswg_addresscounty"
|
||||||
)
|
)
|
||||||
@@ -544,19 +540,19 @@ const SearchResults = (props) => {
|
|||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresscounty !=
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_addresscounty"
|
"pinswg_addresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_addresscounty !=
|
detailsObj.pinswg_addresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresspostcode"
|
"pinswg_siteaddresspostcode"
|
||||||
)
|
)
|
||||||
@@ -565,7 +561,7 @@ const SearchResults = (props) => {
|
|||||||
highlightQuery
|
highlightQuery
|
||||||
)
|
)
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(detailsObj, "pinswg_postcode")
|
{_.has(detailsObj, "pinswg_postcode")
|
||||||
? highlightText(
|
? highlightText(
|
||||||
detailsObj.pinswg_postcode,
|
detailsObj.pinswg_postcode,
|
||||||
highlightQuery
|
highlightQuery
|
||||||
@@ -579,10 +575,9 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(detailsObj, [
|
||||||
detailsObj,
|
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)
|
])
|
||||||
? detailsObj[
|
? detailsObj[
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
@@ -595,31 +590,41 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(item, [
|
||||||
item,
|
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)
|
])
|
||||||
? resolveCrmDisplayValue({
|
? router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})
|
})
|
||||||
|
: item[
|
||||||
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(item, [
|
||||||
item,
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)
|
])
|
||||||
? resolveCrmDisplayValue({
|
? router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})
|
})
|
||||||
|
: item[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"
|
||||||
: ""}
|
: ""}
|
||||||
{item?.pinswg_lpareference && (
|
{item?.pinswg_lpareference && (
|
||||||
<>
|
<>
|
||||||
@@ -642,12 +647,19 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item["pinswg_appealType"],
|
? jsonpath({
|
||||||
locale: router.locale,
|
path:
|
||||||
translations: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
fallbackValue: "N/A"
|
item[
|
||||||
})}
|
"pinswg_appealType"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: item["pinswg_appealType"] ||
|
||||||
|
"N/A"}
|
||||||
</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">
|
||||||
@@ -657,14 +669,20 @@ const SearchResults = (props) => {
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: item[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"}
|
||||||
</dd>
|
</dd>
|
||||||
{myportal == true && (
|
{myportal == true && (
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -6,7 +7,6 @@ import { useEffect, useState } from "react";
|
|||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
|
|
||||||
import { getCaseStatus } from "../../actions/services/caseDirectService";
|
import { getCaseStatus } from "../../actions/services/caseDirectService";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
const required = (errorMsg) => (value) =>
|
const required = (errorMsg) => (value) =>
|
||||||
value || typeof value === "number" ? undefined : errorMsg;
|
value || typeof value === "number" ? undefined : errorMsg;
|
||||||
@@ -282,11 +282,22 @@ let AdvancedSearch = (props) => {
|
|||||||
key={key}
|
key={key}
|
||||||
value={optionsObj[key].accountid}
|
value={optionsObj[key].accountid}
|
||||||
>
|
>
|
||||||
{resolveCrmDisplayValue({
|
{/* {optionsObj[key].name} */}
|
||||||
value: optionsObj[key].name,
|
|
||||||
locale,
|
{router.locale == "cy"
|
||||||
translations: transLookup
|
? jsonpath({
|
||||||
})}
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
optionsObj[key]
|
||||||
|
.name +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: optionsObj[key].name ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -372,11 +383,31 @@ let AdvancedSearch = (props) => {
|
|||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{resolveCrmDisplayValue({
|
{_.isEmpty(optionsObj[key])
|
||||||
value: optionsObj[key].value,
|
? ""
|
||||||
locale,
|
: _.isEmpty(optionsObj[key])
|
||||||
translations: transLookup
|
? ""
|
||||||
})}
|
: _.isEmpty(
|
||||||
|
optionsObj[key]
|
||||||
|
.value
|
||||||
|
)
|
||||||
|
? ""
|
||||||
|
: router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
optionsObj[
|
||||||
|
key
|
||||||
|
].value +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: optionsObj[key]
|
||||||
|
.value ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -425,42 +456,64 @@ let AdvancedSearch = (props) => {
|
|||||||
className="govuk-select"
|
className="govuk-select"
|
||||||
id={id}
|
id={id}
|
||||||
name={name}
|
name={name}
|
||||||
|
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||||
>
|
>
|
||||||
<option value="" disabled defaultValue>
|
<option value="" disabled defaultValue>
|
||||||
{t("common:drop-down-select")}
|
{t("common:drop-down-select")}
|
||||||
</option>
|
</option>
|
||||||
|
{_.isEmpty(optionsObj)
|
||||||
{Object.keys(optionsObj || {}).map((key) => {
|
? ""
|
||||||
const option = optionsObj[key];
|
: Object.keys(optionsObj).map((key, index) => {
|
||||||
const projectTypeId =
|
|
||||||
option?.pinswg_sipsprojecttypeid;
|
|
||||||
const projectName = option?.pinswg_name;
|
|
||||||
|
|
||||||
const cleanProjectName = projectName
|
|
||||||
? projectName
|
|
||||||
.replace(
|
|
||||||
/(\band|[\s\-\+\(\),&])/g,
|
|
||||||
""
|
|
||||||
)
|
|
||||||
.toLowerCase()
|
|
||||||
: "";
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<option
|
<option
|
||||||
key={key}
|
key={key}
|
||||||
value={
|
value={
|
||||||
projectTypeId && projectName
|
_.isEmpty(optionsObj[key])
|
||||||
? `${projectTypeId},${cleanProjectName}`
|
? ""
|
||||||
: ""
|
: _.isEmpty(
|
||||||
|
optionsObj[key]
|
||||||
|
)
|
||||||
|
? ""
|
||||||
|
: _.isEmpty(
|
||||||
|
optionsObj[key]
|
||||||
|
.pinswg_sipsprojecttypeid
|
||||||
|
)
|
||||||
|
? ""
|
||||||
|
: optionsObj[key]
|
||||||
|
.pinswg_sipsprojecttypeid +
|
||||||
|
"," +
|
||||||
|
optionsObj[
|
||||||
|
key
|
||||||
|
].pinswg_name
|
||||||
|
.replace(
|
||||||
|
/(\band|[\s\-\+\(\)\,\&])/g,
|
||||||
|
""
|
||||||
|
)
|
||||||
|
.toLowerCase()
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{projectName
|
{_.isEmpty(optionsObj[key])
|
||||||
? resolveCrmDisplayValue({
|
? ""
|
||||||
value: projectName,
|
: _.isEmpty(optionsObj[key])
|
||||||
locale,
|
? ""
|
||||||
translations: transLookup
|
: _.isEmpty(
|
||||||
})
|
optionsObj[key]
|
||||||
: t(
|
.pinswg_name
|
||||||
|
)
|
||||||
|
? ""
|
||||||
|
: router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
optionsObj[
|
||||||
|
key
|
||||||
|
]
|
||||||
|
.pinswg_name +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
|
)
|
||||||
|
: optionsObj[key]
|
||||||
|
.pinswg_name ||
|
||||||
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
</option>
|
</option>
|
||||||
@@ -542,6 +595,7 @@ let AdvancedSearch = (props) => {
|
|||||||
{t("search:search-title-label")}
|
{t("search:search-title-label")}
|
||||||
</h1>
|
</h1>
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<Field
|
<Field
|
||||||
validate={[
|
validate={[
|
||||||
minLength(
|
minLength(
|
||||||
@@ -566,6 +620,7 @@ let AdvancedSearch = (props) => {
|
|||||||
"myportal:searchcases-card-search-example-label-2"
|
"myportal:searchcases-card-search-example-label-2"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Field
|
<Field
|
||||||
validate={[
|
validate={[
|
||||||
minLength(
|
minLength(
|
||||||
@@ -590,6 +645,7 @@ let AdvancedSearch = (props) => {
|
|||||||
"myportal:searchcases-card-search-example-label-2"
|
"myportal:searchcases-card-search-example-label-2"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Field
|
<Field
|
||||||
name="appealTypes"
|
name="appealTypes"
|
||||||
id="appealTypes"
|
id="appealTypes"
|
||||||
@@ -599,6 +655,7 @@ let AdvancedSearch = (props) => {
|
|||||||
label={t("search:appealtype-label")}
|
label={t("search:appealtype-label")}
|
||||||
errormsg="Appeal type is required"
|
errormsg="Appeal type is required"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{props.appealTypesValue?.split(
|
{props.appealTypesValue?.split(
|
||||||
","
|
","
|
||||||
)[0] === "846040002" && (
|
)[0] === "846040002" && (
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -22,7 +23,6 @@ import {
|
|||||||
deleteWatchedCases,
|
deleteWatchedCases,
|
||||||
getWatchedCasesProxy
|
getWatchedCasesProxy
|
||||||
} from "../../actions/services/portalService";
|
} from "../../actions/services/portalService";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
import {
|
import {
|
||||||
setCurrentPage,
|
setCurrentPage,
|
||||||
setCurrentReference
|
setCurrentReference
|
||||||
@@ -35,7 +35,7 @@ import {
|
|||||||
setWatchedCases,
|
setWatchedCases,
|
||||||
setWatchedCasesDetails
|
setWatchedCasesDetails
|
||||||
} from "../../store/watchedCases/action";
|
} from "../../store/watchedCases/action";
|
||||||
import { getDetailsProxy, getSearchDetailsPaged, hasOwn } from "../utils";
|
import { getDetailsProxy, getSearchDetailsPaged } from "../utils";
|
||||||
import { signIn, useSession } from "next-auth/react";
|
import { signIn, useSession } from "next-auth/react";
|
||||||
|
|
||||||
const DNSSearchResults = (props) => {
|
const DNSSearchResults = (props) => {
|
||||||
@@ -53,8 +53,7 @@ const DNSSearchResults = (props) => {
|
|||||||
setWatchedCases,
|
setWatchedCases,
|
||||||
setWatchedCasesDetails,
|
setWatchedCasesDetails,
|
||||||
showMap,
|
showMap,
|
||||||
showLoginCheck,
|
showLoginCheck
|
||||||
mapTarget
|
|
||||||
} = props;
|
} = props;
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
@@ -66,11 +65,87 @@ const DNSSearchResults = (props) => {
|
|||||||
|
|
||||||
const [searchLoaded, setSearchLoaded] = useState(false);
|
const [searchLoaded, setSearchLoaded] = useState(false);
|
||||||
const [showSpinnerState, setShowSpinnerState] = useState(false);
|
const [showSpinnerState, setShowSpinnerState] = useState(false);
|
||||||
const [isMapExpanded, setIsMapExpanded] = useState(false);
|
|
||||||
|
|
||||||
const mapLegend = mapTarget.replaceAll("-", "_");
|
// let dataArray = [];
|
||||||
|
// //push your Json Data in the array
|
||||||
|
// if (showMap == "true") {
|
||||||
|
// dnsCoords.map((item) => {
|
||||||
|
// let point = new OSPoint(
|
||||||
|
// item.pinswg_anticipatedgridrefnorthing ||
|
||||||
|
// item.pinswg_anticipatedgridreferencenorthingtext ||
|
||||||
|
// 0,
|
||||||
|
// item.pinswg_anticipatedgridrefeasting ||
|
||||||
|
// item.pinswg_anticipatedgridreferenceeastingtext ||
|
||||||
|
// 0
|
||||||
|
// );
|
||||||
|
// let siteCoords = point.toOSGB36();
|
||||||
|
// //console.log(siteCoords);
|
||||||
|
// //console.log(item);
|
||||||
|
// dataArray.push({
|
||||||
|
// appellant:
|
||||||
|
// item[
|
||||||
|
// "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
// ],
|
||||||
|
// name: item.pinswg_projectname,
|
||||||
|
// lat: parseFloat(siteCoords.latitude),
|
||||||
|
// lng: parseFloat(siteCoords.longitude),
|
||||||
|
// title: item.pinswg_name,
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
console.log(mapLegend);
|
//console.log(dataArray);
|
||||||
|
|
||||||
|
// const ModelsMap = (map, maps) => {
|
||||||
|
// //instantiate array that will hold your Json Data
|
||||||
|
// //console.log("here");
|
||||||
|
// var prev_infowindow = false;
|
||||||
|
// //Loop through the dataArray to create a marker per data using the coordinates in the json
|
||||||
|
// console.log(dataArray.length);
|
||||||
|
// for (let i = 0; i < dataArray.length; i++) {
|
||||||
|
// const infowindow = new google.maps.InfoWindow({
|
||||||
|
// content:
|
||||||
|
// "<div>" +
|
||||||
|
// (_.isEmpty(dataArray[i].name)
|
||||||
|
// ? ""
|
||||||
|
// : dataArray[i].name.indexOf(";") > 0
|
||||||
|
// ? router.locale == "cy"
|
||||||
|
// ? dataArray[i].name.split(";")[1]
|
||||||
|
// : dataArray[i].name.split(";")[0]
|
||||||
|
// : dataArray[i].name) +
|
||||||
|
// "</div>" +
|
||||||
|
// (dataArray[i].appellant != null
|
||||||
|
// ? "<div>" + dataArray[i].appellant + "</div>"
|
||||||
|
// : "") +
|
||||||
|
// "<div>" +
|
||||||
|
// dataArray[i].title +
|
||||||
|
// "</div>",
|
||||||
|
// });
|
||||||
|
// let marker = new maps.Marker({
|
||||||
|
// position: { lat: dataArray[i].lat, lng: dataArray[i].lng },
|
||||||
|
// title: _.isEmpty(dataArray[i].name)
|
||||||
|
// ? ""
|
||||||
|
// : dataArray[i].name.indexOf(";") > 0
|
||||||
|
// ? router.locale == "cy"
|
||||||
|
// ? dataArray[i].name.split(";")[1]
|
||||||
|
// : dataArray[i].name.split(";")[0]
|
||||||
|
// : dataArray[i].name,
|
||||||
|
// map,
|
||||||
|
// });
|
||||||
|
// marker.addListener("click", () => {
|
||||||
|
// if (prev_infowindow) {
|
||||||
|
// prev_infowindow.close();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// prev_infowindow = infowindow;
|
||||||
|
// infowindow.open({
|
||||||
|
// anchor: marker,
|
||||||
|
// map,
|
||||||
|
// shouldFocus: true,
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
let spinnerState = () => {
|
let spinnerState = () => {
|
||||||
showSpinnerState == true
|
showSpinnerState == true
|
||||||
@@ -318,14 +393,21 @@ const DNSSearchResults = (props) => {
|
|||||||
});
|
});
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
var appType = resolveCrmDisplayValue({
|
var appType =
|
||||||
value: item[
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
});
|
})
|
||||||
|
: item[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A";
|
||||||
|
|
||||||
appType =
|
appType =
|
||||||
appType ==
|
appType ==
|
||||||
@@ -345,8 +427,7 @@ const DNSSearchResults = (props) => {
|
|||||||
href={
|
href={
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? myportal == true
|
? myportal == true
|
||||||
? "/fymhorth/dns/" +
|
? "/fymhorth/dns"
|
||||||
item.ticketnumber
|
|
||||||
: "/dns/" +
|
: "/dns/" +
|
||||||
item.ticketnumber
|
item.ticketnumber
|
||||||
: myportal == true
|
: myportal == true
|
||||||
@@ -405,7 +486,7 @@ const DNSSearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_projectlocation"
|
"pinswg_projectlocation"
|
||||||
)
|
)
|
||||||
@@ -444,55 +525,55 @@ const DNSSearchResults = (props) => {
|
|||||||
: ""
|
: ""
|
||||||
: ""}
|
: ""}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddressline1
|
? detailsObj.pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline1 !=
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline2"
|
"pinswg_siteaddressline2"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline2"
|
"pinswg_siteaddressline2"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline2 !=
|
detailsObj.pinswg_siteaddressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresstown !=
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresscounty !=
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
@@ -506,10 +587,9 @@ const DNSSearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(detailsObj, [
|
||||||
detailsObj,
|
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)
|
])
|
||||||
? detailsObj[
|
? detailsObj[
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
@@ -522,18 +602,23 @@ const DNSSearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(detailsObj, [
|
||||||
detailsObj,
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)
|
])
|
||||||
? resolveCrmDisplayValue({
|
? router.locale == "cy"
|
||||||
value: detailsObj[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"
|
||||||
: ""}
|
: ""}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -543,14 +628,20 @@ const DNSSearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: item[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"}
|
||||||
</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">
|
||||||
@@ -816,30 +907,9 @@ const DNSSearchResults = (props) => {
|
|||||||
<>
|
<>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
{showMap == "true" && isMapExpanded && (
|
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<div className="map-container map-container--expanded">
|
|
||||||
<iframe
|
|
||||||
src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`}
|
|
||||||
width="100%"
|
|
||||||
height="600"
|
|
||||||
frameBorder="0"
|
|
||||||
title="Map"
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-link map-expand-link"
|
|
||||||
onClick={() => setIsMapExpanded(false)}
|
|
||||||
>
|
|
||||||
{t("dnsApplications:reduce-map-link")}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
showMap == "true" && !isMapExpanded
|
showMap == "true"
|
||||||
? "govuk-grid-column-one-half"
|
? "govuk-grid-column-one-half"
|
||||||
: "govuk-grid-column-two-thirds"
|
: "govuk-grid-column-two-thirds"
|
||||||
}
|
}
|
||||||
@@ -895,40 +965,50 @@ const DNSSearchResults = (props) => {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showMap == "true" && isMapExpanded && (
|
{showMap == "true" && (
|
||||||
<div>
|
|
||||||
<h3>Map Legend</h3>
|
|
||||||
<img
|
|
||||||
src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image/png&height=12&width=12&layer=geonode:${mapTarget}&style=&version=1.3.0&SLD_VERSION=1.1.0&LEGEND_OPTIONS=forceLabels:on&LANGUAGE=${locale}&SCALE=2000000&access_token=n3cRovjblNL1ND9bmzu6S9fupzg3wo`}
|
|
||||||
width="120%"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{showMap == "true" && !isMapExpanded && (
|
|
||||||
<div className="govuk-grid-column-one-half">
|
<div className="govuk-grid-column-one-half">
|
||||||
<div className="map-container">
|
<div
|
||||||
<iframe
|
// style={{
|
||||||
src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`}
|
// height: "45vh",
|
||||||
width="100%"
|
// width: "100%",
|
||||||
height="500"
|
// }}
|
||||||
frameBorder="0"
|
|
||||||
title="Map"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="button "
|
|
||||||
className="govuk-link map-expand-link mapSizeButton"
|
|
||||||
onClick={() => setIsMapExpanded(true)}
|
|
||||||
>
|
>
|
||||||
{t("dnsApplications:enlarge-map-link")}
|
{/* <GoogleMapReact
|
||||||
</button>
|
options={function (maps) {
|
||||||
|
return {
|
||||||
|
overviewMapControl: true,
|
||||||
|
mapTypeControl: true,
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
bootstrapURLKeys={{
|
||||||
|
key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||||
|
}}
|
||||||
|
defaultCenter={{
|
||||||
|
id: "",
|
||||||
|
lat: 52.412272,
|
||||||
|
lng: -3.437989,
|
||||||
|
}}
|
||||||
|
defaultZoom={7}
|
||||||
|
onGoogleApiLoaded={({ map, maps }) =>
|
||||||
|
ModelsMap(map, maps)
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
|
|
||||||
|
<iframe
|
||||||
|
src={
|
||||||
|
"https://datamap.gov.wales/maps/pedw-dev/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/"
|
||||||
|
}
|
||||||
|
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||||
|
width={"100%"}
|
||||||
|
style={{ maxHeight: "400px" }}
|
||||||
|
height={"500px"}
|
||||||
|
className={"mappingFrame"}
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{searchResultsObj["@odata.count"] > 5 && (
|
{searchResultsObj["@odata.count"] > 5 && (
|
||||||
<div id="recordCountSelect" className="govuk-grid-row">
|
<div id="recordCountSelect" className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import _ from "lodash";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import {
|
|
||||||
resolveRepresentationWindow,
|
|
||||||
isRepresentationWindowOpen,
|
|
||||||
isRepresentationWindowClosed,
|
|
||||||
canShowRepresentationButtonForAppealType,
|
|
||||||
canStartHouseholderRepresentation,
|
|
||||||
canStartCpoRepresentation
|
|
||||||
} from "../../lib/domain/representation-policy";
|
|
||||||
|
|
||||||
const RepsOnResults = (props) => {
|
const RepsOnResults = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -19,23 +12,33 @@ const RepsOnResults = (props) => {
|
|||||||
const specialistProcess =
|
const specialistProcess =
|
||||||
detailsObj?.pinswg_speacialistcaseprocess ||
|
detailsObj?.pinswg_speacialistcaseprocess ||
|
||||||
detailsObj?.pinswg_specialistcaseprocess;
|
detailsObj?.pinswg_specialistcaseprocess;
|
||||||
const representationWindow = resolveRepresentationWindow(detailsObj);
|
|
||||||
const hasOwn = (obj, key) =>
|
|
||||||
Object.prototype.hasOwnProperty.call(obj || {}, key);
|
|
||||||
|
|
||||||
function showRepButton(appealType) {
|
function showReps(startDate, endDate) {
|
||||||
appealType = Number(appealType);
|
let date = new Date();
|
||||||
if (!canShowRepresentationButtonForAppealType(appealType)) {
|
date = new Date(date.toDateString());
|
||||||
return false;
|
const start = new Date(startDate);
|
||||||
|
const end = new Date(endDate);
|
||||||
|
|
||||||
|
return date >= start && date <= end ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showRepButton(appealType) {
|
||||||
switch (appealType) {
|
switch (appealType) {
|
||||||
|
case 846040012:
|
||||||
|
case 846040013:
|
||||||
|
case 846040014:
|
||||||
|
//for ROW case 846040015:
|
||||||
|
case 846040020:
|
||||||
|
case 846040021:
|
||||||
|
case 846040023:
|
||||||
|
case 846040024:
|
||||||
|
return false;
|
||||||
case 846040004:
|
case 846040004:
|
||||||
return canStartHouseholderRepresentation(appealType, isLPA);
|
return isLPA ? true : false;
|
||||||
|
|
||||||
case 846040015:
|
case 846040015:
|
||||||
return specialistProcess == 846040001
|
return specialistProcess == 846040001
|
||||||
? isRepresentationWindowOpen(
|
? showReps(
|
||||||
detailsObj.pinswg_startdate,
|
detailsObj.pinswg_startdate,
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -52,13 +55,24 @@ const RepsOnResults = (props) => {
|
|||||||
return shouldShow;
|
return shouldShow;
|
||||||
|
|
||||||
case 846040019:
|
case 846040019:
|
||||||
return canStartCpoRepresentation(appealType, detailsObj);
|
return showReps(
|
||||||
|
detailsObj.pinswg_startdate,
|
||||||
|
detailsObj.pinswg_statementduedate
|
||||||
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showRepsEnded(startDate, endDate) {
|
||||||
|
let date = new Date();
|
||||||
|
date = new Date(date.toDateString());
|
||||||
|
const start = new Date(startDate);
|
||||||
|
const end = new Date(endDate);
|
||||||
|
return date > start && date > end ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
function formatDates(dateObj, showTime) {
|
function formatDates(dateObj, showTime) {
|
||||||
var dateObj = new Date(dateObj);
|
var dateObj = new Date(dateObj);
|
||||||
var dd = String(dateObj.getDate()).padStart(2, "0");
|
var dd = String(dateObj.getDate()).padStart(2, "0");
|
||||||
@@ -80,29 +94,45 @@ const RepsOnResults = (props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
{(hasOwn(detailsObj, "pinswg_startdate") ||
|
{(_.has(detailsObj, "pinswg_startdate") ||
|
||||||
hasOwn(detailsObj, "pinswg_startdates") ||
|
_.has(detailsObj, "pinswg_applicationacceptedasvalid") ||
|
||||||
hasOwn(detailsObj, "pinswg_applicationacceptedasvalid") ||
|
_.has(detailsObj, "pinswg_consultationopen")) &&
|
||||||
hasOwn(detailsObj, "pinswg_consultationopen")) &&
|
showReps(
|
||||||
((representationWindow.hasStartDate &&
|
detailsObj.pinswg_startdate ||
|
||||||
representationWindow.isOpen) ||
|
detailsObj.pinswg_applicationacceptedasvalid ||
|
||||||
isRepresentationWindowOpen(
|
|
||||||
detailsObj.pinswg_consultationopen,
|
detailsObj.pinswg_consultationopen,
|
||||||
|
detailsObj.pinswg_finalcommentsduedate ||
|
||||||
|
detailsObj.pinswg_endofrepresentationperiod ||
|
||||||
detailsObj.pinswg_consultationclose
|
detailsObj.pinswg_consultationclose
|
||||||
)) && (
|
) && (
|
||||||
<>
|
<>
|
||||||
{showRepButton(Number(appealType)) ? (
|
{showRepButton(detailsObj.appealType) ? (
|
||||||
|
<>
|
||||||
|
{/* <Link
|
||||||
|
href={{
|
||||||
|
pathname:
|
||||||
|
"/myportal/representation",
|
||||||
|
query: {
|
||||||
|
case: detailsObj.pinswg_name,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
className="govuk-button"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"case:summary-make-representation-label"
|
||||||
|
)}
|
||||||
|
</Link> */}
|
||||||
<div className="govuk-body govuk-!-font-size-14">
|
<div className="govuk-body govuk-!-font-size-14">
|
||||||
{appealType == 846040002
|
{appealType == 846040002
|
||||||
? t("case:summary-consultation-open-label")
|
? t(
|
||||||
|
"case:summary-consultation-open-label"
|
||||||
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-representation-open-label"
|
"case:summary-representation-open-label"
|
||||||
)}{" "}
|
)}{" "}
|
||||||
</div>
|
</div>
|
||||||
) : !canShowRepresentationButtonForAppealType(
|
</>
|
||||||
appealType
|
) : !isLPA && appealType == 846040004 ? (
|
||||||
) ||
|
|
||||||
(!isLPA && appealType == 846040004) ? (
|
|
||||||
""
|
""
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
@@ -146,10 +176,10 @@ const RepsOnResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}{" "}
|
)}{" "}
|
||||||
{hasOwn(detailsObj, "pinswg_startdate") &&
|
{_.has(detailsObj, "pinswg_startdate") &&
|
||||||
(detailsObj.pinswg_startdate != null ||
|
(detailsObj.pinswg_startdate != null ||
|
||||||
detailsObj.pinswg_finalcommentsduedate != null) &&
|
detailsObj.pinswg_finalcommentsduedate != null) &&
|
||||||
isRepresentationWindowClosed(
|
showRepsEnded(
|
||||||
detailsObj.pinswg_startdate,
|
detailsObj.pinswg_startdate,
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
) && (
|
) && (
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
import _ from "lodash";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -26,7 +27,7 @@ import {
|
|||||||
setWatchedCasesDetails
|
setWatchedCasesDetails
|
||||||
} from "../../store/watchedCases/action";
|
} from "../../store/watchedCases/action";
|
||||||
|
|
||||||
import { getDetailsProxy, getSearchDetailsPaged, hasOwn } from "../utils";
|
import { getDetailsProxy, getSearchDetailsPaged } from "../utils";
|
||||||
import PaginationControl from "./pagination";
|
import PaginationControl from "./pagination";
|
||||||
|
|
||||||
import { signIn, useSession } from "next-auth/react";
|
import { signIn, useSession } from "next-auth/react";
|
||||||
@@ -35,13 +36,11 @@ import {
|
|||||||
deleteWatchedCases,
|
deleteWatchedCases,
|
||||||
getWatchedCasesProxy
|
getWatchedCasesProxy
|
||||||
} from "../../actions/services/portalService";
|
} from "../../actions/services/portalService";
|
||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
|
||||||
|
|
||||||
import { sendGAEvent } from "@next/third-parties/google";
|
import { sendGAEvent } from "@next/third-parties/google";
|
||||||
import RepsOnResults from "./repsonresults";
|
import RepsOnResults from "./repsonresults";
|
||||||
import LiveLink from "./liveLink";
|
import LiveLink from "./liveLink";
|
||||||
import { query } from "jsonpath";
|
import { query } from "jsonpath";
|
||||||
import { splitWatchedCasesBySubmissionState } from "../../lib/domain/dashboard-policy/splitWatchedCasesBySubmissionState";
|
|
||||||
|
|
||||||
const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||||
|
|
||||||
@@ -221,9 +220,21 @@ const SearchResults = (props) => {
|
|||||||
getWatchedCasesProxy(
|
getWatchedCasesProxy(
|
||||||
props.accountDetails.loggedinUserId
|
props.accountDetails.loggedinUserId
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
data = splitWatchedCasesBySubmissionState(
|
let showWatchedCases = (submittedArr) => {
|
||||||
data.value
|
const required = submittedArr.value.filter((el) => {
|
||||||
).watchedCases;
|
return (
|
||||||
|
el.pinswg_representationsubmitted == null
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
let newObj = {};
|
||||||
|
return Object.assign(newObj, {
|
||||||
|
"@odata.count": required.length,
|
||||||
|
"value": required
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
data = showWatchedCases(data);
|
||||||
|
|
||||||
data.value.sort(function compare(a, b) {
|
data.value.sort(function compare(a, b) {
|
||||||
var dateA = new Date(a.createdon);
|
var dateA = new Date(a.createdon);
|
||||||
@@ -485,7 +496,7 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_projectlocation"
|
"pinswg_projectlocation"
|
||||||
)
|
)
|
||||||
@@ -521,7 +532,7 @@ const SearchResults = (props) => {
|
|||||||
// )[0]
|
// )[0]
|
||||||
// : ""
|
// : ""
|
||||||
""}
|
""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
@@ -531,52 +542,52 @@ const SearchResults = (props) => {
|
|||||||
{/* {detailsObj.pinswg_siteaddressline1 !=
|
{/* {detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />} */}
|
null && <br />} */}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline1 !=
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddressline2"
|
"pinswg_siteaddressline2"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddressline2 !=
|
detailsObj.pinswg_siteaddressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresstown !=
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
|
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
)
|
)
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
) &&
|
) &&
|
||||||
detailsObj.pinswg_siteaddresscounty !=
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{hasOwn(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_siteaddresspostcode"
|
"pinswg_siteaddresspostcode"
|
||||||
)
|
)
|
||||||
@@ -594,10 +605,9 @@ const SearchResults = (props) => {
|
|||||||
? item.pinswg_appellantfirstname +
|
? item.pinswg_appellantfirstname +
|
||||||
" " +
|
" " +
|
||||||
item.pinswg_appellantlastname
|
item.pinswg_appellantlastname
|
||||||
: hasOwn(
|
: _.has(detailsObj, [
|
||||||
detailsObj,
|
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)
|
])
|
||||||
? detailsObj[
|
? detailsObj[
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
@@ -610,18 +620,23 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{hasOwn(
|
{_.has(item, [
|
||||||
item,
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)
|
])
|
||||||
? resolveCrmDisplayValue({
|
? router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})
|
})
|
||||||
|
: item[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"
|
||||||
: ""}
|
: ""}
|
||||||
{item?.pinswg_lpareference && (
|
{item?.pinswg_lpareference && (
|
||||||
<>
|
<>
|
||||||
@@ -644,31 +659,20 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
] +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: item[
|
||||||
{detailsObj?.pinswg_specialistcaseprocess && (
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
<>
|
] || "N/A"}
|
||||||
<br /> <br />
|
|
||||||
<span>
|
|
||||||
{resolveCrmDisplayValue({
|
|
||||||
value: detailsObj[
|
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
|
||||||
],
|
|
||||||
locale: router.locale,
|
|
||||||
translations:
|
|
||||||
transLookup,
|
|
||||||
fallbackValue: "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">
|
||||||
@@ -678,14 +682,20 @@ const SearchResults = (props) => {
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{resolveCrmDisplayValue({
|
{router.locale == "cy"
|
||||||
value: item[
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
]?.trim(),
|
].trim() +
|
||||||
locale: router.locale,
|
'")].value_cy',
|
||||||
translations: transLookup,
|
json: transLookup,
|
||||||
fallbackValue: "N/A"
|
eval: true
|
||||||
})}
|
})
|
||||||
|
: item[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"}
|
||||||
</dd>
|
</dd>
|
||||||
{myportal == true && (
|
{myportal == true && (
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import CRMError from "./crmError";
|
import CRMError from "./crmError";
|
||||||
import SearchResults from "./search/searchresults";
|
import SearchResults from "./search/searchresults";
|
||||||
import { hasOwn } from "./utils";
|
|
||||||
|
|
||||||
export default function Search(props) {
|
export default function Search(props) {
|
||||||
const {
|
const {
|
||||||
@@ -13,14 +12,14 @@ export default function Search(props) {
|
|||||||
myportal,
|
myportal,
|
||||||
watchedCases,
|
watchedCases,
|
||||||
isLinkedCase,
|
isLinkedCase,
|
||||||
showLoginCheck
|
showLoginCheck,
|
||||||
} = props;
|
} = props;
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
var hasError = hasOwn(searchResultsObj.searchResultsObj, "errorCode")
|
var hasError = _.has(searchResultsObj.searchResultsObj, "errorCode")
|
||||||
? true
|
? true
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
|
|||||||
@@ -91,15 +91,15 @@ export const statusValues = [
|
|||||||
"value_cy": "Datganiadau",
|
"value_cy": "Datganiadau",
|
||||||
"statuscode": 846040010
|
"statuscode": 846040010
|
||||||
},
|
},
|
||||||
{ "value": "Reporting", "value_cy": "Adroddi", "statuscode": 846040008 },
|
{ "value": "Reporting", "value_cy": "Adrodd", "statuscode": 846040008 },
|
||||||
{
|
{
|
||||||
"value": "Waiting for Details",
|
"value": "Waiting for Details",
|
||||||
"value_cy": "Aros am fanylion",
|
"value_cy": "Aros am fanylion",
|
||||||
"statuscode": 3
|
"statuscode": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Ministerial decision",
|
"value": "Minister's Decision",
|
||||||
"value_cy": "Penderfyniad gweinidogol",
|
"value_cy": "Penderfyniad y Gweinidog",
|
||||||
"statuscode": 846040012
|
"statuscode": 846040012
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -235,8 +235,8 @@ export const statusValues = [
|
|||||||
},
|
},
|
||||||
{ "value": "Event", "value_cy": "Digwyddiad", "statuscode": 846040049 },
|
{ "value": "Event", "value_cy": "Digwyddiad", "statuscode": 846040049 },
|
||||||
{
|
{
|
||||||
"value": "Ministerial decision",
|
"value": "Minister's Decision",
|
||||||
"value_cy": "Penderfyniad gweinidogol",
|
"value_cy": "Penderfyniad y Gweinidog",
|
||||||
"statuscode": 846040050
|
"statuscode": 846040050
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -255,7 +255,7 @@ export const statusValues = [
|
|||||||
"statuscode": 846040053
|
"statuscode": 846040053
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Application Start / Case in Progress",
|
"value": "Appliation Start / Case in Progress",
|
||||||
"value_cy": "Cais wedi dechrau / achos ar y gweill",
|
"value_cy": "Cais wedi dechrau / achos ar y gweill",
|
||||||
"statuscode": 846040054
|
"statuscode": 846040054
|
||||||
},
|
},
|
||||||
@@ -283,15 +283,5 @@ export const statusValues = [
|
|||||||
"value": "Case Submitted",
|
"value": "Case Submitted",
|
||||||
"value_cy": "Achos wedi’i gyflwyno",
|
"value_cy": "Achos wedi’i gyflwyno",
|
||||||
"statuscode": 846040061
|
"statuscode": 846040061
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Problem Solved",
|
|
||||||
"value_cy": "Problem wedi'i Datrys",
|
|
||||||
"statuscode": 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Information Provided",
|
|
||||||
"value_cy": "Gwybodaeth a Ddarperir",
|
|
||||||
"statuscode": 1000
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
const translateLpaName = ({ name, locale, transLookup }) => {
|
const translateLpaName = ({ name, locale, transLookup }) => {
|
||||||
if (!name) return "";
|
if (!name) return "";
|
||||||
|
|
||||||
if (locale !== "cy") return name;
|
if (locale !== "cy") return name;
|
||||||
|
|
||||||
return resolveCrmDisplayValue({
|
return (
|
||||||
value: name,
|
jsonpath({
|
||||||
locale,
|
path: '$..[?(@ && @.value=="' + name + '")].value_cy',
|
||||||
translations: transLookup
|
json: transLookup,
|
||||||
});
|
eval: true
|
||||||
|
})?.[0] || name
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getCaseLpaNames = ({
|
export const getCaseLpaNames = ({
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user