Compare commits
480
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffae7df890 | ||
|
|
18ada0f9b1 | ||
|
|
6900d02f8c | ||
|
|
4b92f40018 | ||
|
|
0df0ad5faa | ||
|
|
7eda5ffd37 | ||
|
|
65f6b65613 | ||
|
|
26130d12d4 | ||
|
|
e2df26c935 | ||
|
|
3b65133ea0 | ||
|
|
d31002f0ed | ||
|
|
ffd6943aa1 | ||
|
|
17f516b797 | ||
|
|
46876cdff6 | ||
|
|
b4451dc7ee | ||
|
|
4cea869256 | ||
|
|
89f1691c8f | ||
|
|
5fc3b3867c | ||
|
|
a80fa87ea2 | ||
|
|
19ae9b9f63 | ||
|
|
40f7b92dc6 | ||
|
|
9c42fc64f0 | ||
|
|
1514eef343 | ||
|
|
5561e9f9bf | ||
|
|
e920ea681e | ||
|
|
e97f514c3f | ||
|
|
941e030b57 | ||
|
|
28eb95018a | ||
|
|
d0c56d1741 | ||
|
|
193da6af2f | ||
|
|
5dee64dfec | ||
|
|
f11aa09412 | ||
|
|
3d897e6b26 | ||
|
|
d6fd08a8ff | ||
|
|
f40514b4ea | ||
|
|
408dae0ca3 | ||
|
|
c14b0d0a40 | ||
|
|
cdf48a81a7 | ||
|
|
954e58ee3f | ||
|
|
6e764e9364 | ||
|
|
dedd23dfb1 | ||
|
|
1220131cfd | ||
|
|
3555688e39 | ||
|
|
c38da6c8d8 | ||
|
|
297a5dfc77 | ||
|
|
6c7eca581b | ||
|
|
8b244ffb94 | ||
|
|
089c225e4d | ||
|
|
0e33718c34 | ||
|
|
511713eede | ||
|
|
ff85f525a5 | ||
|
|
2cfb06db2a | ||
|
|
eb020b014d | ||
|
|
6354cabde0 | ||
|
|
f725c811b3 | ||
|
|
8e6b88984f | ||
|
|
e04f87323f | ||
|
|
ea1d530155 | ||
|
|
b72df06349 | ||
|
|
87812a6bf2 | ||
|
|
7aa7e2819a | ||
|
|
26070426e8 | ||
|
|
d85b59a25f | ||
|
|
0cf344ea85 | ||
|
|
deb7b12313 | ||
|
|
29abd0efd0 | ||
|
|
3877323b9b | ||
|
|
b4bec11fa0 | ||
|
|
afa81d8bd6 | ||
|
|
ae25ad4673 | ||
|
|
ae007d18ad | ||
|
|
2fb7895234 | ||
|
|
c738d2bde9 | ||
|
|
bfac0d1ff9 | ||
|
|
f0059eb949 | ||
|
|
50c2feaeba | ||
|
|
72ef0f7f40 | ||
|
|
dd0ed06732 | ||
|
|
48f24a6330 | ||
|
|
4fc0917b78 | ||
|
|
38f7853723 | ||
|
|
9dc135ef66 | ||
|
|
e961a1dff4 | ||
|
|
5ebffe74af | ||
|
|
f498d1a09e | ||
|
|
c0b23fff6c | ||
|
|
7f5fd90a17 | ||
|
|
8f9fd50f36 | ||
|
|
2e454290c7 | ||
|
|
eae42c3622 | ||
|
|
4bd1cf9744 | ||
|
|
0346b57d19 | ||
|
|
a33018d225 | ||
|
|
0f7a9c36df | ||
|
|
372e1bf7ce | ||
|
|
ad5c726b54 | ||
|
|
b6798fbfca | ||
|
|
43a194bf98 | ||
|
|
e7e7aac652 | ||
|
|
6269ab4c15 | ||
|
|
0433304faf | ||
|
|
0d91e75811 | ||
|
|
f586842b39 | ||
|
|
81fe090ce0 | ||
|
|
dabc5a0697 | ||
|
|
cf0c05ff6a | ||
|
|
35f19bd975 | ||
|
|
75467ca55a | ||
|
|
4841fc4984 | ||
|
|
d882e65071 | ||
|
|
2dc8a721ab | ||
|
|
420501dbf1 | ||
|
|
87f0dcd811 | ||
|
|
0c8f166410 | ||
|
|
c7c74b6250 | ||
|
|
a26313c798 | ||
|
|
854530e605 | ||
|
|
352f146952 | ||
|
|
05f791e6a8 | ||
|
|
e24fe83d0a | ||
|
|
7c5582f6c2 | ||
|
|
1caab59c05 | ||
|
|
8f1b2b63b4 | ||
|
|
99e2db34ae | ||
|
|
8f9652003e | ||
|
|
d6206ee2be | ||
|
|
cb8b7938f5 | ||
|
|
6543161bad | ||
|
|
59eaf80af3 | ||
|
|
34e964c56c | ||
|
|
1edf633aae | ||
|
|
13e598c60c | ||
|
|
2af5c712ab | ||
|
|
4ce6e82de5 | ||
|
|
c874bb4f59 | ||
|
|
ed077214bb | ||
|
|
ac1c127548 | ||
|
|
9a44e36ceb | ||
|
|
8a24852961 | ||
|
|
c14c86cdbd | ||
|
|
46bd30cd76 | ||
|
|
7d86ac0ca4 | ||
|
|
479f30b0a4 | ||
|
|
e6498c813d | ||
|
|
a5df22a486 | ||
|
|
b912f9ecb8 | ||
|
|
1a740bd78b | ||
|
|
cc0e830cf8 | ||
|
|
927cd70d75 | ||
|
|
0c11bd846b | ||
|
|
2c97986b19 | ||
|
|
8cca0db6e9 | ||
|
|
a09c458aed | ||
|
|
93f385e0b0 | ||
|
|
a3e7f5736e | ||
|
|
0ad58a59be | ||
|
|
5c829f1d26 | ||
|
|
1c65d49110 | ||
|
|
f72eaf484a | ||
|
|
8642608c64 | ||
|
|
a7fef58436 | ||
|
|
74774ddae0 | ||
|
|
a6cdec43e1 | ||
|
|
b50f94074b | ||
|
|
4d4d1fe995 | ||
|
|
11c9df9483 | ||
|
|
19a377f49f | ||
|
|
cd750a9228 | ||
|
|
98251d5da9 | ||
|
|
d01d83ecc4 | ||
|
|
626b2720ab | ||
|
|
837d7c68f7 | ||
|
|
f7af4d4bcc | ||
|
|
528c3284c6 | ||
|
|
68d03ed93d | ||
|
|
9eace1b626 | ||
|
|
34ce7f73a8 | ||
|
|
07f3769d84 | ||
|
|
f6fdc79ae3 | ||
|
|
ebed61f75f | ||
|
|
d9a18f008d | ||
|
|
c5f893f91c | ||
|
|
373a6c0d27 | ||
|
|
884c62ee46 | ||
|
|
73ebd12cd2 | ||
|
|
69ed539187 | ||
|
|
4ae78dec72 | ||
|
|
05b034c328 | ||
|
|
a458a12c6a | ||
|
|
bbc1e3f0a1 | ||
|
|
83fed387f3 | ||
|
|
1a276be54d | ||
|
|
422b3ce98c | ||
|
|
2c7823f911 | ||
|
|
fc63a2f279 | ||
|
|
f3902e4f9f | ||
|
|
bef329453a | ||
|
|
8d3d356815 | ||
|
|
baa1f7c4f3 | ||
|
|
804f3a6f66 | ||
|
|
49baec5814 | ||
|
|
ae5c0b4e39 | ||
|
|
e1444887cb | ||
|
|
9d6f9c6c49 | ||
|
|
b699f1d359 | ||
|
|
dec96c0546 | ||
|
|
7fad19452b | ||
|
|
1a102ab6cd | ||
|
|
202e1efd51 | ||
|
|
4d6ed2d38d | ||
|
|
f9df42f361 | ||
|
|
53515afc49 | ||
|
|
ae9ee1702d | ||
|
|
4bc4edf537 | ||
|
|
e23cdef338 | ||
|
|
130102ad30 | ||
|
|
608348910f | ||
|
|
ff83456d03 | ||
|
|
f765411992 | ||
|
|
4009fac494 | ||
|
|
1fe6f48c80 | ||
|
|
60f04787b6 | ||
|
|
37b2e1c734 | ||
|
|
5c9f4dd854 | ||
|
|
d048ca56bf | ||
|
|
bedaa79281 | ||
|
|
f2d02dc7d3 | ||
|
|
c20414b32b | ||
|
|
31366f40ca | ||
|
|
5cadd05364 | ||
|
|
c82732c46d | ||
|
|
2cde131324 | ||
|
|
1f6f5d31ca | ||
|
|
9a002d0bcc | ||
|
|
6dded01501 | ||
|
|
6fb4f5722a | ||
|
|
390758bfd3 | ||
|
|
f91cc1b953 | ||
|
|
933e30f626 | ||
|
|
69e61b35d7 | ||
|
|
2882330c5d | ||
|
|
8f94b2feb2 | ||
|
|
8341404e9c | ||
|
|
3ad21d2c82 | ||
|
|
8c6d3d84d2 | ||
|
|
9c0dd3069d | ||
|
|
dd72fb7a40 | ||
|
|
775cb4450a | ||
|
|
cf7654127b | ||
|
|
1537012ece | ||
|
|
7d1d34fc4f | ||
|
|
32a3542f79 | ||
|
|
89c7525ce9 | ||
|
|
5974886411 | ||
|
|
5708db003a | ||
|
|
1333533611 | ||
|
|
5dbde51f7f | ||
|
|
5b34cdeb1c | ||
|
|
ea334bf5ef | ||
|
|
28aec45270 | ||
|
|
51dddf8174 | ||
|
|
4badb52921 | ||
|
|
e6a1dbaa89 | ||
|
|
4fb4eaee5f | ||
|
|
d7850f92a0 | ||
|
|
34419733de | ||
|
|
e109c91b60 | ||
|
|
054e54cda3 | ||
|
|
e539b7054b | ||
|
|
9ab83efedc | ||
|
|
9980b83d34 | ||
|
|
cb39990cb1 | ||
|
|
06c4b6f5bc | ||
|
|
49e9be181b | ||
|
|
c9ef4ffabb | ||
|
|
e00d614067 | ||
|
|
bcb6afa6cc | ||
|
|
3fdb9e8c3a | ||
|
|
9ba2c523ba | ||
|
|
33ab93643d | ||
|
|
49418becf2 | ||
|
|
9c2519f2ce | ||
|
|
d0075d6112 | ||
|
|
72e1bfb3ad | ||
|
|
ab66b969b4 | ||
|
|
175500a2ce | ||
|
|
63e4e25aab | ||
|
|
232fd4685d | ||
|
|
9ffbe49777 | ||
|
|
681c89d50a | ||
|
|
665c4bbba5 | ||
|
|
59ae2db6c5 | ||
|
|
c0f59a9645 | ||
|
|
463d03f798 | ||
|
|
dc8cffad33 | ||
|
|
23255d496c | ||
|
|
e7e24fd299 | ||
|
|
df7599fca0 | ||
|
|
8ed6921804 | ||
|
|
8509450ac0 | ||
|
|
85f88eb074 | ||
|
|
42940ebaa6 | ||
|
|
31026ffda6 | ||
|
|
61e74a5da8 | ||
|
|
8b175b114d | ||
|
|
c627e100e1 | ||
|
|
adaae7b9b0 | ||
|
|
93634ca173 | ||
|
|
e80e4433a7 | ||
|
|
c0dfed60f9 | ||
|
|
df5ee1b2be | ||
|
|
e79579a2e2 | ||
|
|
0b541f8355 | ||
|
|
b18e98a2d4 | ||
|
|
48b7ab6298 | ||
|
|
f82ac6cd4c | ||
|
|
47f99bf65b | ||
|
|
c3fcfe60da | ||
|
|
b0cafb58be | ||
|
|
b1edb208c6 | ||
|
|
8f6f6f4084 | ||
|
|
9fc66fe054 | ||
|
|
086942df7a | ||
|
|
29d8090630 | ||
|
|
893136addc | ||
|
|
032748d4fe | ||
|
|
021cd9375c | ||
|
|
833eef7405 | ||
|
|
942f1aff9f | ||
|
|
e6c7ce7809 | ||
|
|
16190a6ecd | ||
|
|
b012049029 | ||
|
|
19910ec8fa | ||
|
|
554b25ebcd | ||
|
|
734f969546 | ||
|
|
29971a7bbb | ||
|
|
af959dc048 | ||
|
|
3eeeab6379 | ||
|
|
8e6296e4b1 | ||
|
|
fd5d01bc03 | ||
|
|
f1ec5ac762 | ||
|
|
b213fdc27a | ||
|
|
1502880b6d | ||
|
|
81c074245f | ||
|
|
714470faaa | ||
|
|
e0a96d94ea | ||
|
|
223c35e426 | ||
|
|
b79e21c419 | ||
|
|
5e1ffd3067 | ||
|
|
a5e485032e | ||
|
|
bcdb777551 | ||
|
|
ccf5c01721 | ||
|
|
639894da79 | ||
|
|
b785e068db | ||
|
|
e86fdad660 | ||
|
|
32fa5be81a | ||
|
|
efb12a315b | ||
|
|
b133dca25a | ||
|
|
c204aeb43b | ||
|
|
79a2e769b0 | ||
|
|
b6147645b2 | ||
|
|
9a58417abd | ||
|
|
f6dae31b3a | ||
|
|
a1445d9629 | ||
|
|
37d60ac205 | ||
|
|
97cfeb562a | ||
|
|
54728d9565 | ||
|
|
ead00dda76 | ||
|
|
5549ed43ba | ||
|
|
8119f73408 | ||
|
|
10a507ada6 | ||
|
|
672810485d | ||
|
|
d8e668ff99 | ||
|
|
e608a3e55e | ||
|
|
bfd25b72f5 | ||
|
|
1590cd16f6 | ||
|
|
291dd09c14 | ||
|
|
7ec0607d6c | ||
|
|
d21102d7f6 | ||
|
|
414116aff8 | ||
|
|
247efa2ff3 | ||
|
|
beb5d6f809 | ||
|
|
32664f73e6 | ||
|
|
5f801c9d25 | ||
|
|
ecf7a5be71 | ||
|
|
dcb6171dc1 | ||
|
|
b2e1c01dea | ||
|
|
f44725ee5e | ||
|
|
3c0f2aae88 | ||
|
|
6424d5f688 | ||
|
|
bd76d8fc67 | ||
|
|
05190daf50 | ||
|
|
853c053567 | ||
|
|
3dd9a7586f | ||
|
|
9734bffee3 | ||
|
|
e8c3b172e9 | ||
|
|
b8be86fe5c | ||
|
|
19310b8145 | ||
|
|
8b349e7d3a | ||
|
|
253a5c4d37 | ||
|
|
57d8ffc4f3 | ||
|
|
b668f323fe | ||
|
|
47c2c68ed0 | ||
|
|
39a055e670 | ||
|
|
824d14d814 | ||
|
|
49d39e052e | ||
|
|
c7e13f84e7 | ||
|
|
984c7bbf06 | ||
|
|
499a1e9527 | ||
|
|
7c95f679ba | ||
|
|
f9310d655b | ||
|
|
b407ac21d0 | ||
|
|
92bfd320c8 | ||
|
|
f37290f489 | ||
|
|
5060932bd7 | ||
|
|
b2ce928a63 | ||
|
|
9c6354dc7d | ||
|
|
e7df3bbedd | ||
|
|
612fa44a86 | ||
|
|
54b6180c0d | ||
|
|
228cf35611 | ||
|
|
0f8fc932e7 | ||
|
|
202aa3cdb6 | ||
|
|
e918f20c03 | ||
|
|
d042c52f76 | ||
|
|
b98a310edc | ||
|
|
d7791a9ab9 | ||
|
|
209e49d721 | ||
|
|
b423bb0cea | ||
|
|
4c5602eed3 | ||
|
|
d5cee80859 | ||
|
|
7b6862c350 | ||
|
|
85f323d580 | ||
|
|
630ed8d32b | ||
|
|
8f84ae8d8a | ||
|
|
654a6c1171 | ||
|
|
a367cc0c88 | ||
|
|
c05b0b151c | ||
|
|
2dd40542e3 | ||
|
|
58b88b1620 | ||
|
|
94577fdec9 | ||
|
|
de123537db | ||
|
|
001b64d28f | ||
|
|
df15078d20 | ||
|
|
f910d6a530 | ||
|
|
ca52806ddc | ||
|
|
ba220192e5 | ||
|
|
9acc9437df | ||
|
|
0de6084b71 | ||
|
|
9ebcde3c45 | ||
|
|
75e117dd7f | ||
|
|
fd4784902b | ||
|
|
ce6dfc39a6 | ||
|
|
2e557c85b1 | ||
|
|
32f494783a | ||
|
|
e690bc6725 | ||
|
|
2c5323c9cf | ||
|
|
4bf10d97db | ||
|
|
aaf9b3e574 | ||
|
|
6eb53e113e | ||
|
|
7f95d361a9 | ||
|
|
61e645c963 | ||
|
|
379f238552 | ||
|
|
81fbf008ea | ||
|
|
02f8cd706c | ||
|
|
19f255111d | ||
|
|
25c63bc7f9 | ||
|
|
36829b7446 | ||
|
|
77b71577ad | ||
|
|
a752443ad9 | ||
|
|
b54b4459aa | ||
|
|
d901b18ed4 | ||
|
|
172acf0560 | ||
|
|
c869fdc6c4 | ||
|
|
c1180354e0 | ||
|
|
d187907802 | ||
|
|
cd918ef69c | ||
|
|
95b6137cbc | ||
|
|
f18a126eb0 | ||
|
|
2612b5e743 |
+71
-64
@@ -4,47 +4,49 @@ GRANT_TYPE = "client_credentials"
|
|||||||
|
|
||||||
HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
||||||
|
|
||||||
//CNR oauth CNR
|
# //CNR oauth CNR
|
||||||
CLIENT_ID = 3125ac03-91ac-46a7-a166-0086f0ed90b3
|
# CLIENT_ID = 3125ac03-91ac-46a7-a166-0086f0ed90b3
|
||||||
CLIENT_SECRET = bFq8Q~9VX5Ra3lKnGGIXsB.G6-ZGMx7LqyqXjdr4
|
# CLIENT_SECRET = bFq8Q~9VX5Ra3lKnGGIXsB.G6-ZGMx7LqyqXjdr4
|
||||||
RELAY_ROOT = https://ar-ns-lz-pedw-cnr-uks-01.servicebus.windows.net/ar-hc-lz-pedw-cnr-uks-01/
|
# RELAY_ROOT = https://ar-ns-lz-pedw-cnr-uks-01.servicebus.windows.net/ar-hc-lz-pedw-cnr-uks-01/
|
||||||
RELAYURI = "ar-ns-lz-pedw-cnr-uks-01.servicebus.windows.net"
|
# RELAYURI = "ar-ns-lz-pedw-cnr-uks-01.servicebus.windows.net"
|
||||||
RELAYPATH = "ar-hc-lz-pedw-cnr-uks-01"
|
# RELAYPATH = "ar-hc-lz-pedw-cnr-uks-01"
|
||||||
CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
# CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
||||||
|
|
||||||
//New Dev oauth ESNR
|
# //New Dev oauth ESNR
|
||||||
CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
# CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
||||||
CLIENT_SECRET = .Jf8Q~tKMObCJjhh_hy3J5AIctFrBalU4FS~tdxk
|
# CLIENT_SECRET = .Jf8Q~tKMObCJjhh_hy3J5AIctFrBalU4FS~tdxk
|
||||||
RELAY_ROOT = https://ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net/ar-hc-lz-pedw-dev-uks-01/
|
# RELAY_ROOT = https://ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net/ar-hc-lz-pedw-dev-uks-01/
|
||||||
RELAYURI = "ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net"
|
# RELAYURI = "ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net"
|
||||||
RELAYPATH = "ar-hc-lz-pedw-dev-uks-01"
|
# RELAYPATH = "ar-hc-lz-pedw-dev-uks-01"
|
||||||
CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
# CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
||||||
|
|
||||||
//New Test
|
# //New Test
|
||||||
CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
# CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
||||||
CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM
|
# CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM
|
||||||
RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/
|
# RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/
|
||||||
RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net"
|
# RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net"
|
||||||
RELAYPATH = "ar-hc-lz-pedw-test-uks-01"
|
# RELAYPATH = "ar-hc-lz-pedw-test-uks-01"
|
||||||
CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS"
|
# CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS"
|
||||||
|
|
||||||
//Preprod Oauth WGO
|
# //New PreProd
|
||||||
//CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
||||||
////CLIENT_SECRET = Ioo7Q~RJfhWsE45wPsuHm1CzRk1SppnNN3lZF
|
CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E
|
||||||
//CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E
|
RELAY_ROOT = https://ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-uks-01/
|
||||||
//RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/
|
RELAYURI = "ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net"
|
||||||
//RELAYURI = "pp-pedw-ns.servicebus.windows.net"
|
RELAYPATH = "ar-hc-lz-pedw-ppe-uks-01"
|
||||||
//RELAYPATH = "pp-pedw-hc"
|
# RELAY_ROOT = https://ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-ukw-01/
|
||||||
//CRMURL = "ppcrm2016.llc.gov.wales/PPPINSWales"
|
# 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"
|
||||||
|
|
||||||
//Prod Oauth WGO
|
|
||||||
//CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc
|
# //Prod Oauth WGO
|
||||||
////CLIENT_SECRET = mJN7Q~lFu.xFGa5KCc.zwIm_fJAWxajyQaFo~
|
# CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc
|
||||||
//CLIENT_SECRET = tFk8Q~E.R-HFjROTu1sRKqwb_ONzy05uPYoF6awR
|
# CLIENT_SECRET = tFk8Q~E.R-HFjROTu1sRKqwb_ONzy05uPYoF6awR
|
||||||
//RELAY_ROOT = https://prod-pedw-ns.servicebus.windows.net/prod-pedw-hc/
|
# RELAY_ROOT = https://prod-pedw-ns.servicebus.windows.net/prod-pedw-hc/
|
||||||
//RELAYURI = "prod-pedw-ns.servicebus.windows.net"
|
# RELAYURI = "prod-pedw-ns.servicebus.windows.net"
|
||||||
//RELAYPATH = "prod-pedw-hc"
|
# RELAYPATH = "prod-pedw-hc"
|
||||||
//CRMURL = "crm2016.llc.gov.wales/PEDW"
|
# CRMURL = "crm2016.llc.gov.wales/PEDW"
|
||||||
|
|
||||||
|
|
||||||
//GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
//GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||||
@@ -52,11 +54,12 @@ GOOGLE_TAG_MANAGER = G-GTWW3JT03Z
|
|||||||
SHOWLOGIN = true
|
SHOWLOGIN = true
|
||||||
SHOWREPRESENTATIONS = true
|
SHOWREPRESENTATIONS = true
|
||||||
SHOWFILEUPLOAD = "false"
|
SHOWFILEUPLOAD = "false"
|
||||||
SHOWMAPS = "false"
|
SHOWMAPS = false
|
||||||
API_ROOT = "http://localhost:3000"
|
API_ROOT = "http://localhost:3000"
|
||||||
CY_API_ROOT = "http://cymru.local:3000"
|
CY_API_ROOT = "http://cymru.local:3000"
|
||||||
I18N_DOMAIN = "cymru.local"
|
I18N_DOMAIN = "cymru.local"
|
||||||
DOCAPI_OFFLINE = "12:00:00,14:00:00"
|
DOCAPI_OFFLINE = "12:00:00,14:00:00"
|
||||||
|
SHOWFILTERDOCS = false
|
||||||
|
|
||||||
|
|
||||||
// Next Auth vars
|
// Next Auth vars
|
||||||
@@ -65,22 +68,17 @@ 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://pedw-dev-test-sql-svr.database.windows.net:1433;database=PEDWDev;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
# DATABASE_URL = sqlserver://pedw-dev-test-sql-svr.database.windows.net:1433;database=PEDWDev;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-dev-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
// Pre prod sql server
|
// Pre 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://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://pp-pedw-sql.database.windows.net:1433;database=PEDWPreProd;user=pp-pedw-ukw;password=jscw4+896w9YaiXruOA3mtpNkio1oUZxBZcFJ9Awdz4=;encrypt=true;trustservercertificate=false;hostnameincertificate=*.database.windows.net;logintimeout=30;authentication=SqlPassword
|
|
||||||
//DATABASE_URL = sqlserver://pp-pedw-sql.database.windows.net:1433;database=PEDWPreProd;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustservercertificate=false;hostnameincertificate=*.database.windows.net;logintimeout=30
|
|
||||||
//DATABASE_URL = sqlserver://pp-pedw-sql.privatelink.database.windows.net:1433;database=PEDWPreProd;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustservercertificate=false;hostnameincertificate=*.database.windows.net;logintimeout=30
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 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
|
||||||
|
|
||||||
|
|
||||||
SECRET = SuperSecret
|
SECRET = SuperSecret
|
||||||
@@ -98,33 +96,33 @@ AZURE_CLIENT_SECRET = $CLIENT_SECRET
|
|||||||
# 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 = 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
|
||||||
// preprod key
|
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwppeuks"
|
||||||
//AZURE_STORAGE_ACCOUNT_NAME = "pedwpp"
|
AZURE_STORAGE_ACCOUNT_KEY = B4GRKr+cA9b9mNM/GHFivzhzflJIZltG8bMmooXlYvGYySPAspTTHistAT30sHipnR+hh6dqUc9q+ASttAjPRQ==
|
||||||
//AZURE_STORAGE_ACCOUNT_KEY = koZ46STRqapSa2Dod8MLL6aju1eYLhhyJ6DXpCLMTnFLJvbDT6CHUv/jwr5U/Ta8a60MWzwToHQy+AStADO7sg==
|
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwppeuks.blob.core.windows.net
|
||||||
//AZURE_PEDW_STORAGE_ENDPOINT = https://pedwpp.blob.core.windows.net
|
|
||||||
|
|
||||||
|
|
||||||
// PROD key
|
// PROD key
|
||||||
//AZURE_STORAGE_ACCOUNT_NAME = "pedwprod"
|
# AZURE_STORAGE_ACCOUNT_NAME = "pedwprod"
|
||||||
//AZURE_STORAGE_ACCOUNT_KEY = koZ46STRqapSa2Dod8MLL6aju1eYLhhyJ6DXpCLMTnFLJvbDT6CHUv/jwr5U/Ta8a60MWzwToHQy+AStADO7sg==
|
# AZURE_STORAGE_ACCOUNT_KEY = koZ46STRqapSa2Dod8MLL6aju1eYLhhyJ6DXpCLMTnFLJvbDT6CHUv/jwr5U/Ta8a60MWzwToHQy+AStADO7sg==
|
||||||
//AZURE_PEDW_STORAGE_ENDPOINT = https://pedwprod.blob.core.windows.net
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://pedwprod.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
|
||||||
|
|
||||||
SHOW_DEBUG = true
|
SHOW_DEBUG = true
|
||||||
|
|
||||||
@@ -132,11 +130,20 @@ 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
|
||||||
|
|
||||||
|
|
||||||
// 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
|
||||||
|
|
||||||
// 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
|
||||||
|
|
||||||
|
|
||||||
|
HIDEERRORLOGS = false
|
||||||
+9
-2
@@ -16,8 +16,8 @@ yarn-error.log*
|
|||||||
.yarn
|
.yarn
|
||||||
|
|
||||||
#lock files
|
#lock files
|
||||||
yarn.lock
|
# yarn.lock
|
||||||
package-lock.json
|
# package-lock.json
|
||||||
|
|
||||||
tmp
|
tmp
|
||||||
|
|
||||||
@@ -32,3 +32,10 @@ docker*.yml
|
|||||||
|
|
||||||
pages/api/poll-queue.js
|
pages/api/poll-queue.js
|
||||||
pages/polling.js
|
pages/polling.js
|
||||||
|
|
||||||
|
# dev apis to no include
|
||||||
|
|
||||||
|
pages/api/endpoint/getaccounts_api.js
|
||||||
|
|
||||||
|
# certs
|
||||||
|
certificates/*
|
||||||
|
|||||||
+364
-91
@@ -1,8 +1,8 @@
|
|||||||
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 } from "../components/utils";
|
||||||
|
|
||||||
import { da } from "date-fns/locale";
|
|
||||||
const {
|
const {
|
||||||
ContainerClient,
|
ContainerClient,
|
||||||
BlockBlobClient,
|
BlockBlobClient,
|
||||||
@@ -178,45 +178,6 @@ export const getContainers = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getDocumentTypeFromFilename = (filename) => {
|
|
||||||
var doctypeCode = "000000";
|
|
||||||
|
|
||||||
if (filename.indexOf("_-_Statement_of_Case") > 0) doctypeCode = "000000";
|
|
||||||
else if (filename.indexOf("_-_Application_Form") > 0)
|
|
||||||
doctypeCode = "000001";
|
|
||||||
else if (filename.indexOf("_-_Site_Ownership_Certificate") > 0)
|
|
||||||
doctypeCode = "000002";
|
|
||||||
else if (filename.indexOf("_-_Decision_Notice") > 0) doctypeCode = "000003";
|
|
||||||
else if (filename.indexOf("_-_Site_Location_Plan") > 0)
|
|
||||||
doctypeCode = "000004";
|
|
||||||
else if (filename.indexOf("_-_Plans_Drawing_Documents") > 0)
|
|
||||||
doctypeCode = "000005";
|
|
||||||
else if (filename.indexOf("_-_Additional_Plans_Drawings_Documents") > 0)
|
|
||||||
doctypeCode = "000006";
|
|
||||||
else if (filename.indexOf("_-_Design_and_Access_Statement") > 0)
|
|
||||||
doctypeCode = "000007";
|
|
||||||
else if (filename.indexOf("_-_Green_Infrastructure_Statement") > 0)
|
|
||||||
doctypeCode = "000008";
|
|
||||||
else if (filename.indexOf("_-_LPA_Correspondence") > 0)
|
|
||||||
doctypeCode = "000009";
|
|
||||||
else if (filename.indexOf("_-_LPA_Original_Permission") > 0)
|
|
||||||
doctypeCode = "000010";
|
|
||||||
else if (filename.indexOf("_-_LPA's_Registration_Letter") > 0)
|
|
||||||
doctypeCode = "000010";
|
|
||||||
else if (filename.indexOf(+"_-_Environmental_Statement") > 0)
|
|
||||||
doctypeCode = "000012";
|
|
||||||
else if (filename.indexOf("_-_Cost_of_Application") > 0)
|
|
||||||
doctypeCode = "000013";
|
|
||||||
else if (filename.indexOf("_-_Other_Relevant_Material") > 0)
|
|
||||||
doctypeCode = "000014";
|
|
||||||
else if (
|
|
||||||
filename.indexOf("_-_S106_Agreement_or_Unilateral_Undertaking") > 0
|
|
||||||
)
|
|
||||||
doctypeCode = "000015";
|
|
||||||
|
|
||||||
return doctypeCode;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getBlobs = async (containerName, casefolderID) => {
|
export const getBlobs = async (containerName, casefolderID) => {
|
||||||
const containerToken = await createContainerSas(containerName);
|
const containerToken = await createContainerSas(containerName);
|
||||||
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
||||||
@@ -242,6 +203,7 @@ export const getBlobs = async (containerName, casefolderID) => {
|
|||||||
"caseObj": casefolderID + "/" + casefolderID + "_case.json",
|
"caseObj": casefolderID + "/" + casefolderID + "_case.json",
|
||||||
"isCurrentVersion": blob.isCurrentVersion,
|
"isCurrentVersion": blob.isCurrentVersion,
|
||||||
"contentLength": blob.properties.contentLength,
|
"contentLength": blob.properties.contentLength,
|
||||||
|
"size": blob.properties.contentLength,
|
||||||
"contentType": blob.contentType,
|
"contentType": blob.contentType,
|
||||||
"lastModified": blob.properties.lastModified,
|
"lastModified": blob.properties.lastModified,
|
||||||
"filepath":
|
"filepath":
|
||||||
@@ -380,11 +342,22 @@ export const createAppealPDFBlob = async (
|
|||||||
let month = repDate.getMonth() + 1;
|
let month = repDate.getMonth() + 1;
|
||||||
let year = repDate.getFullYear();
|
let year = repDate.getFullYear();
|
||||||
|
|
||||||
const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form";
|
const pdfFileName =
|
||||||
|
year +
|
||||||
|
"-" +
|
||||||
|
("0" + month).slice(-2) +
|
||||||
|
"-" +
|
||||||
|
("0" + day).slice(-2) +
|
||||||
|
"_-_Appeal_Form";
|
||||||
|
|
||||||
//console.log(content);
|
//console.log(content);
|
||||||
const blobName = caseID + "/files/" + pdfFileName + ".pdf";
|
const blobName = caseID + "/files/" + pdfFileName + ".pdf";
|
||||||
|
|
||||||
|
const uploadOptions = {
|
||||||
|
blockSize: 4 * 1024 * 1024, // 4 MiB max block size
|
||||||
|
concurrency: 2, // maximum number of parallel transfer workers
|
||||||
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
|
};
|
||||||
console.log("blobName:", blobName);
|
console.log("blobName:", blobName);
|
||||||
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
||||||
|
|
||||||
@@ -396,6 +369,8 @@ export const createAppealPDFBlob = async (
|
|||||||
containerid: containerName,
|
containerid: containerName,
|
||||||
caseID: caseID,
|
caseID: caseID,
|
||||||
blobType: "Appeal PDF",
|
blobType: "Appeal PDF",
|
||||||
|
documentLocationId: "846040000",
|
||||||
|
ishareLocation: "846040000",
|
||||||
};
|
};
|
||||||
|
|
||||||
//console.log("the tags:", tags);
|
//console.log("the tags:", tags);
|
||||||
@@ -426,6 +401,12 @@ export const createRepPDFBlob = async (
|
|||||||
//console.log(content);
|
//console.log(content);
|
||||||
const blobName = caseID + "/" + repName + "/files/" + repName + ".pdf";
|
const blobName = caseID + "/" + repName + "/files/" + repName + ".pdf";
|
||||||
|
|
||||||
|
const uploadOptions = {
|
||||||
|
blockSize: 4 * 1024 * 1024, // 4 MiB max block size
|
||||||
|
concurrency: 2, // maximum number of parallel transfer workers
|
||||||
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
|
};
|
||||||
|
|
||||||
console.log("blobName:", blobName);
|
console.log("blobName:", blobName);
|
||||||
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
||||||
|
|
||||||
@@ -441,13 +422,16 @@ export const createRepPDFBlob = async (
|
|||||||
: repName.indexOf("_Comments") > 0
|
: repName.indexOf("_Comments") > 0
|
||||||
? "846040003"
|
? "846040003"
|
||||||
: repName.indexOf("_Impact") > 0
|
: repName.indexOf("_Impact") > 0
|
||||||
? "846040001"
|
? "846040029"
|
||||||
|
: repName.indexOf("_Consultation_Response_") > 0
|
||||||
|
? "846040036"
|
||||||
: "846040002";
|
: "846040002";
|
||||||
|
|
||||||
const tags = {
|
const tags = {
|
||||||
containerid: containerName,
|
containerid: containerName,
|
||||||
caseID: caseID,
|
caseID: caseID,
|
||||||
blobType: "Representation PDF",
|
blobType: "Representation PDF",
|
||||||
|
documentLocationId: whichLocation,
|
||||||
ishareLocation: whichLocation,
|
ishareLocation: whichLocation,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -549,10 +533,128 @@ export const uploadFile = async (formContent, containerName, foldername) => {
|
|||||||
const containerClient = new ContainerClient(sasUrl);
|
const containerClient = new ContainerClient(sasUrl);
|
||||||
|
|
||||||
const files = formContent;
|
const files = formContent;
|
||||||
|
let blobResponseArr = [];
|
||||||
|
|
||||||
//console.log(...formContent);
|
//console.log(...formContent);
|
||||||
console.log("files...", files, Object.keys(files).length, foldername);
|
console.log("files...", files, Object.keys(files).length, foldername);
|
||||||
|
|
||||||
|
for (const prop in files) {
|
||||||
|
console.log(`files[${prop}] = ${files[prop][0].size}`);
|
||||||
|
const blobName = foldername + "/files/" + files[prop][0].fieldName;
|
||||||
|
|
||||||
|
console.log(blobName);
|
||||||
|
const blockBlobClient = containerClient.getBlockBlobClient(blobName);
|
||||||
|
const uploadBlobResponse = await blockBlobClient
|
||||||
|
.uploadFile(files[prop][0].path, files[prop].size)
|
||||||
|
.then((data) => {
|
||||||
|
console.log(
|
||||||
|
"////////////////////////\nfile name:",
|
||||||
|
files[prop][0].fieldName,
|
||||||
|
"\n////////////////////////////"
|
||||||
|
);
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
let whichLocation =
|
||||||
|
files[prop][0].fieldName.indexOf("_Statement_of_Case") >
|
||||||
|
0 ||
|
||||||
|
files[prop][0].fieldName.indexOf("_-_Statement_of_Case") >
|
||||||
|
0 ||
|
||||||
|
files[prop][0].fieldName.indexOf("_-_Application_Form") >
|
||||||
|
0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_Site_Ownership_Certificate"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf("_-_Decision_Notice") >
|
||||||
|
0 ||
|
||||||
|
files[prop][0].fieldName.indexOf("_-_Site_Location_Plan") >
|
||||||
|
0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_Plans_Drawing_Documents"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_Additional_Plans_Drawings_Documents"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_Design_and_Access_Statement"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_NSB_LPA_Additional_Documents"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf("_-_LPA_Correspondence") >
|
||||||
|
0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_LPA_Original_Permission"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_LPA's_Registration_Letter"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
+"_-_Environmental_Statement"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf("_-_Cost_of_Application") >
|
||||||
|
0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_Other_Relevant_Material"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_S106_Agreement_or_Unilateral_Undertaking" > 0
|
||||||
|
)
|
||||||
|
? "846040000"
|
||||||
|
: files[prop][0].fieldName.indexOf("_IP_") > 0
|
||||||
|
? "846040005"
|
||||||
|
: files[prop][0].fieldName.indexOf("_Statement_") > 0
|
||||||
|
? "846040002"
|
||||||
|
: files[prop][0].fieldName.indexOf("_Questionnaire_") >
|
||||||
|
0
|
||||||
|
? "846040001"
|
||||||
|
: files[prop][0].fieldName.indexOf("_Comments_") > 0
|
||||||
|
? "846040003"
|
||||||
|
: files[prop][0].fieldName.indexOf("_Impact_") > 0
|
||||||
|
? "846040001"
|
||||||
|
: files[prop][0].fieldName.indexOf(
|
||||||
|
"_Consultation_Response_"
|
||||||
|
) > 0
|
||||||
|
? "846040036"
|
||||||
|
: "846040000";
|
||||||
|
|
||||||
|
const tags = {
|
||||||
|
containerid: containerName,
|
||||||
|
caseID: foldername.split("/")[0],
|
||||||
|
documentType: files[prop][0].fieldName.split(".")[1],
|
||||||
|
blobType: "RepresentationFile",
|
||||||
|
documentLocationId: whichLocation,
|
||||||
|
ishareLocation: whichLocation,
|
||||||
|
};
|
||||||
|
const withTags = blockBlobClient.setTags(tags);
|
||||||
|
const withMeta = blockBlobClient.setMetadata(tags);
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
`Uploaded block blob ${files[prop][0].fieldName} successfully`
|
||||||
|
//uploadBlobResponse.requestId
|
||||||
|
);
|
||||||
|
|
||||||
|
blobResponseArr.push({ file: files[prop][0].fieldName });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return blobResponseArr;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const uploadSingleFile = async (
|
||||||
|
formContent,
|
||||||
|
containerName,
|
||||||
|
foldername
|
||||||
|
) => {
|
||||||
|
const containerToken = await createContainerSas(containerName);
|
||||||
|
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
||||||
|
const containerClient = new ContainerClient(sasUrl);
|
||||||
|
|
||||||
|
const files = formContent;
|
||||||
|
|
||||||
|
//console.log(...formContent);
|
||||||
|
console.log("files...", files, Object.keys(files).length, foldername);
|
||||||
|
let blobResponseArr = [];
|
||||||
|
|
||||||
for (const prop in files) {
|
for (const prop in files) {
|
||||||
console.log(`files[${prop}] = ${files[prop][0].size}`);
|
console.log(`files[${prop}] = ${files[prop][0].size}`);
|
||||||
const blobName = foldername + "/files/" + files[prop][0].fieldName;
|
const blobName = foldername + "/files/" + files[prop][0].fieldName;
|
||||||
@@ -562,6 +664,17 @@ export const uploadFile = async (formContent, containerName, foldername) => {
|
|||||||
const uploadBlobResponse = await blockBlobClient.uploadFile(
|
const uploadBlobResponse = await blockBlobClient.uploadFile(
|
||||||
files[prop][0].path,
|
files[prop][0].path,
|
||||||
files[prop].size
|
files[prop].size
|
||||||
|
// {
|
||||||
|
// blobHTTPHeaders: {
|
||||||
|
// blobContentType: "application/octet-stream",
|
||||||
|
// },
|
||||||
|
// onProgress: (progress) => {
|
||||||
|
// // Log upload progress, you can emit this back to the client
|
||||||
|
// console.log(
|
||||||
|
// `Progress: ${progress.loadedBytes} bytes uploaded`
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// }
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
@@ -570,49 +683,78 @@ export const uploadFile = async (formContent, containerName, foldername) => {
|
|||||||
"\n////////////////////////////"
|
"\n////////////////////////////"
|
||||||
);
|
);
|
||||||
|
|
||||||
let whichLocation =
|
// let whichLocation =
|
||||||
files[prop][0].fieldName.indexOf("_Statement_of_Case") > 0 ||
|
// files[prop][0].fieldName.indexOf("_Statement_of_Case") > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Statement_of_Case") > 0 ||
|
// files[prop][0].fieldName.indexOf("_-_Statement_of_Case") > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Application_Form") > 0 ||
|
// files[prop][0].fieldName.indexOf("_-_Application_Form") > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Site_Ownership_Certificate") >
|
// files[prop][0].fieldName.indexOf("_-_Site_Ownership_Certificate") >
|
||||||
0 ||
|
// 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Decision_Notice") > 0 ||
|
// files[prop][0].fieldName.indexOf("_-_Decision_Notice") > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Site_Location_Plan") > 0 ||
|
// files[prop][0].fieldName.indexOf("_-_Site_Location_Plan") > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Plans_Drawing_Documents") >
|
// files[prop][0].fieldName.indexOf("_-_Plans_Drawing_Documents") >
|
||||||
0 ||
|
// 0 ||
|
||||||
files[prop][0].fieldName.indexOf(
|
// files[prop][0].fieldName.indexOf(
|
||||||
"_-_Additional_Plans_Drawings_Documents"
|
// "_-_Additional_Plans_Drawings_Documents"
|
||||||
) > 0 ||
|
// ) > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Design_and_Access_Statement") >
|
// files[prop][0].fieldName.indexOf("_-_Design_and_Access_Statement") >
|
||||||
0 ||
|
// 0 ||
|
||||||
files[prop][0].fieldName.indexOf(
|
// files[prop][0].fieldName.indexOf(
|
||||||
"_-_Green_Infrastructure_Statement"
|
// "_-_NSB_LPA_Additional_Documents"
|
||||||
) > 0 ||
|
// ) > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_LPA_Correspondence") > 0 ||
|
// files[prop][0].fieldName.indexOf("_-_LPA_Correspondence") > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_LPA_Original_Permission") >
|
// files[prop][0].fieldName.indexOf("_-_LPA_Original_Permission") >
|
||||||
0 ||
|
// 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_LPA's_Registration_Letter") >
|
// files[prop][0].fieldName.indexOf("_-_LPA's_Registration_Letter") >
|
||||||
0 ||
|
// 0 ||
|
||||||
files[prop][0].fieldName.indexOf(+"_-_Environmental_Statement") >
|
// files[prop][0].fieldName.indexOf("_-_Environmental_Statement") >
|
||||||
0 ||
|
// 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Cost_of_Application") > 0 ||
|
// files[prop][0].fieldName.indexOf("_-_Cost_of_Application") > 0 ||
|
||||||
files[prop][0].fieldName.indexOf("_-_Other_Relevant_Material") >
|
// files[prop][0].fieldName.indexOf("_-_Other_Relevant_Material") >
|
||||||
0 ||
|
// 0 ||
|
||||||
files[prop][0].fieldName.indexOf(
|
// files[prop][0].fieldName.indexOf(
|
||||||
"_-_S106_Agreement_or_Unilateral_Undertaking" > 0
|
// "_-_S106_Agreement_or_Unilateral_Undertaking" > 0
|
||||||
)
|
// )
|
||||||
? "846040000"
|
// ? "846040000"
|
||||||
: files[prop][0].fieldName.indexOf("_IP_") > 0
|
// : files[prop][0].fieldName.indexOf("_IP_") > 0
|
||||||
? "846040005"
|
// ? "846040005"
|
||||||
: files[prop][0].fieldName.indexOf("_Statement_") > 0
|
// : files[prop][0].fieldName.indexOf("_Statement_") > 0
|
||||||
? "846040002"
|
// ? "846040002"
|
||||||
: files[prop][0].fieldName.indexOf("_Questionnaire_") > 0
|
// : files[prop][0].fieldName.indexOf("_Questionnaire_") > 0
|
||||||
? "846040001"
|
// ? "846040001"
|
||||||
: files[prop][0].fieldName.indexOf("_Comments_") > 0
|
// : files[prop][0].fieldName.indexOf("_Comments_") > 0
|
||||||
? "846040003"
|
// ? "846040003"
|
||||||
: files[prop][0].fieldName.indexOf("_Impact_") > 0
|
// : files[prop][0].fieldName.indexOf("_Impact_") > 0
|
||||||
? "846040001"
|
// ? "846040001"
|
||||||
: "846040000";
|
// : "846040000";
|
||||||
|
|
||||||
|
const fieldName = files[prop][0].fieldName;
|
||||||
|
|
||||||
|
// Define the patterns and corresponding values
|
||||||
|
const patternMapping = [
|
||||||
|
{
|
||||||
|
pattern:
|
||||||
|
/_Statement_of_Case|_-_Statement_of_Case|_-_Application_Form|_-_Site_Ownership_Certificate|_-_Decision_Notice|_-_Site_Location_Plan|_-_Plans_Drawing_Documents|_-_Additional_Plans_Drawings_Documents|_-_Design_and_Access_Statement|_-_NSB_LPA_Additional_Documents|_-_LPA_Correspondence|_-_LPA_Original_Permission|_-_LPA's_Registration_Letter|_-_Environmental_Statement|_-_Cost_of_Application|_-_Other_Relevant_Material|_-_S106_Agreement_or_Unilateral_Undertaking/,
|
||||||
|
value: "846040000",
|
||||||
|
},
|
||||||
|
{ pattern: /_IP_/, value: "846040005" },
|
||||||
|
{ pattern: /_Statement_/, value: "846040002" },
|
||||||
|
{ pattern: /_Questionnaire_/, value: "846040001" },
|
||||||
|
{ pattern: /_Comments_/, value: "846040003" },
|
||||||
|
{ pattern: /_Impact_/, value: "846040001" },
|
||||||
|
{ pattern: /_Consultation_Response_/, value: "846040036" },
|
||||||
|
];
|
||||||
|
|
||||||
|
// Find a matching pattern or fallback to default
|
||||||
|
let whichLocation = "846040000"; // Default value
|
||||||
|
|
||||||
|
for (const { pattern, value } of patternMapping) {
|
||||||
|
if (pattern.test(fieldName)) {
|
||||||
|
whichLocation = value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// return whichLocation;
|
||||||
|
|
||||||
const tags = {
|
const tags = {
|
||||||
containerid: containerName,
|
containerid: containerName,
|
||||||
@@ -620,6 +762,7 @@ export const uploadFile = async (formContent, containerName, foldername) => {
|
|||||||
documentType: files[prop][0].fieldName.split(".")[1],
|
documentType: files[prop][0].fieldName.split(".")[1],
|
||||||
blobType: "RepresentationFile",
|
blobType: "RepresentationFile",
|
||||||
ishareLocation: whichLocation,
|
ishareLocation: whichLocation,
|
||||||
|
documentLocationId: whichLocation,
|
||||||
};
|
};
|
||||||
const withTags = await blockBlobClient.setTags(tags);
|
const withTags = await blockBlobClient.setTags(tags);
|
||||||
const withMeta = await blockBlobClient.setMetadata(tags);
|
const withMeta = await blockBlobClient.setMetadata(tags);
|
||||||
@@ -628,7 +771,12 @@ export const uploadFile = async (formContent, containerName, foldername) => {
|
|||||||
`Uploaded block blob ${files[prop][0].fieldName} successfully`,
|
`Uploaded block blob ${files[prop][0].fieldName} successfully`,
|
||||||
uploadBlobResponse.requestId
|
uploadBlobResponse.requestId
|
||||||
);
|
);
|
||||||
|
|
||||||
|
blobResponseArr.push({ file: files[prop][0].fieldName });
|
||||||
|
// return uploadBlobResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return blobResponseArr;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const uploadRepFiles = async (
|
export const uploadRepFiles = async (
|
||||||
@@ -833,6 +981,26 @@ export const downloadProgressFile = async (
|
|||||||
return JSON.parse(downloaded.toString());
|
return JSON.parse(downloaded.toString());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const downloadCaseFile = async (
|
||||||
|
containerName,
|
||||||
|
blobName,
|
||||||
|
casefolderID
|
||||||
|
) => {
|
||||||
|
console.log(containerName, blobName);
|
||||||
|
|
||||||
|
const containerToken = await createContainerSas(containerName);
|
||||||
|
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
||||||
|
const containerClient = new ContainerClient(sasUrl);
|
||||||
|
const blobClient = containerClient.getBlobClient(blobName);
|
||||||
|
const downloadedBlob = await blobClient.download();
|
||||||
|
|
||||||
|
const downloaded = await streamToBuffer(downloadedBlob.readableStreamBody);
|
||||||
|
|
||||||
|
//console.log("Downloaded blob content:", downloaded.toString());
|
||||||
|
|
||||||
|
return JSON.parse(downloaded.toString());
|
||||||
|
};
|
||||||
|
|
||||||
export const downloadAllProgressFiles = async (
|
export const downloadAllProgressFiles = async (
|
||||||
containerName,
|
containerName,
|
||||||
progressBlobObj
|
progressBlobObj
|
||||||
@@ -872,11 +1040,17 @@ export const downloadAllProgressFiles = async (
|
|||||||
blobClient = containerClient.getBlobClient(
|
blobClient = containerClient.getBlobClient(
|
||||||
progressBlobObj[prop].caseObj
|
progressBlobObj[prop].caseObj
|
||||||
);
|
);
|
||||||
caseBlob = await blobClient.download(0);
|
|
||||||
caseDownloaded =
|
try {
|
||||||
caseDownloaded +
|
//console.log("===========\nGetting : ", blobClient._name);
|
||||||
(await streamToBuffer(caseBlob.readableStreamBody)) +
|
caseBlob = await blobClient.download(0);
|
||||||
",";
|
caseDownloaded =
|
||||||
|
caseDownloaded +
|
||||||
|
(await streamToBuffer(caseBlob.readableStreamBody)) +
|
||||||
|
",";
|
||||||
|
} catch {
|
||||||
|
console.log("===========\nFAILED : ", blobClient._name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
caseDownloaded = caseDownloaded.substring(0, caseDownloaded.length - 1);
|
caseDownloaded = caseDownloaded.substring(0, caseDownloaded.length - 1);
|
||||||
@@ -1136,7 +1310,20 @@ export const getAllProgressBlobs = async (containerName) => {
|
|||||||
// "\n////////////////////////////"
|
// "\n////////////////////////////"
|
||||||
// );
|
// );
|
||||||
|
|
||||||
return blobObj;
|
function removeDuplicates(arr) {
|
||||||
|
const unique = arr.filter(
|
||||||
|
(value, index, self) =>
|
||||||
|
index ===
|
||||||
|
self.findIndex(
|
||||||
|
(t) => t.name === value.name // Change 'id' to the property you're checking for uniqueness
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return unique;
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = removeDuplicates(blobObj);
|
||||||
|
|
||||||
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getRepsBlobs = async (containerName) => {
|
export const getRepsBlobs = async (containerName) => {
|
||||||
@@ -1188,6 +1375,92 @@ export const getRepsBlobs = async (containerName) => {
|
|||||||
return blobObj;
|
return blobObj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getRepsFilesBlobs = async (
|
||||||
|
containerName,
|
||||||
|
casefolderID,
|
||||||
|
filenamePrefix
|
||||||
|
) => {
|
||||||
|
const containerToken = await createContainerSas(containerName);
|
||||||
|
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
||||||
|
const containerClient = new ContainerClient(sasUrl);
|
||||||
|
|
||||||
|
//conLog"getBlobs " + sasUrl);
|
||||||
|
|
||||||
|
//console.log(containerClient.listBlobsFlat());
|
||||||
|
|
||||||
|
const blobObj = [];
|
||||||
|
for await (const blob of containerClient.listBlobsFlat({
|
||||||
|
prefix: casefolderID + "/" + filenamePrefix + "/files/",
|
||||||
|
})) {
|
||||||
|
let blobDocumentType = blob.name
|
||||||
|
.split("/")[2]
|
||||||
|
.slice(0, blob.name.split("/")[2].indexOf("_"));
|
||||||
|
|
||||||
|
console.log(blob.name);
|
||||||
|
|
||||||
|
blobObj.push({
|
||||||
|
"name": blob.name.split("/")[3],
|
||||||
|
"path": blob.name,
|
||||||
|
"documentType": getDocumentTypeFromFilename(
|
||||||
|
blob.name.split("/")[3]
|
||||||
|
),
|
||||||
|
"versionId": blob.versionId,
|
||||||
|
"isCurrentVersion": blob.isCurrentVersion,
|
||||||
|
"contentLength": blob.properties.contentLength,
|
||||||
|
"filenameprefix": filenamePrefix,
|
||||||
|
"filepath":
|
||||||
|
"/api/file/downloadblob?container=" +
|
||||||
|
containerName +
|
||||||
|
"&casefolderID=" +
|
||||||
|
blob.name.split("/")[0] +
|
||||||
|
"/" +
|
||||||
|
blob.name.split("/")[1] +
|
||||||
|
"&blobname=" +
|
||||||
|
blob.name.split("/")[3],
|
||||||
|
"hashedfilepath": hashAPIPath(
|
||||||
|
"/api/file/downloadblob?container=" +
|
||||||
|
containerName +
|
||||||
|
"&casefolderID=" +
|
||||||
|
blob.name.split("/")[0] +
|
||||||
|
"/" +
|
||||||
|
blob.name.split("/")[1] +
|
||||||
|
"&blobname=" +
|
||||||
|
blob.name
|
||||||
|
),
|
||||||
|
"deletepath":
|
||||||
|
"/api/file/deleteblob?container=" +
|
||||||
|
containerName +
|
||||||
|
"&casefolderID=" +
|
||||||
|
blob.name.split("/")[0] +
|
||||||
|
"/" +
|
||||||
|
blob.name.split("/")[1] +
|
||||||
|
"&blobname=" +
|
||||||
|
blob.name.split("/")[3],
|
||||||
|
"hasheddeletepath": hashAPIPath(
|
||||||
|
"/api/file/deleteblob?container=" +
|
||||||
|
containerName +
|
||||||
|
"&casefolderID=" +
|
||||||
|
blob.name.split("/")[0] +
|
||||||
|
"/" +
|
||||||
|
blob.name.split("/")[1] +
|
||||||
|
"&blobname=" +
|
||||||
|
blob.name.split("/")[3]
|
||||||
|
),
|
||||||
|
"hashgetblobs": hashAPIPath(
|
||||||
|
"/api/file/getbloblist?container=" +
|
||||||
|
containerName +
|
||||||
|
"&casefolderID=" +
|
||||||
|
blob.name.split("/")[0] +
|
||||||
|
"/" +
|
||||||
|
blob.name.split("/")[1]
|
||||||
|
),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//console.log("blobObj:", blobObj);
|
||||||
|
|
||||||
|
return blobObj;
|
||||||
|
};
|
||||||
|
|
||||||
export const createQueueSas = async (queueName) => {
|
export const createQueueSas = async (queueName) => {
|
||||||
// Get environment variables
|
// Get environment variables
|
||||||
const account = process.env.AZURE_STORAGE_ACCOUNT_NAME;
|
const account = process.env.AZURE_STORAGE_ACCOUNT_NAME;
|
||||||
|
|||||||
+263
-71
@@ -301,6 +301,18 @@ export const getBasicDNSURLSearch = (searchString) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getSIPSEvents = async (caseid) => {
|
||||||
|
return axios
|
||||||
|
.get(BASE_URL + "/api/endpoint/getsipsevents_api?caseid=" + caseid)
|
||||||
|
.then((res) => {
|
||||||
|
return res.data;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
consoleLogger(error);
|
||||||
|
return error.response;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const getAddressSearchPaged = (
|
export const getAddressSearchPaged = (
|
||||||
searchString,
|
searchString,
|
||||||
pageNumber,
|
pageNumber,
|
||||||
@@ -377,7 +389,7 @@ export const getDNSCoords = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getDNSList = (searchString) => {
|
export const getDNSList = async (searchString) => {
|
||||||
return axios
|
return axios
|
||||||
.get(BASE_URL + "/api/endpoint/getdnslist_api")
|
.get(BASE_URL + "/api/endpoint/getdnslist_api")
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
@@ -474,7 +486,7 @@ export const getAdvancedSearchPaged = (
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getBasicSearchDetails = (
|
export const getBasicSearchDetails = async (
|
||||||
appealTypeName,
|
appealTypeName,
|
||||||
caseReference,
|
caseReference,
|
||||||
primaryIdAttribute,
|
primaryIdAttribute,
|
||||||
@@ -528,7 +540,7 @@ export const getBasicPartSavedDetails = (
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getBasicSearchDetailsPaged = (
|
export const getBasicSearchDetailsPaged = async (
|
||||||
appealTypeName,
|
appealTypeName,
|
||||||
caseReference,
|
caseReference,
|
||||||
primaryIdAttribute,
|
primaryIdAttribute,
|
||||||
@@ -634,6 +646,22 @@ export const getAppealsTypes = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getProjectTypes = () => {
|
||||||
|
return axios
|
||||||
|
.get(BASE_URL + "/api/endpoint/getprojecttypes_api")
|
||||||
|
.then((res) => res.data)
|
||||||
|
.catch((error) => {
|
||||||
|
consoleLogger(error);
|
||||||
|
let ErrResponse = {
|
||||||
|
value: [],
|
||||||
|
errorCode: error.response.status,
|
||||||
|
errorMsg: error.response.statusText,
|
||||||
|
};
|
||||||
|
|
||||||
|
return ErrResponse;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const getAppealsTypesForNewAppeal = () => {
|
export const getAppealsTypesForNewAppeal = () => {
|
||||||
return axios
|
return axios
|
||||||
.get(BASE_URL + "/api/endpoint/getappealtypesfornewappeal_api")
|
.get(BASE_URL + "/api/endpoint/getappealtypesfornewappeal_api")
|
||||||
@@ -813,8 +841,7 @@ export const getMyRepresentations = (loggedInUserId) => {
|
|||||||
export const getMyRepresentationsProxy = (loggedInUserId) => {
|
export const getMyRepresentationsProxy = (loggedInUserId) => {
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
"/api/endpoint/getmyrepresentationsproxy_api?loggedInUserId=" +
|
||||||
"/api/endpoint/getmyrepresentationsproxy_api?loggedInUserId=" +
|
|
||||||
loggedInUserId
|
loggedInUserId
|
||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
@@ -835,9 +862,7 @@ export const getRepresentations = (incidentID) => {
|
|||||||
export const getRepresentationsProxy = (incidentID) => {
|
export const getRepresentationsProxy = (incidentID) => {
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
"/api/endpoint/getrepresentationsproxy_api?incidentID=" + incidentID
|
||||||
"/api/endpoint/getrepresentationsproxy_api?incidentID=" +
|
|
||||||
incidentID
|
|
||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@@ -873,8 +898,7 @@ export const getWatchedCasesProxy = (loggedInUserId) => {
|
|||||||
export const getAwaitingSubmissionProxy = (loggedInUserId) => {
|
export const getAwaitingSubmissionProxy = (loggedInUserId) => {
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
"/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" +
|
||||||
"/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" +
|
|
||||||
loggedInUserId
|
loggedInUserId
|
||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
@@ -961,7 +985,7 @@ export const getRepsFromBlob = (containerName) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getRepsFromBlobProxy = (containerName) => {
|
export const getRepsFromBlobProxy = async (containerName) => {
|
||||||
//console.log(
|
//console.log(
|
||||||
// "///////////////////////getRepsFromBlobProxy: " + containerName,
|
// "///////////////////////getRepsFromBlobProxy: " + containerName,
|
||||||
// "/api/file/getawaitingsubmissionfromblobproxy?container=" +
|
// "/api/file/getawaitingsubmissionfromblobproxy?container=" +
|
||||||
@@ -969,8 +993,8 @@ export const getRepsFromBlobProxy = (containerName) => {
|
|||||||
// "\n///////////////////////\n"
|
// "\n///////////////////////\n"
|
||||||
// );
|
// );
|
||||||
|
|
||||||
return axios
|
try {
|
||||||
.get(
|
const res = await axios.get(
|
||||||
// BASE_URL +
|
// BASE_URL +
|
||||||
"/api/file/getrepsblobproxy?container=" + containerName
|
"/api/file/getrepsblobproxy?container=" + containerName
|
||||||
// +
|
// +
|
||||||
@@ -978,16 +1002,14 @@ export const getRepsFromBlobProxy = (containerName) => {
|
|||||||
// "/api/file/getawaitingsubmissionfromblob?container=" +
|
// "/api/file/getawaitingsubmissionfromblob?container=" +
|
||||||
// containerName
|
// containerName
|
||||||
// )
|
// )
|
||||||
)
|
);
|
||||||
.then((res) => {
|
return res.data;
|
||||||
return res.data;
|
} catch (error) {
|
||||||
})
|
consoleLogger(error);
|
||||||
.catch((error) => {
|
}
|
||||||
consoleLogger(error);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getAwaitingSubmissionFromBlobProxy = (containerName) => {
|
export const getAwaitingSubmissionFromBlobProxy = async (containerName) => {
|
||||||
console.log(
|
console.log(
|
||||||
"///////////////////////getAwaitingSubmissionFromBlobProxy: " +
|
"///////////////////////getAwaitingSubmissionFromBlobProxy: " +
|
||||||
containerName,
|
containerName,
|
||||||
@@ -996,26 +1018,24 @@ export const getAwaitingSubmissionFromBlobProxy = (containerName) => {
|
|||||||
"\n///////////////////////\n"
|
"\n///////////////////////\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
return axios
|
try {
|
||||||
.get(
|
const res = await axios.get(
|
||||||
// BASE_URL +
|
BASE_URL +
|
||||||
"/api/file/getawaitingsubmissionfromblobproxy?container=" +
|
"/api/file/getawaitingsubmissionfromblobproxy?container=" +
|
||||||
containerName
|
containerName
|
||||||
// +
|
// +
|
||||||
// hashAPIPath(
|
// hashAPIPath(
|
||||||
// "/api/file/getawaitingsubmissionfromblob?container=" +
|
// "/api/file/getawaitingsubmissionfromblob?container=" +
|
||||||
// containerName
|
// containerName
|
||||||
// )
|
// )
|
||||||
)
|
);
|
||||||
.then((res) => {
|
return res.data;
|
||||||
return res.data;
|
} catch (error) {
|
||||||
})
|
consoleLogger(error);
|
||||||
.catch((error) => {
|
}
|
||||||
consoleLogger(error);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getPortalModuleDetails = (appealType, caseReference) => {
|
export const getPortalModuleDetails = async (appealType, caseReference) => {
|
||||||
//console.log(
|
//console.log(
|
||||||
// BASE_URL +
|
// BASE_URL +
|
||||||
// "/api/endpoint/getportalmoduledetails_api?appealType=" +
|
// "/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||||
@@ -1023,18 +1043,38 @@ export const getPortalModuleDetails = (appealType, caseReference) => {
|
|||||||
// "&caseReference=" +
|
// "&caseReference=" +
|
||||||
// encodeURI(caseReference)
|
// encodeURI(caseReference)
|
||||||
// );
|
// );
|
||||||
return axios
|
|
||||||
.get(
|
// return axios
|
||||||
|
// .get(
|
||||||
|
// BASE_URL +
|
||||||
|
// "/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||||
|
// appealType +
|
||||||
|
// "&caseReference=" +
|
||||||
|
// encodeURI(caseReference)
|
||||||
|
// )
|
||||||
|
// .then((res) => res.data)
|
||||||
|
// .catch((error) => {
|
||||||
|
// console.log("error case ref:", caseReference);
|
||||||
|
// consoleLogger(error);
|
||||||
|
// });
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
method: "get",
|
||||||
|
url:
|
||||||
BASE_URL +
|
BASE_URL +
|
||||||
"/api/endpoint/getportalmoduledetails_api?appealType=" +
|
"/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||||
appealType +
|
appealType +
|
||||||
"&caseReference=" +
|
"&caseReference=" +
|
||||||
encodeURI(caseReference)
|
encodeURI(caseReference),
|
||||||
)
|
};
|
||||||
.then((res) => res.data)
|
|
||||||
.catch((error) => {
|
try {
|
||||||
consoleLogger(error);
|
const res = await axios(config);
|
||||||
});
|
return res.data;
|
||||||
|
} catch (error) {
|
||||||
|
console.log("error case ref:", caseReference);
|
||||||
|
consoleLogger(error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getPortalModuleDetailsProxy = (appealType, caseReference) => {
|
export const getPortalModuleDetailsProxy = (appealType, caseReference) => {
|
||||||
@@ -1083,8 +1123,11 @@ export const updatePassword = (contactId, newpassword) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updateAccount = async (contactId, updateBody) => {
|
export const updateAccount = async (contactId, updateBody, ssr) => {
|
||||||
var queryUrl = "/api/endpoint/updateaccount_api?contactId=" + contactId;
|
var queryUrl =
|
||||||
|
(ssr ? BASE_URL : "") +
|
||||||
|
"/api/endpoint/updateaccount_api?contactId=" +
|
||||||
|
contactId;
|
||||||
var data = updateBody;
|
var data = updateBody;
|
||||||
var config = {
|
var config = {
|
||||||
method: "post",
|
method: "post",
|
||||||
@@ -1097,6 +1140,7 @@ export const updateAccount = async (contactId, updateBody) => {
|
|||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
//console.log("this error:", error);
|
//console.log("this error:", error);
|
||||||
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1417,9 +1461,10 @@ export const deleteMyRepresentationsFromBlob = (
|
|||||||
|
|
||||||
export const deleteWatchedCases = (watchedCaseID) => {
|
export const deleteWatchedCases = (watchedCaseID) => {
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"/api/endpoint/deletewatchedcases_api?watchedCaseID=" + watchedCaseID;
|
"/api/endpoint/deletewatchedcasesproxy_api?watchedCaseID=" +
|
||||||
|
watchedCaseID;
|
||||||
var config = {
|
var config = {
|
||||||
method: "delete",
|
method: "get",
|
||||||
url: queryUrl,
|
url: queryUrl,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1495,6 +1540,44 @@ export const uploadFiles = async (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const uploadSingleFile = async (filesObj, containerID, casefolderID) => {
|
||||||
|
let files = filesObj;
|
||||||
|
|
||||||
|
//console.log(formValues);
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("containerID", containerID);
|
||||||
|
formData.append("casefolderID", casefolderID);
|
||||||
|
|
||||||
|
// files.forEach((file) => formData.append("files", file));
|
||||||
|
|
||||||
|
for (let i = 0; i < files.length; i++) {
|
||||||
|
console.log(files.length);
|
||||||
|
// for (let j = 0; j < files[i].length; j++) {
|
||||||
|
// console.log("upload files:", files[i][j].name);
|
||||||
|
formData.append(files[i].name, files[i]);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(formData);
|
||||||
|
|
||||||
|
var queryUrl = "/api/file/uploadsinglefile";
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
method: "post",
|
||||||
|
url: queryUrl,
|
||||||
|
data: formData,
|
||||||
|
headers: { "content-type": "multipart/form-data" },
|
||||||
|
};
|
||||||
|
|
||||||
|
//console.log(config);
|
||||||
|
try {
|
||||||
|
const res = await axios(config);
|
||||||
|
return res.data;
|
||||||
|
} catch (error) {
|
||||||
|
consoleLogger(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export const uploadRepFiles = async (
|
export const uploadRepFiles = async (
|
||||||
formValues,
|
formValues,
|
||||||
filesObj,
|
filesObj,
|
||||||
@@ -1512,12 +1595,12 @@ export const uploadRepFiles = async (
|
|||||||
|
|
||||||
// files.forEach((file) => formData.append("files", file));
|
// files.forEach((file) => formData.append("files", file));
|
||||||
|
|
||||||
for (let i = 0; i < files.length; i++) {
|
// for (let i = 0; i < files.length; i++) {
|
||||||
for (let j = 0; j < files[i].length; j++) {
|
// for (let j = 0; j < files[i].length; j++) {
|
||||||
//console.log("upload rep files:", files[i][j].name);
|
// //console.log("upload rep files:", files[i][j].name);
|
||||||
formData.append(files[i][j].name, files[i][j]);
|
// formData.append(files[i][j].name, files[i][j]);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//console.log(formData);
|
//console.log(formData);
|
||||||
|
|
||||||
@@ -1646,6 +1729,24 @@ export const getFilesFromBlob = (containerName, casefolderID) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getFilesFromBlobproxy = (containerName, casefolderID) => {
|
||||||
|
return axios
|
||||||
|
.get(
|
||||||
|
// BASE_URL +
|
||||||
|
"/api/file/getbloblistproxy?container=" +
|
||||||
|
containerName +
|
||||||
|
"&casefolderID=" +
|
||||||
|
casefolderID
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
//console.log("//////////----", res.data);
|
||||||
|
return res.data;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
consoleLogger(error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const getFilesFromBlobHashed = (
|
export const getFilesFromBlobHashed = (
|
||||||
containerName,
|
containerName,
|
||||||
getblobshash,
|
getblobshash,
|
||||||
@@ -1690,6 +1791,31 @@ export const deleteBlob = async (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const deleteRepBlob = async (
|
||||||
|
containerName,
|
||||||
|
blobName,
|
||||||
|
deleteblobhash,
|
||||||
|
casefolderID,
|
||||||
|
filenamePrefix
|
||||||
|
) => {
|
||||||
|
try {
|
||||||
|
const res = await axios.get(
|
||||||
|
"/api/file/deleteblob?container=" +
|
||||||
|
containerName +
|
||||||
|
"&casefolderID=" +
|
||||||
|
casefolderID +
|
||||||
|
"/" +
|
||||||
|
filenamePrefix +
|
||||||
|
"&blobname=" +
|
||||||
|
blobName +
|
||||||
|
deleteblobhash
|
||||||
|
);
|
||||||
|
return res.data;
|
||||||
|
} catch (error) {
|
||||||
|
consoleLogger(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export const downloadBlob = (containerName, blobName) => {
|
export const downloadBlob = (containerName, blobName) => {
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
@@ -1771,22 +1897,30 @@ export const sendEmail = async (
|
|||||||
// personalisation,
|
// personalisation,
|
||||||
// reference
|
// reference
|
||||||
// );
|
// );
|
||||||
var queryUrl = "/api/email/notify";
|
// var queryUrl = "/api/email/notify";
|
||||||
|
|
||||||
var config = {
|
// var config = {
|
||||||
method: "post",
|
// method: "post",
|
||||||
url: queryUrl,
|
// url: queryUrl,
|
||||||
data: mailData,
|
// data: mailData,
|
||||||
};
|
// };
|
||||||
|
|
||||||
return axios(config)
|
// return axios(config)
|
||||||
.then((res) => {
|
// .then((res) => {
|
||||||
//console.log("posted ", res.data);
|
// //console.log("posted ", res.data);
|
||||||
return res.data;
|
// return res.data;
|
||||||
})
|
// })
|
||||||
.catch((error) => {
|
// .catch((error) => {
|
||||||
consoleLogger(error);
|
// consoleLogger(error);
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await axios.post("/api/email/notify", mailData);
|
||||||
|
return response.data;
|
||||||
|
} catch (error) {
|
||||||
|
consoleLogger(error); // Optional custom logging
|
||||||
|
throw error; // ✅ Ensure the calling function sees the error
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getNotice = () => {
|
export const getNotice = () => {
|
||||||
@@ -1820,7 +1954,7 @@ export const getPortalLoginProxy = async (emailAddress) => {
|
|||||||
"/api/endpoint/getportalloginproxy_api?emailAddress=" + emailAddress;
|
"/api/endpoint/getportalloginproxy_api?emailAddress=" + emailAddress;
|
||||||
|
|
||||||
return axios
|
return axios
|
||||||
.get(BASE_URL + queryUrl)
|
.get(queryUrl)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
@@ -1845,12 +1979,18 @@ export const createContainerProxy = (containerName) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const sendCaseCompleteMessage = async (containerID, caseReference) => {
|
export const sendCaseCompleteMessage = async (
|
||||||
|
containerID,
|
||||||
|
caseReference,
|
||||||
|
inv
|
||||||
|
) => {
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"/api/file/createappealcompletemessage_api?container=" +
|
"/api/file/createappealcompletemessage_api?container=" +
|
||||||
containerID +
|
containerID +
|
||||||
"&tempcaseref=" +
|
"&tempcaseref=" +
|
||||||
caseReference;
|
caseReference +
|
||||||
|
"&inv=" +
|
||||||
|
inv;
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
method: "get",
|
method: "get",
|
||||||
@@ -1942,6 +2082,24 @@ export const setRepInvolvment = async (caseid, contactid) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const setCaseInvolvment = async (caseid, contactid) => {
|
||||||
|
var queryUrl = "/api/file/createrepinvolvement_api";
|
||||||
|
|
||||||
|
var data = { "incidentid": caseid, "contactid": contactid };
|
||||||
|
var config = {
|
||||||
|
method: "post",
|
||||||
|
url: queryUrl,
|
||||||
|
data: data,
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await axios(config);
|
||||||
|
return res.data;
|
||||||
|
} catch (error) {
|
||||||
|
consoleLogger(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export const getAddressSearch = async (searchString) => {
|
export const getAddressSearch = async (searchString) => {
|
||||||
const params = new URLSearchParams(searchString);
|
const params = new URLSearchParams(searchString);
|
||||||
const str = params.toString();
|
const str = params.toString();
|
||||||
@@ -1968,3 +2126,37 @@ export const getAddressSearch = async (searchString) => {
|
|||||||
return ErrResponse;
|
return ErrResponse;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const createCRMTask = async (formValues) => {
|
||||||
|
var queryUrl = "/api/endpoint/createcrmtask_api";
|
||||||
|
|
||||||
|
var data = formValues;
|
||||||
|
var config = {
|
||||||
|
method: "post",
|
||||||
|
url: queryUrl,
|
||||||
|
data: data,
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await axios(config);
|
||||||
|
return res.data;
|
||||||
|
} catch (error) {
|
||||||
|
consoleLogger(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getPreferredLanguage = async (email) => {
|
||||||
|
return axios
|
||||||
|
.get(
|
||||||
|
BASE_URL +
|
||||||
|
"/api/endpoint/getpreferredlanguage_api?emailAddress=" +
|
||||||
|
email
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
return res.data;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
consoleLogger(error);
|
||||||
|
return error.response;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
+33
-22
@@ -1,53 +1,58 @@
|
|||||||
export const getSelectQuery = (appealTypeName) => {
|
export const getSelectQuery = (appealTypeName) => {
|
||||||
switch (appealTypeName) {
|
switch (appealTypeName) {
|
||||||
case "pinswg_advertses":
|
case "pinswg_advertses":
|
||||||
return "&$select=pinswg_speacialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_procedure,pinswg_questionnaireduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_startdate,pinswg_otherpartiesstatement,pinswg_finalcommentsduedate,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_speacialistcaseprocess,pinswg_statementduedate";
|
return "&$select=pinswg_detailedeiascreeningrequired,pinswg_speacialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_procedure,pinswg_questionnaireduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_startdate,pinswg_otherpartiesstatement,pinswg_finalcommentsduedate,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_speacialistcaseprocess,pinswg_statementduedate";
|
||||||
break;
|
break;
|
||||||
case "pinswg_callinss77s":
|
case "pinswg_callinss77s":
|
||||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_startdate,statuscode,pinswg_dateexportedtoiss,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_startdate,statuscode,pinswg_dateexportedtoiss,pinswg_startdateofevent,pinswg_typeofevent,pinswg_statementsduedate";
|
||||||
break;
|
break;
|
||||||
case "pinswg_commonlands":
|
case "pinswg_commonlands":
|
||||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_starttimeoftheevent,pinswg_typeofevent,pinswg_statementsduedate";
|
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_starttimeoftheevent,pinswg_typeofevent,pinswg_statementsduedate";
|
||||||
break;
|
break;
|
||||||
case "pinswg_environmentalpermittings":
|
case "pinswg_environmentalpermittings":
|
||||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_hedgeshedgerowstreepreservationreplacems":
|
case "pinswg_hedgeshedgerowstreepreservationreplacems":
|
||||||
return "&$select=pinswg_specialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,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,pinswg_specialistcaseprocess";
|
return "&$select=pinswg_detailedeiascreening,pinswg_specialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,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,pinswg_specialistcaseprocess";
|
||||||
break;
|
break;
|
||||||
case "pinswg_miscellaneouscaseworks":
|
case "pinswg_miscellaneouscaseworks":
|
||||||
|
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,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;
|
||||||
case "pinswg_wayleaves":
|
case "pinswg_wayleaves":
|
||||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,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_associatedlpa_value,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_communityinfrastructurelevys117118119s":
|
case "pinswg_communityinfrastructurelevys117118119s":
|
||||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_questionnaireduedate,pinswg_statementduedate";
|
||||||
break;
|
break;
|
||||||
case "pinswg_compulsorypurchaseorderses":
|
case "pinswg_compulsorypurchaseorderses":
|
||||||
return "&$select=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_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_electricityacts":
|
case "pinswg_electricityacts":
|
||||||
return "&$select=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;
|
||||||
|
case "pinswg_harbourrevisionorders":
|
||||||
|
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdiscription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_householderappealhases":
|
case "pinswg_householderappealhases":
|
||||||
return "&$select=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";
|
||||||
break;
|
break;
|
||||||
case "pinswg_enforcementnoticeappeals174s":
|
case "pinswg_enforcementnoticeappeals174s":
|
||||||
return "&$select=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_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
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_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_enforcementlistedbuildingconservationaps":
|
case "pinswg_enforcementlistedbuildingconservationaps":
|
||||||
return "&$select=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_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdates,pinswg_statementduedate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_detailedeiascreeningrequired,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_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdates,pinswg_statementduedate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_maintenanceoflands217s":
|
case "pinswg_maintenanceoflands217s":
|
||||||
return "&$select=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_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdates,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
return "&$select=pinswg_detailedeiascreeningrequired,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_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdates,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_lawfuldevelopmentcertificates":
|
case "pinswg_lawfuldevelopmentcertificates":
|
||||||
return "&$select=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_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
return "&$select=pinswg_detailedeiascreeningrequiered,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_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_listedbuildingandconservationareaconsens":
|
case "pinswg_listedbuildingandconservationareaconsens":
|
||||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_sitepostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_starttimeofevent,pinswg_typeofevent";
|
return "&$select=pinswg_detailedeiascreeningrequiered,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_sitepostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_starttimeofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_planningappeals78s":
|
case "pinswg_planningappeals78s":
|
||||||
//console.log(
|
//console.log(
|
||||||
@@ -55,24 +60,30 @@ export const getSelectQuery = (appealTypeName) => {
|
|||||||
// process.env.RELAYPATH == "test-pedw-hc"
|
// process.env.RELAYPATH == "test-pedw-hc"
|
||||||
// );
|
// );
|
||||||
return process.env.RELAYPATH == "dev-pedw-hc"
|
return process.env.RELAYPATH == "dev-pedw-hc"
|
||||||
? "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_representation_period_end_date,pinswg_extend_representation_date,pinswg_typeofevent"
|
? "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_representation_period_end_date,pinswg_extend_representation_date,pinswg_typeofevent"
|
||||||
: "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_typeofevent";
|
: "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_planningconditionss73s79s":
|
case "pinswg_planningconditionss73s79s":
|
||||||
return "&$select=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_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_detailedeiascreeningrequiered,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_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_planningobligationappeals106s":
|
case "pinswg_planningobligationappeals106s":
|
||||||
return "&$select=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_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
return "&$select=pinswg_detailedeiascreeningrequired,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_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_rows":
|
case "pinswg_rows":
|
||||||
return "&$select=pinswg_specialistcaseprocess,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_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate,pinswg_specialistcaseprocess";
|
return "&$select=pinswg_detailedeiascreeningrequired,pinswg_specialistcaseprocess,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_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate,pinswg_specialistcaseprocess";
|
||||||
break;
|
break;
|
||||||
case "pinswg_ldps":
|
case "pinswg_ldps":
|
||||||
return "&$select=modifiedon,pinswg_name";
|
return "&$select=pinswg_eiarequired,modifiedon,pinswg_name";
|
||||||
break;
|
break;
|
||||||
case "pinswg_nonvalidations":
|
case "pinswg_nonvalidations":
|
||||||
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":
|
||||||
|
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":
|
||||||
|
// 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_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_casesuspensionstartdate,pinswg_casesuspensionenddate,pinswg_consultationopen,pinswg_consultationclose,pinswg_reportissuedtowelshministers,pinswg_decisionissuedtoapplicant,pinswg_decisionoutcome";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ const RenderTextfield = ({
|
|||||||
id={id}
|
id={id}
|
||||||
type={type}
|
type={type}
|
||||||
disabled={disabled ? true : false}
|
disabled={disabled ? true : false}
|
||||||
|
maxLength="50"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@@ -172,7 +173,9 @@ const RenderPickList = ({
|
|||||||
id={datafieldname}
|
id={datafieldname}
|
||||||
name={datafieldname}
|
name={datafieldname}
|
||||||
>
|
>
|
||||||
<option>Select...</option>
|
<option value="" disabled defaultValue>
|
||||||
|
{t("common:drop-down-select")}
|
||||||
|
</option>
|
||||||
{Object.keys(optionsArr).map((key, index) => {
|
{Object.keys(optionsArr).map((key, index) => {
|
||||||
return (
|
return (
|
||||||
<option
|
<option
|
||||||
@@ -216,13 +219,15 @@ let PersonalDetails = (props) => {
|
|||||||
/(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/gi;
|
/(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/gi;
|
||||||
|
|
||||||
const email = (value) =>
|
const email = (value) =>
|
||||||
value && !emailRegex.test(value) ? "Invalid email address" : undefined;
|
value && !emailRegex.test(value)
|
||||||
|
? t("account:invalid-phone-number-errormsg")
|
||||||
|
: undefined;
|
||||||
const phoneNumber = (value) =>
|
const phoneNumber = (value) =>
|
||||||
value &&
|
value &&
|
||||||
!/^(?:(?:\(?(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?(?:\(?0\)?[\s-]?)?)|(?:\(?0))(?:(?:\d{5}\)?[\s-]?\d{4,5})|(?:\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3}))|(?:\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4})|(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}))(?:[\s-]?(?:x|ext\.?|\#)\d{3,4})?$/i.test(
|
!/^(?:(?:\(?(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?(?:\(?0\)?[\s-]?)?)|(?:\(?0))(?:(?:\d{5}\)?[\s-]?\d{4,5})|(?:\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3}))|(?:\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4})|(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}))(?:[\s-]?(?:x|ext\.?|\#)\d{3,4})?$/i.test(
|
||||||
value
|
value
|
||||||
)
|
)
|
||||||
? "Invalid phone number"
|
? t("account:invalid-phone-number-errormsg")
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
const postcode = (value) =>
|
const postcode = (value) =>
|
||||||
@@ -241,183 +246,194 @@ let PersonalDetails = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{props.accountUpdatedComplete == false ? (
|
<div className="govuk-form-group">
|
||||||
props.personalDetailsComplete == false ? (
|
{props.accountUpdatedComplete == false ? (
|
||||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
props.personalDetailsComplete == false ? (
|
||||||
<fieldset className="govuk-fieldset">
|
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
<fieldset className="govuk-fieldset">
|
||||||
<h2 className="govuk-fieldset__heading">
|
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||||
{t("account:account-about-you-label")}
|
<h2 className="govuk-fieldset__heading">
|
||||||
</h2>
|
{t("account:account-about-you-label")}
|
||||||
</legend>
|
</h2>
|
||||||
<div className="govuk-form-group ">
|
</legend>
|
||||||
<span className="govuk-label ">
|
<div className="govuk-form-group ">
|
||||||
{t("account:account-role-label")}:{" "}
|
<span className="govuk-label ">
|
||||||
{
|
{t("account:account-role-label")}:{" "}
|
||||||
|
{
|
||||||
|
props.props.accountDetails
|
||||||
|
.accountDetails[
|
||||||
|
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<Field
|
||||||
|
name="pinswg_preferredlanguage"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname={"pinswg_preferredlanguage"}
|
||||||
|
optionsArr={["English", "Welsh"]}
|
||||||
|
className="govuk-input govuk-input--width-20 govuk-radios--inline"
|
||||||
|
validate={[required]}
|
||||||
|
label={t(
|
||||||
|
"account:account-preferred-language-label"
|
||||||
|
)}
|
||||||
|
errorMsg={t("account:is-required-label")}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
name="firstname"
|
||||||
|
id="firstname"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-20"
|
||||||
|
validate={[required]}
|
||||||
|
label={t(
|
||||||
|
"account:account-first-name-label"
|
||||||
|
)}
|
||||||
|
errorMsg={t("account:is-required-label")}
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="lastname"
|
||||||
|
id="lastname"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-20"
|
||||||
|
validate={[required]}
|
||||||
|
label={t("account:account-last-name-label")}
|
||||||
|
errorMsg={t("account:is-required-label")}
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="emailaddress1"
|
||||||
|
id="emailaddress1"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="email"
|
||||||
|
className="govuk-input govuk-input--width-20"
|
||||||
|
validate={[required, email]}
|
||||||
|
label={t(
|
||||||
|
"account:account-email-address-label"
|
||||||
|
)}
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="telephone1"
|
||||||
|
id="telephone1"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-20"
|
||||||
|
validate={[required, phoneNumber]}
|
||||||
|
label={t("account:account-telephone-label")}
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="company"
|
||||||
|
id="company"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-20"
|
||||||
|
label={t(
|
||||||
|
"account:account-company-group-label"
|
||||||
|
)}
|
||||||
|
errorMsg={t("account:is-required-label")}
|
||||||
|
/>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset className="govuk-fieldset">
|
||||||
|
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||||
|
<h2 className="govuk-fieldset__heading">
|
||||||
|
{t(
|
||||||
|
"account:account-your-address-label"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
</legend>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
name="address1_line1"
|
||||||
|
id="address1_line1"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-20"
|
||||||
|
label={t(
|
||||||
|
"account:account-address-line-1-label"
|
||||||
|
)}
|
||||||
|
validate={[required]}
|
||||||
|
errorMsg={t("account:is-required-label")}
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="address1_line2"
|
||||||
|
id="address1_line2"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-20"
|
||||||
|
label={t(
|
||||||
|
"account:account-address-line-2-label"
|
||||||
|
)}
|
||||||
|
errorMsg={t("account:is-required-label")}
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="address1_city"
|
||||||
|
id="address1_city"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-10"
|
||||||
|
label={t("account:account-town-city-label")}
|
||||||
|
validate={[required]}
|
||||||
|
errorMsg={t("account:is-required-label")}
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="address1_county"
|
||||||
|
id="address1_county"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-10"
|
||||||
|
label={t("account:account-county-label")}
|
||||||
|
validate={[required]}
|
||||||
|
errorMsg={t("account:is-required-label")}
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="address1_postalcode"
|
||||||
|
id="address1_postalcode"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-5"
|
||||||
|
label={t("account:account-postcode-label")}
|
||||||
|
validate={[required, postcode]}
|
||||||
|
/>
|
||||||
|
</fieldset>
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
"/myportal?q=" +
|
||||||
props.props.accountDetails
|
props.props.accountDetails
|
||||||
.accountDetails[
|
.loggedinUserId
|
||||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
</span>
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
{t("common:cancel-link")}
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<Field
|
</form>
|
||||||
name="pinswg_preferredlanguage"
|
) : (
|
||||||
component={RenderPickList}
|
<>
|
||||||
datafieldname={"pinswg_preferredlanguage"}
|
<BuildCheckPersonalDetails
|
||||||
optionsArr={["English", "Welsh"]}
|
props={props}
|
||||||
className="govuk-input govuk-input--width-20 govuk-radios--inline"
|
setPersonalDetailsComplete={
|
||||||
validate={[required]}
|
setPersonalDetailsComplete
|
||||||
label={t(
|
|
||||||
"account:account-preferred-language-label"
|
|
||||||
)}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Field
|
|
||||||
name="firstname"
|
|
||||||
id="firstname"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
validate={[required]}
|
|
||||||
label={t("account:account-first-name-label")}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="lastname"
|
|
||||||
id="lastname"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
validate={[required]}
|
|
||||||
label={t("account:account-last-name-label")}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="emailaddress1"
|
|
||||||
id="emailaddress1"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="email"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
validate={[required, email]}
|
|
||||||
label={t("account:account-email-address-label")}
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="telephone1"
|
|
||||||
id="telephone1"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="number"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
validate={[required, phoneNumber]}
|
|
||||||
label={t("account:account-telephone-label")}
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="company"
|
|
||||||
id="company"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
label={t("account:account-company-group-label")}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
</fieldset>
|
|
||||||
<fieldset className="govuk-fieldset">
|
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
|
||||||
<h2 className="govuk-fieldset__heading">
|
|
||||||
{t("account:account-your-address-label")}
|
|
||||||
</h2>
|
|
||||||
</legend>
|
|
||||||
|
|
||||||
<Field
|
|
||||||
name="address1_line1"
|
|
||||||
id="address1_line1"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
label={t(
|
|
||||||
"account:account-address-line-1-label"
|
|
||||||
)}
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_line2"
|
|
||||||
id="address1_line2"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
label={t(
|
|
||||||
"account:account-address-line-2-label"
|
|
||||||
)}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_city"
|
|
||||||
id="address1_city"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-10"
|
|
||||||
label={t("account:account-town-city-label")}
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_county"
|
|
||||||
id="address1_county"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-10"
|
|
||||||
label={t("account:account-county-label")}
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_postalcode"
|
|
||||||
id="address1_postalcode"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-5"
|
|
||||||
label={t("account:account-postcode-label")}
|
|
||||||
validate={[required, postcode]}
|
|
||||||
/>
|
|
||||||
</fieldset>
|
|
||||||
<div className="govuk-button-group">
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
className="govuk-button"
|
|
||||||
data-module="govuk-button"
|
|
||||||
>
|
|
||||||
{t("common:continue-button")}
|
|
||||||
</button>
|
|
||||||
<Link
|
|
||||||
href={
|
|
||||||
"/myportal?q=" +
|
|
||||||
props.props.accountDetails.loggedinUserId
|
|
||||||
}
|
}
|
||||||
className="govuk-link"
|
setAccountUpdatedComplete={
|
||||||
>
|
setAccountUpdatedComplete
|
||||||
{t("common:cancel-link")}
|
}
|
||||||
</Link>
|
/>
|
||||||
</div>
|
</>
|
||||||
</form>
|
)
|
||||||
) : (
|
) : (
|
||||||
<>
|
<PersonalDetailsComplete props={props} />
|
||||||
<BuildCheckPersonalDetails
|
)}
|
||||||
props={props}
|
</div>
|
||||||
setPersonalDetailsComplete={
|
|
||||||
setPersonalDetailsComplete
|
|
||||||
}
|
|
||||||
setAccountUpdatedComplete={
|
|
||||||
setAccountUpdatedComplete
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
) : (
|
|
||||||
<PersonalDetailsComplete props={props} />
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useRouter } from "next/router";
|
|||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { updateAccount } from "../../actions";
|
import { updateAccount } from "../../actions";
|
||||||
|
import { setCookie } from "nookies";
|
||||||
|
|
||||||
const PersonalDetailsComplete = (props) => {
|
const PersonalDetailsComplete = (props) => {
|
||||||
const {
|
const {
|
||||||
@@ -17,26 +18,48 @@ const PersonalDetailsComplete = (props) => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
|
// let contactid = props.accountDetails.loggedinUserId;
|
||||||
|
// let updateBody = props.props.props.form.personalDetailsForm.values;
|
||||||
|
// let prefLang =
|
||||||
|
// props.props.props.form.personalDetailsForm.values
|
||||||
|
// .pinswg_preferredlanguage;
|
||||||
|
|
||||||
|
const { loggedinUserId } = props.accountDetails || {};
|
||||||
|
const formValues = props.props?.props?.form?.personalDetailsForm?.values;
|
||||||
|
const prefLang = formValues?.pinswg_preferredlanguage;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let contactid = props.accountDetails.loggedinUserId;
|
// let contactid = props.accountDetails.loggedinUserId;
|
||||||
let updateBody = props.props.props.form.personalDetailsForm.values;
|
// let updateBody = props.props.props.form.personalDetailsForm.values;
|
||||||
updateAccount(contactid, updateBody);
|
// let prefLang =
|
||||||
}, [
|
// props.props.props.form.personalDetailsForm.values
|
||||||
props.accountDetails.loggedinUserId,
|
// .pinswg_preferredlanguage;
|
||||||
props.props.props.form.personalDetailsForm.values,
|
if (!loggedinUserId || !formValues) return;
|
||||||
]);
|
|
||||||
|
console.log("=============== pref lang", prefLang);
|
||||||
|
const userLang = prefLang == "846040000" ? "cy" : "en";
|
||||||
|
setCookie(null, "pedw_locale", userLang, {
|
||||||
|
path: "/",
|
||||||
|
maxAge: 60 * 60 * 24 * 365,
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("Set cookie to:", userLang);
|
||||||
|
|
||||||
|
async function doUpdate() {
|
||||||
|
const response = await updateAccount(loggedinUserId, formValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
doUpdate();
|
||||||
|
}, [loggedinUserId, formValues, prefLang]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<p className="govuk-body">{t("account:account-complete-para-1")}</p>
|
<p className="govuk-body">{t("account:account-complete-para-1")}</p>
|
||||||
|
|
||||||
<p className="govuk-body">{t("account:account-complete-para-2")}</p>
|
{/* <p className="govuk-body">{t("account:account-complete-para-2")}</p> */}
|
||||||
|
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
<Link
|
<Link href={"/"} className="govuk-link">
|
||||||
href={"/myportal?q=" + props.accountDetails.loggedinUserId}
|
|
||||||
className="govuk-link"
|
|
||||||
>
|
|
||||||
{" "}
|
{" "}
|
||||||
{t("account:account-complete-return-to-portal-link")}
|
{t("account:account-complete-return-to-portal-link")}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -31,8 +31,10 @@ const RegisterComplete = (props) => {
|
|||||||
let accountBody = props.props.props.form.accountRegisterForm.values;
|
let accountBody = props.props.props.form.accountRegisterForm.values;
|
||||||
let emailAddress =
|
let emailAddress =
|
||||||
props.props.props.form.accountRegisterForm.values.emailaddress1;
|
props.props.props.form.accountRegisterForm.values.emailaddress1;
|
||||||
|
|
||||||
|
// was an appellant "pinswg_typeofinvolvement": 846040001,
|
||||||
Object.assign(accountBody, {
|
Object.assign(accountBody, {
|
||||||
"pinswg_typeofinvolvement": 846040001,
|
"pinswg_typeofinvolvement": 846040061,
|
||||||
});
|
});
|
||||||
|
|
||||||
accountBody = _.omit(accountBody, ["custom_password_check"]);
|
accountBody = _.omit(accountBody, ["custom_password_check"]);
|
||||||
@@ -80,6 +82,10 @@ const RegisterComplete = (props) => {
|
|||||||
{t("account:register-new-account-paragraph-what-next")}
|
{t("account:register-new-account-paragraph-what-next")}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("account:register-new-account-paragraph-thanks")}
|
||||||
|
</p>
|
||||||
|
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
<Link href="/" className="govuk-link">
|
<Link href="/" className="govuk-link">
|
||||||
{t("account:register-new-account-my-portal-link")}
|
{t("account:register-new-account-my-portal-link")}
|
||||||
|
|||||||
+145
-141
@@ -137,149 +137,153 @@ const RegisterForm = (props) => {
|
|||||||
{props.accountCreatedComplete != true ? (
|
{props.accountCreatedComplete != true ? (
|
||||||
props.registerFormComplete == false ? (
|
props.registerFormComplete == false ? (
|
||||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||||
<fieldset className="govuk-fieldset">
|
<div className="card" id="personalDetailsCard">
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
<div className="card-body">
|
||||||
<h2 className="govuk-fieldset__heading">
|
<fieldset className="govuk-fieldset">
|
||||||
{t(
|
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||||
"account:register-new-account-sub-heading-1"
|
<h2 className="govuk-fieldset__heading">
|
||||||
)}{" "}
|
{t(
|
||||||
{loggedInUserEmail}
|
"account:register-new-account-sub-heading-1"
|
||||||
</h2>
|
)}{" "}
|
||||||
</legend>
|
{loggedInUserEmail}
|
||||||
<Field
|
</h2>
|
||||||
name="firstname"
|
</legend>
|
||||||
id="firstname"
|
<Field
|
||||||
component={RenderTextfield}
|
name="firstname"
|
||||||
type="text"
|
id="firstname"
|
||||||
className="govuk-input govuk-input--width-20"
|
component={RenderTextfield}
|
||||||
validate={[required]}
|
type="text"
|
||||||
label={t(
|
className="govuk-input govuk-input--width-20"
|
||||||
"account:register-new-account-first-name-label"
|
validate={[required]}
|
||||||
)}
|
label={t(
|
||||||
errorMsg={t(
|
"account:register-new-account-first-name-label"
|
||||||
"account:register-new-account-first-name-label-errormsg"
|
)}
|
||||||
)}
|
errorMsg={t(
|
||||||
/>
|
"account:register-new-account-first-name-label-errormsg"
|
||||||
<Field
|
)}
|
||||||
name="lastname"
|
/>
|
||||||
id="lastname"
|
<Field
|
||||||
component={RenderTextfield}
|
name="lastname"
|
||||||
type="text"
|
id="lastname"
|
||||||
className="govuk-input govuk-input--width-20"
|
component={RenderTextfield}
|
||||||
validate={[required]}
|
type="text"
|
||||||
label={t(
|
className="govuk-input govuk-input--width-20"
|
||||||
"account:register-new-account-last-name-label"
|
validate={[required]}
|
||||||
)}
|
label={t(
|
||||||
errorMsg={t(
|
"account:register-new-account-last-name-label"
|
||||||
"account:register-new-account-last-name-label-errormsg"
|
)}
|
||||||
)}
|
errorMsg={t(
|
||||||
/>
|
"account:register-new-account-last-name-label-errormsg"
|
||||||
<Field
|
)}
|
||||||
name="emailaddress1"
|
/>
|
||||||
id="emailaddress1"
|
<Field
|
||||||
component={RenderTextfield}
|
name="emailaddress1"
|
||||||
type="email"
|
id="emailaddress1"
|
||||||
className="govuk-input govuk-input--width-20"
|
component={RenderTextfield}
|
||||||
validate={[required, email]}
|
type="email"
|
||||||
label={t(
|
className="govuk-input govuk-input--width-20"
|
||||||
"account:register-new-account-email-address-label"
|
validate={[required, email]}
|
||||||
)}
|
label={t(
|
||||||
disabled
|
"account:register-new-account-email-address-label"
|
||||||
/>
|
)}
|
||||||
<Field
|
disabled
|
||||||
name="telephone1"
|
/>
|
||||||
id="telephone1"
|
<Field
|
||||||
component={RenderTextfield}
|
name="telephone1"
|
||||||
type="number"
|
id="telephone1"
|
||||||
className="govuk-input govuk-input--width-20"
|
component={RenderTextfield}
|
||||||
validate={[required, phoneNumber]}
|
type="text"
|
||||||
label={t(
|
className="govuk-input govuk-input--width-20"
|
||||||
"account:register-new-account-phone-label"
|
validate={[required, phoneNumber]}
|
||||||
)}
|
label={t(
|
||||||
/>
|
"account:register-new-account-phone-label"
|
||||||
</fieldset>
|
)}
|
||||||
<fieldset className="govuk-fieldset">
|
/>
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
</fieldset>
|
||||||
<h2 className="govuk-fieldset__heading">
|
<fieldset className="govuk-fieldset">
|
||||||
{t(
|
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||||
"account:register-new-account-sub-heading-2"
|
<h2 className="govuk-fieldset__heading">
|
||||||
)}
|
{t(
|
||||||
</h2>
|
"account:register-new-account-sub-heading-2"
|
||||||
</legend>
|
)}
|
||||||
|
</h2>
|
||||||
|
</legend>
|
||||||
|
|
||||||
<Field
|
<Field
|
||||||
name="address1_line1"
|
name="address1_line1"
|
||||||
id="address1_line1"
|
id="address1_line1"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
label={t(
|
label={t(
|
||||||
"account:register-new-account-address-line-1-label"
|
"account:register-new-account-address-line-1-label"
|
||||||
)}
|
)}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg={t(
|
errorMsg={t(
|
||||||
"account:register-new-account-address-line-1-label-errormsg"
|
"account:register-new-account-address-line-1-label-errormsg"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name="address1_line2"
|
name="address1_line2"
|
||||||
id="address1_line2"
|
id="address1_line2"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
label={t(
|
label={t(
|
||||||
"account:register-new-account-address-line-2-label"
|
"account:register-new-account-address-line-2-label"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name="address1_city"
|
name="address1_city"
|
||||||
id="address1_city"
|
id="address1_city"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-10"
|
className="govuk-input govuk-input--width-10"
|
||||||
label={t(
|
label={t(
|
||||||
"account:register-new-account-town-label"
|
"account:register-new-account-town-label"
|
||||||
)}
|
)}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg={t(
|
errorMsg={t(
|
||||||
"account:register-new-account-town-label-errormsg"
|
"account:register-new-account-town-label-errormsg"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name="address1_county"
|
name="address1_county"
|
||||||
id="address1_county"
|
id="address1_county"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-10"
|
className="govuk-input govuk-input--width-10"
|
||||||
label={t(
|
label={t(
|
||||||
"account:register-new-account-county-label"
|
"account:register-new-account-county-label"
|
||||||
)}
|
)}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg={t(
|
errorMsg={t(
|
||||||
"account:register-new-account-county-label-errormsg"
|
"account:register-new-account-county-label-errormsg"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name="address1_postalcode"
|
name="address1_postalcode"
|
||||||
id="address1_postalcode"
|
id="address1_postalcode"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-5"
|
className="govuk-input govuk-input--width-5"
|
||||||
label={t(
|
label={t(
|
||||||
"account:register-new-account-postcode-label"
|
"account:register-new-account-postcode-label"
|
||||||
)}
|
)}
|
||||||
validate={[required, postcode]}
|
validate={[required, postcode]}
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ import {
|
|||||||
let reactPlugin = new ReactPlugin();
|
let reactPlugin = new ReactPlugin();
|
||||||
let appInsights = new ApplicationInsights({
|
let appInsights = new ApplicationInsights({
|
||||||
config: {
|
config: {
|
||||||
connectionString: process.env.NEXT_PUBLIC_APP_INSIGHT,
|
connectionString:
|
||||||
|
process.env.APPLICATIONINSIGHTS_CONNECTIONSTRING ||
|
||||||
|
process.env.NEXT_PUBLIC_APP_INSIGHT,
|
||||||
enableAutoRouteTracking: true,
|
enableAutoRouteTracking: true,
|
||||||
enableCorsCorrelation: true,
|
enableCorsCorrelation: true,
|
||||||
enableRequestHeaderTracking: true,
|
enableRequestHeaderTracking: true,
|
||||||
|
|||||||
+196
-32
@@ -20,12 +20,30 @@ const Breadcrumbs = (props) => {
|
|||||||
setCurrentView,
|
setCurrentView,
|
||||||
setCurrentSection,
|
setCurrentSection,
|
||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
} = props;
|
} = props;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const { data: session, status } = useSession();
|
const { data: session, status } = useSession();
|
||||||
|
|
||||||
|
const qcount =
|
||||||
|
currentView.caseReference.appealType == 846040000 ||
|
||||||
|
currentView.caseReference.appealType == 846040001 ||
|
||||||
|
currentView.caseReference.appealType == 846040025 ||
|
||||||
|
currentView.caseReference.appealType == 846040004 ||
|
||||||
|
currentView.caseReference.appealType == 846040018 ||
|
||||||
|
currentView.caseReference.appealType == 846040003 ||
|
||||||
|
currentView.caseReference.appealType == 846040009 ||
|
||||||
|
currentView.caseReference.appealType == 846040008
|
||||||
|
? 7
|
||||||
|
: currentView.caseReference.appealType == 846040005 ||
|
||||||
|
currentView.caseReference.appealType == 846040006 ||
|
||||||
|
currentView.caseReference.appealType == 846040007
|
||||||
|
? 9
|
||||||
|
: "";
|
||||||
|
|
||||||
|
var viewAllKey = currentView?.viewKey || router.query.viewKey;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<nav
|
<nav
|
||||||
@@ -138,6 +156,27 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{router.pathname == "/myportal/contactus" && (
|
||||||
|
<>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
router.locale != "en"
|
||||||
|
? "/" +
|
||||||
|
router.locale +
|
||||||
|
"/fymhorth"
|
||||||
|
: "/myportal"
|
||||||
|
}
|
||||||
|
className="govuk-breadcrumbs__link"
|
||||||
|
>
|
||||||
|
{t("common:breadcrumb-my-portal")}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
{t("common:footer-contact-us-link-label")}
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
{router.pathname == "/addresssearchresults" && (
|
{router.pathname == "/addresssearchresults" && (
|
||||||
<>
|
<>
|
||||||
{" "}
|
{" "}
|
||||||
@@ -458,22 +497,21 @@ const Breadcrumbs = (props) => {
|
|||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey ==
|
||||||
"awaitingSubmissionDetails" &&
|
"awaitingSubmissionDetails" &&
|
||||||
t(
|
t(
|
||||||
"myportal:awatitingsubmission-card-title"
|
"myportal:awatitingsubmission-card-title"
|
||||||
)}
|
)}
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey == "watchedCases" &&
|
||||||
"watchedCases" &&
|
|
||||||
t("myportal:watchedcases-card-title")}
|
t("myportal:watchedcases-card-title")}
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey == "myCases" &&
|
||||||
"myCases" &&
|
|
||||||
t("myportal:mycases-card-title")}
|
t("myportal:mycases-card-title")}
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey == "myRepresentations" &&
|
||||||
"myRepresentations" &&
|
|
||||||
t(
|
t(
|
||||||
"myportal:myrepresentations-card-title"
|
"myportal:myrepresentations-card-title"
|
||||||
)}
|
)}
|
||||||
|
{viewAllKey == "mySubmittedReps" &&
|
||||||
|
"Submitted representations"}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@@ -504,6 +542,27 @@ const Breadcrumbs = (props) => {
|
|||||||
)}
|
)}
|
||||||
{router.pathname == "/case/[ticketnumber]" && (
|
{router.pathname == "/case/[ticketnumber]" && (
|
||||||
<>
|
<>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
router.locale != "en"
|
||||||
|
? router.locale +
|
||||||
|
"/searchresults?q=" +
|
||||||
|
props.props.search
|
||||||
|
.searchString
|
||||||
|
: "/searchresults?q=" +
|
||||||
|
props.props.search
|
||||||
|
.searchString
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
// spinnerState();
|
||||||
|
router.back();
|
||||||
|
}}
|
||||||
|
className="govuk-breadcrumbs__link"
|
||||||
|
>
|
||||||
|
{t("common:breadcrumb-search-results")}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("common:breadcrumb-case-reference")}:{" "}
|
{t("common:breadcrumb-case-reference")}:{" "}
|
||||||
{
|
{
|
||||||
@@ -628,7 +687,6 @@ const Breadcrumbs = (props) => {
|
|||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/case/[ticketnumber]" && (
|
{router.pathname == "/myportal/case/[ticketnumber]" && (
|
||||||
<>
|
<>
|
||||||
{" "}
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
@@ -643,6 +701,27 @@ const Breadcrumbs = (props) => {
|
|||||||
{t("common:breadcrumb-my-portal")}
|
{t("common:breadcrumb-my-portal")}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
router.locale != "en"
|
||||||
|
? router.locale +
|
||||||
|
"/fymhorth/searchresults?q=" +
|
||||||
|
props.props.search
|
||||||
|
.searchString
|
||||||
|
: "/myportal/searchresults?q=" +
|
||||||
|
props.props.search
|
||||||
|
.searchString
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
// spinnerState();
|
||||||
|
router.back();
|
||||||
|
}}
|
||||||
|
className="govuk-breadcrumbs__link"
|
||||||
|
>
|
||||||
|
{t("common:breadcrumb-search-results")}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("common:breadcrumb-case-reference")}:{" "}
|
{t("common:breadcrumb-case-reference")}:{" "}
|
||||||
{
|
{
|
||||||
@@ -707,6 +786,38 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{router.pathname ==
|
||||||
|
"/myportal/dns/[developmentName]" && (
|
||||||
|
<>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
router.locale != "en"
|
||||||
|
? router.locale + "/fymhorth"
|
||||||
|
: "/myportal"
|
||||||
|
}
|
||||||
|
className="govuk-breadcrumbs__link"
|
||||||
|
>
|
||||||
|
{t("common:breadcrumb-my-portal")}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
<Link
|
||||||
|
href={"/myportal/dnsapplications"}
|
||||||
|
className="govuk-breadcrumbs__link"
|
||||||
|
>
|
||||||
|
{t("dnsCommon:service-name")}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
{t("common:breadcrumb-case-reference")}:{" "}
|
||||||
|
{
|
||||||
|
props.props.currentView.caseReference
|
||||||
|
.currentReference
|
||||||
|
}
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
{router.pathname == "/case" && (
|
{router.pathname == "/case" && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
@@ -789,24 +900,71 @@ const Breadcrumbs = (props) => {
|
|||||||
}
|
}
|
||||||
</li> */}
|
</li> */}
|
||||||
|
|
||||||
{typeof props.currentView
|
{props.currentView.representationSubmit ==
|
||||||
.representationCapacity != "undefined" &&
|
true &&
|
||||||
props.currentView.representationCapacity !=
|
props.currentView
|
||||||
"" && (
|
.representationSubmitConfirmation !=
|
||||||
|
true && (
|
||||||
<li className="govuk-breadcrumbs__link-item backChevron">
|
<li className="govuk-breadcrumbs__link-item backChevron">
|
||||||
<a
|
<a
|
||||||
className="govuk-breadcrumbs__link"
|
className="govuk-breadcrumbs__link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setRepresentationCapacity();
|
setRepresentationSubmit(
|
||||||
props.updateField(
|
qcount
|
||||||
"representationForm",
|
|
||||||
"representationType",
|
|
||||||
""
|
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("common:back-link")}{" "}
|
{t("common:back-link")}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
{props.currentView.representationSubmit !=
|
||||||
|
true &&
|
||||||
|
props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
) &&
|
||||||
|
props.currentView.caseReference.repDetails
|
||||||
|
.representationType !=
|
||||||
|
"Questionnaire" && (
|
||||||
|
<li className="govuk-breadcrumbs__link-item backChevron">
|
||||||
|
<a
|
||||||
|
className="govuk-breadcrumbs__link"
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:back-link")}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
{props.currentView.representationSubmit !=
|
||||||
|
true &&
|
||||||
|
props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
) &&
|
||||||
|
props.currentView.caseReference.repDetails
|
||||||
|
.representationType ==
|
||||||
|
"Questionnaire" &&
|
||||||
|
props.showQuestionnaireSection > 1 && (
|
||||||
|
<li className="govuk-breadcrumbs__link-item backChevron">
|
||||||
|
<a
|
||||||
|
className="govuk-breadcrumbs__link"
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
props.setShowQuestionnaireSection(
|
||||||
|
props.showQuestionnaireSection -
|
||||||
|
1
|
||||||
|
);
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:back-link")}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
@@ -868,14 +1026,23 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dns/[developmentName]" && (
|
|
||||||
|
{router.pathname == "/dnsapplications" && (
|
||||||
|
<>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
{t("dnsCommon:service-name")}
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{router.pathname == "/dnsdetails" && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale == "en"
|
router.locale != "en"
|
||||||
? router.locale + "/../../dns"
|
? router.locale +
|
||||||
: "/../../dns"
|
"/dnsapplications"
|
||||||
|
: "/dnsapplications"
|
||||||
}
|
}
|
||||||
className="govuk-breadcrumbs__link"
|
className="govuk-breadcrumbs__link"
|
||||||
>
|
>
|
||||||
@@ -891,19 +1058,12 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dnsapplications" && (
|
{router.pathname == "/dns/[developmentName]" && (
|
||||||
<>
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
|
||||||
{t("dnsCommon:service-name")}
|
|
||||||
</li>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{router.pathname == "/dnsdetails" && (
|
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale == "en"
|
router.locale != "en"
|
||||||
? router.locale +
|
? router.locale +
|
||||||
"/dnsapplications"
|
"/dnsapplications"
|
||||||
: "/dnsapplications"
|
: "/dnsapplications"
|
||||||
@@ -939,7 +1099,7 @@ const Breadcrumbs = (props) => {
|
|||||||
{router.pathname == "/dns/contact-us" && (
|
{router.pathname == "/dns/contact-us" && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
Contact us
|
{t("common:footer-contact-us-link-label")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@@ -1044,6 +1204,10 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
//dispatch(reset("representationForm"));
|
//dispatch(reset("representationForm"));
|
||||||
dispatch(setRepresentationCapacity(representationCapacity));
|
dispatch(setRepresentationCapacity(representationCapacity));
|
||||||
},
|
},
|
||||||
|
setRepresentationSubmit: (representationSubmit) => {
|
||||||
|
dispatch(setRepresentationSubmit(representationSubmit));
|
||||||
|
},
|
||||||
|
|
||||||
setCurrentView: (currentView) => {
|
setCurrentView: (currentView) => {
|
||||||
dispatch(setCurrentView(currentView));
|
dispatch(setCurrentView(currentView));
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-8
@@ -34,17 +34,13 @@ const Case = (props) => {
|
|||||||
searchDetailsObj={props.searchDetailsObj}
|
searchDetailsObj={props.searchDetailsObj}
|
||||||
searchString={props.searchString}
|
searchString={props.searchString}
|
||||||
incidentid={props.incidentid}
|
incidentid={props.incidentid}
|
||||||
showMap={props.showMap}
|
showMap={props.showMaps}
|
||||||
currentView={props.currentView}
|
currentView={props.currentView}
|
||||||
messagesObj={props.messagesObj}
|
messagesObj={props.messagesObj}
|
||||||
/>
|
|
||||||
<Documents
|
|
||||||
incidentid={props.incidentid}
|
|
||||||
caseReference={props.caseReference}
|
|
||||||
searchResultsObj={props.searchResultsObj}
|
|
||||||
searchDetailsObj={props.searchDetailsObj}
|
|
||||||
documentDetailsObj={props.documentDetailsObj}
|
|
||||||
docsOffline={props.props.docsOffline}
|
docsOffline={props.props.docsOffline}
|
||||||
|
documentDetailsObj={props.documentDetailsObj}
|
||||||
|
showFilteredDocs={props.showFilteredDocs}
|
||||||
|
eventsObj={props.eventsObj}
|
||||||
/>
|
/>
|
||||||
{showRepresentations == true && (
|
{showRepresentations == true && (
|
||||||
<RepresentationList
|
<RepresentationList
|
||||||
|
|||||||
@@ -15,67 +15,89 @@ export default function CaseNoticeBanner(props) {
|
|||||||
const bannerOpenCookie = typeof cookie.get("pedwNotice") == "undefined";
|
const bannerOpenCookie = typeof cookie.get("pedwNotice") == "undefined";
|
||||||
let messagesObjArr = messagesObj.value;
|
let messagesObjArr = messagesObj.value;
|
||||||
|
|
||||||
|
let todaysDate = new Date();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{messagesObjArr.map((message, index) => (
|
{messagesObjArr.map((message, index) => (
|
||||||
<div className="govuk-warning-text noticebanner" key={index}>
|
<div key={index}>
|
||||||
<strong className="govuk-warning-text__text">
|
{todaysDate.toISOString() >= message.scheduledstart &&
|
||||||
<span className="govuk-visually-hidden">Warning</span>
|
todaysDate.toISOString() <= message.scheduledend && (
|
||||||
</strong>
|
<div
|
||||||
<div>
|
className="govuk-warning-text noticebanner"
|
||||||
<div className=" govuk-body-s">
|
key={index}
|
||||||
<h2 className="govuk-heading-s">
|
>
|
||||||
{(
|
<strong className="govuk-warning-text__text">
|
||||||
message.subject.match(
|
<span className="govuk-visually-hidden">
|
||||||
new RegExp(">>>", "g")
|
{t("case:notice-label")}
|
||||||
) || []
|
</span>
|
||||||
).length > 0
|
</strong>
|
||||||
? router.locale == "cy"
|
<div>
|
||||||
? message.subject
|
<div className=" govuk-body-s">
|
||||||
.split("Banner ")[1]
|
<h2 className="govuk-heading-s">
|
||||||
.split(">>>")[1]
|
{(
|
||||||
: message.subject
|
message.subject.match(
|
||||||
.split("Banner ")[1]
|
new RegExp(">>>", "g")
|
||||||
.split(">>>")[0]
|
) || []
|
||||||
: (
|
).length > 0
|
||||||
message.subject.match(
|
? router.locale == "cy"
|
||||||
new RegExp(";", "g")
|
? message.subject
|
||||||
) || []
|
.split("Banner ")[1]
|
||||||
).length > 0
|
.split(">>>")[1]
|
||||||
? router.locale == "cy"
|
: message.subject
|
||||||
? message.subject
|
.split("Banner ")[1]
|
||||||
.split("Banner ")[1]
|
.split(">>>")[0]
|
||||||
.split(";")[1]
|
: (
|
||||||
: message.subject
|
message.subject.match(
|
||||||
.split("Banner ")[1]
|
new RegExp(";", "g")
|
||||||
.split(";")[0]
|
) || []
|
||||||
: message.subject.split("Banner ")[1]}
|
).length > 0
|
||||||
</h2>
|
? router.locale == "cy"
|
||||||
</div>
|
? message.subject
|
||||||
<div className="govuk-body-s">
|
.split("Banner ")[1]
|
||||||
{(
|
.split(";")[1]
|
||||||
message.description.match(
|
: message.subject
|
||||||
new RegExp(">>>", "g")
|
.split("Banner ")[1]
|
||||||
) || []
|
.split(";")[0]
|
||||||
).length > 0
|
: message.subject.split(
|
||||||
? router.locale == "cy"
|
"Banner "
|
||||||
? message.description.split(">>>")[1]
|
)[1]}
|
||||||
: message.description.split(">>>")[0]
|
</h2>
|
||||||
: (
|
</div>
|
||||||
message.description.match(
|
<div className="govuk-body-s">
|
||||||
new RegExp(";", "g")
|
{(
|
||||||
) || []
|
message.description.match(
|
||||||
).length > 0
|
new RegExp(">>>", "g")
|
||||||
? router.locale == "cy"
|
) || []
|
||||||
? message.description.split(";")[1]
|
).length > 0
|
||||||
: message.description.split(";")[0]
|
? router.locale == "cy"
|
||||||
: message.description}
|
? message.description.split(
|
||||||
</div>
|
">>>"
|
||||||
<div className="govuk-body-xs govuk-!-margin-bottom-0 ">
|
)[1]
|
||||||
{t("case:date-raised")}:{" "}
|
: message.description.split(
|
||||||
{formatDates(message.createdon)}
|
">>>"
|
||||||
</div>
|
)[0]
|
||||||
</div>
|
: (
|
||||||
|
message.description.match(
|
||||||
|
new RegExp(";", "g")
|
||||||
|
) || []
|
||||||
|
).length > 0
|
||||||
|
? router.locale == "cy"
|
||||||
|
? message.description.split(
|
||||||
|
";"
|
||||||
|
)[1]
|
||||||
|
: message.description.split(
|
||||||
|
";"
|
||||||
|
)[0]
|
||||||
|
: message.description}
|
||||||
|
</div>
|
||||||
|
<div className="govuk-body-xs govuk-!-margin-bottom-0 ">
|
||||||
|
{t("case:date-raised")}:{" "}
|
||||||
|
{formatDates(message.createdon)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
|||||||
+555
-50
@@ -30,6 +30,7 @@ const DocumentDetails = (props) => {
|
|||||||
setDocumentDetails,
|
setDocumentDetails,
|
||||||
setCurrentPage,
|
setCurrentPage,
|
||||||
docsOffline,
|
docsOffline,
|
||||||
|
showFilteredDocs,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -40,6 +41,53 @@ const DocumentDetails = (props) => {
|
|||||||
const [selectedOption, setSelectedOption] = useState(10);
|
const [selectedOption, setSelectedOption] = useState(10);
|
||||||
const [documentTypes, setDocumentTypes] = useState([{}]);
|
const [documentTypes, setDocumentTypes] = useState([{}]);
|
||||||
const [selectedDocumentType, setSelectedDocumentType] = useState("all");
|
const [selectedDocumentType, setSelectedDocumentType] = useState("all");
|
||||||
|
const [selectAll, setSelectAll] = useState(false);
|
||||||
|
|
||||||
|
const [checkedItems, setCheckedItems] = useState(
|
||||||
|
documentTypes.reduce((acc, item) => {
|
||||||
|
acc[item.pinswg_isharedocumentlocations] = false;
|
||||||
|
return acc;
|
||||||
|
}, {})
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleCheckboxChange = (e) => {
|
||||||
|
const { name, checked } = e.target;
|
||||||
|
|
||||||
|
setCheckedItems((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[name]: checked,
|
||||||
|
}));
|
||||||
|
setSelectAll(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSelectAllChange = (e) => {
|
||||||
|
const { checked } = e.target;
|
||||||
|
setSelectAll(checked); // Set the 'Select All' state
|
||||||
|
if (checked) {
|
||||||
|
// If 'Select All' is checked, check all the other checkboxes
|
||||||
|
|
||||||
|
setCheckedItems(
|
||||||
|
documentTypes.reduce((acc, item) => {
|
||||||
|
acc[item.pinswg_isharedocumentlocations] = true;
|
||||||
|
return acc;
|
||||||
|
}, {})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
clearCheckboxes();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const clearCheckboxes = () => {
|
||||||
|
setSelectAll(false);
|
||||||
|
setCheckedItems(
|
||||||
|
documentTypes.reduce((acc, item) => {
|
||||||
|
acc[item.pinswg_isharedocumentlocations] = false;
|
||||||
|
return acc;
|
||||||
|
}, {}),
|
||||||
|
setSelectedDocumentType("all"),
|
||||||
|
setCurrentPage(1)
|
||||||
|
);
|
||||||
|
};
|
||||||
let ShowDocLinks = false;
|
let ShowDocLinks = false;
|
||||||
let checkShowDocLinks = docsOffline != false ? true : false;
|
let checkShowDocLinks = docsOffline != false ? true : false;
|
||||||
|
|
||||||
@@ -107,12 +155,13 @@ const DocumentDetails = (props) => {
|
|||||||
id="showDocumentType"
|
id="showDocumentType"
|
||||||
name="showDocumentType"
|
name="showDocumentType"
|
||||||
>
|
>
|
||||||
<option value="all">
|
<option value="all" key="00">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="All")].value_cy',
|
path: '$..[?(@ && @.value=="All")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: "All"}
|
: "All"}
|
||||||
</option>
|
</option>
|
||||||
{documentTypes.map((item, key) => {
|
{documentTypes.map((item, key) => {
|
||||||
@@ -124,12 +173,14 @@ const DocumentDetails = (props) => {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
item.pinswg_isharedocumentlocationsLabel +
|
item.pinswg_isharedocumentlocationsLabel +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: item.pinswg_isharedocumentlocationsLabel ||
|
: item.pinswg_isharedocumentlocationsLabel ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -236,9 +287,12 @@ const DocumentDetails = (props) => {
|
|||||||
{/* {t("case:documents-date-published-label")} */}
|
{/* {t("case:documents-date-published-label")} */}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => sortDataBy("createdon")}
|
onClick={() =>
|
||||||
|
sortDataBy("pinswg_documentpublisheddate")
|
||||||
|
}
|
||||||
className={
|
className={
|
||||||
orderByState == "createdon"
|
orderByState ==
|
||||||
|
"pinswg_documentpublisheddate"
|
||||||
? fieldSortState == "asc"
|
? 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 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 sortDesc`
|
||||||
@@ -269,12 +323,14 @@ const DocumentDetails = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
documentDetailsArr.map((item, key) => {
|
documentDetailsArr.map((item, key) => {
|
||||||
let detailsObj = jsonpath(
|
let detailsObj = jsonpath({
|
||||||
"$..[?(@._pinswg_documentids_value=='" +
|
path:
|
||||||
|
"$..[?(@ && @._pinswg_documentids_value=='" +
|
||||||
incidentid +
|
incidentid +
|
||||||
"')]",
|
"')]",
|
||||||
item
|
json: item,
|
||||||
);
|
sanbox: {},
|
||||||
|
});
|
||||||
detailsObj = item;
|
detailsObj = item;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -355,14 +411,16 @@ const DocumentDetails = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
sanbox: {},
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -411,6 +469,452 @@ const DocumentDetails = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const FilteredDocumentView = (documentDetailsArr) => {
|
||||||
|
documentDetailsArr = documentDetailsArr.value;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{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>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="docFilteringGroup">
|
||||||
|
<div className="govuk-!-width-one-third">
|
||||||
|
{" "}
|
||||||
|
<div className="govuk-form-group filterByGroup">
|
||||||
|
<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>
|
||||||
|
<button onClick={clearCheckboxes}>
|
||||||
|
{t("case:documents-clear-filter-label")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-checkboxes govuk-checkboxes--small">
|
||||||
|
{" "}
|
||||||
|
<>
|
||||||
|
<div className="govuk-checkboxes__item">
|
||||||
|
<input
|
||||||
|
className="govuk-checkboxes__input"
|
||||||
|
type="checkbox"
|
||||||
|
id={"all_" + "_" + 0}
|
||||||
|
key={0}
|
||||||
|
name={"all_" + "_" + 0}
|
||||||
|
checked={selectAll}
|
||||||
|
value={"all"}
|
||||||
|
onChange={handleSelectAllChange}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="govuk-label-s govuk-checkboxes__label"
|
||||||
|
htmlFor={"all" + "__" + 0}
|
||||||
|
>
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Pawb"
|
||||||
|
: "All"}{" "}
|
||||||
|
- (
|
||||||
|
{documentTypes.reduce(
|
||||||
|
(accumulator, currentItem) => {
|
||||||
|
return (
|
||||||
|
accumulator +
|
||||||
|
currentItem.count
|
||||||
|
);
|
||||||
|
},
|
||||||
|
0
|
||||||
|
)}
|
||||||
|
)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
{documentTypes.map((item, key) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="govuk-checkboxes__item"
|
||||||
|
key={key}
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
className="govuk-checkboxes__input"
|
||||||
|
type="checkbox"
|
||||||
|
id={
|
||||||
|
item.pinswg_isharedocumentlocations
|
||||||
|
}
|
||||||
|
key={key}
|
||||||
|
value={
|
||||||
|
item.pinswg_isharedocumentlocations
|
||||||
|
}
|
||||||
|
name={
|
||||||
|
item.pinswg_isharedocumentlocations
|
||||||
|
}
|
||||||
|
checked={
|
||||||
|
checkedItems[
|
||||||
|
item
|
||||||
|
.pinswg_isharedocumentlocations
|
||||||
|
]
|
||||||
|
}
|
||||||
|
onChange={handleCheckboxChange}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="govuk-label-s govuk-checkboxes__label"
|
||||||
|
htmlFor={
|
||||||
|
item.pinswg_isharedocumentlocations
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
item.pinswg_isharedocumentlocationsLabel +
|
||||||
|
'")].value_cy',
|
||||||
|
jsonL: transLookup,
|
||||||
|
sanbox: {},
|
||||||
|
})
|
||||||
|
: item.pinswg_isharedocumentlocationsLabel ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}{" "}
|
||||||
|
- ({item.count})
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>{" "}
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
className="govuk-button "
|
||||||
|
type="button"
|
||||||
|
onClick={(e) => {
|
||||||
|
const data = [
|
||||||
|
...document.querySelectorAll(
|
||||||
|
".govuk-checkboxes__input:checked"
|
||||||
|
),
|
||||||
|
].map((e) => e.value);
|
||||||
|
setSelectedDocumentType(data);
|
||||||
|
setCurrentPage(1);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("case:documents-filter-button")}
|
||||||
|
</button>
|
||||||
|
</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>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-!-width-two-thirds docResults">
|
||||||
|
{" "}
|
||||||
|
<dl className=" govuk-summary-list govuk-!-margin-bottom-9 results documentList">
|
||||||
|
<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(
|
||||||
|
"pinswg_documentpublisheddate"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className={
|
||||||
|
orderByState ==
|
||||||
|
"pinswg_documentpublisheddate"
|
||||||
|
? 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,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
|
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>
|
||||||
|
|
||||||
|
{/* {
|
||||||
|
detailsObj.pinswg_documentpublisheddate
|
||||||
|
}
|
||||||
|
{
|
||||||
|
detailsObj.pinswg_latestpublisheddate
|
||||||
|
} */}
|
||||||
|
|
||||||
|
{detailsObj.pinswg_documentpublisheddate !=
|
||||||
|
null
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_documentpublisheddate
|
||||||
|
)
|
||||||
|
: formatDates(
|
||||||
|
detailsObj.pinswg_latestpublisheddate
|
||||||
|
)}
|
||||||
|
{/* {_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_documentpublisheddate"
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_documentpublisheddate
|
||||||
|
)
|
||||||
|
: _.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}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const getDocumentTypes = useCallback(() => {
|
const getDocumentTypes = useCallback(() => {
|
||||||
getSearchDocumentTypes(props.incidentid).then((data) => {
|
getSearchDocumentTypes(props.incidentid).then((data) => {
|
||||||
setDocumentTypes(data);
|
setDocumentTypes(data);
|
||||||
@@ -427,8 +931,9 @@ const DocumentDetails = (props) => {
|
|||||||
selectedOption,
|
selectedOption,
|
||||||
selectedDocumentType
|
selectedDocumentType
|
||||||
)
|
)
|
||||||
.then((data) => data)
|
// .then((data) => data)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
setDocumentSearchState(true);
|
||||||
setDocumentDetails(data);
|
setDocumentDetails(data);
|
||||||
setShowSpinnerState(false);
|
setShowSpinnerState(false);
|
||||||
});
|
});
|
||||||
@@ -498,8 +1003,10 @@ const DocumentDetails = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const [showDocumentSearchState, setDocumentSearchState] = useState(false);
|
const [showDocumentSearchState, setDocumentSearchState] = useState(false);
|
||||||
const [orderByState, setOrderbyState] = useState("createdon");
|
const [orderByState, setOrderbyState] = useState(
|
||||||
const [fieldSortState, setfieldSortState] = useState("asc");
|
"pinswg_documentpublisheddate"
|
||||||
|
);
|
||||||
|
const [fieldSortState, setfieldSortState] = useState("desc");
|
||||||
|
|
||||||
let documentSearchState = () => {
|
let documentSearchState = () => {
|
||||||
showDocumentSearchState == true
|
showDocumentSearchState == true
|
||||||
@@ -509,14 +1016,14 @@ const DocumentDetails = (props) => {
|
|||||||
|
|
||||||
const sortDataBy = (whichField) => {
|
const sortDataBy = (whichField) => {
|
||||||
setOrderbyState(whichField);
|
setOrderbyState(whichField);
|
||||||
setfieldSortState("asc");
|
setfieldSortState("desc");
|
||||||
|
|
||||||
getDocumentResults(1, whichField, fieldSortState);
|
getDocumentResults(1, whichField, fieldSortState);
|
||||||
whichField == orderByState
|
whichField == orderByState
|
||||||
? fieldSortState == "desc"
|
? fieldSortState == "asc"
|
||||||
? setfieldSortState("asc")
|
? setfieldSortState("desc")
|
||||||
: setfieldSortState("desc")
|
: setfieldSortState("asc")
|
||||||
: setfieldSortState("asc");
|
: setfieldSortState("desc");
|
||||||
setCurrentPage(1);
|
setCurrentPage(1);
|
||||||
setShowSpinnerState(true);
|
setShowSpinnerState(true);
|
||||||
};
|
};
|
||||||
@@ -551,7 +1058,7 @@ const DocumentDetails = (props) => {
|
|||||||
return docObj;
|
return docObj;
|
||||||
};
|
};
|
||||||
|
|
||||||
const searchDocumentResultsObj = docDetailsObj();
|
//const searchDocumentResultsObj = docDetailsObj();
|
||||||
}, [
|
}, [
|
||||||
incidentid,
|
incidentid,
|
||||||
setDocumentDetails,
|
setDocumentDetails,
|
||||||
@@ -563,30 +1070,28 @@ const DocumentDetails = (props) => {
|
|||||||
getDocumentResults,
|
getDocumentResults,
|
||||||
]);
|
]);
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="govuk-grid-row">
|
||||||
<div>
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-grid-row">
|
<h2 className="govuk-heading-m ">
|
||||||
<div className="govuk-grid-column-full">
|
{t("case:documents-heading-label")}
|
||||||
<h2>{t("case:documents-heading-label")}</h2>
|
</h2>
|
||||||
{_.isEmpty(documentDetailsObj.value) ? (
|
{_.isEmpty(documentDetailsObj.value) ? (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-two-thirds">
|
<div className="govuk-grid-column-two-thirds">
|
||||||
<h3>
|
<h3>
|
||||||
{showDocumentSearchState == false
|
{showDocumentSearchState == false
|
||||||
? t("case:documents-checking-label")
|
? t("case:documents-checking-label")
|
||||||
: t(
|
: t("case:documents-non-available-label")}
|
||||||
"case:documents-non-available-label"
|
</h3>
|
||||||
)}
|
</div>
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
DocumentView(documentDetailsArr)
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
) : showFilteredDocs == "true" ? (
|
||||||
|
FilteredDocumentView(documentDetailsArr)
|
||||||
|
) : (
|
||||||
|
DocumentView(documentDetailsArr)
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,221 @@
|
|||||||
|
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 EIADetails = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
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) {
|
||||||
|
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(eventsArr.length > 0);
|
||||||
|
|
||||||
|
return (
|
||||||
|
eventsArr.length > 0 && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="card">
|
||||||
|
<div className="card-body">
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t("case:event-title")}
|
||||||
|
</h2>
|
||||||
|
{eventsArr.map(
|
||||||
|
(item, key) =>
|
||||||
|
item.pinswg_eventpublishflag && (
|
||||||
|
<>
|
||||||
|
{" "}
|
||||||
|
<div className="eventContainer">
|
||||||
|
<div className="eventColumn">
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{" "}
|
||||||
|
{t(
|
||||||
|
"case:event-name-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
: {item.pinswg_name}
|
||||||
|
</div>
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventname"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-event-name-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:{" "}
|
||||||
|
{item.pinswg_eventname}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="eventColumn">
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddressline1"
|
||||||
|
) && (
|
||||||
|
<>
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-address-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddressline1
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddressline2"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddressline2
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresstown"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresstown
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresscounty"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresscounty
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresscounty"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresspostcode
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{/* type of event
|
||||||
|
start date date of event - end date of event
|
||||||
|
|
||||||
|
if virtual event no address showNoOfRecords
|
||||||
|
show event address */}
|
||||||
|
<div className="eventColumn">
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-start-date-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:{" "}
|
||||||
|
{formatDates(
|
||||||
|
item.pinswg_dateeventrequested
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_enddateoftheevent"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-end-date-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:{" "}
|
||||||
|
{item.pinswg_enddateoftheevent !=
|
||||||
|
null &&
|
||||||
|
formatDates(
|
||||||
|
item.pinswg_enddateoftheevent
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="eventColumn">
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue",
|
||||||
|
]
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-type-of-event-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:{" "}
|
||||||
|
{
|
||||||
|
item[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
)}{" "}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapStateToProps = (state) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
setEventDetails: (eventsObj) => {
|
||||||
|
dispatch(setEventDetails(eventsObj));
|
||||||
|
},
|
||||||
|
setCurrentPage: (currentPage) => {
|
||||||
|
dispatch(setCurrentPage(currentPage));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(EIADetails);
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
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 EventsDetails = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
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) {
|
||||||
|
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(eventsArr.length > 0);
|
||||||
|
|
||||||
|
return (
|
||||||
|
eventsArr.length > 0 && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="card">
|
||||||
|
<div className="card-body">
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t("case:event-title")}
|
||||||
|
</h2>
|
||||||
|
{eventsArr.map(
|
||||||
|
(item, key) =>
|
||||||
|
item.pinswg_eventpublishflag && (
|
||||||
|
<>
|
||||||
|
{" "}
|
||||||
|
<div className="eventContainer">
|
||||||
|
<div className="eventColumn">
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{" "}
|
||||||
|
{t(
|
||||||
|
"case:event-name-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
: {item.pinswg_name}
|
||||||
|
</div>
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventname"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-event-name-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:{" "}
|
||||||
|
{item.pinswg_eventname}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="eventColumn">
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddressline1"
|
||||||
|
) && (
|
||||||
|
<>
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-address-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddressline1
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddressline2"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddressline2
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresstown"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresstown
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresscounty"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresscounty
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresscounty"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresspostcode
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{/* type of event
|
||||||
|
start date date of event - end date of event
|
||||||
|
|
||||||
|
if virtual event no address showNoOfRecords
|
||||||
|
show event address */}
|
||||||
|
<div className="eventColumn">
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-start-date-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:{" "}
|
||||||
|
{formatDates(
|
||||||
|
item.pinswg_dateeventrequested
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_enddateoftheevent"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-end-date-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:{" "}
|
||||||
|
{item.pinswg_enddateoftheevent !=
|
||||||
|
null &&
|
||||||
|
formatDates(
|
||||||
|
item.pinswg_enddateoftheevent
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="eventColumn">
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue",
|
||||||
|
]
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
<b>
|
||||||
|
{t(
|
||||||
|
"case:event-type-of-event-label"
|
||||||
|
)}
|
||||||
|
</b>
|
||||||
|
:{" "}
|
||||||
|
{
|
||||||
|
item[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
)}{" "}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapStateToProps = (state) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
setEventDetails: (eventsObj) => {
|
||||||
|
dispatch(setEventDetails(eventsObj));
|
||||||
|
},
|
||||||
|
setCurrentPage: (currentPage) => {
|
||||||
|
dispatch(setCurrentPage(currentPage));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(EventsDetails);
|
||||||
@@ -0,0 +1,364 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderCondtionalRadioList,
|
||||||
|
RenderPickList,
|
||||||
|
RenderRichMultiline,
|
||||||
|
shouldDisableButton,
|
||||||
|
} from "./representationElements";
|
||||||
|
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
|
const ConsultationAgent = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
appellantApplicantRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
currentView,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} = props;
|
||||||
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
"filesList"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
|
function (el) {
|
||||||
|
return el != null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
: [];
|
||||||
|
|
||||||
|
const files = acceptedFiles.map((file) => (
|
||||||
|
<li key={file.path}>
|
||||||
|
{file.path} - {file.size} bytes
|
||||||
|
</li>
|
||||||
|
));
|
||||||
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-from-an-agent-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:kind-of-consultation-label"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
name="representationType"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname="representationType"
|
||||||
|
optionsArr={
|
||||||
|
appellantApplicantRepresentationArr
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationOnBehalfOf"
|
||||||
|
datafieldname="representationOnBehalfOf"
|
||||||
|
// label={t("myrepresentations:capacity-select-what-capacity-label")}
|
||||||
|
options={["Yes", "No"]}
|
||||||
|
id="representationOnBehalfOf"
|
||||||
|
className="govuk-radios__input"
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
component={RenderCondtionalRadioList}
|
||||||
|
validate={[required]}
|
||||||
|
legend={t("case:representation-onbehalfof")}
|
||||||
|
hint={t(
|
||||||
|
"myrepresentations:representation-onbehalfof-hint"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Consultation Response"
|
||||||
|
? t(
|
||||||
|
"myrepresentations:enter-comment-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:consultation-comment-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Consultation Response" && (
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationComments"
|
||||||
|
id="representationComments"
|
||||||
|
component={RenderRichMultiline}
|
||||||
|
type="text"
|
||||||
|
rows="5"
|
||||||
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={
|
||||||
|
props.name + "-hint"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.appealType == "846040004" ? (
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={
|
||||||
|
props.props.caseReference
|
||||||
|
}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// .length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails
|
||||||
|
// .filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
disabled={shouldDisableButton({
|
||||||
|
props,
|
||||||
|
formObj,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
{/* {router.query.state != "edit" && (
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
setRepresentationCapacity();
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationCapacity",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
{t("common:back-link")}
|
||||||
|
</a>
|
||||||
|
)} */}
|
||||||
|
{savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
null,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
|
reduxForm({
|
||||||
|
form: "representationForm",
|
||||||
|
enableReinitialize: true,
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
})(ConsultationAgent)
|
||||||
|
);
|
||||||
@@ -0,0 +1,337 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderPickList,
|
||||||
|
RenderRichMultiline,
|
||||||
|
shouldDisableButton,
|
||||||
|
} from "./representationElements";
|
||||||
|
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
|
const ConsultationAppellant = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
appellantApplicantRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
currentView,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} = props;
|
||||||
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
|
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
||||||
|
|
||||||
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
"filesList"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
|
function (el) {
|
||||||
|
return el != null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
: [];
|
||||||
|
|
||||||
|
filterFilesList = filterFilesList.filter(
|
||||||
|
(value, index, self) =>
|
||||||
|
index === self.findIndex((t) => t.name === value.name)
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-from-an-appellant-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:kind-of-consultation-label"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
name="representationType"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname="representationType"
|
||||||
|
optionsArr={
|
||||||
|
appellantApplicantRepresentationArr
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Consultation Response"
|
||||||
|
? t("myrepresentations:enter-comment-label")
|
||||||
|
: t(
|
||||||
|
"myrepresentations:consultation-comment-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Consultation Response" && (
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationComments"
|
||||||
|
id="representationComments"
|
||||||
|
component={RenderRichMultiline}
|
||||||
|
type="text"
|
||||||
|
rows="5"
|
||||||
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={
|
||||||
|
props.name + "-hint"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.appealType == "846040004" ? (
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={props.props.caseReference}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference.repDetails
|
||||||
|
// .filesList.length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
disabled={shouldDisableButton({
|
||||||
|
props,
|
||||||
|
formObj,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
{/* {router.query.state != "edit" && (
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
setRepresentationCapacity();
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationType",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
{t("common:back-link")}
|
||||||
|
</a>
|
||||||
|
)} */}
|
||||||
|
|
||||||
|
{savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//const mapStateToProps = (state, props) => {};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
null,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
|
reduxForm({
|
||||||
|
form: "representationForm",
|
||||||
|
enableReinitialize: true,
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
})(ConsultationAppellant)
|
||||||
|
);
|
||||||
@@ -0,0 +1,378 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderCondtionalRadioList,
|
||||||
|
RenderPickList,
|
||||||
|
RenderRichMultiline,
|
||||||
|
shouldDisableButton,
|
||||||
|
} from "./representationElements";
|
||||||
|
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
|
const ConsultationInterestedPartyPerson = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
interestedPersonRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} = props;
|
||||||
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
"filesList"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
|
function (el) {
|
||||||
|
return el != null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
: [];
|
||||||
|
|
||||||
|
const files = acceptedFiles.map((file) => (
|
||||||
|
<li key={file.path}>
|
||||||
|
{file.path} - {file.size} bytes
|
||||||
|
</li>
|
||||||
|
));
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:kind-of-consultation-label"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
name="representationType"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname="representationType"
|
||||||
|
validate={[required]}
|
||||||
|
optionsArr={
|
||||||
|
interestedPersonRepresentationArr
|
||||||
|
}
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationOnBehalfOf"
|
||||||
|
datafieldname="representationOnBehalfOf"
|
||||||
|
// label="In what capacity do you wish to make representations on this case?"
|
||||||
|
options={[
|
||||||
|
t(
|
||||||
|
"myrepresentations:questionnaire-yes"
|
||||||
|
),
|
||||||
|
t("myrepresentations:questionnaire-no"),
|
||||||
|
]}
|
||||||
|
id="representationOnBehalfOf"
|
||||||
|
className="govuk-radios__input"
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
component={RenderCondtionalRadioList}
|
||||||
|
validate={[required]}
|
||||||
|
legend={t("case:representation-onbehalfof")}
|
||||||
|
hint={t(
|
||||||
|
"myrepresentations:representation-onbehalfof-hint"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Consultation Response"
|
||||||
|
? t(
|
||||||
|
"myrepresentations:enter-comment-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:consultation-comment-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
{" "}
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Consultation Response" && (
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationComments"
|
||||||
|
id="representationComments"
|
||||||
|
component={RenderRichMultiline}
|
||||||
|
type="text"
|
||||||
|
rows="5"
|
||||||
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={
|
||||||
|
props.name + "-hint"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.appealType == "846040004" ? (
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={
|
||||||
|
props.props.caseReference
|
||||||
|
}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// .length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails
|
||||||
|
// .filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
disabled={shouldDisableButton({
|
||||||
|
props,
|
||||||
|
formObj,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
{/*
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
setRepresentationCapacity();
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationCapacity",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationType",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
{t("case:summary-back-button-label")}
|
||||||
|
</a> */}
|
||||||
|
{savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//const mapStateToProps = (state, props) => {};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
null,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
|
reduxForm({
|
||||||
|
form: "representationForm",
|
||||||
|
enableReinitialize: true,
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
})(ConsultationInterestedPartyPerson)
|
||||||
|
);
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -10,9 +10,15 @@ import {
|
|||||||
RenderCondtionalRadioList,
|
RenderCondtionalRadioList,
|
||||||
RenderPickList,
|
RenderPickList,
|
||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
|
shouldDisableButton,
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
const RepAgent = (props) => {
|
const RepAgent = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -27,264 +33,283 @@ const RepAgent = (props) => {
|
|||||||
currentView,
|
currentView,
|
||||||
setRepFileName,
|
setRepFileName,
|
||||||
updateRepresentation,
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const [savingStatus, setSavingStatus] = useState(false);
|
|
||||||
|
|
||||||
setRepFileName(formObj.representationForm.values);
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
let filterFilesList =
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
props.currentView.caseReference.repDetails.filesList.filter(function (
|
"repDetails"
|
||||||
el
|
)
|
||||||
) {
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
return el != null;
|
"filesList"
|
||||||
});
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
|
function (el) {
|
||||||
|
return el != null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
: [];
|
||||||
|
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
<li key={file.path}>
|
<li key={file.path}>
|
||||||
{file.path} - {file.size} bytes
|
{file.path} - {file.size} bytes
|
||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
{typeof formObj.representationForm.values
|
|
||||||
.representationType == "undefined" &&
|
|
||||||
props.representationType != "Select..." ? (
|
|
||||||
<>
|
|
||||||
<h2 className="govuk-heading-m ">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:representation-from-an-agent-heading"
|
|
||||||
)}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-body-m"
|
|
||||||
htmlFor="representationType"
|
|
||||||
>
|
|
||||||
{t("myrepresentations:kind-of-rep-label")}
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<Field
|
|
||||||
name="representationType"
|
|
||||||
component={RenderPickList}
|
|
||||||
datafieldname="representationType"
|
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<label className="govuk-label govuk-body-m">
|
|
||||||
{t("myrepresentations:representation-type")}:{" "}
|
|
||||||
{router.locale == "cy"
|
|
||||||
? formObj.representationForm.values
|
|
||||||
.representationType == "Questionnaire"
|
|
||||||
? "Holiadur"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType == "Statement"
|
|
||||||
? "Datganiad"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType ==
|
|
||||||
"Final comments"
|
|
||||||
? "Sylwadau terfynol"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType}
|
|
||||||
</label>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{(typeof props.representationType != "undefined" ||
|
|
||||||
typeof formObj.representationForm.values.representationType !=
|
|
||||||
"undefined") && (
|
|
||||||
<>
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<Field
|
|
||||||
name="representationOnBehalfOf"
|
|
||||||
datafieldname="representationOnBehalfOf"
|
|
||||||
// label={t("myrepresentations:capacity-select-what-capacity-label")}
|
|
||||||
options={["Yes", "No"]}
|
|
||||||
id="representationOnBehalfOf"
|
|
||||||
className="govuk-radios__input"
|
|
||||||
errorMsg={t(
|
|
||||||
"myrepresentations:select-an-option-label"
|
|
||||||
)}
|
|
||||||
component={RenderCondtionalRadioList}
|
|
||||||
validate={[required]}
|
|
||||||
legend={
|
|
||||||
"Are you acting on behalf of a company, group or organisation?"
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<p className="govuk-body">
|
|
||||||
{t("myrepresentations:enter-comment-label")}
|
|
||||||
</p>
|
|
||||||
<fieldset
|
|
||||||
className="govuk-fieldset"
|
|
||||||
aria-describedby="commentBox-hint"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
id="commentBox-hint"
|
|
||||||
className="govuk-hint"
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
"myrepresentations:comments-set-out-label"
|
|
||||||
)}
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<Field
|
|
||||||
name="representationComments"
|
|
||||||
id="representationComments"
|
|
||||||
component={RenderRichMultiline}
|
|
||||||
type="text"
|
|
||||||
rows="5"
|
|
||||||
className="govuk-textarea govuk-input--width-30"
|
|
||||||
aria-describedby={props.name + "-hint"}
|
|
||||||
/>
|
|
||||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:publish-policy-label"
|
|
||||||
)}
|
|
||||||
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
|
||||||
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
|
||||||
<FileUploadField
|
|
||||||
name={"representationDocuments"}
|
|
||||||
id={"representationDocuments"}
|
|
||||||
label={t(
|
|
||||||
"myrepresentations:add-files-label"
|
|
||||||
)}
|
|
||||||
ticketnumber={props.props.caseReference}
|
|
||||||
hint={"sdsd"}
|
|
||||||
fileList={[]}
|
|
||||||
setFilesForRepresentation={[]}
|
|
||||||
containerID={
|
|
||||||
props.props.props.accountDetails
|
|
||||||
.containerID
|
|
||||||
}
|
|
||||||
filenamePrefix={props}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{props.currentView.caseReference.hasOwnProperty(
|
|
||||||
"repDetails"
|
|
||||||
) &&
|
|
||||||
props.currentView.caseReference.repDetails
|
|
||||||
.filesList.length > 0 ? (
|
|
||||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
|
||||||
{filterFilesList.map((blob, i) => (
|
|
||||||
<div
|
|
||||||
key={blob.name + "_" + i}
|
|
||||||
className="govuk-!-margin-bottom-5 fileThumb "
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
src={getThumbnailIconByExtension(
|
|
||||||
blob.name
|
|
||||||
)}
|
|
||||||
alt={blob.name}
|
|
||||||
width="50"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
|
|
||||||
{blob.name} (
|
|
||||||
{bytesToSize(blob.size)})
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</fieldset>
|
|
||||||
</div>{" "}
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{typeof formObj.representationForm.values.representationType !=
|
|
||||||
"undefined" && (
|
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-form-group">
|
||||||
<button
|
{typeof formObj.representationForm.values
|
||||||
type="submit"
|
.representationType == "undefined" &&
|
||||||
className="govuk-button"
|
props.representationType != "Select..." ? (
|
||||||
data-module="govuk-button"
|
<>
|
||||||
>
|
<h2 className="govuk-heading-m ">
|
||||||
{t("common:continue-button")}
|
{t(
|
||||||
</button>
|
"myrepresentations:representation-from-an-agent-heading"
|
||||||
{/* {router.query.state != "edit" && (
|
)}
|
||||||
<a
|
</h2>
|
||||||
onClick={() => {
|
|
||||||
setRepresentationCapacity();
|
<label
|
||||||
props.updateField(
|
className="govuk-label govuk-body-m"
|
||||||
"representationForm",
|
htmlFor="representationType"
|
||||||
"representationCapacity",
|
>
|
||||||
""
|
{t("myrepresentations:kind-of-rep-label")}
|
||||||
);
|
</label>
|
||||||
}}
|
|
||||||
className="govuk-link"
|
<Field
|
||||||
>
|
name="representationType"
|
||||||
{t("common:back-link")}
|
component={RenderPickList}
|
||||||
</a>
|
datafieldname="representationType"
|
||||||
)} */}
|
optionsArr={
|
||||||
{savingStatus ? (
|
appellantApplicantRepresentationArr
|
||||||
<span className=" progress-save-active">
|
|
||||||
{router.locale == "cy"
|
|
||||||
? "Nôl data"
|
|
||||||
: "Saving data"}
|
|
||||||
<img
|
|
||||||
className="data-loading-icon"
|
|
||||||
src="/assets/images/loading.gif"
|
|
||||||
alt={
|
|
||||||
router.locale == "cy"
|
|
||||||
? "Nôl data"
|
|
||||||
: "Saving data"
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</span>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<label className="govuk-label govuk-body-m">
|
||||||
className="govuk-button progress-save "
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
onClick={() => {
|
{router.locale == "cy"
|
||||||
let valuesObj =
|
? formObj.representationForm.values
|
||||||
props.props.props.form[props.form]
|
.representationType == "Questionnaire"
|
||||||
.values || {};
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
console.log("valuesobj:", valuesObj);
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
delete valuesObj["_pinswg_appellant_value"];
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
console.log("on save:", valuesObj);
|
"Final comments"
|
||||||
updateRepresentation(
|
? "Sylwadau terfynol"
|
||||||
valuesObj,
|
: formObj.representationForm.values
|
||||||
false,
|
.representationType
|
||||||
true
|
: formObj.representationForm.values
|
||||||
);
|
.representationType}
|
||||||
}}
|
</label>
|
||||||
>
|
|
||||||
{t("common:save-exit-button")}
|
|
||||||
</button>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
{(typeof props.representationType != "undefined" ||
|
||||||
</>
|
typeof formObj.representationForm.values
|
||||||
);
|
.representationType != "undefined") && (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationOnBehalfOf"
|
||||||
|
datafieldname="representationOnBehalfOf"
|
||||||
|
// label={t("myrepresentations:capacity-select-what-capacity-label")}
|
||||||
|
options={["Yes", "No"]}
|
||||||
|
id="representationOnBehalfOf"
|
||||||
|
className="govuk-radios__input"
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
component={RenderCondtionalRadioList}
|
||||||
|
validate={[required]}
|
||||||
|
legend={t("case:representation-onbehalfof")}
|
||||||
|
hint={t(
|
||||||
|
"myrepresentations:representation-onbehalfof-hint"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("myrepresentations:enter-comment-label")}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
{/* <div
|
||||||
|
id="commentBox-hint"
|
||||||
|
className="govuk-hint"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:comments-set-out-label"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
</div> */}
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationComments"
|
||||||
|
id="representationComments"
|
||||||
|
component={RenderRichMultiline}
|
||||||
|
type="text"
|
||||||
|
rows="5"
|
||||||
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={
|
||||||
|
props.name + "-hint"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={
|
||||||
|
props.props.caseReference
|
||||||
|
}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// .length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails
|
||||||
|
// .filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
disabled={shouldDisableButton({
|
||||||
|
props,
|
||||||
|
formObj,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
updateField: (form, field, newValue) =>
|
updateField: (form, field, newValue) =>
|
||||||
dispatch(change(form, field, newValue)),
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
|
|||||||
@@ -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 React from "react";
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, reduxForm } from "redux-form";
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
@@ -10,13 +9,15 @@ import {
|
|||||||
FileUploadField,
|
FileUploadField,
|
||||||
RenderPickList,
|
RenderPickList,
|
||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
|
shouldDisableButton,
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
// import {
|
import {
|
||||||
// setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
// setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
// } from "../../../store/currentView/action";
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
const RepAppellant = (props) => {
|
const RepAppellant = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -31,242 +32,277 @@ const RepAppellant = (props) => {
|
|||||||
currentView,
|
currentView,
|
||||||
setRepFileName,
|
setRepFileName,
|
||||||
updateRepresentation,
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const [savingStatus, setSavingStatus] = useState(false);
|
|
||||||
|
|
||||||
setRepFileName(formObj.representationForm.values);
|
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
||||||
|
|
||||||
let filterFilesList =
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
props.currentView.caseReference.repDetails.filesList.filter(function (
|
setRepFileName(formObj.representationForm.values);
|
||||||
el
|
|
||||||
) {
|
|
||||||
return el != null;
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
<>
|
"repDetails"
|
||||||
<div className="govuk-grid-row">
|
)
|
||||||
<div className="govuk-form-group">
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
{typeof formObj.representationForm.values
|
"filesList"
|
||||||
.representationType == "undefined" &&
|
)
|
||||||
props.representationType != "Select..." ? (
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
<>
|
function (el) {
|
||||||
<h2 className="govuk-heading-m ">
|
return el != null;
|
||||||
{t(
|
}
|
||||||
"myrepresentations:representation-from-an-appellant-heading"
|
)
|
||||||
)}
|
: []
|
||||||
</h2>
|
: [];
|
||||||
<label
|
|
||||||
className="govuk-label govuk-body-m"
|
filterFilesList = filterFilesList.filter(
|
||||||
htmlFor="representationType"
|
(value, index, self) =>
|
||||||
>
|
index === self.findIndex((t) => t.name === value.name)
|
||||||
{t("myrepresentations:kind-of-rep-label")}
|
);
|
||||||
</label>
|
|
||||||
<Field
|
return (
|
||||||
name="representationType"
|
<>
|
||||||
component={RenderPickList}
|
|
||||||
datafieldname="representationType"
|
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<label className="govuk-label govuk-body-m">
|
|
||||||
{t("myrepresentations:representation-type")}:{" "}
|
|
||||||
{router.locale == "cy"
|
|
||||||
? formObj.representationForm.values
|
|
||||||
.representationType == "Questionnaire"
|
|
||||||
? "Holiadur"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType == "Statement"
|
|
||||||
? "Datganiad"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType ==
|
|
||||||
"Final comments"
|
|
||||||
? "Sylwadau terfynol"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType}
|
|
||||||
</label>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{(typeof props.representationType != "undefined" ||
|
|
||||||
typeof formObj.representationForm.values.representationType !=
|
|
||||||
"undefined") && (
|
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<p className="govuk-body">
|
{typeof formObj.representationForm.values
|
||||||
{t("myrepresentations:enter-comment-label")}
|
.representationType == "undefined" &&
|
||||||
</p>
|
props.representationType != "Select..." ? (
|
||||||
<fieldset
|
<>
|
||||||
className="govuk-fieldset"
|
<h2 className="govuk-heading-m ">
|
||||||
aria-describedby="commentBox-hint"
|
{t(
|
||||||
>
|
"myrepresentations:representation-from-an-appellant-heading"
|
||||||
<div id="commentBox-hint" className="govuk-hint">
|
|
||||||
{t("myrepresentations:comments-set-out-label")}:
|
|
||||||
</div>
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<Field
|
|
||||||
name="representationComments"
|
|
||||||
id="representationComments"
|
|
||||||
component={RenderRichMultiline}
|
|
||||||
type="text"
|
|
||||||
rows="5"
|
|
||||||
className="govuk-textarea govuk-input--width-30"
|
|
||||||
aria-describedby={props.name + "-hint"}
|
|
||||||
/>
|
|
||||||
{formObj.representationForm.values.appealType ==
|
|
||||||
"846040004" ? (
|
|
||||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:questionnaire-publish-policy-label"
|
|
||||||
)}{" "}
|
|
||||||
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
|
||||||
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
) : (
|
|
||||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:publish-policy-label"
|
|
||||||
)}{" "}
|
|
||||||
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
|
||||||
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
|
||||||
<FileUploadField
|
|
||||||
name={"representationDocuments"}
|
|
||||||
id={"representationDocuments"}
|
|
||||||
label={t(
|
|
||||||
"myrepresentations:add-files-label"
|
|
||||||
)}
|
)}
|
||||||
ticketnumber={props.props.caseReference}
|
</h2>
|
||||||
hint={"sdsd"}
|
<label
|
||||||
fileList={[]}
|
className="govuk-label govuk-body-m"
|
||||||
setFilesForRepresentation={[]}
|
htmlFor="representationType"
|
||||||
containerID={
|
>
|
||||||
props.props.props.accountDetails
|
{t("myrepresentations:kind-of-rep-label")}
|
||||||
.containerID
|
</label>
|
||||||
}
|
<Field
|
||||||
filenamePrefix={props}
|
name="representationType"
|
||||||
/>
|
component={RenderPickList}
|
||||||
</div>
|
datafieldname="representationType"
|
||||||
{props.currentView.caseReference.hasOwnProperty(
|
optionsArr={
|
||||||
"repDetails"
|
appellantApplicantRepresentationArr
|
||||||
) &&
|
|
||||||
props.currentView.caseReference.repDetails.filesList
|
|
||||||
.length > 0 ? (
|
|
||||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
|
||||||
{filterFilesList.map((blob, i) => (
|
|
||||||
<div
|
|
||||||
key={blob.name + "_" + i}
|
|
||||||
className="govuk-!-margin-bottom-5 fileThumb "
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
src={getThumbnailIconByExtension(
|
|
||||||
blob.name
|
|
||||||
)}
|
|
||||||
alt={blob.name}
|
|
||||||
width="50"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
|
|
||||||
{blob.name} (
|
|
||||||
{bytesToSize(blob.size)})
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</fieldset>
|
|
||||||
</div>{" "}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{typeof formObj.representationForm.values.representationType !=
|
|
||||||
"undefined" && (
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-button-group">
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
className="govuk-button"
|
|
||||||
data-module="govuk-button"
|
|
||||||
>
|
|
||||||
{t("common:continue-button")}
|
|
||||||
</button>
|
|
||||||
{/* {router.query.state != "edit" && (
|
|
||||||
<a
|
|
||||||
onClick={() => {
|
|
||||||
setRepresentationCapacity();
|
|
||||||
props.updateField(
|
|
||||||
"representationForm",
|
|
||||||
"representationType",
|
|
||||||
""
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
className="govuk-link"
|
|
||||||
>
|
|
||||||
{t("common:back-link")}
|
|
||||||
</a>
|
|
||||||
)} */}
|
|
||||||
|
|
||||||
{savingStatus ? (
|
|
||||||
<span className=" progress-save-active">
|
|
||||||
{router.locale == "cy"
|
|
||||||
? "Nôl data"
|
|
||||||
: "Saving data"}
|
|
||||||
<img
|
|
||||||
className="data-loading-icon"
|
|
||||||
src="/assets/images/loading.gif"
|
|
||||||
alt={
|
|
||||||
router.locale == "cy"
|
|
||||||
? "Nôl data"
|
|
||||||
: "Saving data"
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</span>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<label className="govuk-label govuk-body-m">
|
||||||
className="govuk-button progress-save "
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
onClick={() => {
|
{router.locale == "cy"
|
||||||
let valuesObj =
|
? formObj.representationForm.values
|
||||||
props.props.props.form[props.form]
|
.representationType == "Questionnaire"
|
||||||
.values || {};
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
console.log("valuesobj:", valuesObj);
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
delete valuesObj["_pinswg_appellant_value"];
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
console.log("on save:", valuesObj);
|
"Final comments"
|
||||||
updateRepresentation(
|
? "Sylwadau terfynol"
|
||||||
valuesObj,
|
: formObj.representationForm.values
|
||||||
false,
|
.representationType
|
||||||
true
|
: formObj.representationForm.values
|
||||||
);
|
.representationType}
|
||||||
}}
|
</label>
|
||||||
>
|
|
||||||
{t("common:save-exit-button")}
|
|
||||||
</button>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
{(typeof props.representationType != "undefined" ||
|
||||||
</>
|
typeof formObj.representationForm.values
|
||||||
);
|
.representationType != "undefined") && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("myrepresentations:enter-comment-label")}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
{/* <div
|
||||||
|
id="commentBox-hint"
|
||||||
|
className="govuk-hint"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:comments-set-out-label"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
</div> */}
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationComments"
|
||||||
|
id="representationComments"
|
||||||
|
component={RenderRichMultiline}
|
||||||
|
type="text"
|
||||||
|
rows="5"
|
||||||
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={props.name + "-hint"}
|
||||||
|
/>
|
||||||
|
{formObj.representationForm.values
|
||||||
|
.appealType == "846040004" ? (
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label"
|
||||||
|
)}{" "}
|
||||||
|
<a
|
||||||
|
href={t(
|
||||||
|
"myrepresentations:publish-policy-link"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-link-label"
|
||||||
|
)}
|
||||||
|
</a>{" "}
|
||||||
|
{t(
|
||||||
|
"myrepresentations:publish-policy-label-two"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={props.props.caseReference}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference.repDetails
|
||||||
|
// .filesList.length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
disabled={shouldDisableButton({
|
||||||
|
props,
|
||||||
|
formObj,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//const mapStateToProps = (state, props) => {};
|
//const mapStateToProps = (state, props) => {};
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => {
|
||||||
updateField: (form, field, newValue) =>
|
return {
|
||||||
dispatch(change(form, field, newValue)),
|
updateField: (form, field, newValue) =>
|
||||||
});
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
null,
|
null,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ let RepCapacitySelection = (props) => {
|
|||||||
casesObj,
|
casesObj,
|
||||||
validate,
|
validate,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
|
setCurrentReference,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
@@ -26,6 +27,7 @@ let RepCapacitySelection = (props) => {
|
|||||||
));
|
));
|
||||||
|
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
const appealType = props.props.currentView.caseReference.appealType;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -37,6 +39,8 @@ let RepCapacitySelection = (props) => {
|
|||||||
searchResultsObj={props.props.searchResultsObj}
|
searchResultsObj={props.props.searchResultsObj}
|
||||||
myRepresentations={props.props.myRepresentations}
|
myRepresentations={props.props.myRepresentations}
|
||||||
props={props}
|
props={props}
|
||||||
|
setCurrentReference={setCurrentReference}
|
||||||
|
appealType={appealType}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
<div id="rep-details" className="">
|
<div id="rep-details" className="">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
@@ -50,9 +54,15 @@ let RepCapacitySelection = (props) => {
|
|||||||
<Field
|
<Field
|
||||||
name="representationCapacity"
|
name="representationCapacity"
|
||||||
datafieldname="representationCapacity"
|
datafieldname="representationCapacity"
|
||||||
label={t(
|
label={
|
||||||
"myrepresentations:capacity-select-what-capacity-label"
|
appealType != 846040002
|
||||||
)}
|
? t(
|
||||||
|
"myrepresentations:capacity-select-what-capacity-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:sips-capacity-select-what-capacity-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
options={capacityOptionsArr}
|
options={capacityOptionsArr}
|
||||||
id="representationCapacity"
|
id="representationCapacity"
|
||||||
className="govuk-radios__input"
|
className="govuk-radios__input"
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const RepComplete = (props) => {
|
|||||||
props.props.currentView.representationMessageSent != true &&
|
props.props.currentView.representationMessageSent != true &&
|
||||||
(setRepInvolvment(
|
(setRepInvolvment(
|
||||||
props.props.currentView.caseReference.incidentid,
|
props.props.currentView.caseReference.incidentid,
|
||||||
props.props.props.props.accountDetails.loggedinUserId
|
props.props.props.props.accountDetails.accountDetails.contactid
|
||||||
),
|
),
|
||||||
sendRepCompleteMessage(
|
sendRepCompleteMessage(
|
||||||
props.props.props.props.accountDetails.containerID,
|
props.props.props.props.accountDetails.containerID,
|
||||||
@@ -68,7 +68,8 @@ const RepComplete = (props) => {
|
|||||||
")",
|
")",
|
||||||
"pinswg_Contact@odata.bind":
|
"pinswg_Contact@odata.bind":
|
||||||
"/contacts(" +
|
"/contacts(" +
|
||||||
props.props.props.props.accountDetails.loggedinUserId +
|
props.props.props.props.accountDetails.accountDetails
|
||||||
|
.contactid +
|
||||||
")",
|
")",
|
||||||
"pinswg_appealcasetype":
|
"pinswg_appealcasetype":
|
||||||
props.props.currentView.caseReference.appealType,
|
props.props.currentView.caseReference.appealType,
|
||||||
@@ -92,9 +93,7 @@ const RepComplete = (props) => {
|
|||||||
{t("myrepresentations:rep-complete-heading")}
|
{t("myrepresentations:rep-complete-heading")}
|
||||||
</h1>
|
</h1>
|
||||||
<p>{t("myrepresentations:rep-complete-para-one")}</p>
|
<p>{t("myrepresentations:rep-complete-para-one")}</p>
|
||||||
|
|
||||||
<p>{t("myrepresentations:rep-complete-para-two")}</p>
|
<p>{t("myrepresentations:rep-complete-para-two")}</p>
|
||||||
|
|
||||||
<p> {t("myrepresentations:rep-complete-para-three")}</p>
|
<p> {t("myrepresentations:rep-complete-para-three")}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
|
|||||||
@@ -7,11 +7,22 @@ import { connect } from "react-redux";
|
|||||||
import RepComplete from "./representationComplete";
|
import RepComplete from "./representationComplete";
|
||||||
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
||||||
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
||||||
|
import Link from "next/link";
|
||||||
|
import {
|
||||||
|
bytesToSize,
|
||||||
|
getThumbnailIconByExtension,
|
||||||
|
formatDates,
|
||||||
|
updateLinks,
|
||||||
|
} from "../../utils";
|
||||||
|
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import {
|
||||||
|
setCurrentReference,
|
||||||
|
setCurrentView,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
const RepCompleteSubmit = (props) => {
|
const RepCompleteSubmit = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
const [confirmSections, setConfirmSections] = useState(false);
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
@@ -25,6 +36,11 @@ const RepCompleteSubmit = (props) => {
|
|||||||
setRepresentationSubmitConfirmation,
|
setRepresentationSubmitConfirmation,
|
||||||
setRepresentationMessageSent,
|
setRepresentationMessageSent,
|
||||||
setRepresentationReset,
|
setRepresentationReset,
|
||||||
|
setShowQuestionnaireSection,
|
||||||
|
showQuestionnaireSection,
|
||||||
|
questionnaireCount,
|
||||||
|
finaliseAppealProcess,
|
||||||
|
setCurrentReference,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
@@ -33,9 +49,9 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
|
|
||||||
const [confirmSections, setConfirmSections] = useState(false);
|
let repFormData = formObj.representationForm.values;
|
||||||
|
|
||||||
const repFormData = formObj.representationForm.values;
|
repFormData = updateLinks(repFormData);
|
||||||
|
|
||||||
//const repDate = new Date();
|
//const repDate = new Date();
|
||||||
|
|
||||||
@@ -90,14 +106,13 @@ const RepCompleteSubmit = (props) => {
|
|||||||
// "caseRef": props.props.currentView.caseReference.currentReference,
|
// "caseRef": props.props.currentView.caseReference.currentReference,
|
||||||
// });
|
// });
|
||||||
|
|
||||||
console.log("///////// repFormData:", repFormData);
|
//console.log("///////// repFormData:", repFormData);
|
||||||
|
|
||||||
const whichQuestionnaireCheck = () => {
|
const whichQuestionnaireCheck = () => {
|
||||||
{
|
{
|
||||||
switch (currentView.caseReference.appealType) {
|
switch (currentView.caseReference.appealType) {
|
||||||
case 846040000:
|
case 846040000:
|
||||||
case 846040001:
|
case 846040001:
|
||||||
case 846040006:
|
|
||||||
case 846040025:
|
case 846040025:
|
||||||
case 846040004:
|
case 846040004:
|
||||||
case 846040018:
|
case 846040018:
|
||||||
@@ -110,6 +125,10 @@ const RepCompleteSubmit = (props) => {
|
|||||||
props={props}
|
props={props}
|
||||||
formObj={formObj}
|
formObj={formObj}
|
||||||
setSubmitBack={setSubmitBack}
|
setSubmitBack={setSubmitBack}
|
||||||
|
setShowQuestionnaireSection={
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
}
|
||||||
|
setRepresentationSubmit={setRepresentationSubmit}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@@ -121,6 +140,10 @@ const RepCompleteSubmit = (props) => {
|
|||||||
props={props}
|
props={props}
|
||||||
formObj={formObj}
|
formObj={formObj}
|
||||||
setSubmitBack={setSubmitBack}
|
setSubmitBack={setSubmitBack}
|
||||||
|
setShowQuestionnaireSection={
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
}
|
||||||
|
setRepresentationSubmit={setRepresentationSubmit}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@@ -133,51 +156,99 @@ const RepCompleteSubmit = (props) => {
|
|||||||
|
|
||||||
let buildAppealFilesArray = [];
|
let buildAppealFilesArray = [];
|
||||||
|
|
||||||
let filesUploadObj =
|
let filesUploadObj = props.currentView.fileList;
|
||||||
formObj.representationForm.values.representationDocuments;
|
|
||||||
|
// formObj.representationForm.values.representationDocuments;
|
||||||
|
|
||||||
for (let key in filesUploadObj) {
|
for (let key in filesUploadObj) {
|
||||||
typeof filesUploadObj[key].name != "undefined" &&
|
typeof filesUploadObj[key].name != "undefined" &&
|
||||||
buildAppealFilesArray.push({
|
buildAppealFilesArray.push({
|
||||||
"name": filesUploadObj[key].name,
|
"name": filesUploadObj[key].name,
|
||||||
"size": filesUploadObj[key].size,
|
"size": filesUploadObj[key].contentLength,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
// console.log(
|
||||||
buildAppealFilesArray,
|
// buildAppealFilesArray,
|
||||||
formObj.representationForm.values.filesList
|
// formObj.representationForm.values.filesList
|
||||||
);
|
// );
|
||||||
|
|
||||||
buildAppealFilesArray = formObj.representationForm.values.hasOwnProperty(
|
// buildAppealFilesArray = formObj.representationForm.values.hasOwnProperty(
|
||||||
"filesList"
|
// "filesList"
|
||||||
)
|
// )
|
||||||
? buildAppealFilesArray.concat(
|
// ? formObj.representationForm.values.filesList
|
||||||
formObj.representationForm.values.filesList
|
// : [];
|
||||||
)
|
|
||||||
: buildAppealFilesArray;
|
|
||||||
|
|
||||||
console.log(buildAppealFilesArray);
|
let arrUniq = [
|
||||||
|
...new Map(buildAppealFilesArray.map((v) => [v.name, v])).values(),
|
||||||
// const arrUniq = [
|
];
|
||||||
// ...new Map(buildAppealFilesArray.map((v) => [v.name, v])).values(),
|
|
||||||
// ];
|
|
||||||
|
|
||||||
buildAppealFilesArray = buildAppealFilesArray.filter(function (el) {
|
buildAppealFilesArray = buildAppealFilesArray.filter(function (el) {
|
||||||
return el != null;
|
return el != null;
|
||||||
});
|
});
|
||||||
|
|
||||||
const arrUniq = buildAppealFilesArray.filter(
|
// const arrUniq = buildAppealFilesArray.filter(
|
||||||
(obj1, i, arr) => arr.findIndex((obj2) => obj2.name === obj1.name) === i
|
// (obj1, i, arr) => arr.findIndex((obj2) => obj2.name === obj1.name) === i
|
||||||
);
|
// );
|
||||||
|
|
||||||
console.log(arrUniq);
|
//arrUniq = arrUniq.concat(filesUploadObj);
|
||||||
|
|
||||||
|
function removeNullObjects(arr) {
|
||||||
|
if (arr.length === 0) {
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
return arr.filter((obj) => obj !== null);
|
||||||
|
}
|
||||||
|
function removeEmptyObjects(arr) {
|
||||||
|
if (arr.length === 0) {
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
return arr.filter(
|
||||||
|
(obj) =>
|
||||||
|
obj && typeof obj === "object" && Object.keys(obj).length > 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
arrUniq = removeNullObjects(arrUniq);
|
||||||
|
arrUniq = removeEmptyObjects(arrUniq);
|
||||||
|
|
||||||
Object.assign(formObj.representationForm.values, {
|
Object.assign(formObj.representationForm.values, {
|
||||||
"filesList": arrUniq,
|
"filesList": arrUniq,
|
||||||
});
|
});
|
||||||
|
|
||||||
let filterFiles = [];
|
let filterFiles = [];
|
||||||
|
|
||||||
|
function showRepsEnded(endDate) {
|
||||||
|
let date = new Date();
|
||||||
|
date = new Date(date.toDateString());
|
||||||
|
let end = new Date(endDate);
|
||||||
|
end.setUTCHours(23);
|
||||||
|
end.setUTCMinutes(59);
|
||||||
|
end.setUTCSeconds(59);
|
||||||
|
end.toISOString();
|
||||||
|
|
||||||
|
return end > date ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const checkRepDatePassed = () => {
|
||||||
|
if (repFormData.representationType == "Questionnaire") {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
if (repFormData.representationType == "Final comments") {
|
||||||
|
return repFormData.hasOwnProperty(
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
) && showRepsEnded(repFormData.pinswg_finalcommentsduedate)
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
}
|
||||||
|
if (repFormData.representationType == "Statement") {
|
||||||
|
return repFormData.hasOwnProperty("pinswg_statementduedate") &&
|
||||||
|
showRepsEnded(repFormData.pinswg_statementduedate)
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{currentView.representationSubmitConfirmation == true ? (
|
{currentView.representationSubmitConfirmation == true ? (
|
||||||
@@ -193,21 +264,33 @@ const RepCompleteSubmit = (props) => {
|
|||||||
<div className="govuk-grid-row govuk-body">
|
<div className="govuk-grid-row govuk-body">
|
||||||
<h1 className="govuk-heading-m ">
|
<h1 className="govuk-heading-m ">
|
||||||
{" "}
|
{" "}
|
||||||
{t(
|
{repFormData.appealType == 846040002
|
||||||
"myrepresentations:rep-check-submit-heading"
|
? t(
|
||||||
)}
|
"myrepresentations:consultation-check-submit-heading"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:rep-check-submit-heading"
|
||||||
|
)}
|
||||||
</h1>
|
</h1>
|
||||||
<dl className="govuk-summary-list ">
|
<dl className="govuk-summary-list ">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-top-9">
|
<h2 className="govuk-heading-m govuk-!-margin-top-9">
|
||||||
{t(
|
{repFormData.appealType == 846040002
|
||||||
"myrepresentations:rep-check-your-rep-heading"
|
? t(
|
||||||
)}
|
"myrepresentations:consultation-check-your-rep-heading"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:rep-check-your-rep-heading"
|
||||||
|
)}
|
||||||
</h2>
|
</h2>
|
||||||
<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(
|
{repFormData.appealType == 846040002
|
||||||
"case:representation-representation-type"
|
? t(
|
||||||
)}
|
"case:consultation-representation-type"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:representation-representation-type"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
@@ -226,7 +309,7 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__actions">
|
<dd className="govuk-summary-list__actions">
|
||||||
<a
|
{/* <a
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -236,11 +319,11 @@ const RepCompleteSubmit = (props) => {
|
|||||||
{t("common:change-link-label")}
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
{/* {FieldsTranslations(
|
{FieldsTranslations(
|
||||||
rows[0].value
|
rows[0].value
|
||||||
)} */}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{_.has(
|
{_.has(
|
||||||
@@ -266,7 +349,24 @@ const RepCompleteSubmit = (props) => {
|
|||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSubmitBack();
|
// setSubmitBack();
|
||||||
|
setCurrentReference({
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
repFormData.caseRef,
|
||||||
|
"currentType":
|
||||||
|
"myRepresentations",
|
||||||
|
"incidentid":
|
||||||
|
repFormData.incidentID,
|
||||||
|
"appealType":
|
||||||
|
repFormData.appealType,
|
||||||
|
"repDetails":
|
||||||
|
repFormData,
|
||||||
|
});
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
@@ -301,7 +401,26 @@ const RepCompleteSubmit = (props) => {
|
|||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSubmitBack();
|
// setSubmitBack();
|
||||||
|
setCurrentReference(
|
||||||
|
{
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
repFormData.caseRef,
|
||||||
|
"currentType":
|
||||||
|
"myRepresentations",
|
||||||
|
"incidentid":
|
||||||
|
repFormData.incidentID,
|
||||||
|
"appealType":
|
||||||
|
repFormData.appealType,
|
||||||
|
"repDetails":
|
||||||
|
repFormData,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
@@ -319,53 +438,72 @@ const RepCompleteSubmit = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<div className="govuk-summary-list__row">
|
{repFormData.representationType !=
|
||||||
<dt className="govuk-summary-list__key">
|
"Questionnaire" &&
|
||||||
{t("case:representation-comments")}
|
repFormData.appealType != 846040002 && (
|
||||||
</dt>
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t(
|
||||||
|
"case:representation-comments"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
<span
|
<span
|
||||||
className="multiline-elipsis"
|
className="multiline-elipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.representationComments,
|
__html: repFormData.representationComments,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__actions">
|
<dd className="govuk-summary-list__actions">
|
||||||
<a
|
<a
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSubmitBack();
|
// setSubmitBack();
|
||||||
}}
|
|
||||||
>
|
setCurrentReference({
|
||||||
{t("common:change-link-label")}
|
"ticketnumber":
|
||||||
<span className="govuk-visually-hidden">
|
repFormData.ticketnumber,
|
||||||
{" "}
|
"currentReference":
|
||||||
{/* {FieldsTranslations(
|
repFormData.caseRef,
|
||||||
|
"currentType":
|
||||||
|
"myRepresentations",
|
||||||
|
"incidentid":
|
||||||
|
repFormData.incidentID,
|
||||||
|
"appealType":
|
||||||
|
repFormData.appealType,
|
||||||
|
"repDetails":
|
||||||
|
repFormData,
|
||||||
|
});
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"common:change-link-label"
|
||||||
|
)}
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
{" "}
|
||||||
|
{/* {FieldsTranslations(
|
||||||
rows[0].value
|
rows[0].value
|
||||||
)} */}
|
)} */}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</dd>
|
</dd>
|
||||||
</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("case:representation-files")}
|
{t("case:representation-files")}
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{formObj.representationForm.values
|
{arrUniq.length > 0
|
||||||
.filesList.length > 0
|
? arrUniq.map((blob, i) => (
|
||||||
? ((filterFiles =
|
|
||||||
formObj.representationForm.values.filesList.filter(
|
|
||||||
function (el) {
|
|
||||||
return el != null;
|
|
||||||
}
|
|
||||||
)),
|
|
||||||
filterFiles.map((blob, i) => (
|
|
||||||
<div
|
<div
|
||||||
key={blob.name + "_" + i}
|
key={blob.name + "_" + i}
|
||||||
className="govuk-!-margin-bottom-5 fileThumb "
|
className="govuk-!-margin-bottom-5 fileThumb "
|
||||||
@@ -386,8 +524,8 @@ const RepCompleteSubmit = (props) => {
|
|||||||
)
|
)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)))
|
))
|
||||||
: ""}{" "}
|
: ""}
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__actions">
|
<dd className="govuk-summary-list__actions">
|
||||||
@@ -395,10 +533,38 @@ const RepCompleteSubmit = (props) => {
|
|||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSubmitBack();
|
repFormData.representationType ==
|
||||||
|
"Questionnaire"
|
||||||
|
? (setShowQuestionnaireSection(
|
||||||
|
questionnaireCount ==
|
||||||
|
7
|
||||||
|
? 6
|
||||||
|
: 8
|
||||||
|
),
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
))
|
||||||
|
: (setCurrentReference({
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
repFormData.caseRef,
|
||||||
|
"currentType":
|
||||||
|
"myRepresentations",
|
||||||
|
"incidentid":
|
||||||
|
repFormData.incidentID,
|
||||||
|
"appealType":
|
||||||
|
repFormData.appealType,
|
||||||
|
"repDetails":
|
||||||
|
repFormData,
|
||||||
|
}),
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("common:change-link-label")}
|
{t("common:change-link-label")}
|
||||||
|
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
{/* {FieldsTranslations(
|
{/* {FieldsTranslations(
|
||||||
@@ -408,92 +574,136 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{whichQuestionnaireCheck()}
|
{repFormData.representationType ==
|
||||||
|
"Questionnaire"
|
||||||
|
? whichQuestionnaireCheck()
|
||||||
|
: ""}
|
||||||
</dl>
|
</dl>
|
||||||
<p>
|
<p>
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:rep-check-tandc-para-one"
|
"myrepresentations:rep-check-tandc-para-one"
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:rep-check-tandc-para-two"
|
"myrepresentations:rep-check-tandc-para-two"
|
||||||
)}
|
)}{" "}
|
||||||
|
<Link
|
||||||
|
href={t("common:footer-privacy-link")}
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"common:footer-privacy-notice-link-label"
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:rep-check-tandc-para-three"
|
"myrepresentations:rep-check-tandc-para-three"
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
|
{checkRepDatePassed() ? (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-warning-text noticebanner">
|
||||||
<div className="govuk-checkboxes govuk-checkboxes--small">
|
<strong className="govuk-warning-text__text">
|
||||||
<div className="govuk-checkboxes__item">
|
<span className="govuk-visually-hidden">
|
||||||
<input
|
Warning
|
||||||
name="pinswg_checkconfirmation"
|
</span>
|
||||||
id="pinswg_checkconfirmation"
|
</strong>
|
||||||
type="checkbox"
|
<div>
|
||||||
className="govuk-checkboxes__input"
|
<div className=" govuk-body-s">
|
||||||
value=""
|
<h2 className="govuk-heading-s">
|
||||||
onChange={(e) => {
|
{t(
|
||||||
setConfirmSections(
|
"myrepresentations:rep-period-passed-heading"
|
||||||
!confirmSections
|
)}
|
||||||
);
|
</h2>
|
||||||
}}
|
<p className="govuk-body-s">
|
||||||
/>
|
{t(
|
||||||
<label
|
"myrepresentations:rep-period-notice-label"
|
||||||
className="govuk-label govuk-checkboxes__label"
|
)}
|
||||||
htmlFor="pinswg_checkconfirmation"
|
</p>
|
||||||
>
|
</div>
|
||||||
{t(
|
|
||||||
"myrepresentations:rep-check-tandc-para-four"
|
|
||||||
)}
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
) : finaliseAppealProcess ? (
|
||||||
|
<div className="">
|
||||||
|
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:rep-finalising-heading"
|
||||||
|
)}
|
||||||
|
</h3>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:rep-finalising-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<p className="govuk-body textloading">
|
||||||
|
{t("myrepresentations:rep-wait-label")}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<div className="govuk-checkboxes govuk-checkboxes--small">
|
||||||
|
<div className="govuk-checkboxes__item">
|
||||||
|
<input
|
||||||
|
name="pinswg_checkconfirmation"
|
||||||
|
id="pinswg_checkconfirmation"
|
||||||
|
type="checkbox"
|
||||||
|
className="govuk-checkboxes__input"
|
||||||
|
value=""
|
||||||
|
onChange={(e) => {
|
||||||
|
setConfirmSections(
|
||||||
|
!confirmSections
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-checkboxes__label"
|
||||||
|
htmlFor="pinswg_checkconfirmation"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:rep-check-tandc-para-four"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* <Field
|
<div className="govuk-grid-row">
|
||||||
name="representationType"
|
<div className="govuk-button-group">
|
||||||
component={RenderPickList}
|
<button
|
||||||
datafieldname="representationType"
|
disabled={
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
confirmSections
|
||||||
/> */}
|
? false
|
||||||
</div>
|
: true
|
||||||
</div>
|
}
|
||||||
<div className="govuk-grid-row">
|
type="submit"
|
||||||
<div className="govuk-button-group">
|
className="govuk-button"
|
||||||
<button
|
data-module="govuk-button"
|
||||||
disabled={confirmSections ? false : true}
|
onClick={() => {
|
||||||
type="submit"
|
// setRepresentationSubmitConfirmation(
|
||||||
className="govuk-button"
|
// true
|
||||||
data-module="govuk-button"
|
// );
|
||||||
onClick={() => {
|
setRepresentationSubmit(
|
||||||
setRepresentationSubmitConfirmation(
|
true
|
||||||
true
|
);
|
||||||
);
|
}}
|
||||||
setRepresentationSubmit(true);
|
>
|
||||||
}}
|
{t("common:continue-button")}
|
||||||
>
|
</button>
|
||||||
{t("common:continue-button")}
|
<a
|
||||||
</button>
|
onClick={() => setSubmitBack()}
|
||||||
{/* <a
|
className="govuk-link"
|
||||||
onClick={() => {
|
>
|
||||||
setRepresentationSubmit(false);
|
{t(
|
||||||
}}
|
"case:summary-back-button-label"
|
||||||
className="govuk-button"
|
)}
|
||||||
>
|
</a>
|
||||||
{t("common:continue-button")}
|
</div>
|
||||||
</a> */}
|
</div>
|
||||||
|
</>
|
||||||
<a
|
)}
|
||||||
onClick={() => setSubmitBack()}
|
|
||||||
className="govuk-link"
|
|
||||||
>
|
|
||||||
{t("case:summary-back-button-label")}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -517,7 +727,11 @@ const mapStateToProps = (state) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
const mapDispatchToProps = (dispatch) => {
|
||||||
return {};
|
return {
|
||||||
|
setCurrentReference: (currentReference) => {
|
||||||
|
dispatch(setCurrentReference(currentReference));
|
||||||
|
},
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(RepCompleteSubmit);
|
export default connect(mapStateToProps, mapDispatchToProps)(RepCompleteSubmit);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const RepDetails = (props) => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
const { currentType, casesObj } = props;
|
const { currentType, casesObj, appealType } = props;
|
||||||
|
|
||||||
let { caseReference } = props;
|
let { caseReference } = props;
|
||||||
|
|
||||||
@@ -28,10 +28,11 @@ const RepDetails = (props) => {
|
|||||||
: caseReference
|
: caseReference
|
||||||
: caseReference;
|
: caseReference;
|
||||||
|
|
||||||
detailsObj = jsonpath(
|
detailsObj = jsonpath({
|
||||||
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
|
||||||
setCaseDetailsObj
|
json: setCaseDetailsObj,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
@@ -96,10 +97,14 @@ const RepDetails = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("myrepresentations:capacity-para-one")}
|
{appealType == 846040002
|
||||||
|
? t("myrepresentations:sips-capacity-para-one")
|
||||||
|
: t("myrepresentations:capacity-para-one")}
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("myrepresentations:capacity-para-two")}
|
{appealType == 846040002
|
||||||
|
? t("myrepresentations:sips-capacity-para-two")
|
||||||
|
: t("myrepresentations:capacity-para-two")}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,13 +2,31 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import router from "next/router";
|
import router from "next/router";
|
||||||
import React, { useMemo, useState } from "react";
|
import React, { useMemo, useState, useRef } from "react";
|
||||||
import DatePicker from "react-datepicker";
|
import DatePicker from "react-datepicker";
|
||||||
import "react-datepicker/dist/react-datepicker.css";
|
import "react-datepicker/dist/react-datepicker.css";
|
||||||
import Dropzone from "react-dropzone";
|
import Dropzone from "react-dropzone";
|
||||||
import "react-quill-new/dist/quill.snow.css";
|
import "react-quill-new/dist/quill.snow.css";
|
||||||
import { Field } from "redux-form";
|
import { Field, change } from "redux-form";
|
||||||
const ReactQuill = dynamic(() => import("react-quill-new"), { ssr: false });
|
import {
|
||||||
|
uploadSingleFile,
|
||||||
|
deleteBlob,
|
||||||
|
deleteRepBlob,
|
||||||
|
getFilesFromBlobHashed,
|
||||||
|
getFilesFromBlobproxy,
|
||||||
|
} from "../../../actions";
|
||||||
|
|
||||||
|
const LoadingMessage = () => <div>Loading the editor...</div>;
|
||||||
|
|
||||||
|
// Dynamically import ReactQuill with a proper loading state
|
||||||
|
const ReactQuill = dynamic(
|
||||||
|
() => import("react-quill-new").then((mod) => mod.default),
|
||||||
|
{
|
||||||
|
ssr: false,
|
||||||
|
loading: () => <LoadingMessage />, // This is valid as long as it's a valid React component
|
||||||
|
}
|
||||||
|
);
|
||||||
|
import { useDispatch } from "react-redux"; // Import the useDispatch hook
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addDays,
|
addDays,
|
||||||
@@ -20,7 +38,11 @@ import {
|
|||||||
subYears,
|
subYears,
|
||||||
} from "date-fns";
|
} from "date-fns";
|
||||||
|
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import {
|
||||||
|
bytesToSize,
|
||||||
|
getThumbnailIconByExtension,
|
||||||
|
updateLinks,
|
||||||
|
} from "../../utils";
|
||||||
|
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
@@ -199,8 +221,8 @@ export const RenderRadioListWithText = ({
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
router.locale == "en"
|
router.locale == "en"
|
||||||
? "Please give further details for this selection"
|
? "Please give further details if required"
|
||||||
: "Rhowch fanylion pellach am y dewis hwn"
|
: "Rhowch fanylion pellach os oes angen"
|
||||||
}
|
}
|
||||||
component={RenderRichMultiline}
|
component={RenderRichMultiline}
|
||||||
type="text"
|
type="text"
|
||||||
@@ -279,9 +301,7 @@ export const RenderCondtionalRadioList = ({
|
|||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<div id={id + "-hint"} className="govuk-hint">
|
<div id={id + "-hint"} className="govuk-hint">
|
||||||
e.g. ‘Owners of Numbers 1-5 High Street‘, or
|
{custom.hint}
|
||||||
‘Mr and Mrs Smith‘ or ‘The executors
|
|
||||||
of Mr Evans‘ estate‘
|
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-radios">
|
<div className="govuk-radios">
|
||||||
{Object.keys(options).map((key, index) => (
|
{Object.keys(options).map((key, index) => (
|
||||||
@@ -304,40 +324,46 @@ export const RenderCondtionalRadioList = ({
|
|||||||
className="govuk-label govuk-radios__label"
|
className="govuk-label govuk-radios__label"
|
||||||
htmlFor={id + "_" + index}
|
htmlFor={id + "_" + index}
|
||||||
>
|
>
|
||||||
{options[key]}
|
{options[key] == "Yes"
|
||||||
|
? t(
|
||||||
|
"myrepresentations:questionnaire-yes"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:questionnaire-no"
|
||||||
|
)}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{value ==
|
{value == "Yes" && options[key] == "Yes" && (
|
||||||
t("myrepresentations:questionnaire-yes") &&
|
<div
|
||||||
options[key] ==
|
className="govuk-radios__conditional "
|
||||||
t(
|
id={"conditional-" + id}
|
||||||
"myrepresentations:questionnaire-yes"
|
>
|
||||||
) && (
|
|
||||||
<div
|
<div
|
||||||
className="govuk-radios__conditional "
|
className="govuk-form-group"
|
||||||
id={"conditional-" + id}
|
key={"yes_group_" + key}
|
||||||
>
|
>
|
||||||
<div
|
<label
|
||||||
className="govuk-form-group"
|
className="govuk-label"
|
||||||
key={"yes_group_" + key}
|
htmlFor={id + "_details"}
|
||||||
>
|
>
|
||||||
<label
|
{t(
|
||||||
className="govuk-label"
|
"myrepresentations:representation-onbehalfof-label"
|
||||||
htmlFor={id + "_details"}
|
)}
|
||||||
>
|
</label>
|
||||||
Enter the name of the
|
<Field
|
||||||
company/group/organisation *
|
className="govuk-input govuk-!-width-one-half"
|
||||||
</label>
|
id={id + "_details"}
|
||||||
<Field
|
name={id + "_details"}
|
||||||
className="govuk-input govuk-!-width-one-half"
|
component={RenderTextfield}
|
||||||
id={id + "_details"}
|
type="text"
|
||||||
name={id + "_details"}
|
validate={[required]}
|
||||||
component="input"
|
errorMsg={t(
|
||||||
type="text"
|
"myrepresentations:is-required-label"
|
||||||
/>
|
)}
|
||||||
</div>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -360,8 +386,7 @@ export const RenderLPACondtionalRadioList = ({
|
|||||||
...custom
|
...custom
|
||||||
}) => {
|
}) => {
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
let { t } = useTranslation();
|
||||||
console.log(error);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -394,7 +419,15 @@ export const RenderLPACondtionalRadioList = ({
|
|||||||
</label>
|
</label>
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<div id={id + "-hint"} className="govuk-hint"></div>
|
{typeof custom.hint != undefined && (
|
||||||
|
<div
|
||||||
|
className="govuk-hint govuk-!-font-size-14"
|
||||||
|
id={id + "-hint"}
|
||||||
|
>
|
||||||
|
{custom.hint}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="govuk-radios govuk-radios--small">
|
<div className="govuk-radios govuk-radios--small">
|
||||||
{Object.keys(options).map((key, index) => (
|
{Object.keys(options).map((key, index) => (
|
||||||
<div key={key} className="govuk-!-margin-bottom-3">
|
<div key={key} className="govuk-!-margin-bottom-3">
|
||||||
@@ -410,7 +443,7 @@ export const RenderLPACondtionalRadioList = ({
|
|||||||
type="radio"
|
type="radio"
|
||||||
className="govuk-radios__input"
|
className="govuk-radios__input"
|
||||||
value={options[key]}
|
value={options[key]}
|
||||||
validate={[eval(required)]}
|
// validate={[required]}
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
className="govuk-label govuk-radios__label"
|
className="govuk-label govuk-radios__label"
|
||||||
@@ -463,7 +496,7 @@ export const RenderPickList = ({
|
|||||||
errorMsg,
|
errorMsg,
|
||||||
...custom
|
...custom
|
||||||
}) => {
|
}) => {
|
||||||
console.log(custom.disabled);
|
// console.log(custom.disabled);
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -494,7 +527,9 @@ export const RenderPickList = ({
|
|||||||
disabled={custom.disabled}
|
disabled={custom.disabled}
|
||||||
// onChange={onChange}
|
// onChange={onChange}
|
||||||
>
|
>
|
||||||
<option>{t("common:drop-down-select")}</option>
|
<option value="" disabled defaultValue>
|
||||||
|
{t("common:drop-down-select")}
|
||||||
|
</option>
|
||||||
{Object.keys(optionsArr).map((key, index) => {
|
{Object.keys(optionsArr).map((key, index) => {
|
||||||
return (
|
return (
|
||||||
<option key={key} value={optionsArr[key]}>
|
<option key={key} value={optionsArr[key]}>
|
||||||
@@ -506,6 +541,13 @@ export const RenderPickList = ({
|
|||||||
: optionsArr[key] ==
|
: optionsArr[key] ==
|
||||||
"Final comments"
|
"Final comments"
|
||||||
? "Sylwadau terfynol"
|
? "Sylwadau terfynol"
|
||||||
|
: optionsArr[key] ==
|
||||||
|
"Written representations"
|
||||||
|
? "Sylwadau ysgrifenedig"
|
||||||
|
: optionsArr[key] == "Inquiry"
|
||||||
|
? "Ymchwiliad"
|
||||||
|
: optionsArr[key] == "Hearing"
|
||||||
|
? "Gwrandawiad"
|
||||||
: optionsArr[key]
|
: optionsArr[key]
|
||||||
: optionsArr[key]}
|
: optionsArr[key]}
|
||||||
</option>
|
</option>
|
||||||
@@ -557,6 +599,7 @@ export const RenderTextfield = ({
|
|||||||
name={name}
|
name={name}
|
||||||
id={id}
|
id={id}
|
||||||
type={type}
|
type={type}
|
||||||
|
disabled={custom.disabled == true ? true : false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@@ -695,7 +738,7 @@ export const RenderMultiline = ({
|
|||||||
toolbar: [
|
toolbar: [
|
||||||
[{ "header": [1, 2, false] }],
|
[{ "header": [1, 2, false] }],
|
||||||
["bold", "italic", "underline", "blockquote"],
|
["bold", "italic", "underline", "blockquote"],
|
||||||
[{ "list": "ordered" }, { "list": "bullet" }, "link"],
|
[{ "list": "ordered" }, { "list": "bullet" }],
|
||||||
["clean"],
|
["clean"],
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@@ -752,6 +795,7 @@ export const RenderRichMultiline = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const changeEdit = (valStr) => {
|
const changeEdit = (valStr) => {
|
||||||
|
valStr = updateLinks(valStr);
|
||||||
setEditValue(valStr);
|
setEditValue(valStr);
|
||||||
input.onChange(valStr);
|
input.onChange(valStr);
|
||||||
};
|
};
|
||||||
@@ -847,6 +891,8 @@ const rejectStyle = {
|
|||||||
|
|
||||||
export const RenderFileUpload = (field) => {
|
export const RenderFileUpload = (field) => {
|
||||||
const files = field.input.value;
|
const files = field.input.value;
|
||||||
|
const dispatch = useDispatch(); // Get dispatch using useDispatch hook
|
||||||
|
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const style = useMemo(
|
const style = useMemo(
|
||||||
@@ -898,111 +944,146 @@ export const RenderFileUpload = (field) => {
|
|||||||
return "/assets/images/documenttypes/zip.png";
|
return "/assets/images/documenttypes/zip.png";
|
||||||
break;
|
break;
|
||||||
case "image/jpeg":
|
case "image/jpeg":
|
||||||
|
return "/assets/images/documenttypes/jpg.png";
|
||||||
case "image/png":
|
case "image/png":
|
||||||
return URL.createObjectURL(fileObj);
|
return "/assets/images/documenttypes/jpg.png";
|
||||||
|
//return URL.createObjectURL(fileObj);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return "/assets/images/documenttypes/txt.png";
|
return "/assets/images/documenttypes/default.png";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getDocumentType = (docCode) => {
|
|
||||||
switch (docCode) {
|
|
||||||
case "000001":
|
|
||||||
return "000001";
|
|
||||||
break;
|
|
||||||
case "000002":
|
|
||||||
return "000002";
|
|
||||||
break;
|
|
||||||
case "000003":
|
|
||||||
return "000003";
|
|
||||||
break;
|
|
||||||
case "000004":
|
|
||||||
return "000004";
|
|
||||||
break;
|
|
||||||
case "000005":
|
|
||||||
return "000005";
|
|
||||||
break;
|
|
||||||
case "000006":
|
|
||||||
return "000006";
|
|
||||||
break;
|
|
||||||
case "000007":
|
|
||||||
return "000007";
|
|
||||||
break;
|
|
||||||
case "000008":
|
|
||||||
return "000008";
|
|
||||||
break;
|
|
||||||
case "000009":
|
|
||||||
return "000009";
|
|
||||||
break;
|
|
||||||
case "000010":
|
|
||||||
return "000010";
|
|
||||||
break;
|
|
||||||
case "000011":
|
|
||||||
return "000011";
|
|
||||||
break;
|
|
||||||
case "000012":
|
|
||||||
return "000012";
|
|
||||||
break;
|
|
||||||
case "000013":
|
|
||||||
return "000013";
|
|
||||||
break;
|
|
||||||
case "000014":
|
|
||||||
return "000014";
|
|
||||||
break;
|
|
||||||
case "000015":
|
|
||||||
return "000015";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return "000000";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const filelistObj = field.fileList || {};
|
const filelistObj = field.fileList || {};
|
||||||
|
|
||||||
console.log("----", filelistObj.length);
|
|
||||||
|
|
||||||
let blobList = filelistObj;
|
let blobList = filelistObj;
|
||||||
|
|
||||||
// let buildAppealFilesArray = [];
|
//let blobList = field.props.currentView.fileList;
|
||||||
|
|
||||||
// let filesUploadObj = field.input.value;
|
function removeNullObjects(arr) {
|
||||||
|
if (arr.length === 0) {
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
return arr.filter((obj) => obj !== null);
|
||||||
|
}
|
||||||
|
|
||||||
// for (let key in filesUploadObj) {
|
function removeObjectsWithUndefinedKey(arr, key) {
|
||||||
// typeof filesUploadObj[key].name != "undefined" &&
|
if (arr.length === 0) {
|
||||||
// buildAppealFilesArray.push({
|
return arr;
|
||||||
// "name": filesUploadObj[key].name,
|
}
|
||||||
// "size": filesUploadObj[key].size,
|
return arr.filter((obj) => obj[key] !== undefined);
|
||||||
// });
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// buildAppealFilesArray = buildAppealFilesArray.concat(blobList);
|
function removeEmptyObjects(arr) {
|
||||||
|
if (arr.length === 0) {
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
return arr.filter(
|
||||||
|
(obj) =>
|
||||||
|
obj && typeof obj === "object" && Object.keys(obj).length > 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// blobList = buildAppealFilesArray;
|
//blobList = removeEmptyObjects(blobList);
|
||||||
|
//blobList = removeObjectsWithUndefinedKey(blobList, "name");
|
||||||
|
//blobList = removeNullObjects(blobList);
|
||||||
|
|
||||||
|
let buildAppealFilesArray = [];
|
||||||
|
|
||||||
|
let filesUploadObj = field.input.value;
|
||||||
|
|
||||||
|
for (let key in filesUploadObj) {
|
||||||
|
typeof filesUploadObj[key].name != "undefined" &&
|
||||||
|
buildAppealFilesArray.push({
|
||||||
|
"name": filesUploadObj[key].name,
|
||||||
|
"size": filesUploadObj[key].size,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//buildAppealFilesArray = buildAppealFilesArray.concat(blobList);
|
||||||
|
|
||||||
|
function removeDuplicates(arr) {
|
||||||
|
const seen = new Set();
|
||||||
|
return arr.filter((obj) => {
|
||||||
|
const serializedObj = JSON.stringify(obj);
|
||||||
|
if (seen.has(serializedObj)) {
|
||||||
|
return false; // Skip this object (duplicate)
|
||||||
|
}
|
||||||
|
seen.add(serializedObj); // Add the serialized object to the "seen" set
|
||||||
|
return true; // Keep this object
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
buildAppealFilesArray = removeDuplicates(buildAppealFilesArray);
|
||||||
|
|
||||||
|
//blobList = buildAppealFilesArray;
|
||||||
|
|
||||||
const deleteThisBlob = async (
|
const deleteThisBlob = async (
|
||||||
containerName,
|
containerName,
|
||||||
blobName,
|
blobName,
|
||||||
deleteblobhash,
|
deleteblobhash,
|
||||||
getblobshash,
|
getblobshash,
|
||||||
casefolderID
|
casefolderID,
|
||||||
|
filenamePrefix
|
||||||
) => {
|
) => {
|
||||||
deleteBlob(containerName, blobName, deleteblobhash, casefolderID)
|
deleteRepBlob(
|
||||||
|
containerName,
|
||||||
|
blobName,
|
||||||
|
deleteblobhash,
|
||||||
|
casefolderID,
|
||||||
|
filenamePrefix
|
||||||
|
)
|
||||||
.then((data) => data)
|
.then((data) => data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getFilesFromBlobHashed(
|
getFilesFromBlobHashed(
|
||||||
containerName,
|
containerName,
|
||||||
getblobshash,
|
getblobshash,
|
||||||
casefolderID
|
casefolderID + "/" + filenamePrefix
|
||||||
).then((newfilelist) => field.setFilesForAppeal(newfilelist));
|
).then((newfilelist) =>
|
||||||
|
field.setFilesForRepresentations(newfilelist.value[0])
|
||||||
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const [rejectedFiles, setRejectedFiles] = useState([]); // Store rejected files
|
||||||
|
const [completedUploadFiles, setCompletedUploadFiles] = useState(false);
|
||||||
|
const [uploadCountMessage, setUploadCountMessage] = useState("");
|
||||||
|
|
||||||
|
const handleDropRejected = (fileRejections) => {
|
||||||
|
const errors = fileRejections
|
||||||
|
.map(({ file, errors }) => {
|
||||||
|
return errors.map((error) => {
|
||||||
|
if (error.code === "file-too-large") {
|
||||||
|
return `${file.name} ${t(
|
||||||
|
"myrepresentations:fileupload-file-error-filesize-label"
|
||||||
|
)}`;
|
||||||
|
}
|
||||||
|
if (error.code === "file-invalid-type") {
|
||||||
|
return `${file.name} ${t(
|
||||||
|
"myrepresentations:fileupload-file-error-invalid-type-label"
|
||||||
|
)}`;
|
||||||
|
}
|
||||||
|
return `${file.name} ${t(
|
||||||
|
"myrepresentations:fileupload-file-error-invalid-label"
|
||||||
|
)}`;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.flat(); // Flatten the errors array
|
||||||
|
|
||||||
|
setRejectedFiles(errors); // Store the error messages for rejected files
|
||||||
|
};
|
||||||
|
|
||||||
|
// Handle accepted files (clear error message when files are accepted)
|
||||||
|
const handleDropAccepted = () => {
|
||||||
|
setErrorMessage(null);
|
||||||
|
setRejectedFiles([]); // Clear any previously rejected file errorsss
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Dropzone
|
<Dropzone
|
||||||
|
maxSize={50 * 1024 * 1024}
|
||||||
accept={{
|
accept={{
|
||||||
"application/pdf": [".pdf"],
|
"application/pdf": [".pdf"],
|
||||||
"application/msword": [".doc"],
|
"application/msword": [".doc"],
|
||||||
@@ -1012,20 +1093,116 @@ export const RenderFileUpload = (field) => {
|
|||||||
"image/jpeg": [".jpg", ".jpeg"],
|
"image/jpeg": [".jpg", ".jpeg"],
|
||||||
"application/zip": [".zip"],
|
"application/zip": [".zip"],
|
||||||
"image/png": [".png"],
|
"image/png": [".png"],
|
||||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
|
||||||
|
[".xlsx"],
|
||||||
}}
|
}}
|
||||||
onDrop={(filesToUpload, e) => {
|
onDrop={(filesToUpload, e) => {
|
||||||
|
setCompletedUploadFiles(false);
|
||||||
const renamedAcceptedFiles = filesToUpload.map(
|
const renamedAcceptedFiles = filesToUpload.map(
|
||||||
(file) =>
|
(file) =>
|
||||||
new File(
|
new File(
|
||||||
[file],
|
[file],
|
||||||
`${field.filenamePrefix}_-_Attachment_-_${file.name}`,
|
`${
|
||||||
|
field.filenamePrefix.hasOwnProperty(
|
||||||
|
"representationForm"
|
||||||
|
) &&
|
||||||
|
field.filenamePrefix.representationForm.hasOwnProperty(
|
||||||
|
"values"
|
||||||
|
) &&
|
||||||
|
field.filenamePrefix.representationForm.values.hasOwnProperty(
|
||||||
|
"repfile_name"
|
||||||
|
) &&
|
||||||
|
field.filenamePrefix.representationForm
|
||||||
|
.values.repfile_name
|
||||||
|
}_-_Attachment_-_${file.name}`,
|
||||||
{
|
{
|
||||||
type: file.type,
|
type: file.type,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
field.input.onChange(renamedAcceptedFiles);
|
field.input.onChange(renamedAcceptedFiles);
|
||||||
|
setUploadCountMessage(renamedAcceptedFiles.length);
|
||||||
|
|
||||||
|
uploadSingleFile(
|
||||||
|
renamedAcceptedFiles,
|
||||||
|
field.containerID,
|
||||||
|
field.ticketnumber +
|
||||||
|
"/" +
|
||||||
|
field.filenamePrefix.representationForm.values
|
||||||
|
.repfile_name
|
||||||
|
).then((data) => {
|
||||||
|
console.log(data);
|
||||||
|
let buildAppealFilesArray = [];
|
||||||
|
let values = field;
|
||||||
|
let filesUploadObj = renamedAcceptedFiles;
|
||||||
|
|
||||||
|
for (let key in filesUploadObj) {
|
||||||
|
typeof filesUploadObj[key].name != "undefined" &&
|
||||||
|
buildAppealFilesArray.push({
|
||||||
|
"name": filesUploadObj[key].name,
|
||||||
|
"size": filesUploadObj[key].size,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(buildAppealFilesArray);
|
||||||
|
function removeDuplicates(arr, key) {
|
||||||
|
const seen = new Set();
|
||||||
|
return arr.filter((item) => {
|
||||||
|
const value = item[key];
|
||||||
|
if (seen.has(value)) {
|
||||||
|
return false; // Duplicate found
|
||||||
|
} else {
|
||||||
|
seen.add(value); // Add value to the set
|
||||||
|
return true; // Keep the item
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
buildAppealFilesArray = values.hasOwnProperty(
|
||||||
|
"fileList"
|
||||||
|
)
|
||||||
|
? buildAppealFilesArray.concat(values.fileList)
|
||||||
|
: buildAppealFilesArray;
|
||||||
|
|
||||||
|
buildAppealFilesArray = removeDuplicates(
|
||||||
|
buildAppealFilesArray,
|
||||||
|
"name"
|
||||||
|
);
|
||||||
|
|
||||||
|
// Object.assign(values, {
|
||||||
|
// "fileList": buildAppealFilesArray,
|
||||||
|
// });
|
||||||
|
data.invalidFiles.length > 0 &&
|
||||||
|
(setRejectedFiles(data.invalidFiles),
|
||||||
|
setUploadCountMessage(
|
||||||
|
renamedAcceptedFiles.length -
|
||||||
|
data.invalidFiles.length
|
||||||
|
));
|
||||||
|
getFilesFromBlobproxy(
|
||||||
|
field.containerID,
|
||||||
|
field.ticketnumber +
|
||||||
|
"/" +
|
||||||
|
(typeof field.filenamePrefix != "object"
|
||||||
|
? field.filenamePrefix
|
||||||
|
: encodeURIComponent(
|
||||||
|
field.filenamePrefix
|
||||||
|
.representationForm.values
|
||||||
|
.repfile_name
|
||||||
|
))
|
||||||
|
).then((data) => {
|
||||||
|
data = data.value || {};
|
||||||
|
field.input.value = "";
|
||||||
|
field.setFilesForRepresentations(data[0]);
|
||||||
|
setCompletedUploadFiles(true);
|
||||||
|
|
||||||
|
dispatch(
|
||||||
|
change("representationForm", field.name, null)
|
||||||
|
); // Set the field value to null
|
||||||
|
});
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
|
onDropRejected={handleDropRejected}
|
||||||
|
onDropAccepted={handleDropAccepted}
|
||||||
>
|
>
|
||||||
{({ getRootProps, getInputProps }) => (
|
{({ getRootProps, getInputProps }) => (
|
||||||
<>
|
<>
|
||||||
@@ -1037,6 +1214,7 @@ export const RenderFileUpload = (field) => {
|
|||||||
{t(
|
{t(
|
||||||
"myrepresentations:fileupload-drop-label"
|
"myrepresentations:fileupload-drop-label"
|
||||||
)}
|
)}
|
||||||
|
(Max 50 MB)
|
||||||
</div>
|
</div>
|
||||||
<em>
|
<em>
|
||||||
(
|
(
|
||||||
@@ -1046,58 +1224,101 @@ export const RenderFileUpload = (field) => {
|
|||||||
)
|
)
|
||||||
</em>
|
</em>
|
||||||
</div>
|
</div>
|
||||||
<aside>{thumbs}</aside>
|
{/* <aside>{thumbs}</aside> */}
|
||||||
</section>
|
</section>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Dropzone>
|
</Dropzone>
|
||||||
|
{rejectedFiles.length > 0 && completedUploadFiles == true && (
|
||||||
|
<div
|
||||||
|
style={{ color: "red", marginTop: "10px" }}
|
||||||
|
className="govuk-body govuk-!-font-size-14 "
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
{rejectedFiles.map((error, index) => (
|
||||||
|
<li key={index}>{error}</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{uploadCountMessage > 0 && completedUploadFiles == false && (
|
||||||
|
<div className="govuk-body govuk-!-font-size-14">
|
||||||
|
{t("home:uploading-files-label", {
|
||||||
|
number: uploadCountMessage,
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{completedUploadFiles > 0 && uploadCountMessage >= 0 && (
|
||||||
|
<div className="govuk-body govuk-!-font-size-14">
|
||||||
|
{t("home:completed-uploading-files-label", {
|
||||||
|
number: uploadCountMessage,
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{field.meta.touched && field.meta.error && (
|
{field.meta.touched && field.meta.error && (
|
||||||
<span className="error">{field.meta.error}</span>
|
<span className="error">{field.meta.error}</span>
|
||||||
)}
|
)}
|
||||||
{files && Array.isArray(files) && (
|
{!completedUploadFiles &&
|
||||||
<ul>
|
filesUploadObj &&
|
||||||
{files.map(
|
Array.isArray(filesUploadObj) &&
|
||||||
(file, i) =>
|
filesUploadObj.map(
|
||||||
typeof file.name != "undefined" && (
|
(file, i) =>
|
||||||
<div
|
typeof file.name != "undefined" && (
|
||||||
key={file.name}
|
<div
|
||||||
className="govuk-!-margin-bottom-5 fileThumb"
|
key={file.name}
|
||||||
>
|
className="govuk-!-margin-bottom-5 fileThumb"
|
||||||
<img
|
>
|
||||||
src={getThumbnailIcon(file, file.type)}
|
<img
|
||||||
alt={file.name}
|
src={getThumbnailIcon(file, file.type)}
|
||||||
width="50"
|
alt={file.name}
|
||||||
/>
|
width="50"
|
||||||
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
|
/>
|
||||||
{file.name} ({bytesToSize(file.size)})
|
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
|
||||||
</span>
|
{file.name} ({bytesToSize(file.size)}
|
||||||
</div>
|
)<br />
|
||||||
)
|
<div id={file.name + "_" + i}>
|
||||||
)}
|
{completedUploadFiles ? (
|
||||||
</ul>
|
<p className="govuk-body govuk-!-font-size-14">
|
||||||
|
Upload complete
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
<p className="govuk-body textloading govuk-!-font-size-14">
|
||||||
|
{t(
|
||||||
|
"home:uploading-files-progress-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
{blobList.length > 0 && (
|
||||||
|
<h4>{t("myrepresentations:previously-added-files")}</h4>
|
||||||
)}
|
)}
|
||||||
{blobList.map((blob, i) => (
|
{blobList.map((blob, i) => (
|
||||||
<div
|
<div
|
||||||
key={blob.name + "_" + i}
|
key={blob.name + "_" + i}
|
||||||
className="govuk-!-margin-bottom-5 fileThumb govuk-!-margin-top-5"
|
className="govuk-!-margin-bottom-5 fileThumb govuk-!-margin-top-5"
|
||||||
>
|
>
|
||||||
<div className="">
|
<span
|
||||||
<span
|
className="govuk-summary-list__actionLink watched_link govuk-!-margin-right-5 govuk-!-text-align-left"
|
||||||
className="govuk-summary-list__actionLink watched_link govuk-!-margin-right-5 govuk-!-text-align-left"
|
onClick={() => {
|
||||||
onClick={() => {
|
setUploadCountMessage(uploadCountMessage - 1);
|
||||||
deleteThisBlob(
|
deleteThisBlob(
|
||||||
field.containerID,
|
field.containerID,
|
||||||
blob.name,
|
blob.name,
|
||||||
blob.hasheddeletepath,
|
blob.hasheddeletepath,
|
||||||
blob.hashgetblobs,
|
blob.hashgetblobs,
|
||||||
field.ticketnumber
|
field.ticketnumber,
|
||||||
);
|
blob.path.split("/")[1]
|
||||||
}}
|
);
|
||||||
title="Remove this file"
|
}}
|
||||||
>
|
title={t("home:remove-this-file-label")}
|
||||||
−
|
>
|
||||||
</span>
|
−
|
||||||
</div>
|
</span>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
src={getThumbnailIconByExtension(blob.name)}
|
src={getThumbnailIconByExtension(blob.name)}
|
||||||
alt={blob.name}
|
alt={blob.name}
|
||||||
@@ -1110,7 +1331,12 @@ export const RenderFileUpload = (field) => {
|
|||||||
"/api/file/downloadblob?container=" +
|
"/api/file/downloadblob?container=" +
|
||||||
field.containerID +
|
field.containerID +
|
||||||
"&casefolderID=" +
|
"&casefolderID=" +
|
||||||
field.ticketnumber +
|
encodeURIComponent(
|
||||||
|
field.ticketnumber +
|
||||||
|
"/" +
|
||||||
|
field.filenamePrefix.representationForm
|
||||||
|
?.values?.repfile_name
|
||||||
|
) +
|
||||||
"&blobname=" +
|
"&blobname=" +
|
||||||
blob.name +
|
blob.name +
|
||||||
blob.hashedfilepath
|
blob.hashedfilepath
|
||||||
@@ -1141,17 +1367,35 @@ export function FileUploadField(props) {
|
|||||||
ticketnumber={props.ticketnumber}
|
ticketnumber={props.ticketnumber}
|
||||||
hint={props.hint}
|
hint={props.hint}
|
||||||
fileList={props.fileList}
|
fileList={props.fileList}
|
||||||
setFilesForAppeal={props.setFilesForAppeal}
|
setFilesForRepresentations={props.setFilesForRepresentations}
|
||||||
containerID={props.containerID}
|
containerID={props.containerID}
|
||||||
filenamePrefix={
|
filenamePrefix={
|
||||||
props.filenamePrefix.formObj.representationForm.values
|
props.filenamePrefix.hasOwnProperty("representationForm") &&
|
||||||
.repfile_name
|
props.filenamePrefix.representationForm.hasOwnProperty(
|
||||||
|
"values"
|
||||||
|
) &&
|
||||||
|
props.filenamePrefix.representationForm.values.hasOwnProperty(
|
||||||
|
"repfile_name"
|
||||||
|
)
|
||||||
|
? props.filenamePrefix.representationForm.values
|
||||||
|
.repfile_name
|
||||||
|
: props.filenamePrefix.hasOwnProperty("formObj")
|
||||||
|
? props.filenamePrefix.formObj["representationForm"]
|
||||||
|
.values.repfile_name
|
||||||
|
: ""
|
||||||
}
|
}
|
||||||
|
props={props}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const shouldDisableButton = ({ props, formObj }) =>
|
||||||
|
!(
|
||||||
|
props?.currentView?.fileList?.length > 0 ||
|
||||||
|
typeof formObj?.representationForm?.values?.representationComments !==
|
||||||
|
"undefined"
|
||||||
|
);
|
||||||
// export const RepresentationGuidanceText = (appealType) => {
|
// export const RepresentationGuidanceText = (appealType) => {
|
||||||
// let { t } = useTranslation();
|
// let { t } = useTranslation();
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,25 @@
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useDropzone } from "react-dropzone";
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, reduxForm } from "redux-form";
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
import {
|
import {
|
||||||
FileUploadField,
|
FileUploadField,
|
||||||
RenderCondtionalRadioList,
|
RenderCondtionalRadioList,
|
||||||
RenderPickList,
|
RenderPickList,
|
||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
|
shouldDisableButton,
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
|
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
const RepInterestedPartyPerson = (props) => {
|
const RepInterestedPartyPerson = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
@@ -24,170 +32,221 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
setRepFileName,
|
setRepFileName,
|
||||||
updateRepresentation,
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const [savingStatus, setSavingStatus] = useState(false);
|
|
||||||
|
|
||||||
setRepFileName(formObj.representationForm.values);
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
let filterFilesList =
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
props.currentView.caseReference.repDetails.filesList.filter(function (
|
"repDetails"
|
||||||
el
|
)
|
||||||
) {
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
return el != null;
|
"filesList"
|
||||||
});
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
|
function (el) {
|
||||||
|
return el != null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
: [];
|
||||||
|
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
<li key={file.path}>
|
<li key={file.path}>
|
||||||
{file.path} - {file.size} bytes
|
{file.path} - {file.size} bytes
|
||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
{typeof formObj.representationForm.values
|
|
||||||
.representationType == "undefined" &&
|
|
||||||
props.representationType != "Select..." ? (
|
|
||||||
<>
|
|
||||||
<h2 className="govuk-heading-m ">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:representation-from-an-interested-person-heading"
|
|
||||||
)}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-body-m"
|
|
||||||
htmlFor="representationType"
|
|
||||||
>
|
|
||||||
{t("myrepresentations:kind-of-rep-label")}
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<Field
|
|
||||||
name="representationType"
|
|
||||||
component={RenderPickList}
|
|
||||||
datafieldname="representationType"
|
|
||||||
validate={[required]}
|
|
||||||
optionsArr={interestedPersonRepresentationArr}
|
|
||||||
errorMsg={t(
|
|
||||||
"myrepresentations:select-an-option-label"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<label className="govuk-label govuk-body-m">
|
|
||||||
{t("myrepresentations:representation-type")}:{" "}
|
|
||||||
{router.locale == "cy"
|
|
||||||
? formObj.representationForm.values
|
|
||||||
.representationType == "Questionnaire"
|
|
||||||
? "Holiadur"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType == "Statement"
|
|
||||||
? "Datganiad"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType ==
|
|
||||||
"Final comments"
|
|
||||||
? "Sylwadau terfynol"
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType
|
|
||||||
: formObj.representationForm.values
|
|
||||||
.representationType}
|
|
||||||
</label>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{(typeof props.representationType != "undefined" ||
|
|
||||||
typeof formObj.representationForm.values.representationType !=
|
|
||||||
"undefined") && (
|
|
||||||
<>
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<Field
|
|
||||||
name="representationOnBehalfOf"
|
|
||||||
datafieldname="representationOnBehalfOf"
|
|
||||||
// label="In what capacity do you wish to make representations on this case?"
|
|
||||||
options={["Yes", "No"]}
|
|
||||||
id="representationOnBehalfOf"
|
|
||||||
className="govuk-radios__input"
|
|
||||||
errorMsg={t(
|
|
||||||
"myrepresentations:select-an-option-label"
|
|
||||||
)}
|
|
||||||
component={RenderCondtionalRadioList}
|
|
||||||
validate={[required]}
|
|
||||||
legend={
|
|
||||||
"Are you acting on behalf of a company, group or organisation?"
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<p className="govuk-body">
|
|
||||||
{t("myrepresentations:enter-comment-label")}
|
|
||||||
</p>
|
|
||||||
<fieldset
|
|
||||||
className="govuk-fieldset"
|
|
||||||
aria-describedby="commentBox-hint"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
id="commentBox-hint"
|
|
||||||
className="govuk-hint"
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
"myrepresentations:comments-set-out-label"
|
|
||||||
)}
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<Field
|
|
||||||
name="representationComments"
|
|
||||||
id="representationComments"
|
|
||||||
component={RenderRichMultiline}
|
|
||||||
type="text"
|
|
||||||
rows="5"
|
|
||||||
className="govuk-textarea govuk-input--width-30"
|
|
||||||
aria-describedby={props.name + "-hint"}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
|
||||||
<FileUploadField
|
|
||||||
name={"representationDocuments"}
|
|
||||||
id={"representationDocuments"}
|
|
||||||
label={t(
|
|
||||||
"myrepresentations:add-files-label"
|
|
||||||
)}
|
|
||||||
ticketnumber={props.props.caseReference}
|
|
||||||
hint={"sdsd"}
|
|
||||||
fileList={[]}
|
|
||||||
setFilesForRepresentation={[]}
|
|
||||||
containerID={
|
|
||||||
props.props.props.accountDetails
|
|
||||||
.containerID
|
|
||||||
}
|
|
||||||
filenamePrefix={props}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>{" "}
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{typeof formObj.representationForm.values.representationType !=
|
|
||||||
"undefined" && (
|
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-form-group">
|
||||||
<button
|
{typeof formObj.representationForm.values
|
||||||
type="submit"
|
.representationType == "undefined" &&
|
||||||
className="govuk-button"
|
props.representationType != "Select..." ? (
|
||||||
data-module="govuk-button"
|
<>
|
||||||
>
|
<h2 className="govuk-heading-m ">
|
||||||
{t("common:continue-button")}
|
{t(
|
||||||
</button>
|
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||||
{/*
|
)}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t("myrepresentations:kind-of-rep-label")}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
name="representationType"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname="representationType"
|
||||||
|
validate={[required]}
|
||||||
|
optionsArr={
|
||||||
|
interestedPersonRepresentationArr
|
||||||
|
}
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationOnBehalfOf"
|
||||||
|
datafieldname="representationOnBehalfOf"
|
||||||
|
// label="In what capacity do you wish to make representations on this case?"
|
||||||
|
options={[
|
||||||
|
t(
|
||||||
|
"myrepresentations:questionnaire-yes"
|
||||||
|
),
|
||||||
|
t("myrepresentations:questionnaire-no"),
|
||||||
|
]}
|
||||||
|
id="representationOnBehalfOf"
|
||||||
|
className="govuk-radios__input"
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
component={RenderCondtionalRadioList}
|
||||||
|
validate={[required]}
|
||||||
|
legend={t("case:representation-onbehalfof")}
|
||||||
|
hint={t(
|
||||||
|
"myrepresentations:representation-onbehalfof-hint"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("myrepresentations:enter-comment-label")}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
{/* <div
|
||||||
|
id="commentBox-hint"
|
||||||
|
className="govuk-hint"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:comments-set-out-label"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
</div> */}
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationComments"
|
||||||
|
id="representationComments"
|
||||||
|
component={RenderRichMultiline}
|
||||||
|
type="text"
|
||||||
|
rows="5"
|
||||||
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={
|
||||||
|
props.name + "-hint"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={
|
||||||
|
props.props.caseReference
|
||||||
|
}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// .length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails
|
||||||
|
// .filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
disabled={shouldDisableButton({
|
||||||
|
props,
|
||||||
|
formObj,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
{/*
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setRepresentationCapacity();
|
setRepresentationCapacity();
|
||||||
@@ -206,49 +265,52 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
>
|
>
|
||||||
{t("case:summary-back-button-label")}
|
{t("case:summary-back-button-label")}
|
||||||
</a> */}
|
</a> */}
|
||||||
{savingStatus ? (
|
{savingStatus ? (
|
||||||
<span className=" progress-save-active">
|
<span className=" progress-save-active">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? "Nôl data"
|
? "Nôl data"
|
||||||
: "Saving data"}
|
: "Saving data"}
|
||||||
<img
|
<img
|
||||||
className="data-loading-icon"
|
className="data-loading-icon"
|
||||||
src="/assets/images/loading.gif"
|
src="/assets/images/loading.gif"
|
||||||
alt={
|
alt={
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? "Nôl data"
|
? "Nôl data"
|
||||||
: "Saving data"
|
: "Saving data"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
className="govuk-button progress-save "
|
className="govuk-button progress-save "
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
let valuesObj =
|
let valuesObj =
|
||||||
props.props.props.form[props.form]
|
props.props.props.form[props.form]
|
||||||
.values || {};
|
.values || {};
|
||||||
|
|
||||||
console.log("valuesobj:", valuesObj);
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
delete valuesObj["_pinswg_appellant_value"];
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
console.log("on save:", valuesObj);
|
//console.log("on save:", valuesObj);
|
||||||
updateRepresentation(
|
updateRepresentation(
|
||||||
valuesObj,
|
valuesObj,
|
||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("common:save-exit-button")}
|
{t("common:save-exit-button")}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
</>
|
||||||
</>
|
);
|
||||||
);
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//const mapStateToProps = (state, props) => {};
|
//const mapStateToProps = (state, props) => {};
|
||||||
@@ -256,6 +318,9 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
updateField: (form, field, newValue) =>
|
updateField: (form, field, newValue) =>
|
||||||
dispatch(change(form, field, newValue)),
|
dispatch(change(form, field, newValue)),
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
|
|||||||
@@ -5,21 +5,29 @@ import { useRouter } from "next/router";
|
|||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, formValueSelector, reduxForm } from "redux-form";
|
import { Field, change, formValueSelector, reduxForm } from "redux-form";
|
||||||
import { useState } from "react";
|
import { useState, useEffect } from "react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
FileUploadField,
|
FileUploadField,
|
||||||
RenderMultiline,
|
RenderMultiline,
|
||||||
RenderPickList,
|
RenderPickList,
|
||||||
|
shouldDisableButton,
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement";
|
import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement";
|
||||||
import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78";
|
import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78";
|
||||||
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
||||||
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||||
|
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
setCurrentPage,
|
||||||
|
setCurrentReference,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
let RepLPA = (props) => {
|
let RepLPA = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
const {
|
const {
|
||||||
@@ -38,9 +46,11 @@ let RepLPA = (props) => {
|
|||||||
setQuestionnaireCount,
|
setQuestionnaireCount,
|
||||||
setRepFileName,
|
setRepFileName,
|
||||||
updateRepresentation,
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const [savingStatus, setSavingStatus] = useState(false);
|
|
||||||
|
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
<li key={file.path}>
|
<li key={file.path}>
|
||||||
@@ -49,50 +59,22 @@ let RepLPA = (props) => {
|
|||||||
));
|
));
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
const updateQuestionnaireCount = () => {
|
|
||||||
{
|
|
||||||
switch (currentView.caseReference.appealType) {
|
|
||||||
case 846040000:
|
|
||||||
case 846040001:
|
|
||||||
case 846040006:
|
|
||||||
case 846040025:
|
|
||||||
case 846040004:
|
|
||||||
case 846040018:
|
|
||||||
case 846040003:
|
|
||||||
case 846040009:
|
|
||||||
case 846040008:
|
|
||||||
setQuestionnaireCount(7);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 846040005:
|
|
||||||
case 846040006:
|
|
||||||
case 846040007:
|
|
||||||
setQuestionnaireCount(9);
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
setQuestionnaireCount(7);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const whichQuestionnaire = () => {
|
const whichQuestionnaire = () => {
|
||||||
{
|
{
|
||||||
switch (currentView.caseReference.appealType) {
|
switch (currentView.caseReference.appealType) {
|
||||||
case 846040000:
|
case 846040000:
|
||||||
case 846040001:
|
case 846040001:
|
||||||
case 846040006:
|
|
||||||
case 846040025:
|
case 846040025:
|
||||||
case 846040004:
|
case 846040004:
|
||||||
case 846040018:
|
case 846040018:
|
||||||
case 846040003:
|
case 846040003:
|
||||||
case 846040009:
|
case 846040009:
|
||||||
case 846040008:
|
case 846040008:
|
||||||
|
case 846040010:
|
||||||
case 846040017:
|
case 846040017:
|
||||||
updateQuestionnaireCount();
|
|
||||||
return (
|
return (
|
||||||
<S78_Questionnaire
|
<S78_Questionnaire
|
||||||
|
questionnaireType={"s78"}
|
||||||
props={props}
|
props={props}
|
||||||
containerID={
|
containerID={
|
||||||
props.props.props.accountDetails.containerID
|
props.props.props.accountDetails.containerID
|
||||||
@@ -103,6 +85,7 @@ let RepLPA = (props) => {
|
|||||||
setShowQuestionnaireSection
|
setShowQuestionnaireSection
|
||||||
}
|
}
|
||||||
questionnaireCount={questionnaireCount}
|
questionnaireCount={questionnaireCount}
|
||||||
|
setRepresentationSubmit={setRepresentationSubmit}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@@ -110,9 +93,9 @@ let RepLPA = (props) => {
|
|||||||
case 846040005:
|
case 846040005:
|
||||||
case 846040006:
|
case 846040006:
|
||||||
case 846040007:
|
case 846040007:
|
||||||
updateQuestionnaireCount();
|
|
||||||
return (
|
return (
|
||||||
<Enforcement_Questionnaire
|
<Enforcement_Questionnaire
|
||||||
|
questionnaireType={"enf"}
|
||||||
props={props}
|
props={props}
|
||||||
containerID={
|
containerID={
|
||||||
props.props.props.accountDetails.containerID
|
props.props.props.accountDetails.containerID
|
||||||
@@ -123,6 +106,7 @@ let RepLPA = (props) => {
|
|||||||
setShowQuestionnaireSection
|
setShowQuestionnaireSection
|
||||||
}
|
}
|
||||||
questionnaireCount={questionnaireCount}
|
questionnaireCount={questionnaireCount}
|
||||||
|
setRepresentationSubmit={setRepresentationSubmit}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@@ -138,13 +122,13 @@ let RepLPA = (props) => {
|
|||||||
switch (currentView.caseReference.appealType) {
|
switch (currentView.caseReference.appealType) {
|
||||||
case 846040000:
|
case 846040000:
|
||||||
case 846040001:
|
case 846040001:
|
||||||
case 846040006:
|
|
||||||
case 846040025:
|
case 846040025:
|
||||||
case 846040004:
|
case 846040004:
|
||||||
case 846040018:
|
case 846040018:
|
||||||
case 846040003:
|
case 846040003:
|
||||||
case 846040009:
|
case 846040009:
|
||||||
case 846040008:
|
case 846040008:
|
||||||
|
case 846040010:
|
||||||
case 846040017:
|
case 846040017:
|
||||||
return (
|
return (
|
||||||
<RepresentationProgress_s78
|
<RepresentationProgress_s78
|
||||||
@@ -193,12 +177,14 @@ let RepLPA = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath(
|
detailsObj = jsonpath({
|
||||||
'$..[?(@.pinswg_name=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]',
|
'")]',
|
||||||
setCaseDetailsObj
|
json: setCaseDetailsObj,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||||
? router.query.state == "edit"
|
? router.query.state == "edit"
|
||||||
@@ -210,15 +196,18 @@ let RepLPA = (props) => {
|
|||||||
|
|
||||||
var resultsObj = {};
|
var resultsObj = {};
|
||||||
|
|
||||||
resultsObj = jsonpath(
|
resultsObj = jsonpath({
|
||||||
'$..[?(@.pinswg_name=="' +
|
path:
|
||||||
|
'$..[?@ && @.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]',
|
'")]',
|
||||||
setCaseResultssObj
|
json: setCaseResultssObj,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
resultsObj = resultsObj[0];
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
props.formObj["representationForm"].hasOwnProperty("values") &&
|
props.formObj.hasOwnProperty("representationForm") &&
|
||||||
|
props.formObj["representationForm"].hasOwnProperty("values") &&
|
||||||
props.formObj["representationForm"].values.hasOwnProperty(
|
props.formObj["representationForm"].values.hasOwnProperty(
|
||||||
"representationCapacity"
|
"representationCapacity"
|
||||||
) &&
|
) &&
|
||||||
@@ -227,6 +216,13 @@ let RepLPA = (props) => {
|
|||||||
) &&
|
) &&
|
||||||
setRepFileName(props.formObj["representationForm"].values);
|
setRepFileName(props.formObj["representationForm"].values);
|
||||||
|
|
||||||
|
let filesListObj =
|
||||||
|
props.formObj.hasOwnProperty("representationForm") &&
|
||||||
|
props.formObj["representationForm"].hasOwnProperty("values") &&
|
||||||
|
props.formObj["representationForm"].values.hasOwnProperty("filesList")
|
||||||
|
? props.formObj["representationForm"].values.filesList
|
||||||
|
: {};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
@@ -234,7 +230,8 @@ let RepLPA = (props) => {
|
|||||||
{!_.has(
|
{!_.has(
|
||||||
formObj["representationForm"],
|
formObj["representationForm"],
|
||||||
["values", "representationType"] ||
|
["values", "representationType"] ||
|
||||||
typeof props.representationType != "undefined"
|
typeof props.currentView.caseReference.repDetails !=
|
||||||
|
"undefined"
|
||||||
) ? (
|
) ? (
|
||||||
<>
|
<>
|
||||||
<label
|
<label
|
||||||
@@ -292,7 +289,7 @@ let RepLPA = (props) => {
|
|||||||
className="govuk-fieldset"
|
className="govuk-fieldset"
|
||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
<div
|
{/* <div
|
||||||
id="commentBox-hint"
|
id="commentBox-hint"
|
||||||
className="govuk-hint"
|
className="govuk-hint"
|
||||||
>
|
>
|
||||||
@@ -300,7 +297,7 @@ let RepLPA = (props) => {
|
|||||||
"myrepresentations:comments-set-out-label"
|
"myrepresentations:comments-set-out-label"
|
||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</div>
|
</div> */}
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
name="representationComments"
|
name="representationComments"
|
||||||
@@ -321,6 +318,35 @@ let RepLPA = (props) => {
|
|||||||
>
|
>
|
||||||
{" "}
|
{" "}
|
||||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
{console.log(
|
||||||
|
"--------",
|
||||||
|
props.formObj.hasOwnProperty(
|
||||||
|
"representationForm"
|
||||||
|
) &&
|
||||||
|
props.formObj[
|
||||||
|
"representationForm"
|
||||||
|
].hasOwnProperty("values") &&
|
||||||
|
props.formObj[
|
||||||
|
"representationForm"
|
||||||
|
].values.hasOwnProperty(
|
||||||
|
"filesList"
|
||||||
|
)
|
||||||
|
? props.props.props.form[
|
||||||
|
"representationForm"
|
||||||
|
].values.filesList
|
||||||
|
: ""
|
||||||
|
)}
|
||||||
|
{/* {props.formObj.hasOwnProperty(
|
||||||
|
"representationForm"
|
||||||
|
) &&
|
||||||
|
props.formObj[
|
||||||
|
"representationForm"
|
||||||
|
].hasOwnProperty("values") &&
|
||||||
|
props.formObj[
|
||||||
|
"representationForm"
|
||||||
|
].values.hasOwnProperty(
|
||||||
|
"filesList"
|
||||||
|
) && ( */}
|
||||||
<FileUploadField
|
<FileUploadField
|
||||||
name={"representationDocuments"}
|
name={"representationDocuments"}
|
||||||
id={"representationDocuments"}
|
id={"representationDocuments"}
|
||||||
@@ -332,17 +358,39 @@ let RepLPA = (props) => {
|
|||||||
}
|
}
|
||||||
hint={"sdsd"}
|
hint={"sdsd"}
|
||||||
fileList={
|
fileList={
|
||||||
props.props.props.form[
|
props.currentView.fileList
|
||||||
"representationForm"
|
// (props.formObj.hasOwnProperty(
|
||||||
].values.filesList || []
|
// "representationForm"
|
||||||
|
// ) &&
|
||||||
|
// props.formObj[
|
||||||
|
// "representationForm"
|
||||||
|
// ].hasOwnProperty(
|
||||||
|
// "values"
|
||||||
|
// ) &&
|
||||||
|
// props.formObj[
|
||||||
|
// "representationForm"
|
||||||
|
// ].values.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.props.props.form[
|
||||||
|
// "representationForm"
|
||||||
|
// ].values.filesList) ||
|
||||||
|
// []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
}
|
}
|
||||||
setFilesForRepresentation={[]}
|
|
||||||
containerID={
|
containerID={
|
||||||
props.props.props.accountDetails
|
props.props.props.accountDetails
|
||||||
.containerID
|
.containerID
|
||||||
}
|
}
|
||||||
filenamePrefix={props}
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* // )} */}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</>
|
</>
|
||||||
@@ -391,10 +439,10 @@ let RepLPA = (props) => {
|
|||||||
{showQuestionnaireSection > 1 && (
|
{showQuestionnaireSection > 1 && (
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.scrollTo({
|
// window.scrollTo({
|
||||||
top: 0,
|
// top: 0,
|
||||||
behavior: "smooth",
|
// behavior: "smooth",
|
||||||
});
|
// });
|
||||||
setRepFileName(
|
setRepFileName(
|
||||||
props.formObj[
|
props.formObj[
|
||||||
"representationForm"
|
"representationForm"
|
||||||
@@ -409,7 +457,6 @@ let RepLPA = (props) => {
|
|||||||
Back
|
Back
|
||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{savingStatus ? (
|
{savingStatus ? (
|
||||||
<span className=" progress-save-active">
|
<span className=" progress-save-active">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
@@ -434,16 +481,16 @@ let RepLPA = (props) => {
|
|||||||
props.form
|
props.form
|
||||||
].values || {};
|
].values || {};
|
||||||
|
|
||||||
console.log(
|
// console.log(
|
||||||
"valuesobj:",
|
// "valuesobj:",
|
||||||
valuesObj
|
// valuesObj
|
||||||
);
|
// );
|
||||||
|
|
||||||
delete valuesObj[
|
delete valuesObj[
|
||||||
"_pinswg_appellant_value"
|
"_pinswg_appellant_value"
|
||||||
];
|
];
|
||||||
|
|
||||||
console.log("on save:", valuesObj);
|
//console.log("on save:", valuesObj);
|
||||||
updateRepresentation(
|
updateRepresentation(
|
||||||
valuesObj,
|
valuesObj,
|
||||||
false,
|
false,
|
||||||
@@ -464,6 +511,29 @@ let RepLPA = (props) => {
|
|||||||
type="submit"
|
type="submit"
|
||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
|
disabled={shouldDisableButton({
|
||||||
|
props,
|
||||||
|
formObj,
|
||||||
|
})}
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
setRepresentationSubmit(true);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
@@ -502,19 +572,20 @@ let RepLPA = (props) => {
|
|||||||
className="govuk-button progress-save "
|
className="govuk-button progress-save "
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
let valuesObj =
|
let valuesObj =
|
||||||
props.props.form[props.form]
|
props.props.props.form[
|
||||||
.values || {};
|
props.form
|
||||||
|
].values || {};
|
||||||
|
|
||||||
console.log(
|
// console.log(
|
||||||
"valuesobj:",
|
// "valuesobj:",
|
||||||
valuesObj
|
// valuesObj
|
||||||
);
|
// );
|
||||||
|
|
||||||
delete valuesObj[
|
delete valuesObj[
|
||||||
"_pinswg_appellant_value"
|
"_pinswg_appellant_value"
|
||||||
];
|
];
|
||||||
|
|
||||||
console.log("on save:", valuesObj);
|
//console.log("on save:", valuesObj);
|
||||||
updateRepresentation(
|
updateRepresentation(
|
||||||
valuesObj,
|
valuesObj,
|
||||||
false,
|
false,
|
||||||
@@ -548,6 +619,13 @@ RepLPA = connect((state) => {
|
|||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
updateField: (form, field, newValue) =>
|
updateField: (form, field, newValue) =>
|
||||||
dispatch(change(form, field, newValue)),
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
setCurrentReference: (currentReference) => {
|
||||||
|
dispatch(setCurrentReference(currentReference));
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = (state, props) => {
|
const mapStateToProps = (state, props) => {
|
||||||
@@ -556,7 +634,7 @@ const mapStateToProps = (state, props) => {
|
|||||||
? state.currentView.caseReference.repDetails
|
? state.currentView.caseReference.repDetails
|
||||||
: state.currentView.caseReference,
|
: state.currentView.caseReference,
|
||||||
{
|
{
|
||||||
"representationCapacity": "lpa",
|
"representationCapacity": "LPA",
|
||||||
"onBehalfOfLPA":
|
"onBehalfOfLPA":
|
||||||
props.props.props.accountDetails.accountDetails[
|
props.props.props.accountDetails.accountDetails[
|
||||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ let RepLPAQuestionnaire = (props) => {
|
|||||||
className="govuk-fieldset"
|
className="govuk-fieldset"
|
||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
<div id="commentBox-hint" className="govuk-hint">
|
{/* <div id="commentBox-hint" className="govuk-hint">
|
||||||
{t("myrepresentations:comments-set-out-label")}:
|
{t("myrepresentations:comments-set-out-label")}:
|
||||||
</div>
|
</div> */}
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
name="representationComments"
|
name="representationComments"
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ const RepLPADetails = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath(
|
detailsObj = jsonpath({
|
||||||
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
|
||||||
setCaseDetailsObj
|
json: setCaseDetailsObj,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ const RepLandOwner = (props) => {
|
|||||||
className="govuk-fieldset"
|
className="govuk-fieldset"
|
||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
<div id="commentBox-hint" className="govuk-hint">
|
{/* <div id="commentBox-hint" className="govuk-hint">
|
||||||
{t("myrepresentations:comments-set-out-label")}:
|
{t("myrepresentations:comments-set-out-label")}:
|
||||||
</div>
|
</div> */}
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
name="representationComments"
|
name="representationComments"
|
||||||
|
|||||||
+1
-1
@@ -455,7 +455,7 @@ const RepresentationProgress_enforcement = (props) => {
|
|||||||
>
|
>
|
||||||
<span className="js-step-title-text govuk-!-font-size-16">
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:enf-section-heading-seven"
|
"myrepresentations:s78-section-heading-five-sub"
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ const RepresentationProgress_s78 = (props) => {
|
|||||||
>
|
>
|
||||||
<span className="js-step-title-text govuk-!-font-size-16">
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:s78-section-heading-three"
|
"myrepresentations:s78-section-heading-five-sub"
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
+150
-70
@@ -4,6 +4,8 @@ import { useRouter } from "next/router";
|
|||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
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 { getFormCollectionByID } from "../../../../components/utils";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
FileUploadField,
|
FileUploadField,
|
||||||
RenderDatePicker,
|
RenderDatePicker,
|
||||||
@@ -14,6 +16,11 @@ import {
|
|||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
RenderTextfield,
|
RenderTextfield,
|
||||||
} from "../representationElements";
|
} from "../representationElements";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../../store/currentView/action";
|
||||||
|
|
||||||
let Enforcement_Questionnaire = (props) => {
|
let Enforcement_Questionnaire = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -29,6 +36,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
procedureTypeValue,
|
procedureTypeValue,
|
||||||
onBehalfOfLPA,
|
onBehalfOfLPA,
|
||||||
showQuestionnaireSection,
|
showQuestionnaireSection,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
@@ -50,12 +58,14 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath(
|
detailsObj = jsonpath({
|
||||||
'$..[?(@.pinswg_name=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]',
|
'")]',
|
||||||
setCaseDetailsObj
|
json: setCaseDetailsObj,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||||
? router.query.state == "edit"
|
? router.query.state == "edit"
|
||||||
@@ -71,12 +81,14 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
|
|
||||||
var resultsObj = {};
|
var resultsObj = {};
|
||||||
|
|
||||||
resultsObj = jsonpath(
|
resultsObj = jsonpath({
|
||||||
'$..[?(@.ticketnumber=="' +
|
path:
|
||||||
|
'$..[?(@ && @.ticketnumber=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]',
|
'")]',
|
||||||
setCaseResultssObj
|
json: setCaseResultssObj,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
resultsObj = resultsObj[0];
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -87,7 +99,14 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
<h3 className="govuk-heading-s ">
|
<h3 className="govuk-heading-s ">
|
||||||
Enforcement_Questionnaire{" "}
|
Enforcement Questionnaire
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("myrepresentations:questionnaire-hint-para")}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3 className="govuk-heading-s ">
|
||||||
{t("myrepresentations:enf-section-heading-one")}{" "}
|
{t("myrepresentations:enf-section-heading-one")}{" "}
|
||||||
</h3>
|
</h3>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -106,19 +125,32 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
<div className="govuk-label">
|
<div className="govuk-label">
|
||||||
3. {t("myrepresentations:enf-section-question-3")}:{" "}
|
3. {t("myrepresentations:enf-section-question-3")}:{" "}
|
||||||
{detailsObj.pinswg_siteaddressline1 +
|
{detailsObj.pinswg_siteaddressline1 +
|
||||||
" " +
|
(detailsObj.pinswg_siteaddressline2 != null
|
||||||
detailsObj.pinswg_siteaddressline2 +
|
? " " +
|
||||||
" " +
|
detailsObj.pinswg_siteaddressline2 +
|
||||||
|
" "
|
||||||
|
: " ") +
|
||||||
detailsObj.pinswg_siteaddresstown +
|
detailsObj.pinswg_siteaddresstown +
|
||||||
" " +
|
" " +
|
||||||
detailsObj.pinswg_siteaddresspostcode}
|
detailsObj.pinswg_siteaddresspostcode}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<div className="govuk-label">
|
||||||
|
4. {t("myrepresentations:s78-section-question-4")}:{" "}
|
||||||
|
{
|
||||||
|
getFormCollectionByID(
|
||||||
|
currentView.caseReference.appealType
|
||||||
|
).value
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
label={t(
|
label={
|
||||||
"myrepresentations:enf-section-question-4"
|
"5." +
|
||||||
)}
|
t("myrepresentations:enf-section-question-4")
|
||||||
|
}
|
||||||
name="procedureType"
|
name="procedureType"
|
||||||
optionsArr={[
|
optionsArr={[
|
||||||
"Written representations",
|
"Written representations",
|
||||||
@@ -150,7 +182,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
|
|
||||||
<Field
|
<Field
|
||||||
label={
|
label={
|
||||||
"5. " +
|
"6. " +
|
||||||
t("myrepresentations:enf-section-question-5")
|
t("myrepresentations:enf-section-question-5")
|
||||||
}
|
}
|
||||||
name="enterToView"
|
name="enterToView"
|
||||||
@@ -164,6 +196,9 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
rows="5"
|
rows="5"
|
||||||
className="govuk-textarea govuk-input--width-30"
|
className="govuk-textarea govuk-input--width-30"
|
||||||
aria-describedby={props.name + "-hint"}
|
aria-describedby={props.name + "-hint"}
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -182,7 +217,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"6. " +
|
"7. " +
|
||||||
t(
|
t(
|
||||||
"myrepresentations:enf-section-question-6"
|
"myrepresentations:enf-section-question-6"
|
||||||
)
|
)
|
||||||
@@ -211,7 +246,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"7. " +
|
"8. " +
|
||||||
t(
|
t(
|
||||||
"myrepresentations:enf-section-question-7"
|
"myrepresentations:enf-section-question-7"
|
||||||
)
|
)
|
||||||
@@ -240,7 +275,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"8. " +
|
"9. " +
|
||||||
t(
|
t(
|
||||||
"myrepresentations:enf-section-question-8"
|
"myrepresentations:enf-section-question-8"
|
||||||
)
|
)
|
||||||
@@ -264,7 +299,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
type="text"
|
type="text"
|
||||||
component={RenderRichMultiline}
|
component={RenderRichMultiline}
|
||||||
label={
|
label={
|
||||||
"9. " +
|
"10. " +
|
||||||
t(
|
t(
|
||||||
"myrepresentations:enf-section-question-9"
|
"myrepresentations:enf-section-question-9"
|
||||||
)
|
)
|
||||||
@@ -285,7 +320,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
label={
|
label={
|
||||||
"10. " +
|
"11. " +
|
||||||
t("myrepresentations:enf-section-question-10")
|
t("myrepresentations:enf-section-question-10")
|
||||||
}
|
}
|
||||||
name="feePaid"
|
name="feePaid"
|
||||||
@@ -317,7 +352,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"11. " +
|
"12. " +
|
||||||
t("myrepresentations:enf-section-question-11")
|
t("myrepresentations:enf-section-question-11")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -354,7 +389,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"12. " +
|
"13. " +
|
||||||
t("myrepresentations:enf-section-question-12")
|
t("myrepresentations:enf-section-question-12")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -381,8 +416,8 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"13. " +
|
"14. " +
|
||||||
t("myrepresentations:enf-section-question-12")
|
t("myrepresentations:enf-section-question-13")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:enf-section-question-13-hint"
|
"myrepresentations:enf-section-question-13-hint"
|
||||||
@@ -408,7 +443,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"14. " +
|
"15. " +
|
||||||
t("myrepresentations:enf-section-question-14")
|
t("myrepresentations:enf-section-question-14")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -435,7 +470,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"15. " +
|
"16. " +
|
||||||
t("myrepresentations:enf-section-question-15")
|
t("myrepresentations:enf-section-question-15")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -462,7 +497,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"16. " +
|
"17. " +
|
||||||
t("myrepresentations:enf-section-question-16")
|
t("myrepresentations:enf-section-question-16")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -489,7 +524,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"17. " +
|
"18. " +
|
||||||
t("myrepresentations:enf-section-question-17")
|
t("myrepresentations:enf-section-question-17")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -514,7 +549,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
label={
|
label={
|
||||||
"18. " +
|
"19. " +
|
||||||
t("myrepresentations:enf-section-question-18")
|
t("myrepresentations:enf-section-question-18")
|
||||||
}
|
}
|
||||||
name="LPAldpAndMap"
|
name="LPAldpAndMap"
|
||||||
@@ -533,7 +568,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
label={
|
label={
|
||||||
"19. " +
|
"20. " +
|
||||||
t("myrepresentations:enf-section-question-19")
|
t("myrepresentations:enf-section-question-19")
|
||||||
}
|
}
|
||||||
name="LPAlocalGuidance"
|
name="LPAlocalGuidance"
|
||||||
@@ -551,7 +586,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<Field
|
<Field
|
||||||
label={
|
label={
|
||||||
"20. " +
|
"21. " +
|
||||||
t("myrepresentations:enf-section-question-20")
|
t("myrepresentations:enf-section-question-20")
|
||||||
}
|
}
|
||||||
name="LPAintentionToSubmitFullStatement"
|
name="LPAintentionToSubmitFullStatement"
|
||||||
@@ -578,7 +613,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
<Field
|
<Field
|
||||||
label={
|
label={
|
||||||
"21. " +
|
"22. " +
|
||||||
t("myrepresentations:enf-section-question-21")
|
t("myrepresentations:enf-section-question-21")
|
||||||
}
|
}
|
||||||
name="AONB"
|
name="AONB"
|
||||||
@@ -610,7 +645,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"22. " +
|
"23. " +
|
||||||
t("myrepresentations:enf-section-question-22")
|
t("myrepresentations:enf-section-question-22")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -637,7 +672,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"23. " +
|
"24. " +
|
||||||
t("myrepresentations:enf-section-question-23")
|
t("myrepresentations:enf-section-question-23")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -664,8 +699,8 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"24. " +
|
"25. " +
|
||||||
t("myrepresentations:enf-section-question-23")
|
t("myrepresentations:enf-section-question-24")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:enf-section-question-24-hint"
|
"myrepresentations:enf-section-question-24-hint"
|
||||||
@@ -691,7 +726,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"25. " +
|
"26. " +
|
||||||
t("myrepresentations:enf-section-question-25")
|
t("myrepresentations:enf-section-question-25")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -718,7 +753,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"26. " +
|
"27. " +
|
||||||
t("myrepresentations:enf-section-question-26")
|
t("myrepresentations:enf-section-question-26")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -745,7 +780,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"27. " +
|
"28. " +
|
||||||
t("myrepresentations:enf-section-question-27")
|
t("myrepresentations:enf-section-question-27")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -759,7 +794,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
label={
|
label={
|
||||||
"28. " +
|
"29. " +
|
||||||
t("myrepresentations:enf-section-question-28")
|
t("myrepresentations:enf-section-question-28")
|
||||||
}
|
}
|
||||||
name="gypsyTravellerInvolvment"
|
name="gypsyTravellerInvolvment"
|
||||||
@@ -791,7 +826,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"29. " +
|
"30. " +
|
||||||
t("myrepresentations:enf-section-question-29")
|
t("myrepresentations:enf-section-question-29")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -818,7 +853,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"30. " +
|
"31. " +
|
||||||
t("myrepresentations:enf-section-question-30")
|
t("myrepresentations:enf-section-question-30")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -840,7 +875,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
{t("myrepresentations:enf-section-heading-six")}
|
{t("myrepresentations:enf-section-heading-six")}
|
||||||
</h3>
|
</h3>
|
||||||
<div className="govuk-form-group govuk-body-m">
|
<div className="govuk-form-group govuk-body-m">
|
||||||
{t("myrepresentations:enf-section-question-31")}
|
32. {t("myrepresentations:enf-section-question-31")}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -858,9 +893,10 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:enf-section-question-31a"
|
"a) " +
|
||||||
)}
|
t("myrepresentations:enf-section-question-31a")
|
||||||
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:enf-section-question-31a-hint"
|
"myrepresentations:enf-section-question-31a-hint"
|
||||||
)}
|
)}
|
||||||
@@ -870,7 +906,10 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Field
|
<Field
|
||||||
label={t("myrepresentations:enf-section-question-31b")}
|
label={
|
||||||
|
"b) " +
|
||||||
|
t("myrepresentations:enf-section-question-31b")
|
||||||
|
}
|
||||||
name="developmentNotTakePlaceBiodiversity"
|
name="developmentNotTakePlaceBiodiversity"
|
||||||
id="developmentNotTakePlaceBiodiversity"
|
id="developmentNotTakePlaceBiodiversity"
|
||||||
component={RenderRadioList}
|
component={RenderRadioList}
|
||||||
@@ -884,7 +923,10 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
aria-describedby={props.name + "-hint"}
|
aria-describedby={props.name + "-hint"}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
label={t("myrepresentations:enf-section-question-31c")}
|
label={
|
||||||
|
"c) " +
|
||||||
|
t("myrepresentations:enf-section-question-31c")
|
||||||
|
}
|
||||||
name="developmentNotTakePlaceBroadband"
|
name="developmentNotTakePlaceBroadband"
|
||||||
id="developmentNotTakePlaceBroadband"
|
id="developmentNotTakePlaceBroadband"
|
||||||
component={RenderRadioList}
|
component={RenderRadioList}
|
||||||
@@ -914,7 +956,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"32. " +
|
"33. " +
|
||||||
t("myrepresentations:enf-section-question-32")
|
t("myrepresentations:enf-section-question-32")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -933,8 +975,11 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
<h3 className="govuk-heading-s ">
|
<h3 className="govuk-heading-s ">
|
||||||
{t("myrepresentations:enf-section-heading-seven")}
|
{t("myrepresentations:s78-section-heading-five-sub")}
|
||||||
</h3>
|
</h3>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("myrepresentations:s78-section-heading-five")}
|
||||||
|
</p>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
@@ -952,7 +997,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"33. " +
|
"34. " +
|
||||||
t("myrepresentations:enf-section-question-33")
|
t("myrepresentations:enf-section-question-33")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -979,7 +1024,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"34. " +
|
"35. " +
|
||||||
t("myrepresentations:enf-section-question-34")
|
t("myrepresentations:enf-section-question-34")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -1006,7 +1051,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"35. " +
|
"36. " +
|
||||||
t("myrepresentations:enf-section-question-35")
|
t("myrepresentations:enf-section-question-35")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -1033,7 +1078,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"36. " +
|
"37. " +
|
||||||
t("myrepresentations:enf-section-question-36")
|
t("myrepresentations:enf-section-question-36")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -1060,12 +1105,15 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"37. " +
|
"38. " +
|
||||||
t("myrepresentations:enf-section-question-37")
|
t("myrepresentations:enf-section-question-37")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:enf-section-question-37-hint"
|
"myrepresentations:enf-section-question-37-hint"
|
||||||
)}
|
)}
|
||||||
|
hint={
|
||||||
|
"Regulation 45 of the Town and Country Planning (Environmental Impact Assessment) (Wales) Regulations 2017 (as amended)."
|
||||||
|
}
|
||||||
optionSelect={t(
|
optionSelect={t(
|
||||||
"myrepresentations:questionnaire-yes"
|
"myrepresentations:questionnaire-yes"
|
||||||
)}
|
)}
|
||||||
@@ -1087,7 +1135,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"38. " +
|
"39. " +
|
||||||
t("myrepresentations:enf-section-question-38")
|
t("myrepresentations:enf-section-question-38")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -1114,7 +1162,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"39. " +
|
"40. " +
|
||||||
t("myrepresentations:enf-section-question-39")
|
t("myrepresentations:enf-section-question-39")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -1141,7 +1189,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={
|
legend={
|
||||||
"40. " +
|
"41. " +
|
||||||
t("myrepresentations:enf-section-question-40")
|
t("myrepresentations:enf-section-question-40")
|
||||||
}
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
@@ -1165,16 +1213,33 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
name={"representationDocuments"}
|
name={"representationDocuments"}
|
||||||
id={"representationDocuments"}
|
id={"representationDocuments"}
|
||||||
label={t("myrepresentations:add-files-label")}
|
label={t("myrepresentations:add-files-label")}
|
||||||
ticketnumber={props.props.caseReference}
|
ticketnumber={props.props.props.caseReference}
|
||||||
hint={"sdsd"}
|
hint={"sdsd"}
|
||||||
fileList={
|
fileList={
|
||||||
props.props.props.props.form[
|
props.currentView.fileList
|
||||||
"representationForm"
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
].values.filesList || []
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView.caseReference.repDetails
|
||||||
|
// .filesList.length > 0
|
||||||
|
// ? props.currentView.caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
}
|
}
|
||||||
setFilesForRepresentation={[]}
|
setFilesForRepresentations={
|
||||||
containerID={props.containerID}
|
setFilesForRepresentations
|
||||||
filenamePrefix={props.props}
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={props.setCurrentReference}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -1214,6 +1279,7 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"myrepresentations:enf-section-question-onbehalf"
|
"myrepresentations:enf-section-question-onbehalf"
|
||||||
)}
|
)}
|
||||||
|
disabled={true}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -1223,9 +1289,9 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
label={t("myrepresentations:enf-section-question-date")}
|
label={t("myrepresentations:enf-section-question-date")}
|
||||||
component={RenderDatePicker}
|
component={RenderDatePicker}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg="Select a date"
|
errorMsg={t("myrepresentations:select-a-date-label")}
|
||||||
dateStart="0"
|
dateStart="0"
|
||||||
dateEnd="1-y"
|
dateEnd="0"
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
)}
|
)}
|
||||||
@@ -1247,6 +1313,17 @@ Enforcement_Questionnaire = connect((state) => {
|
|||||||
};
|
};
|
||||||
})(Enforcement_Questionnaire);
|
})(Enforcement_Questionnaire);
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state, props) => {
|
const mapStateToProps = (state, props) => {
|
||||||
return {
|
return {
|
||||||
search: state.search,
|
search: state.search,
|
||||||
@@ -1259,10 +1336,13 @@ const mapStateToProps = (state, props) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect(mapStateToProps)(
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
reduxForm({
|
reduxForm({
|
||||||
form: "representationForm",
|
form: "representationForm",
|
||||||
enableReinitialize: true,
|
enableReinitialize: false,
|
||||||
destroyOnUnmount: false,
|
destroyOnUnmount: false,
|
||||||
})(Enforcement_Questionnaire)
|
})(Enforcement_Questionnaire)
|
||||||
);
|
);
|
||||||
|
|||||||
+137
-62
@@ -14,6 +14,11 @@ import {
|
|||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
RenderTextfield,
|
RenderTextfield,
|
||||||
} from "../representationElements";
|
} from "../representationElements";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../../store/currentView/action";
|
||||||
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
|
||||||
@@ -33,6 +38,7 @@ let S78_Questionnaire = (props) => {
|
|||||||
procedureTypeValue,
|
procedureTypeValue,
|
||||||
onBehalfOfLPA,
|
onBehalfOfLPA,
|
||||||
showQuestionnaireSection,
|
showQuestionnaireSection,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
@@ -54,12 +60,14 @@ let S78_Questionnaire = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath(
|
detailsObj = jsonpath({
|
||||||
'$..[?(@.pinswg_name=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]',
|
'")]',
|
||||||
setCaseDetailsObj
|
json: setCaseDetailsObj,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||||
? router.query.state == "edit"
|
? router.query.state == "edit"
|
||||||
@@ -75,8 +83,9 @@ let S78_Questionnaire = (props) => {
|
|||||||
|
|
||||||
var resultsObj = {};
|
var resultsObj = {};
|
||||||
|
|
||||||
resultsObj = jsonpath(
|
resultsObj = jsonpath({
|
||||||
"$..[?(@." +
|
path:
|
||||||
|
"$..[?(@ && @." +
|
||||||
(router.query.hasOwnProperty("state")
|
(router.query.hasOwnProperty("state")
|
||||||
? router.query.state == "edit"
|
? router.query.state == "edit"
|
||||||
? "caseRef"
|
? "caseRef"
|
||||||
@@ -85,11 +94,12 @@ let S78_Questionnaire = (props) => {
|
|||||||
'=="' +
|
'=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]',
|
'")]',
|
||||||
setCaseResultssObj
|
json: setCaseResultssObj,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
resultsObj = resultsObj[0];
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
console.log(resultsObj);
|
//console.log(resultsObj);
|
||||||
|
|
||||||
const onHandleSubmit = (values) => {
|
const onHandleSubmit = (values) => {
|
||||||
//if (currentSection == sectionCount) {
|
//if (currentSection == sectionCount) {
|
||||||
@@ -109,28 +119,35 @@ let S78_Questionnaire = (props) => {
|
|||||||
className="govuk-fieldset"
|
className="govuk-fieldset"
|
||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("myrepresentations:questionnaire-hint-para")}
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2 className="govuk-heading-s ">
|
<h2 className="govuk-heading-s ">
|
||||||
{t("myrepresentations:s78-section-heading-one")}{" "}
|
{t("myrepresentations:s78-section-heading-one")}{" "}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<div className="govuk-label">
|
<div className="govuk-label">
|
||||||
1. {t("myrepresentations:s78-section-question-1")}{" "}
|
1. {t("myrepresentations:s78-section-question-1")}:{" "}
|
||||||
{currentView.caseReference.currentReference}
|
{currentView.caseReference.currentReference}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<div className="govuk-label">
|
<div className="govuk-label">
|
||||||
2. {t("myrepresentations:s78-section-question-2")}{" "}
|
2. {t("myrepresentations:s78-section-question-2")}:{" "}
|
||||||
{resultsObj.pinswg_lpareference}
|
{resultsObj.pinswg_lpareference}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<div className="govuk-label">
|
<div className="govuk-label">
|
||||||
3. {t("myrepresentations:s78-section-question-3")}{" "}
|
3. {t("myrepresentations:s78-section-question-3")}:{" "}
|
||||||
{detailsObj.pinswg_siteaddressline1 +
|
{detailsObj.pinswg_siteaddressline1 +
|
||||||
" " +
|
(detailsObj.pinswg_siteaddressline2 != null
|
||||||
detailsObj.pinswg_siteaddressline2 +
|
? " " +
|
||||||
" " +
|
detailsObj.pinswg_siteaddressline2 +
|
||||||
|
" "
|
||||||
|
: " ") +
|
||||||
detailsObj.pinswg_siteaddresstown +
|
detailsObj.pinswg_siteaddresstown +
|
||||||
" " +
|
" " +
|
||||||
detailsObj.pinswg_siteaddresspostcode}
|
detailsObj.pinswg_siteaddresspostcode}
|
||||||
@@ -138,7 +155,7 @@ let S78_Questionnaire = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<div className="govuk-label">
|
<div className="govuk-label">
|
||||||
4. {t("myrepresentations:s78-section-question-4")}{" "}
|
4. {t("myrepresentations:s78-section-question-4")}:{" "}
|
||||||
{
|
{
|
||||||
getFormCollectionByID(
|
getFormCollectionByID(
|
||||||
currentView.caseReference.appealType
|
currentView.caseReference.appealType
|
||||||
@@ -395,6 +412,7 @@ let S78_Questionnaire = (props) => {
|
|||||||
className="govuk-textarea govuk-input--width-30"
|
className="govuk-textarea govuk-input--width-30"
|
||||||
aria-describedby={props.name + "-hint"}
|
aria-describedby={props.name + "-hint"}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
|
errorMsg={t("myrepresentations:select-an-option-label")}
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
)}
|
)}
|
||||||
@@ -423,6 +441,7 @@ let S78_Questionnaire = (props) => {
|
|||||||
className="govuk-textarea govuk-input--width-30"
|
className="govuk-textarea govuk-input--width-30"
|
||||||
aria-describedby={props.name + "-hint"}
|
aria-describedby={props.name + "-hint"}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
|
errorMsg={t("myrepresentations:select-an-option-label")}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -647,7 +666,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Field
|
<Field
|
||||||
label={t("myrepresentations:s78-section-question-24a")}
|
label={
|
||||||
|
"a) " +
|
||||||
|
t("myrepresentations:s78-section-question-24a")
|
||||||
|
}
|
||||||
name="developmentNotBeginLaterThanFiveYears"
|
name="developmentNotBeginLaterThanFiveYears"
|
||||||
id="developmentNotBeginLaterThanFiveYears"
|
id="developmentNotBeginLaterThanFiveYears"
|
||||||
component={RenderRadioList}
|
component={RenderRadioList}
|
||||||
@@ -660,6 +682,7 @@ let S78_Questionnaire = (props) => {
|
|||||||
className="govuk-textarea govuk-input--width-30"
|
className="govuk-textarea govuk-input--width-30"
|
||||||
aria-describedby={props.name + "-hint"}
|
aria-describedby={props.name + "-hint"}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
|
errorMsg={t("myrepresentations:select-an-option-label")}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -677,9 +700,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-24b"
|
"b) " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-24b")
|
||||||
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-24b-hint"
|
"myrepresentations:s78-section-question-24b-hint"
|
||||||
)}
|
)}
|
||||||
@@ -689,7 +713,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Field
|
<Field
|
||||||
label={t("myrepresentations:s78-section-question-24c")}
|
label={
|
||||||
|
"c) " +
|
||||||
|
t("myrepresentations:s78-section-question-24c")
|
||||||
|
}
|
||||||
name="developmentNotTakePlaceBiodiversity"
|
name="developmentNotTakePlaceBiodiversity"
|
||||||
id="developmentNotTakePlaceBiodiversity"
|
id="developmentNotTakePlaceBiodiversity"
|
||||||
component={RenderRadioList}
|
component={RenderRadioList}
|
||||||
@@ -702,9 +729,13 @@ let S78_Questionnaire = (props) => {
|
|||||||
className="govuk-textarea govuk-input--width-30"
|
className="govuk-textarea govuk-input--width-30"
|
||||||
aria-describedby={props.name + "-hint"}
|
aria-describedby={props.name + "-hint"}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
|
errorMsg={t("myrepresentations:select-an-option-label")}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
label={t("myrepresentations:s78-section-question-24d")}
|
label={
|
||||||
|
"d) " +
|
||||||
|
t("myrepresentations:s78-section-question-24d")
|
||||||
|
}
|
||||||
name="developmentNotTakePlaceBroadband"
|
name="developmentNotTakePlaceBroadband"
|
||||||
id="developmentNotTakePlaceBroadband"
|
id="developmentNotTakePlaceBroadband"
|
||||||
component={RenderRadioList}
|
component={RenderRadioList}
|
||||||
@@ -717,6 +748,7 @@ let S78_Questionnaire = (props) => {
|
|||||||
className="govuk-textarea govuk-input--width-30"
|
className="govuk-textarea govuk-input--width-30"
|
||||||
aria-describedby={props.name + "-hint"}
|
aria-describedby={props.name + "-hint"}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
|
errorMsg={t("myrepresentations:select-an-option-label")}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -754,9 +786,11 @@ let S78_Questionnaire = (props) => {
|
|||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
<h2 className="govuk-heading-s ">
|
<h2 className="govuk-heading-s ">
|
||||||
{t("myrepresentations:s78-section-heading-five")}
|
{t("myrepresentations:s78-section-heading-five-sub")}
|
||||||
</h2>
|
</h2>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("myrepresentations:s78-section-heading-five")}
|
||||||
|
</p>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
name="copyOfApplicantsCertificate"
|
name="copyOfApplicantsCertificate"
|
||||||
@@ -772,9 +806,11 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-26"
|
"26. " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-26")
|
||||||
|
}
|
||||||
|
hint={t("myrepresentations:s78-footnote-one")}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-26-hint"
|
"myrepresentations:s78-section-question-26-hint"
|
||||||
)}
|
)}
|
||||||
@@ -798,9 +834,11 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-27"
|
"27. " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-27")
|
||||||
|
}
|
||||||
|
hint={t("myrepresentations:s78-footnote-two")}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-27-hint"
|
"myrepresentations:s78-section-question-27-hint"
|
||||||
)}
|
)}
|
||||||
@@ -824,9 +862,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-28"
|
"28. " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-28")
|
||||||
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-28-hint"
|
"myrepresentations:s78-section-question-28-hint"
|
||||||
)}
|
)}
|
||||||
@@ -850,9 +889,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-29"
|
"29. " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-29")
|
||||||
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-29-hint"
|
"myrepresentations:s78-section-question-29-hint"
|
||||||
)}
|
)}
|
||||||
@@ -876,9 +916,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-30"
|
"30. " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-30")
|
||||||
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-30-hint"
|
"myrepresentations:s78-section-question-30-hint"
|
||||||
)}
|
)}
|
||||||
@@ -902,9 +943,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-31"
|
"31. " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-31")
|
||||||
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-31-hint"
|
"myrepresentations:s78-section-question-31-hint"
|
||||||
)}
|
)}
|
||||||
@@ -928,9 +970,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-32"
|
"32. " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-32")
|
||||||
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-32-hint"
|
"myrepresentations:s78-section-question-32-hint"
|
||||||
)}
|
)}
|
||||||
@@ -954,9 +997,10 @@ let S78_Questionnaire = (props) => {
|
|||||||
)}
|
)}
|
||||||
component={RenderLPACondtionalRadioList}
|
component={RenderLPACondtionalRadioList}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
legend={t(
|
legend={
|
||||||
"myrepresentations:s78-section-question-33"
|
"33. " +
|
||||||
)}
|
t("myrepresentations:s78-section-question-33")
|
||||||
|
}
|
||||||
conditionalLabel={t(
|
conditionalLabel={t(
|
||||||
"myrepresentations:s78-section-question-33-hint"
|
"myrepresentations:s78-section-question-33-hint"
|
||||||
)}
|
)}
|
||||||
@@ -978,16 +1022,33 @@ let S78_Questionnaire = (props) => {
|
|||||||
name={"representationDocuments"}
|
name={"representationDocuments"}
|
||||||
id={"representationDocuments"}
|
id={"representationDocuments"}
|
||||||
label={t("myrepresentations:add-files-label")}
|
label={t("myrepresentations:add-files-label")}
|
||||||
ticketnumber={props.props.caseReference}
|
ticketnumber={props.props.props.caseReference}
|
||||||
hint={"sdsd"}
|
hint={"sdsd"}
|
||||||
fileList={
|
fileList={
|
||||||
props.props.props.props.form[
|
props.currentView.fileList
|
||||||
"representationForm"
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
].values.filesList || []
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView.caseReference.repDetails
|
||||||
|
// .filesList.length > 0
|
||||||
|
// ? props.currentView.caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
}
|
}
|
||||||
setFilesForRepresentation={[]}
|
setFilesForRepresentations={
|
||||||
containerID={props.containerID}
|
setFilesForRepresentations
|
||||||
filenamePrefix={props.props}
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={props.setCurrentReference}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -1010,7 +1071,7 @@ let S78_Questionnaire = (props) => {
|
|||||||
"myrepresentations:s78-section-question-signed"
|
"myrepresentations:s78-section-question-signed"
|
||||||
)}
|
)}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg="Is required"
|
errorMsg={t("myrepresentations:is-required-label")}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -1025,7 +1086,8 @@ let S78_Questionnaire = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"myrepresentations:s78-section-question-onbehalf"
|
"myrepresentations:s78-section-question-onbehalf"
|
||||||
)}
|
)}
|
||||||
errorMsg="Is required"
|
disabled={true}
|
||||||
|
errorMsg={t("myrepresentations:is-required-label")}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Field
|
<Field
|
||||||
@@ -1035,8 +1097,8 @@ let S78_Questionnaire = (props) => {
|
|||||||
component={RenderDatePicker}
|
component={RenderDatePicker}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
dateStart="0"
|
dateStart="0"
|
||||||
dateEnd="1-y"
|
dateEnd="0"
|
||||||
errorMsg="Is required"
|
errorMsg={t("myrepresentations:select-a-date-label")}
|
||||||
locale={locale}
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -1059,8 +1121,18 @@ S78_Questionnaire = connect((state) => {
|
|||||||
};
|
};
|
||||||
})(S78_Questionnaire);
|
})(S78_Questionnaire);
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state, props) => {
|
const mapStateToProps = (state, props) => {
|
||||||
console.log();
|
|
||||||
return {
|
return {
|
||||||
search: state.search,
|
search: state.search,
|
||||||
searchResultsObj: state.searchResultsObj,
|
searchResultsObj: state.searchResultsObj,
|
||||||
@@ -1072,10 +1144,13 @@ const mapStateToProps = (state, props) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect(mapStateToProps)(
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
reduxForm({
|
reduxForm({
|
||||||
form: "representationForm",
|
form: "representationForm",
|
||||||
enableReinitialize: true,
|
enableReinitialize: false,
|
||||||
destroyOnUnmount: false,
|
destroyOnUnmount: false,
|
||||||
})(S78_Questionnaire)
|
})(S78_Questionnaire)
|
||||||
);
|
);
|
||||||
|
|||||||
+1358
-586
File diff suppressed because it is too large
Load Diff
+400
-258
File diff suppressed because it is too large
Load Diff
@@ -57,12 +57,14 @@ const RepresentationList = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{representationsArr.map((item, key) => {
|
{representationsArr.map((item, key) => {
|
||||||
let detailsObj = jsonpath(
|
let detailsObj = jsonpath({
|
||||||
"$..[?(@.pinswg_representationsid=='" +
|
path:
|
||||||
|
"$..[?(@ && @.pinswg_representationsid=='" +
|
||||||
incidentid +
|
incidentid +
|
||||||
"')]",
|
"')]",
|
||||||
item
|
json: item,
|
||||||
);
|
eval: true,
|
||||||
|
});
|
||||||
detailsObj = item;
|
detailsObj = item;
|
||||||
|
|
||||||
console.log(detailsObj);
|
console.log(detailsObj);
|
||||||
@@ -87,14 +89,16 @@ const RepresentationList = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
sanbox: {},
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
+1758
-896
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,81 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
|
export function capitalizeFirstLetter(val) {
|
||||||
|
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatDates(dateObj, showTime) {
|
||||||
|
const d = new Date(dateObj);
|
||||||
|
const dd = String(d.getDate()).padStart(2, "0");
|
||||||
|
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
||||||
|
const yyyy = d.getFullYear();
|
||||||
|
const hh = String(d.getHours()).padStart(2, "0");
|
||||||
|
const mins = String(d.getMinutes()).padStart(2, "0");
|
||||||
|
|
||||||
|
return showTime && !(hh === "00" && mins === "00")
|
||||||
|
? `${hh}:${mins}`
|
||||||
|
: `${dd}/${mm}/${yyyy}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function hasValidKey(obj, key) {
|
||||||
|
return obj?.hasOwnProperty(key) && obj[key] !== null && obj[key] !== "";
|
||||||
|
}
|
||||||
|
|
||||||
|
export function showReps(startDate, endDate) {
|
||||||
|
const now = new Date();
|
||||||
|
const start = new Date(startDate);
|
||||||
|
const end = new Date(endDate);
|
||||||
|
return now >= start && now <= end;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function showRepsEnded(startDate, endDate) {
|
||||||
|
const now = new Date();
|
||||||
|
const start = new Date(startDate);
|
||||||
|
const end = new Date(endDate);
|
||||||
|
return now > start && now > end;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isObjectNotEmpty(obj, key) {
|
||||||
|
return obj.hasOwnProperty(key) && Object.keys(obj[key]).length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function hasOwnPropertyAndNotNull(obj, property) {
|
||||||
|
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function linkedCasesList(linkedCasesReference) {
|
||||||
|
//console.log(linkedCasesReference);
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
linkedCasesReference = linkedCasesReference.value || [];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ul className="govuk-list govuk-!-font-size-16">
|
||||||
|
{linkedCasesReference.map((item, key) => {
|
||||||
|
return (
|
||||||
|
<li key={key}>
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "/canlyniadauchwilio?q=" +
|
||||||
|
item.title +
|
||||||
|
"&lk=1"
|
||||||
|
: "/searchresults?q=" +
|
||||||
|
item.title +
|
||||||
|
"&lk=1"
|
||||||
|
}
|
||||||
|
className=""
|
||||||
|
>
|
||||||
|
{item.title}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
//console.log(item.incidentid, item.title);
|
||||||
|
})}
|
||||||
|
</ul>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
export { default as Pinswg_advertsid } from "./pinswg_advertsid";
|
||||||
|
export { default as Pinswg_callinss77id } from "./pinswg_callinss77id";
|
||||||
|
export { default as Pinswg_commonlandid } from "./pinswg_commonlandid";
|
||||||
|
export { default as Pinswg_communityinfrastructurelevyid } from "./pinswg_communityinfrastructurelevyid";
|
||||||
|
export { default as Pinswg_compulsorypurchaseordersid } from "./pinswg_compulsorypurchaseordersid";
|
||||||
|
export { default as Pinswg_dnsid } from "./pinswg_dnsid";
|
||||||
|
export { default as Pinswg_sipscase } from "./pinswg_sipscase";
|
||||||
|
export { default as Pinswg_electricityactid } from "./pinswg_electricityactid";
|
||||||
|
export { default as Pinswg_enforcementlistedbuildingconseid } from "./pinswg_enforcementlistedbuildingconseid";
|
||||||
|
export { default as Pinswg_enforcementnoticeappeals174id } from "./pinswg_enforcementnoticeappeals174id";
|
||||||
|
export { default as Pinswg_environmentalpermittingid } from "./pinswg_environmentalpermittingid";
|
||||||
|
export { default as Pinswg_harbourrevisionorderid } from "./pinswg_harbourrevisionorderid";
|
||||||
|
export { default as Pinswg_hedgeshedgerowstreepreservatioid } from "./pinswg_hedgeshedgerowstreepreservatioid";
|
||||||
|
export { default as Pinswg_householderappealhasid } from "./pinswg_householderappealhasid";
|
||||||
|
export { default as Pinswg_lawfuldevelopmentcertificatappid } from "./pinswg_lawfuldevelopmentcertificatappid";
|
||||||
|
export { default as Pinswg_ldpid } from "./pinswg_ldpid";
|
||||||
|
export { default as Pinswg_listedbuildingandconservationrid } from "./pinswg_listedbuildingandconservationrid";
|
||||||
|
export { default as Pinswg_maintenanceoflands217id } from "./pinswg_maintenanceoflands217id";
|
||||||
|
export { default as Pinswg_miscellaneouscasewordid } from "./pinswg_miscellaneouscasewordid";
|
||||||
|
export { default as Pinswg_nonvalidationid } from "./pinswg_nonvalidationid";
|
||||||
|
export { default as Pinswg_planningappeals78id } from "./pinswg_planningappeals78id";
|
||||||
|
export { default as Pinswg_planningconditionss73s79id } from "./pinswg_planningconditionss73s79id";
|
||||||
|
export { default as Pinswg_planningobligationappeals106id } from "./pinswg_planningobligationappeals106id";
|
||||||
|
export { default as Pinswg_rowid } from "./pinswg_rowid";
|
||||||
|
export { default as Pinswg_transportandworkactid } from "./pinswg_transportandworkactid";
|
||||||
|
export { default as Pinswg_wayleaveid } from "./pinswg_wayleaveid";
|
||||||
@@ -27,14 +27,16 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -50,14 +52,16 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -70,14 +74,16 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -85,17 +91,24 @@ const Pinswg_advertsid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -104,14 +117,16 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -123,14 +138,16 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -142,14 +159,16 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -165,14 +184,16 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_callinss77id = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -313,13 +332,13 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_statementduedate"
|
"pinswg_statementsduedate"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementsduedate
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementsduedate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_commonlandid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -217,18 +236,22 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
: jsonpath(
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
transLookup
|
json: transLookup,
|
||||||
) ||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_communityinfrastructurelevyid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -46,17 +48,24 @@ const Pinswg_compulsorypurchaseordersid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -65,14 +74,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -84,14 +95,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -103,14 +116,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -125,14 +140,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -199,18 +216,22 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
: jsonpath(
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
transLookup
|
json: transLookup,
|
||||||
) ||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -122,14 +122,17 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -148,12 +151,14 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: (
|
: (
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -184,33 +189,61 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
<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">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</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("case:summary-procedure-label")}
|
{t("case:summary-procedure-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -225,9 +258,9 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({path:
|
||||||
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
@@ -264,14 +297,16 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -331,14 +366,16 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -430,8 +467,8 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup,
|
transLookup,
|
||||||
|
|||||||
@@ -65,14 +65,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -87,19 +89,45 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
<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">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</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(
|
{t(
|
||||||
@@ -123,14 +151,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -144,14 +174,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -163,14 +195,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -185,14 +219,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -259,12 +295,14 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -280,12 +318,14 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_enforcementlistedbuildingconseid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_enforcementnoticeappeals174id = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_environmentalpermittingid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -217,18 +236,22 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
: jsonpath(
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
transLookup
|
json: transLookup,
|
||||||
) ||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -65,14 +65,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -87,19 +89,45 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
<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">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</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(
|
{t(
|
||||||
@@ -123,14 +151,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -142,14 +172,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -164,14 +196,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -238,12 +272,14 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -259,12 +295,14 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -50,14 +52,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -70,14 +74,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -85,17 +91,24 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -104,14 +117,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -123,14 +138,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -142,14 +159,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -164,14 +183,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -238,18 +259,22 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
: jsonpath(
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
transLookup
|
json: transLookup,
|
||||||
) ||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_householderappealhasid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -124,14 +139,16 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_lawfuldevelopmentcertificatappid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,48 +51,38 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
|
||||||
<dt className="govuk-summary-list__key">
|
|
||||||
{t("case:summary-case-officer-label")}
|
|
||||||
</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{" "}
|
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
|
||||||
""} */}
|
|
||||||
{_.has(casesObj, "_ownerid_value")
|
|
||||||
? casesObj[
|
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
]
|
|
||||||
: ""}
|
|
||||||
</dd>
|
|
||||||
</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("case:summary-procedure-label")}
|
{t("case:summary-procedure-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +94,16 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +115,16 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +139,16 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_listedbuildingandconservationrid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_maintenanceoflands217id = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_miscellaneouscasewordid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -217,18 +236,22 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
: jsonpath(
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
transLookup
|
json: transLookup,
|
||||||
) ||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,48 +51,37 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
|
||||||
<dt className="govuk-summary-list__key">
|
|
||||||
{t("case:summary-case-officer-label")}
|
|
||||||
</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{" "}
|
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
|
||||||
""} */}
|
|
||||||
{_.has(casesObj, "_ownerid_value")
|
|
||||||
? casesObj[
|
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
]
|
|
||||||
: ""}
|
|
||||||
</dd>
|
|
||||||
</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("case:summary-procedure-label")}
|
{t("case:summary-procedure-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +93,16 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -124,14 +117,16 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_planningappeals78id = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -124,14 +139,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -146,14 +163,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_planningconditionss73s79id = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_planningobligationappeals106id = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -50,14 +52,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -70,14 +74,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -85,17 +91,24 @@ const Pinswg_rowid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -104,14 +117,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -123,14 +138,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -142,14 +159,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -164,14 +183,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -238,18 +259,22 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
: jsonpath(
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
transLookup
|
json: transLookup,
|
||||||
) ||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -65,14 +65,16 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -81,6 +83,30 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
<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">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</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">
|
||||||
@@ -90,12 +116,14 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -111,12 +139,14 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -49,14 +51,16 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,17 +68,24 @@ const Pinswg_wayleaveid = (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("case:summary-case-officer-label")}
|
{t("case:summary-eia-required-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{" "}
|
{router.locale == "cy"
|
||||||
{/* {casesObj.caseDetails.caseOfficer ||
|
? jsonpath(
|
||||||
""} */}
|
'$..[?(@.value=="' +
|
||||||
{_.has(casesObj, "_ownerid_value")
|
detailsObj[
|
||||||
? casesObj[
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
] +
|
||||||
]
|
'")].value_cy',
|
||||||
: ""}
|
transLookup
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -83,14 +94,16 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,14 +115,16 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,14 +136,16 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,14 +160,16 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -217,18 +236,22 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
: jsonpath(
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
transLookup
|
json: transLookup,
|
||||||
) ||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
import { signOut } from "next-auth/react";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
import { destroyCookie, parseCookies, setCookie } from "nookies";
|
||||||
|
import { signIn, useSession } from "next-auth/react";
|
||||||
|
|
||||||
|
const WatchModal = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const { isOpen, onClose } = props;
|
||||||
|
|
||||||
|
const currentType = props.currentType;
|
||||||
|
const casesObj = props.casesObj;
|
||||||
|
const { data: session, status } = useSession();
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
|
||||||
|
let now = new Date();
|
||||||
|
let expDate = new Date(now);
|
||||||
|
|
||||||
|
expDate.setDate(now.getDate() + 365);
|
||||||
|
|
||||||
|
if (!isOpen) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
className={open ? "modal fade show" : "modal fade"}
|
||||||
|
style={{
|
||||||
|
display: open ? "flex" : "none",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="modal-dialog">
|
||||||
|
<div className="modal-content">
|
||||||
|
<h3>Watch case</h3>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{!session
|
||||||
|
? " You will now be signed in to watch this case"
|
||||||
|
: " you are logged in already"}
|
||||||
|
</p>
|
||||||
|
<div className="govuk-checkboxes__item">
|
||||||
|
<input
|
||||||
|
className="govuk-checkboxes__input"
|
||||||
|
type="checkbox"
|
||||||
|
name="addInvolvement"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="govuk-label-s govuk-checkboxes__label"
|
||||||
|
htmlFor="addInvolvement"
|
||||||
|
>
|
||||||
|
{} Yes, I want you want to be emailed updates
|
||||||
|
for case
|
||||||
|
<div> {casesObj.title}</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
className="govuk-button"
|
||||||
|
onClick={() => {
|
||||||
|
setCookie(
|
||||||
|
null,
|
||||||
|
"pedwWatchCase",
|
||||||
|
currentType == "searchResultsObj"
|
||||||
|
? detailsObj.pinswg_name
|
||||||
|
: currentType == "directResultsObj"
|
||||||
|
? casesObj.title
|
||||||
|
: casesObj.reference,
|
||||||
|
{
|
||||||
|
path: "/",
|
||||||
|
expires: expDate,
|
||||||
|
}
|
||||||
|
),
|
||||||
|
signIn();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Yes
|
||||||
|
</button>{" "}
|
||||||
|
<button
|
||||||
|
className="govuk-button govuk-button--secondary"
|
||||||
|
onClick={onClose}
|
||||||
|
>
|
||||||
|
No
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="modal-backdrop fade show"></div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default WatchModal;
|
||||||
+854
-174
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,69 @@
|
|||||||
|
// validationUtils.js
|
||||||
|
|
||||||
|
// Validation functions
|
||||||
|
const required = (value, requiredMessage, emojiNotAllowedMessage) => {
|
||||||
|
let errors;
|
||||||
|
if (!value) {
|
||||||
|
errors = requiredMessage;
|
||||||
|
} else {
|
||||||
|
const emojiRegex =
|
||||||
|
/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{1FA70}-\u{1FAFF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{2300}-\u{23FF}\u{2B50}\u{1F004}-\u{1F0CF}\u{1F0A0}-\u{1F0A5}\u{1F170}-\u{1F251}]/gu;
|
||||||
|
|
||||||
|
if (emojiRegex.test(value)) {
|
||||||
|
errors = emojiNotAllowedMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return errors;
|
||||||
|
};
|
||||||
|
|
||||||
|
const postcode = (value, invalidPostcodeMessage) =>
|
||||||
|
value &&
|
||||||
|
!/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/i.test(value)
|
||||||
|
? "Invalid postcode"
|
||||||
|
: undefined;
|
||||||
|
|
||||||
|
// Function to parse the validation string
|
||||||
|
export const parseValidationString = (validationString) => {
|
||||||
|
if (typeof validationString !== "string") {
|
||||||
|
return []; // Return an empty array if it's not a string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove square brackets and split by commas
|
||||||
|
return validationString
|
||||||
|
.replace(/[\[\]']+/g, "") // Remove square brackets
|
||||||
|
.split(",") // Split by commas
|
||||||
|
.map((rule) => rule.trim()); // Trim each validation rule
|
||||||
|
};
|
||||||
|
|
||||||
|
// Function to handle multiple validation rules
|
||||||
|
export const validateField = (
|
||||||
|
value,
|
||||||
|
validationString,
|
||||||
|
requiredMessage,
|
||||||
|
emojiNotAllowedMessage,
|
||||||
|
invalidPostcodeMessage
|
||||||
|
) => {
|
||||||
|
const validations = parseValidationString(validationString); // Parse the validation string
|
||||||
|
let errors;
|
||||||
|
for (let validationRule of validations) {
|
||||||
|
const validationFunc = validationFunctions[validationRule];
|
||||||
|
if (validationFunc) {
|
||||||
|
errors = validationFunc(
|
||||||
|
value,
|
||||||
|
requiredMessage,
|
||||||
|
emojiNotAllowedMessage,
|
||||||
|
invalidPostcodeMessage
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (errors) break; // Exit if any validation fails
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Map validation strings to actual validation functions
|
||||||
|
export const validationFunctions = {
|
||||||
|
required,
|
||||||
|
postcode,
|
||||||
|
// Add other validation functions as needed
|
||||||
|
};
|
||||||
@@ -110,9 +110,9 @@ export default function AccessibilityCY() {
|
|||||||
Ffoniwch:{" "}
|
Ffoniwch:{" "}
|
||||||
<a
|
<a
|
||||||
className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold"
|
className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
href="tel:03000 604400"
|
href="tel:0300 123 1590"
|
||||||
>
|
>
|
||||||
03000 604400
|
0300 123 1590
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ export default function AccessibilityEN() {
|
|||||||
Call:{" "}
|
Call:{" "}
|
||||||
<a
|
<a
|
||||||
className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold"
|
className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
href="tel:03000 604400"
|
href="tel:0300 123 1590"
|
||||||
>
|
>
|
||||||
03000 604400
|
0300 123 1590
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
+73
-102
@@ -19,6 +19,7 @@ const Header = (props) => {
|
|||||||
"/",
|
"/",
|
||||||
"/logout",
|
"/logout",
|
||||||
"/dns",
|
"/dns",
|
||||||
|
"/dns/[developmentName]",
|
||||||
"/dns/application-process",
|
"/dns/application-process",
|
||||||
"/dns/help",
|
"/dns/help",
|
||||||
"/dns/contact-us",
|
"/dns/contact-us",
|
||||||
@@ -47,12 +48,22 @@ const Header = (props) => {
|
|||||||
"/newappeal/[appealtypes]",
|
"/newappeal/[appealtypes]",
|
||||||
"/newappeal",
|
"/newappeal",
|
||||||
"/myportal/dnsapplications",
|
"/myportal/dnsapplications",
|
||||||
|
"/myportal/dns/[developmentName]",
|
||||||
"/myportal/dnsdetails",
|
"/myportal/dnsdetails",
|
||||||
"/myportal/addresssearch",
|
"/myportal/addresssearch",
|
||||||
"/myportal/addresssearchresults",
|
"/myportal/addresssearchresults",
|
||||||
"/myportal/advancedsearch",
|
"/myportal/advancedsearch",
|
||||||
"/myportal/advancedsearchresults",
|
"/myportal/advancedsearchresults",
|
||||||
"/myportal/case/[ticketnumber]",
|
"/myportal/case/[ticketnumber]",
|
||||||
|
"/account/personaldetails",
|
||||||
|
"/register",
|
||||||
|
"/myportal/searchresults",
|
||||||
|
"/myportal/representation",
|
||||||
|
"/myportal/viewall",
|
||||||
|
"/contactus",
|
||||||
|
"/myportal/contactus",
|
||||||
|
"/unsubscribe/[watchlistid]",
|
||||||
|
"/unsubscribeall/[watchlistid]",
|
||||||
];
|
];
|
||||||
|
|
||||||
const hasContactLink = [
|
const hasContactLink = [
|
||||||
@@ -78,7 +89,44 @@ const Header = (props) => {
|
|||||||
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
||||||
destroyCookie(null, "pedw_locale", { path: "/" }),
|
destroyCookie(null, "pedw_locale", { path: "/" }),
|
||||||
destroyCookie(null, "pinsUser", { path: "/" }),
|
destroyCookie(null, "pinsUser", { path: "/" }),
|
||||||
signOut({ callbackUrl: "/logout" });
|
signOut({
|
||||||
|
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//const switchLocale = locale === "en" ? "cy" : "en";
|
||||||
|
|
||||||
|
const switchLocale = router.asPath.startsWith("/cy") ? "en" : "cy";
|
||||||
|
|
||||||
|
console.log("switch locale", locale === "en" ? "cy" : "en");
|
||||||
|
|
||||||
|
const handleLocaleSwitch = () => {
|
||||||
|
// const router = useRouter();
|
||||||
|
const isWelsh = router.asPath.startsWith("/cy");
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
isWelsh,
|
||||||
|
router.asPath,
|
||||||
|
router.basePath,
|
||||||
|
router.pathname,
|
||||||
|
router.route
|
||||||
|
);
|
||||||
|
|
||||||
|
// Switch path: remove /cy if switching to English, add /cy if switching to Welsh
|
||||||
|
const newPath = isWelsh
|
||||||
|
? router.asPath.replace(/^\/cy/, "") || "/"
|
||||||
|
: router.asPath === "/"
|
||||||
|
? "/cy"
|
||||||
|
: `/cy${router.asPath}`;
|
||||||
|
|
||||||
|
// Persist user's choice in cookie
|
||||||
|
setCookie(null, "pedw_locale", isWelsh ? "en" : "cy", {
|
||||||
|
path: "/",
|
||||||
|
maxAge: 60 * 60 * 24 * 365, // 1 year
|
||||||
|
});
|
||||||
|
|
||||||
|
// Navigate to new language path
|
||||||
|
router.push(newPath);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -103,106 +151,6 @@ const Header = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="languageSwitch">
|
<div className="languageSwitch">
|
||||||
{/* <div className="mobileNav">
|
|
||||||
<div className="mobileMenu">
|
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
id="mobileMenu-1"
|
|
||||||
name="mobileMenu-group-1"
|
|
||||||
/>
|
|
||||||
<label htmlFor="mobileMenu-1">
|
|
||||||
{t("common:mobile-nav-label")} <i>▼</i>
|
|
||||||
</label>
|
|
||||||
<div className="mobileMenu close-mobileMenu">
|
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
id="mobileMenu-close"
|
|
||||||
name="mobileMenu-group-1"
|
|
||||||
/>
|
|
||||||
<label htmlFor="mobileMenu-close">
|
|
||||||
{t("common:mobile-nav-label")} <i>▲</i>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div className="content">
|
|
||||||
<ul>
|
|
||||||
{hasContactLink.includes(router.pathname) ==
|
|
||||||
true ? (
|
|
||||||
<li>
|
|
||||||
<Link href="/dns/contact-us">
|
|
||||||
<a className="govuk-header__link ">
|
|
||||||
Contact
|
|
||||||
</a>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
{noSignoutLink.includes(router.pathname) ==
|
|
||||||
true ? (
|
|
||||||
""
|
|
||||||
) : (
|
|
||||||
<li>
|
|
||||||
<a
|
|
||||||
href={
|
|
||||||
router.locale == "cy"
|
|
||||||
? "/allgofnodi"
|
|
||||||
: "/logout"
|
|
||||||
}
|
|
||||||
onClick={() => {
|
|
||||||
setLogout(),
|
|
||||||
window.localStorage.clear();
|
|
||||||
}}
|
|
||||||
className="govuk-header__link "
|
|
||||||
>
|
|
||||||
{t("common:signout-label")}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<Link
|
|
||||||
href={
|
|
||||||
locale == "en"
|
|
||||||
? router.query.q != null
|
|
||||||
? router.pathname +
|
|
||||||
"?q=" +
|
|
||||||
router.query.q
|
|
||||||
: router.pathname
|
|
||||||
: router.query.q != null
|
|
||||||
? process.env.I18N_DOMAIN +
|
|
||||||
"/" +
|
|
||||||
router.asPath +
|
|
||||||
"?q=" +
|
|
||||||
router.query.q
|
|
||||||
: router.asPath
|
|
||||||
}
|
|
||||||
locale={
|
|
||||||
locale == "en" ? "cy" : "en"
|
|
||||||
}
|
|
||||||
className="govuk-header__link "
|
|
||||||
lang={locale == "en" ? "cy" : "en"}
|
|
||||||
hrefLang={
|
|
||||||
locale == "en" ? "cy" : "en"
|
|
||||||
}
|
|
||||||
data-journey-click={
|
|
||||||
locale == "en"
|
|
||||||
? "link - click:lang-select:Cymraeg"
|
|
||||||
: "link - click:lang-select:English"
|
|
||||||
}
|
|
||||||
aria-label={
|
|
||||||
locale == "en"
|
|
||||||
? "Dewiswch Cymraeg"
|
|
||||||
: "Select English"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{" "}
|
|
||||||
{t("common:available-in")}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> */}
|
|
||||||
<div className="fullNavs">
|
<div className="fullNavs">
|
||||||
{hasContactLink.includes(router.pathname) == true ? (
|
{hasContactLink.includes(router.pathname) == true ? (
|
||||||
<Link
|
<Link
|
||||||
@@ -220,7 +168,7 @@ const Header = (props) => {
|
|||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? "/allgofnodi"
|
? "/cy/allgofnodi"
|
||||||
: "/logout"
|
: "/logout"
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -232,6 +180,29 @@ const Header = (props) => {
|
|||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* <span
|
||||||
|
onClick={handleLocaleSwitch}
|
||||||
|
className="govuk-header__link"
|
||||||
|
lang={switchLocale}
|
||||||
|
hrefLang={switchLocale}
|
||||||
|
role="link"
|
||||||
|
tabIndex={0}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (e.key === "Enter") handleLocaleSwitch();
|
||||||
|
}}
|
||||||
|
data-journey-click={
|
||||||
|
locale === "en"
|
||||||
|
? "link - click:lang-select:Cymraeg"
|
||||||
|
: "link - click:lang-select:English"
|
||||||
|
}
|
||||||
|
aria-label={
|
||||||
|
locale === "en"
|
||||||
|
? "Dewiswch Cymraeg"
|
||||||
|
: "Select English"
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{t("common:available-in")}
|
||||||
|
</span> */}
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
Object.keys(router.query).length > 0
|
Object.keys(router.query).length > 0
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
export default function CaseComment() {
|
export default function CaseComment() {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -24,6 +25,15 @@ export default function CaseComment() {
|
|||||||
<p className="govuk-body-s">
|
<p className="govuk-body-s">
|
||||||
{t("home:casescomment-card-paragraph-two")}
|
{t("home:casescomment-card-paragraph-two")}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Link
|
||||||
|
href={router.locale == "cy" ? "/cyswllt" : "/contactus"}
|
||||||
|
className="govuk-button withChevron govuk-button-cta"
|
||||||
|
>
|
||||||
|
{t("common:footer-contact-us-link-label")}
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+63
-15
@@ -1,3 +1,4 @@
|
|||||||
|
import { he } from "date-fns/locale";
|
||||||
import GoogleMapReact from "google-map-react";
|
import GoogleMapReact from "google-map-react";
|
||||||
const GoogleMapComponent = (props) => {
|
const GoogleMapComponent = (props) => {
|
||||||
const { center, zoom } = props;
|
const { center, zoom } = props;
|
||||||
@@ -21,22 +22,69 @@ const GoogleMapComponent = (props) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// "https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||||
|
// props.center.lng +
|
||||||
|
// "," +
|
||||||
|
// props.center.lat +
|
||||||
|
// "&zoom=12#/"
|
||||||
|
// );
|
||||||
return (
|
return (
|
||||||
<GoogleMapReact
|
// <GoogleMapReact
|
||||||
options={function (maps) {
|
// options={function (maps) {
|
||||||
return {
|
// return {
|
||||||
overviewMapControl: true,
|
// overviewMapControl: true,
|
||||||
mapTypeControl: true,
|
// mapTypeControl: true,
|
||||||
};
|
// };
|
||||||
}}
|
// }}
|
||||||
bootstrapURLKeys={{
|
// bootstrapURLKeys={{
|
||||||
key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
// key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||||
}}
|
// }}
|
||||||
defaultCenter={center}
|
// defaultCenter={center}
|
||||||
defaultZoom={zoom}
|
// defaultZoom={zoom}
|
||||||
yesIWantToUseGoogleMapApiInternals
|
// yesIWantToUseGoogleMapApiInternals
|
||||||
onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
||||||
></GoogleMapReact>
|
// ></GoogleMapReact>
|
||||||
|
<>
|
||||||
|
{" "}
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<a
|
||||||
|
href={
|
||||||
|
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||||
|
props.center.lng +
|
||||||
|
"," +
|
||||||
|
props.center.lat +
|
||||||
|
"&zoom=7#/"
|
||||||
|
}
|
||||||
|
rel="noreferrer noopener"
|
||||||
|
className="govuk-link govuk-link--no-underline govuk-!-font-size-14 "
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
See this map on Datamap Wales
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<iframe
|
||||||
|
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%"}
|
||||||
|
maxheight={"400px"}
|
||||||
|
height={"500px"}
|
||||||
|
className={"mappingFrame"}
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+23
-9
@@ -13,7 +13,10 @@ import MyCases from "./myportal/mycases";
|
|||||||
import MyRepresentations from "./myportal/myrepresentations";
|
import MyRepresentations from "./myportal/myrepresentations";
|
||||||
import SearchCases from "./myportal/searchcases";
|
import SearchCases from "./myportal/searchcases";
|
||||||
import WatchedCases from "./myportal/watchedcases";
|
import WatchedCases from "./myportal/watchedcases";
|
||||||
|
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";
|
||||||
|
|
||||||
const MyPortal = (props) => {
|
const MyPortal = (props) => {
|
||||||
const { showFileUpload, showLoginCheck } = props;
|
const { showFileUpload, showLoginCheck } = props;
|
||||||
@@ -29,7 +32,9 @@ const MyPortal = (props) => {
|
|||||||
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
||||||
destroyCookie(null, "pedw_locale", { path: "/" }),
|
destroyCookie(null, "pedw_locale", { path: "/" }),
|
||||||
destroyCookie(null, "pinsUser", { path: "/" }),
|
destroyCookie(null, "pinsUser", { path: "/" }),
|
||||||
signOut({ callbackUrl: "/logout" });
|
signOut({
|
||||||
|
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout",
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const isLPA =
|
const isLPA =
|
||||||
@@ -100,12 +105,21 @@ const MyPortal = (props) => {
|
|||||||
{isLPA && (
|
{isLPA && (
|
||||||
<div>
|
<div>
|
||||||
<h2 className="heading-small card-heading">
|
<h2 className="heading-small card-heading">
|
||||||
{
|
{router.locale == "cy"
|
||||||
props.accountDetails.accountDetails[
|
? jsonpath({
|
||||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
]
|
'$..[?(@ && @.value=="' +
|
||||||
}{" "}
|
props.accountDetails.accountDetails[
|
||||||
LPA Portal
|
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: props.accountDetails.accountDetails[
|
||||||
|
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]}{" "}
|
||||||
|
{t("myportal:lpa-portal-heading")}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -174,9 +188,9 @@ const MyPortal = (props) => {
|
|||||||
|
|
||||||
{props.myRepresentations.mySubmittedReps
|
{props.myRepresentations.mySubmittedReps
|
||||||
.mySubmittedReps.length > 0 && (
|
.mySubmittedReps.length > 0 && (
|
||||||
<WatchedCases
|
<MySubmittedReps
|
||||||
currentView={props.currentView}
|
currentView={props.currentView}
|
||||||
watchedCases={
|
mySubmittedReps={
|
||||||
props.myRepresentations.mySubmittedReps
|
props.myRepresentations.mySubmittedReps
|
||||||
}
|
}
|
||||||
isLPA={isLPA}
|
isLPA={isLPA}
|
||||||
|
|||||||
@@ -24,25 +24,15 @@ let AdvancedSearch = (props) => {
|
|||||||
|
|
||||||
//console.log("props here:", props.props);
|
//console.log("props here:", props.props);
|
||||||
|
|
||||||
const appealOptionsObj = _.isEmpty(props)
|
const appealOptionsObj =
|
||||||
? [{}]
|
props?.appealType?.appealTypeOptions?.value?.length > 0
|
||||||
: _.isEmpty(props.appealType)
|
? props.appealType.appealTypeOptions.value
|
||||||
? [{}]
|
: [{}];
|
||||||
: _.isEmpty(props.appealType.appealTypeOptions)
|
|
||||||
? [{}]
|
|
||||||
: _.isEmpty(props.appealType.appealTypeOptions.value)
|
|
||||||
? [{}]
|
|
||||||
: props.appealType.appealTypeOptions.value;
|
|
||||||
|
|
||||||
let lpaOptionsObj = _.isEmpty(props)
|
const lpaOptionsObj =
|
||||||
? [{}]
|
props?.LPAData?.LPAData?.value?.length > 0
|
||||||
: _.isEmpty(props.LPAData)
|
? props.LPAData.LPAData.value
|
||||||
? [{}]
|
: [{}];
|
||||||
: _.isEmpty(props.LPAData.LPAData)
|
|
||||||
? [{}]
|
|
||||||
: _.isEmpty(props.LPAData.LPAData)
|
|
||||||
? [{}]
|
|
||||||
: props.LPAData.LPAData.value;
|
|
||||||
|
|
||||||
const RenderTextfield = ({
|
const RenderTextfield = ({
|
||||||
id,
|
id,
|
||||||
@@ -146,13 +136,15 @@ let AdvancedSearch = (props) => {
|
|||||||
{/* {optionsObj[key].name} */}
|
{/* {optionsObj[key].name} */}
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
optionsObj[key]
|
optionsObj[key]
|
||||||
.name +
|
.name +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: optionsObj[key].name ||
|
: optionsObj[key].name ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -249,13 +241,15 @@ let AdvancedSearch = (props) => {
|
|||||||
)
|
)
|
||||||
? ""
|
? ""
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
optionsObj[key]
|
optionsObj[key]
|
||||||
.value +
|
.value +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: optionsObj[key].value ||
|
: optionsObj[key].value ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -306,10 +300,7 @@ let AdvancedSearch = (props) => {
|
|||||||
(router.locale == "cy"
|
(router.locale == "cy"
|
||||||
? "/fymhorth/canlyniadauchwiliouwch"
|
? "/fymhorth/canlyniadauchwiliouwch"
|
||||||
: "/myportal/advancedsearchresults") + searchString,
|
: "/myportal/advancedsearchresults") + searchString,
|
||||||
null,
|
null
|
||||||
{
|
|
||||||
shallow: true,
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -34,11 +34,12 @@ const AwaitingSubmission = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=awaitingSubmission"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -43,14 +43,25 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let topthreeRowArr = [];
|
let topthreeRowArr = [];
|
||||||
let showTopThreeArr = props.awaitingSubmissionFromBlob.value;
|
let showTopThreeArr = props.awaitingSubmissionFromBlob.case;
|
||||||
let showTopThreeArrDets = props.awaitingSubmissionFromBlob.case;
|
let showTopThreeArrDets = props.awaitingSubmissionFromBlob.value;
|
||||||
|
|
||||||
showTopThreeArr = sortByField(showTopThreeArr, "pinswg_name");
|
showTopThreeArr = sortByField(showTopThreeArr, "ticketnumber");
|
||||||
showTopThreeArrDets = sortByField(showTopThreeArrDets, "ticketnumber");
|
showTopThreeArrDets = sortByField(showTopThreeArrDets, "pinswg_name");
|
||||||
|
|
||||||
showTopThreeArr = sortByISODate(showTopThreeArr, "createdDate");
|
let mergedArray = showTopThreeArr.map((item1) => {
|
||||||
showTopThreeArrDets = sortByISODate(showTopThreeArrDets, "createdon");
|
let item2 = showTopThreeArrDets.find(
|
||||||
|
(item) =>
|
||||||
|
item.pinswg_name === item1.ticketnumber ||
|
||||||
|
item.appealComplete === item1.ticketnumber
|
||||||
|
);
|
||||||
|
return { ...item1, ...item2 };
|
||||||
|
});
|
||||||
|
|
||||||
|
showTopThreeArr = mergedArray;
|
||||||
|
|
||||||
|
showTopThreeArr = sortByISODate(showTopThreeArr, "createdon");
|
||||||
|
// showTopThreeArrDets = sortByISODate(showTopThreeArrDets, "createdon");
|
||||||
|
|
||||||
const raisedDate = (datePart) => {
|
const raisedDate = (datePart) => {
|
||||||
var dateObj = new Date(datePart);
|
var dateObj = new Date(datePart);
|
||||||
@@ -117,7 +128,7 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
.pinswg_appealcasetype +
|
.pinswg_appealcasetype +
|
||||||
"&casereference=" +
|
"&casereference=" +
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_name +
|
.ticketnumber +
|
||||||
"&inid=" +
|
"&inid=" +
|
||||||
showTopThreeArr[key].incidentid
|
showTopThreeArr[key].incidentid
|
||||||
}
|
}
|
||||||
@@ -142,35 +153,72 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{showTopThreeArr[index].pinswg_name}
|
{
|
||||||
|
showTopThreeArr[index]
|
||||||
|
.ticketnumber
|
||||||
|
}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
{!showTopThreeArr[key].hasOwnProperty(
|
||||||
|
"appealComplete"
|
||||||
|
) && (
|
||||||
|
<div className="deleteCase">
|
||||||
|
<button
|
||||||
|
title={t(
|
||||||
|
"case:do-you-want-to-delete-case-label"
|
||||||
|
)}
|
||||||
|
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
||||||
|
onClick={() => {
|
||||||
|
confirm(
|
||||||
|
t(
|
||||||
|
"case:do-you-want-to-delete-case-label"
|
||||||
|
) +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.ticketnumber +
|
||||||
|
"?\n" +
|
||||||
|
t(
|
||||||
|
"case:do-you-want-to-delete-case-disclaimer-label"
|
||||||
|
)
|
||||||
|
) &&
|
||||||
|
deleteCaseItem(
|
||||||
|
props.containerID,
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.ticketnumber
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
—
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:lpa-reference-label")}:</b>{" "}
|
<b>{t("myportal:lpa-reference-label")}:</b>{" "}
|
||||||
{
|
{
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_lpaapplicationreference
|
.pinswg_lpaapplicationreference
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
getFormCollectionByID(
|
getFormCollectionByID(
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_appealcasetype
|
.pinswg_appealcasetype
|
||||||
).value +
|
).value +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: getFormCollectionByID(
|
: getFormCollectionByID(
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_appealcasetype
|
.pinswg_appealcasetype
|
||||||
).value || ""}
|
).value || ""}
|
||||||
</div>
|
</div>
|
||||||
<div className="carModuleAddress">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:case-address")}:</b>{" "}
|
<b>{t("myportal:case-address")}:</b>{" "}
|
||||||
{_.isEmpty(showTopThreeArr)
|
{_.isEmpty(showTopThreeArr)
|
||||||
? t("myportal:case-address-not-entered")
|
? t("myportal:case-address-not-entered")
|
||||||
@@ -202,63 +250,69 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
.pinswg_siteaddresstown
|
.pinswg_siteaddresstown
|
||||||
: "")}
|
: "")}
|
||||||
</div>
|
</div>
|
||||||
{showTopThreeArrDets[key]
|
{showTopThreeArr[key].pinswg_appellantagent !=
|
||||||
.pinswg_appellantagent != null && (
|
null && (
|
||||||
<div>
|
<div className="cardModuleReference">
|
||||||
{showTopThreeArrDets[key]
|
{showTopThreeArr[key]
|
||||||
.pinswg_appellantagent !=
|
.pinswg_appellantagent !=
|
||||||
846040000 && (
|
846040000 && (
|
||||||
<b>
|
<b>
|
||||||
{t("myportal:raised-by-label")}:{" "}
|
{t("myportal:raised-by-label")}:{" "}
|
||||||
</b>
|
</b>
|
||||||
)}
|
)}
|
||||||
{showTopThreeArrDets[key]
|
{showTopThreeArr[key]
|
||||||
.pinswg_appellantagent !=
|
.pinswg_appellantagent !=
|
||||||
846040000 &&
|
846040000 &&
|
||||||
(showTopThreeArrDets[key]
|
(showTopThreeArr[key]
|
||||||
.pinswg_agentcompanyname !=
|
.pinswg_agentcompanyname !=
|
||||||
null &&
|
null &&
|
||||||
showTopThreeArrDets[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_agentcompanyname +
|
.pinswg_agentcompanyname +
|
||||||
", ") +
|
", ") +
|
||||||
showTopThreeArrDets[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_agentfirstname +
|
.pinswg_agentfirstname +
|
||||||
" " +
|
" " +
|
||||||
showTopThreeArrDets[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_agentlastname}
|
.pinswg_agentlastname}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{showTopThreeArrDets[key]
|
{showTopThreeArr[key].pinswg_appellantagent !=
|
||||||
.pinswg_appellantfirstname != null && (
|
846040000 && (
|
||||||
<div>
|
<div className="cardModuleReference">
|
||||||
<b>
|
<b>
|
||||||
{t("myportal:on-behalf-of-label")}:{" "}
|
{t("myportal:on-behalf-of-label")}:{" "}
|
||||||
</b>
|
</b>
|
||||||
{showTopThreeArrDets[key]
|
{showTopThreeArr[key]
|
||||||
.pinswg_appellantfirstname +
|
.pinswg_appellantfirstname +
|
||||||
" " +
|
" " +
|
||||||
showTopThreeArrDets[key]
|
showTopThreeArr[key]
|
||||||
.pinswg_appellantlastname}
|
.pinswg_appellantlastname}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{router.locale == "cy"
|
<div className="cardModuleReference">
|
||||||
? jsonpath(
|
<b>
|
||||||
'$..[?(@.value=="' +
|
{router.locale == "cy" ? "ACLl" : "LPA"}
|
||||||
showTopThreeArrDets[key][
|
:
|
||||||
"pinswg_lpaname"
|
</b>
|
||||||
] +
|
{router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
transLookup
|
path:
|
||||||
)
|
'$..[?(@ && @.value=="' +
|
||||||
: showTopThreeArrDets[key][
|
showTopThreeArr[key][
|
||||||
"pinswg_lpaname"
|
"pinswg_lpaname"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: showTopThreeArr[key][
|
||||||
|
"pinswg_lpaname"
|
||||||
|
] || ""}
|
||||||
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:date-raised")}:</b>
|
<b>{t("myportal:date-raised")}:</b>
|
||||||
{" "}
|
{" "}
|
||||||
{raisedDate(
|
{raisedDate(showTopThreeArr[key].createdon)}
|
||||||
showTopThreeArrDets[key].createdon
|
|
||||||
)}
|
|
||||||
</div>{" "}
|
</div>{" "}
|
||||||
{showTopThreeArr[key].hasOwnProperty(
|
{showTopThreeArr[key].hasOwnProperty(
|
||||||
"appealComplete"
|
"appealComplete"
|
||||||
@@ -274,38 +328,6 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{!showTopThreeArr[key].hasOwnProperty(
|
|
||||||
"appealComplete"
|
|
||||||
) && (
|
|
||||||
<div className="">
|
|
||||||
<button
|
|
||||||
title={t(
|
|
||||||
"case:do-you-want-to-delete-case-label"
|
|
||||||
)}
|
|
||||||
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
|
||||||
onClick={() => {
|
|
||||||
confirm(
|
|
||||||
t(
|
|
||||||
"case:do-you-want-to-delete-case-label"
|
|
||||||
) +
|
|
||||||
showTopThreeArr[key]
|
|
||||||
.pinswg_name +
|
|
||||||
"?\n" +
|
|
||||||
t(
|
|
||||||
"case:do-you-want-to-delete-case-disclaimer-label"
|
|
||||||
)
|
|
||||||
) &&
|
|
||||||
deleteCaseItem(
|
|
||||||
props.containerID,
|
|
||||||
showTopThreeArr[key]
|
|
||||||
.pinswg_name
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
—
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -325,16 +347,16 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<TopThreeRow />
|
<TopThreeRow />
|
||||||
|
|
||||||
{props.awaitingSubmissionFromBlob["@odata.count"] > 1 && (
|
{props.awaitingSubmissionFromBlob["@odata.count"] > 1 && (
|
||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=awaitingSubmissionDetails"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ const MyCases = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") + "?viewKey=myCases"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -34,13 +34,13 @@ const MyRepresentations = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=myRepresentations"
|
||||||
}
|
}
|
||||||
shallow
|
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentView({
|
setCurrentView({
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ const MyRepresentations = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=myRepresentations"
|
||||||
}
|
}
|
||||||
shallow
|
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentView({
|
setCurrentView({
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { setCurrentView } from "../../store/currentView/action";
|
||||||
|
import TopThree from "./topthree";
|
||||||
|
|
||||||
|
const MySubmittedReps = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const { setCurrentView } = props;
|
||||||
|
|
||||||
|
let recordCountVar = props.mySubmittedReps.mySubmittedReps;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="card" id="my-watched-cases-card">
|
||||||
|
<div className="card-body">
|
||||||
|
<h3 className="heading-small card-heading">
|
||||||
|
{t("myportal:submitted-reps-card-title")}
|
||||||
|
</h3>
|
||||||
|
<div className="cardModuleContainer">
|
||||||
|
<TopThree
|
||||||
|
showTopThree={props.mySubmittedReps.mySubmittedReps}
|
||||||
|
showDetails={
|
||||||
|
props.mySubmittedReps.mySubmittedRepsDetails
|
||||||
|
}
|
||||||
|
topThreeType={"mySubmittedReps"}
|
||||||
|
showLoginCheck={props.showLoginCheck}
|
||||||
|
currentView={props.currentView}
|
||||||
|
myReps={props.myReps}
|
||||||
|
props={props}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{(props.myReps
|
||||||
|
? recordCountVar.length > 3
|
||||||
|
: recordCountVar["@odata.count"] > 3) && (
|
||||||
|
<div className="cardVieAll">
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
(router.locale != "en"
|
||||||
|
? "/" +
|
||||||
|
router.locale +
|
||||||
|
"/fymhorth/gweldpopeth"
|
||||||
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=mySubmittedReps"
|
||||||
|
}
|
||||||
|
className="govuk-link--no-underline"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentView({
|
||||||
|
"viewName": "Submitted Representations",
|
||||||
|
"viewKey": "mySubmittedReps",
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("myportal:viewall-link-count", {
|
||||||
|
count: props.mySubmittedReps.mySubmittedReps
|
||||||
|
.length,
|
||||||
|
})}
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
setCurrentView: (currentView) => {
|
||||||
|
dispatch(setCurrentView(currentView));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(null, mapDispatchToProps)(MySubmittedReps);
|
||||||
@@ -98,7 +98,6 @@ let CaseSearch = (props) => {
|
|||||||
? "/fymhorth/canlyniadauchwilio"
|
? "/fymhorth/canlyniadauchwilio"
|
||||||
: "/myportal/searchresults",
|
: "/myportal/searchresults",
|
||||||
query: { q: values.basicSearch },
|
query: { q: values.basicSearch },
|
||||||
shallow: true,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -172,6 +171,18 @@ let CaseSearch = (props) => {
|
|||||||
>
|
>
|
||||||
{t("myportal:searchcases-card-advanced-link")}
|
{t("myportal:searchcases-card-advanced-link")}
|
||||||
</Link>
|
</Link>
|
||||||
|
<div className="govuk-form-group govuk-!-margin-top-5">
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "/fymhorth/cyswllt"
|
||||||
|
: "/myportal/contactus"
|
||||||
|
}
|
||||||
|
className="govuk-button withChevron govuk-button-cta"
|
||||||
|
>
|
||||||
|
{t("common:footer-contact-us-link-label")}
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const ServiceBanner = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleLogout = () => {
|
const handleLogout = (locale) => {
|
||||||
console.info("////////////\n" + "logout" + "\n////////////");
|
console.info("////////////\n" + "logout" + "\n////////////");
|
||||||
window.localStorage.clear(),
|
window.localStorage.clear(),
|
||||||
destroyCookie(null, "next-auth.csrf-token"),
|
destroyCookie(null, "next-auth.csrf-token"),
|
||||||
@@ -26,7 +26,9 @@ const ServiceBanner = (props) => {
|
|||||||
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
||||||
destroyCookie(null, "pedw_locale", { path: "/" }),
|
destroyCookie(null, "pedw_locale", { path: "/" }),
|
||||||
destroyCookie(null, "pinsUser", { path: "/" }),
|
destroyCookie(null, "pinsUser", { path: "/" }),
|
||||||
signOut({ callbackUrl: "/logout" });
|
signOut({
|
||||||
|
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout",
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const portalLogoLink = [
|
const portalLogoLink = [
|
||||||
@@ -73,23 +75,25 @@ const ServiceBanner = (props) => {
|
|||||||
<div className="serviceBanner_userDetails_name">
|
<div className="serviceBanner_userDetails_name">
|
||||||
<Link
|
<Link
|
||||||
href="/account/personaldetails"
|
href="/account/personaldetails"
|
||||||
className="govuk-button-secondary govuk-link"
|
className="govuk-button-secondary govuk-link--no-underline"
|
||||||
>
|
>
|
||||||
{props.accountDetails.accountDetails.firstname}{" "}
|
{props.accountDetails.accountDetails.firstname}{" "}
|
||||||
{props.accountDetails.accountDetails.lastname}
|
{props.accountDetails.accountDetails.lastname}
|
||||||
{" - "}
|
{/* {" - "}
|
||||||
{
|
{
|
||||||
props.accountDetails.accountDetails[
|
props.accountDetails.accountDetails[
|
||||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
}
|
} */}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Link
|
<Link
|
||||||
href={router.locale == "cy" ? "/allgofnodi" : "/logout"}
|
href={
|
||||||
|
router.locale == "cy" ? "/cy/allgofnodi" : "/logout"
|
||||||
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
handleLogout();
|
handleLogout(router.locale);
|
||||||
}}
|
}}
|
||||||
className="govuk-header__link "
|
className="govuk-header__link "
|
||||||
>
|
>
|
||||||
|
|||||||
+175
-50
@@ -65,6 +65,43 @@ const TopThree = (props) => {
|
|||||||
return dateB - dateA;
|
return dateB - dateA;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// check start
|
||||||
|
|
||||||
|
function sortByISODate(arr, dateKey) {
|
||||||
|
return arr.sort((a, b) => new Date(b[dateKey]) - new Date(a[dateKey]));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortByField(arr, field, ascending = true) {
|
||||||
|
return arr.sort((a, b) => {
|
||||||
|
if (a[field] < b[field]) return ascending ? -1 : 1;
|
||||||
|
if (a[field] > b[field]) return ascending ? 1 : -1;
|
||||||
|
return 0; // Equal
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//let showTopThreeArr = showTopThree.value;
|
||||||
|
let showTopThreeArrDets = showDetails;
|
||||||
|
|
||||||
|
showTopThreeArr = sortByField(showTopThreeArr, "ticketnumber");
|
||||||
|
//console.log("showTopThreeArr:", showTopThreeArr);
|
||||||
|
showTopThreeArrDets = sortByField(showTopThreeArrDets, "pinswg_name");
|
||||||
|
//console.log("showTopThreeArrDets:", showTopThreeArrDets);
|
||||||
|
|
||||||
|
showTopThreeArrDets = showTopThreeArrDets.flatMap((item) => item.value);
|
||||||
|
|
||||||
|
let mergedArray = showTopThreeArr.map((item1) => {
|
||||||
|
let item2 = showTopThreeArrDets.find(
|
||||||
|
(item) => item.pinswg_name === item1.ticketnumber
|
||||||
|
);
|
||||||
|
return { ...item1, ...item2 };
|
||||||
|
});
|
||||||
|
|
||||||
|
showTopThreeArr = mergedArray;
|
||||||
|
|
||||||
|
showTopThreeArr = sortByISODate(showTopThreeArr, "createdon");
|
||||||
|
|
||||||
|
// check end
|
||||||
|
|
||||||
const raisedDate = (datePart) => {
|
const raisedDate = (datePart) => {
|
||||||
var dateObj = new Date(datePart);
|
var dateObj = new Date(datePart);
|
||||||
return dateObj.toLocaleString();
|
return dateObj.toLocaleString();
|
||||||
@@ -78,6 +115,27 @@ const TopThree = (props) => {
|
|||||||
.then((data) => data)
|
.then((data) => data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
||||||
|
let showWatchedCases = (submittedArr) => {
|
||||||
|
const required = submittedArr.value.filter((el) => {
|
||||||
|
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) {
|
||||||
|
var dateA = new Date(a.createdon);
|
||||||
|
var dateB = new Date(b.createdon);
|
||||||
|
return dateB - dateA;
|
||||||
|
});
|
||||||
setWatchedCases(data),
|
setWatchedCases(data),
|
||||||
getDetailsProxy(data, "myWatchedCases").then(
|
getDetailsProxy(data, "myWatchedCases").then(
|
||||||
(data) => {
|
(data) => {
|
||||||
@@ -170,13 +228,19 @@ const TopThree = (props) => {
|
|||||||
showTopThreeArr[key].incidentid
|
showTopThreeArr[key].incidentid
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? "/fymhorth/achos/" +
|
? "/fymhorth/achos/" +
|
||||||
showTopThreeArr[key].pinswg_title +
|
showTopThreeArr[key].ticketnumber +
|
||||||
"?key=" +
|
"?key=" +
|
||||||
topThreeType
|
topThreeType +
|
||||||
|
"&appealType=" +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_appealcasetype
|
||||||
: "/myportal/case/" +
|
: "/myportal/case/" +
|
||||||
showTopThreeArr[key].pinswg_title +
|
showTopThreeArr[key].ticketnumber +
|
||||||
"?key=" +
|
"?key=" +
|
||||||
topThreeType
|
topThreeType +
|
||||||
|
"&appealType=" +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_appealcasetype
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
data-id={index}
|
data-id={index}
|
||||||
@@ -229,93 +293,152 @@ const TopThree = (props) => {
|
|||||||
]}{" "}
|
]}{" "}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
{topThreeType == "watchedCases" && !props.myReps && (
|
||||||
|
<div className="deleteCase">
|
||||||
|
<button
|
||||||
|
title={t(
|
||||||
|
"case:you-have-stopped-watching-label"
|
||||||
|
)}
|
||||||
|
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
||||||
|
onClick={() => {
|
||||||
|
confirm(
|
||||||
|
t(
|
||||||
|
"case:you-have-stopped-watching-label"
|
||||||
|
) +
|
||||||
|
showTopThreeArr[key][
|
||||||
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
) &&
|
||||||
|
deleteItem(
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_watchlistid,
|
||||||
|
"watchedCases"
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
—
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{topThreeType == "awaitingSubmission" && (
|
||||||
|
<div className="deleteCase">
|
||||||
|
<button
|
||||||
|
title={t(
|
||||||
|
"case:do-you-want-to-delete-case-label"
|
||||||
|
)}
|
||||||
|
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
||||||
|
onClick={() => {
|
||||||
|
confirm(
|
||||||
|
t(
|
||||||
|
"case:do-you-want-to-delete-case-label"
|
||||||
|
) +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.ticketnumber +
|
||||||
|
"?\n" +
|
||||||
|
t(
|
||||||
|
"case:do-you-want-to-delete-case-disclaimer-label"
|
||||||
|
)
|
||||||
|
) &&
|
||||||
|
deleteItem(
|
||||||
|
showTopThreeArr[key].incidentid,
|
||||||
|
"awaitingSubmission"
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
—
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
showTopThreeArr[key][
|
showTopThreeArr[key][
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: showTopThreeArr[key][
|
: showTopThreeArr[key][
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
</div>
|
</div>
|
||||||
{/* )} */}
|
{/* )} */}
|
||||||
{/* {topThreeType != "awaitingSubmission" ? ( */}
|
{/* {topThreeType != "awaitingSubmission" ? ( */}
|
||||||
<div className="carModuleAddress">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:case-address")}:</b>{" "}
|
<b>{t("myportal:case-address")}:</b>{" "}
|
||||||
{_.isEmpty(showDetails)
|
{_.isEmpty(showTopThreeArr[key])
|
||||||
? t("myportal:case-address-not-entered")
|
? t("myportal:case-address-not-entered")
|
||||||
: _.isEmpty(showDetails[index])
|
: _.isEmpty(showTopThreeArr[key])
|
||||||
? t("myportal:case-address-not-entered")
|
? t("myportal:case-address-not-entered")
|
||||||
: _.isEmpty(showDetails[index].value[0])
|
: _.isEmpty(showTopThreeArr[key])
|
||||||
? t("myportal:case-address-not-entered")
|
? t("myportal:case-address-not-entered")
|
||||||
: _.isEmpty(
|
: _.isEmpty(
|
||||||
showDetails[index].value[0]
|
showTopThreeArr[key].pinswg_siteaddressline1
|
||||||
.pinswg_siteaddressline1
|
|
||||||
)
|
)
|
||||||
? t("myportal:case-address-not-entered")
|
? t("myportal:case-address-not-entered")
|
||||||
: showDetails[index].value[0]
|
: showTopThreeArr[key].pinswg_siteaddressline1 +
|
||||||
.pinswg_siteaddressline1 +
|
|
||||||
(!_.isEmpty(
|
(!_.isEmpty(
|
||||||
showDetails[index].value[0]
|
showTopThreeArr[key].pinswg_siteaddressline2
|
||||||
.pinswg_siteaddressline2
|
|
||||||
)
|
)
|
||||||
? ", " +
|
? ", " +
|
||||||
showDetails[index].value[0]
|
showTopThreeArr[key].pinswg_siteaddressline2
|
||||||
.pinswg_siteaddressline2
|
|
||||||
: "") +
|
: "") +
|
||||||
(!_.isEmpty(
|
(!_.isEmpty(
|
||||||
showDetails[index].value[0]
|
showTopThreeArr[key].pinswg_siteaddresstown
|
||||||
.pinswg_siteaddresstown
|
|
||||||
)
|
)
|
||||||
? ", " +
|
? ", " +
|
||||||
showDetails[index].value[0]
|
showTopThreeArr[key].pinswg_siteaddresstown
|
||||||
.pinswg_siteaddresstown
|
|
||||||
: "")}
|
: "")}
|
||||||
</div>
|
</div>
|
||||||
{showTopThreeArr[key].pinswg_appellantagent != null && (
|
{showTopThreeArr[key].pinswg_appellantagent != null && (
|
||||||
<div>
|
<div className="cardModuleReference">
|
||||||
{showTopThreeArr[key].pinswg_appellantagent !=
|
{showTopThreeArr[key].pinswg_appellantagent !=
|
||||||
846040000 && (
|
846040000 && (
|
||||||
<b>{t("myportal:raised-by-label")}</b>
|
<b>{t("myportal:raised-by-label")}: </b>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{showTopThreeArr[key].pinswg_appellantagent !=
|
{showTopThreeArr[key].pinswg_appellantagent !=
|
||||||
846040000 &&
|
846040000 &&
|
||||||
(showTopThreeArr[key].pinswg_agentcompanyname !=
|
(showTopThreeArr[key].pinswg_agentcompanyname !=
|
||||||
null &&
|
null
|
||||||
showTopThreeArr[key]
|
? showTopThreeArr[key]
|
||||||
.pinswg_agentcompanyname + ", ") +
|
.pinswg_agentcompanyname + ", "
|
||||||
|
: "") +
|
||||||
showTopThreeArr[key].pinswg_agentfirstname +
|
showTopThreeArr[key].pinswg_agentfirstname +
|
||||||
" " +
|
" " +
|
||||||
showTopThreeArr[key].pinswg_agentlastname}
|
showTopThreeArr[key].pinswg_agentlastname}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{showTopThreeArr[key].pinswg_appellantfirstname != null && (
|
{showTopThreeArr[key].pinswg_appellantfirstname != null && (
|
||||||
<div>
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:on-behalf-of-label")}: </b>
|
<b>{t("myportal:on-behalf-of-label")}: </b>
|
||||||
{showTopThreeArr[key].pinswg_appellantfirstname +
|
{showTopThreeArr[key].pinswg_appellantfirstname +
|
||||||
" " +
|
" " +
|
||||||
showTopThreeArr[key].pinswg_appellantlastname}
|
showTopThreeArr[key].pinswg_appellantlastname}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{router.locale == "cy"
|
<div className="cardModuleReference">
|
||||||
? jsonpath(
|
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
||||||
'$..[?(@.value=="' +
|
{router.locale == "cy"
|
||||||
showTopThreeArr[key][
|
? jsonpath({
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
showTopThreeArr[key][
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
)
|
] +
|
||||||
: showTopThreeArr[key][
|
'")].value_cy',
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
json: transLookup,
|
||||||
] || ""}
|
eval: true,
|
||||||
|
})
|
||||||
|
: showTopThreeArr[key][
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
</div>
|
||||||
{topThreeType == "awaitingSubmission" ? (
|
{topThreeType == "awaitingSubmission" ? (
|
||||||
<div className="carModuleAddress">
|
<div className="carModuleAddress">
|
||||||
Case Incomplete, not submitted
|
Case Incomplete, not submitted
|
||||||
@@ -323,11 +446,13 @@ const TopThree = (props) => {
|
|||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<div className="cardModuleReference">
|
{topThreeType != "watchedCases" && (
|
||||||
<b>{t("myportal:date-raised")}:</b>
|
<div className="cardModuleReference">
|
||||||
{" "}
|
<b>{t("myportal:date-raised")}:</b>
|
||||||
{raisedDate(showTopThreeArr[key].createdon)}
|
{" "}
|
||||||
</div>{" "}
|
{raisedDate(showTopThreeArr[key].createdon)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{topThreeType == "watchedCases" &&
|
{topThreeType == "watchedCases" &&
|
||||||
props.myReps &&
|
props.myReps &&
|
||||||
showTopThreeArr[key].pinswg_representationsubmitted !=
|
showTopThreeArr[key].pinswg_representationsubmitted !=
|
||||||
@@ -352,7 +477,7 @@ const TopThree = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{topThreeType == "watchedCases" && !props.myReps && (
|
{/* {topThreeType == "watchedCases" && !props.myReps && (
|
||||||
<div className="">
|
<div className="">
|
||||||
<button
|
<button
|
||||||
title={t("case:you-have-stopped-watching-label")}
|
title={t("case:you-have-stopped-watching-label")}
|
||||||
@@ -397,7 +522,7 @@ const TopThree = (props) => {
|
|||||||
—
|
—
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)} */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
setCurrentReference,
|
setCurrentReference,
|
||||||
setCurrentView,
|
setCurrentView,
|
||||||
|
setRepresentationCapacity,
|
||||||
} from "../../store/currentView/action";
|
} from "../../store/currentView/action";
|
||||||
import {
|
import {
|
||||||
setMyRepresentations,
|
setMyRepresentations,
|
||||||
@@ -45,6 +46,7 @@ const TopThree = (props) => {
|
|||||||
setAwaitingSubmissionDetails,
|
setAwaitingSubmissionDetails,
|
||||||
setMyRepresentations,
|
setMyRepresentations,
|
||||||
setMyRepresentationsDetails,
|
setMyRepresentationsDetails,
|
||||||
|
setRepresentationCapacity,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -54,9 +56,13 @@ const TopThree = (props) => {
|
|||||||
let showTopThreeArr = showTopThree.value;
|
let showTopThreeArr = showTopThree.value;
|
||||||
|
|
||||||
Object.keys(showTopThreeArr).map((key, index) => {
|
Object.keys(showTopThreeArr).map((key, index) => {
|
||||||
let createdDate = parseInt(
|
let createdDate = showTopThreeArr[key].repfile_name.split("_-_");
|
||||||
showTopThreeArr[key].repfile_name.split("-")[3]
|
createdDate =
|
||||||
);
|
createdDate[0].replace(
|
||||||
|
/(?<=\d{4}-\d{2}-\d{2})-(?=\d{2}:\d{2}:\d{2})/,
|
||||||
|
"T"
|
||||||
|
) + "Z";
|
||||||
|
|
||||||
showTopThreeArr[key].createdDate = createdDate;
|
showTopThreeArr[key].createdDate = createdDate;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -107,6 +113,13 @@ const TopThree = (props) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isLPA =
|
||||||
|
props.accountDetails.accountDetails[
|
||||||
|
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] == "LPA"
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
|
||||||
const deleteRepItem = (containerID, caseID, repfile) => {
|
const deleteRepItem = (containerID, caseID, repfile) => {
|
||||||
let cookies = parseCookies();
|
let cookies = parseCookies();
|
||||||
//console.log("sssss", containerID, caseID, repfile);
|
//console.log("sssss", containerID, caseID, repfile);
|
||||||
@@ -154,18 +167,17 @@ const TopThree = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const repRaisedDate = (datePart) => {
|
const repRaisedDate = (datePart) => {
|
||||||
|
var dateStr = datePart.split("_-_")[0];
|
||||||
|
var timeStr = dateStr.split("-")[3];
|
||||||
|
|
||||||
var dateObj = new Date(
|
var dateObj = new Date(
|
||||||
datePart.split("-")[0] +
|
dateStr.split("-")[0] +
|
||||||
"-" +
|
"-" +
|
||||||
datePart.split("-")[1] +
|
dateStr.split("-")[1] +
|
||||||
"-" +
|
"-" +
|
||||||
datePart.split("-")[2] +
|
dateStr.split("-")[2] +
|
||||||
" " +
|
" " +
|
||||||
datePart.split("-")[3].split("_")[0].slice(0, 2) +
|
timeStr
|
||||||
":" +
|
|
||||||
datePart.split("-")[3].split("_")[0].slice(2, 4) +
|
|
||||||
":" +
|
|
||||||
datePart.split("-")[3].split("_")[0].slice(4, 6)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return dateObj.toLocaleString();
|
return dateObj.toLocaleString();
|
||||||
@@ -178,63 +190,130 @@ const TopThree = (props) => {
|
|||||||
<div className="cardModuleDetails">
|
<div className="cardModuleDetails">
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:case-reference")}:</b>
|
<b>{t("myportal:case-reference")}:</b>
|
||||||
<Link
|
{showTopThreeArr[key].hasOwnProperty("repComplete") ? (
|
||||||
// href="#"
|
<b>{showTopThreeArr[key].pinswg_name}</b>
|
||||||
href={{
|
) : (
|
||||||
pathname:
|
<Link
|
||||||
router.locale == "cy"
|
// href="#"
|
||||||
? "/fymhorth/representation"
|
href={{
|
||||||
: "/myportal/representation",
|
pathname:
|
||||||
query: {
|
router.locale == "cy"
|
||||||
case: showTopThreeArr[key].caseRef,
|
? "/fymhorth/representation"
|
||||||
state: "edit",
|
: "/myportal/representation",
|
||||||
},
|
query: {
|
||||||
}}
|
case: showTopThreeArr[key].caseRef,
|
||||||
className="govuk-link--no-underline"
|
state: "edit",
|
||||||
data-id={index}
|
created:
|
||||||
onClick={() => {
|
showTopThreeArr[key].repfile_name,
|
||||||
setCurrentReference({
|
},
|
||||||
"ticketnumber":
|
}}
|
||||||
showTopThreeArr[key].ticketnumber,
|
className="govuk-link--no-underline"
|
||||||
"currentReference":
|
data-id={index}
|
||||||
showTopThreeArr[key].caseRef,
|
onClick={() => {
|
||||||
"currentType": topThreeType,
|
setCurrentReference({
|
||||||
"incidentid":
|
"ticketnumber":
|
||||||
showTopThreeArr[key].incidentID,
|
showTopThreeArr[key].ticketnumber,
|
||||||
"appealType":
|
"currentReference":
|
||||||
showTopThreeArr[key].appealType,
|
showTopThreeArr[key].caseRef,
|
||||||
"repDetails": showTopThreeArr[key],
|
"currentType": topThreeType,
|
||||||
});
|
"incidentid":
|
||||||
}}
|
showTopThreeArr[key].incidentID,
|
||||||
>
|
"appealType":
|
||||||
{showTopThreeArr[key].pinswg_name}
|
showTopThreeArr[key].appealType,
|
||||||
</Link>
|
"repDetails": showTopThreeArr[key],
|
||||||
|
});
|
||||||
|
isLPA && setRepresentationCapacity("LPA");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{showTopThreeArr[key].pinswg_name}
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
{!showTopThreeArr[key].hasOwnProperty(
|
||||||
|
"repComplete"
|
||||||
|
) && (
|
||||||
|
<div className="deleteCase">
|
||||||
|
<button
|
||||||
|
title={t(
|
||||||
|
"case:do-you-want-to-delete-case-label"
|
||||||
|
)}
|
||||||
|
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
||||||
|
onClick={() => {
|
||||||
|
confirm(
|
||||||
|
t(
|
||||||
|
"case:do-you-want-to-delete-case-label"
|
||||||
|
) +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_name +
|
||||||
|
"?\n" +
|
||||||
|
t(
|
||||||
|
"case:do-you-want-to-delete-case-disclaimer-label"
|
||||||
|
)
|
||||||
|
) &&
|
||||||
|
deleteRepItem(
|
||||||
|
props.accountDetails
|
||||||
|
.containerID,
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_name,
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.repfile_name
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
—
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:representation-type")}:</b>
|
<b>{t("myportal:representation-type")}:</b>
|
||||||
{" "}
|
{" "}
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
showTopThreeArr[key].representationType +
|
showTopThreeArr[key].representationType +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: showTopThreeArr[key].representationType || ""}
|
: showTopThreeArr[key].representationType || ""}
|
||||||
</div>
|
</div>
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:capacity")}:</b>
|
<b>{t("myportal:capacity")}:</b>
|
||||||
{" "}
|
{" "}
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.representationCapacity +
|
.representationCapacity +
|
||||||
'")].value_cy',
|
'" ||@.value_cy=="' +
|
||||||
transLookup
|
showTopThreeArr[key]
|
||||||
)
|
.representationCapacity +
|
||||||
: 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>
|
||||||
@@ -242,45 +321,33 @@ const TopThree = (props) => {
|
|||||||
{repRaisedDate(showTopThreeArr[key].repfile_name)}
|
{repRaisedDate(showTopThreeArr[key].repfile_name)}
|
||||||
</div>{" "}
|
</div>{" "}
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>LPA:</b>
|
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
||||||
{" "}
|
{" "}
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
showTopThreeArr[key][
|
showTopThreeArr[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: showTopThreeArr[key][
|
: showTopThreeArr[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{showTopThreeArr[key].hasOwnProperty("repComplete") && (
|
||||||
<div className="">
|
<div className="cardModuleReference">
|
||||||
<button
|
<b>
|
||||||
title={t("case:do-you-want-to-delete-case-label")}
|
{" "}
|
||||||
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
{t("myportal:submission-processing-label")}
|
||||||
onClick={() => {
|
.....
|
||||||
confirm(
|
</b>
|
||||||
t("case:do-you-want-to-delete-case-label") +
|
</div>
|
||||||
showTopThreeArr[key].pinswg_name +
|
)}
|
||||||
"?\n" +
|
|
||||||
t(
|
|
||||||
"case:do-you-want-to-delete-case-disclaimer-label"
|
|
||||||
)
|
|
||||||
) &&
|
|
||||||
deleteRepItem(
|
|
||||||
props.accountDetails.containerID,
|
|
||||||
showTopThreeArr[key].pinswg_name,
|
|
||||||
showTopThreeArr[key].repfile_name
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
—
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -343,6 +410,9 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
setMyRepresentationsDetails: (myRepresentationsDetails) => {
|
setMyRepresentationsDetails: (myRepresentationsDetails) => {
|
||||||
dispatch(setMyRepresentationsDetails(myRepresentationsDetails));
|
dispatch(setMyRepresentationsDetails(myRepresentationsDetails));
|
||||||
},
|
},
|
||||||
|
setRepresentationCapacity: (representationCapacity) => {
|
||||||
|
dispatch(setRepresentationCapacity(representationCapacity));
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ let UploadFile = (props) => {
|
|||||||
|
|
||||||
const uploadAction = await uploadFiles(dataObj, fileObj).then(
|
const uploadAction = await uploadFiles(dataObj, fileObj).then(
|
||||||
(data) => {
|
(data) => {
|
||||||
console.log("hello", data);
|
console.log("$1", data);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// router.push({
|
// router.push({
|
||||||
|
|||||||
+486
-253
File diff suppressed because it is too large
Load Diff
@@ -12,9 +12,7 @@ const WatchedCases = (props) => {
|
|||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
const { setCurrentView } = props;
|
const { setCurrentView } = props;
|
||||||
|
|
||||||
let recordCountVar = props.myReps
|
let recordCountVar = props.watchedCases.watchedCases;
|
||||||
? props.watchedCases.mySubmittedReps
|
|
||||||
: props.watchedCases.watchedCases;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card" id="my-watched-cases-card">
|
<div className="card" id="my-watched-cases-card">
|
||||||
@@ -26,11 +24,7 @@ const WatchedCases = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
<div className="cardModuleContainer">
|
<div className="cardModuleContainer">
|
||||||
<TopThree
|
<TopThree
|
||||||
showTopThree={
|
showTopThree={props.watchedCases.watchedCases}
|
||||||
props.myReps
|
|
||||||
? props.watchedCases.mySubmittedReps
|
|
||||||
: props.watchedCases.watchedCases
|
|
||||||
}
|
|
||||||
showDetails={props.watchedCases.watchedCasesDetails}
|
showDetails={props.watchedCases.watchedCasesDetails}
|
||||||
topThreeType={"watchedCases"}
|
topThreeType={"watchedCases"}
|
||||||
showLoginCheck={props.showLoginCheck}
|
showLoginCheck={props.showLoginCheck}
|
||||||
@@ -46,11 +40,12 @@ const WatchedCases = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=watchedCases"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -64,11 +59,9 @@ const WatchedCases = (props) => {
|
|||||||
{props.watchedCases.watchedCases["@odata.count"] +
|
{props.watchedCases.watchedCases["@odata.count"] +
|
||||||
" cases"} */}
|
" cases"} */}
|
||||||
{t("myportal:viewall-link-count", {
|
{t("myportal:viewall-link-count", {
|
||||||
count: props.myReps
|
count: props.watchedCases.watchedCases[
|
||||||
? props.watchedCases.mySubmittedReps.length
|
"@odata.count"
|
||||||
: props.watchedCases.watchedCases[
|
],
|
||||||
"@odata.count"
|
|
||||||
],
|
|
||||||
})}
|
})}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ const RenderTextfield = ({
|
|||||||
id={id}
|
id={id}
|
||||||
type={type}
|
type={type}
|
||||||
disabled={disabled ? true : false}
|
disabled={disabled ? true : false}
|
||||||
|
maxLength={custom.maxFieldLength || ""}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@@ -93,6 +94,7 @@ const RenderMultiline = ({
|
|||||||
{...input}
|
{...input}
|
||||||
rows={rows}
|
rows={rows}
|
||||||
className={className}
|
className={className}
|
||||||
|
maxLength="2000"
|
||||||
></textarea>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@@ -453,18 +455,35 @@ let AboutYou = (props) => {
|
|||||||
const contactPref =
|
const contactPref =
|
||||||
router.locale == "cy" ? ["Ebost", "Post"] : ["Email", "Post"];
|
router.locale == "cy" ? ["Ebost", "Post"] : ["Email", "Post"];
|
||||||
|
|
||||||
const required = (value) => (value ? undefined : "Is required");
|
const required = (value) =>
|
||||||
|
value ? undefined : t("newappeal:is-required-label");
|
||||||
|
|
||||||
|
const emojicheck = (value) => {
|
||||||
|
let errors;
|
||||||
|
|
||||||
|
// Check for emojis using a regular expression
|
||||||
|
const emojiRegex =
|
||||||
|
/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{1FA70}-\u{1FAFF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{2300}-\u{23FF}\u{2B50}\u{1F004}-\u{1F0CF}\u{1F0A0}-\u{1F0A5}\u{1F170}-\u{1F251}]/gu;
|
||||||
|
|
||||||
|
if (emojiRegex.test(value)) {
|
||||||
|
errors = t("newappeal:emojis-not-allowed-label");
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors;
|
||||||
|
};
|
||||||
const emailRegex =
|
const emailRegex =
|
||||||
/(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/gi;
|
/(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/gi;
|
||||||
|
|
||||||
const email = (value) =>
|
const email = (value) =>
|
||||||
value && !emailRegex.test(value) ? "Invalid email address" : undefined;
|
value && !emailRegex.test(value)
|
||||||
|
? t("newappeal:emojis-not-allowed-label")
|
||||||
|
: undefined;
|
||||||
const phoneNumber = (value) =>
|
const phoneNumber = (value) =>
|
||||||
value &&
|
value &&
|
||||||
!/^(?:(?:\(?(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?(?:\(?0\)?[\s-]?)?)|(?:\(?0))(?:(?:\d{5}\)?[\s-]?\d{4,5})|(?:\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3}))|(?:\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4})|(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}))(?:[\s-]?(?:x|ext\.?|\#)\d{3,4})?$/i.test(
|
!/^(?:(?:\(?(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?(?:\(?0\)?[\s-]?)?)|(?:\(?0))(?:(?:\d{5}\)?[\s-]?\d{4,5})|(?:\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3}))|(?:\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4})|(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}))(?:[\s-]?(?:x|ext\.?|\#)\d{3,4})?$/i.test(
|
||||||
value
|
value
|
||||||
)
|
)
|
||||||
? "Invalid phone number"
|
? t("newappeal:invalid-phonenumber-label")
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
const onHandleSubmit = (values) => {
|
const onHandleSubmit = (values) => {
|
||||||
@@ -524,9 +543,9 @@ let AboutYou = (props) => {
|
|||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
validate={[required]}
|
validate={[required, emojicheck]}
|
||||||
label={t("newappeal:about-you-on-behalf-label")}
|
label={t("newappeal:about-you-on-behalf-label")}
|
||||||
maxFieldLength="25"
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<details className="govuk-details" data-module="govuk-details">
|
<details className="govuk-details" data-module="govuk-details">
|
||||||
@@ -562,10 +581,11 @@ let AboutYou = (props) => {
|
|||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
validate={[required]}
|
validate={[required, emojicheck]}
|
||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-appellant-contact-details-firstname-label"
|
"newappeal:about-you-appellant-contact-details-firstname-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantlastname"}
|
name={"pinswg_appellantlastname"}
|
||||||
@@ -573,10 +593,11 @@ let AboutYou = (props) => {
|
|||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
validate={[required]}
|
validate={[required, emojicheck]}
|
||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-appellant-contact-details-lastname-label"
|
"newappeal:about-you-appellant-contact-details-lastname-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantaddress"}
|
name={"pinswg_appellantaddress"}
|
||||||
@@ -584,11 +605,12 @@ let AboutYou = (props) => {
|
|||||||
component={RenderMultiline}
|
component={RenderMultiline}
|
||||||
type="textarea"
|
type="textarea"
|
||||||
className="govuk-textarea govuk-input--width-20"
|
className="govuk-textarea govuk-input--width-20"
|
||||||
validate={[required]}
|
validate={[required, emojicheck]}
|
||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-appellant-contact-details-address-label"
|
"newappeal:about-you-appellant-contact-details-address-label"
|
||||||
)}
|
)}
|
||||||
rows={4}
|
rows={4}
|
||||||
|
maxFieldLength="2000"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantemailaddress"}
|
name={"pinswg_appellantemailaddress"}
|
||||||
@@ -600,12 +622,13 @@ let AboutYou = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-appellant-contact-details-email-label"
|
"newappeal:about-you-appellant-contact-details-email-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantphonenumber"}
|
name={"pinswg_appellantphonenumber"}
|
||||||
id={"pinswg_appellantphonenumber"}
|
id={"pinswg_appellantphonenumber"}
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="number"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
validate={[required, phoneNumber]}
|
validate={[required, phoneNumber]}
|
||||||
label={t(
|
label={t(
|
||||||
@@ -660,6 +683,7 @@ let AboutYou = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-appellant-contact-details-firstname-label"
|
"newappeal:about-you-appellant-contact-details-firstname-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantlastname"}
|
name={"pinswg_appellantlastname"}
|
||||||
@@ -671,6 +695,7 @@ let AboutYou = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-appellant-contact-details-lastname-label"
|
"newappeal:about-you-appellant-contact-details-lastname-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantaddress"}
|
name={"pinswg_appellantaddress"}
|
||||||
@@ -683,6 +708,7 @@ let AboutYou = (props) => {
|
|||||||
"newappeal:about-you-appellant-contact-details-address-label"
|
"newappeal:about-you-appellant-contact-details-address-label"
|
||||||
)}
|
)}
|
||||||
rows={4}
|
rows={4}
|
||||||
|
maxFieldLength="2000"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantemailaddress"}
|
name={"pinswg_appellantemailaddress"}
|
||||||
@@ -694,6 +720,7 @@ let AboutYou = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-appellant-contact-details-email-label"
|
"newappeal:about-you-appellant-contact-details-email-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantphonenumber"}
|
name={"pinswg_appellantphonenumber"}
|
||||||
@@ -706,6 +733,18 @@ let AboutYou = (props) => {
|
|||||||
"newappeal:about-you-appellant-contact-details-phone-label"
|
"newappeal:about-you-appellant-contact-details-phone-label"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<Radiofield
|
||||||
|
name={"pinswg_languagepreference"}
|
||||||
|
datafieldname={"pinswg_languagepreference"}
|
||||||
|
label={t(
|
||||||
|
"newappeal:about-you-agent-language-preferences-label"
|
||||||
|
)}
|
||||||
|
options="[846040001|newappeal:about-you-agent-language-preferences-value-welsh,846040000|newappeal:about-you-agent-language-preferences-value-english]"
|
||||||
|
id={"pinswg_languagepreference"}
|
||||||
|
className="govuk-radios__input"
|
||||||
|
validate={[required]}
|
||||||
|
errorMsg={t("newappeal:select-an-option-label")}
|
||||||
|
/>
|
||||||
<h2 className="govuk-heading-s">
|
<h2 className="govuk-heading-s">
|
||||||
{t("newappeal:about-you-agent-contact-details")}
|
{t("newappeal:about-you-agent-contact-details")}
|
||||||
</h2>{" "}
|
</h2>{" "}
|
||||||
@@ -719,6 +758,7 @@ let AboutYou = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-agent-contact-details-companyname-label"
|
"newappeal:about-you-agent-contact-details-companyname-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_agentreference"}
|
name={"pinswg_agentreference"}
|
||||||
@@ -728,6 +768,7 @@ let AboutYou = (props) => {
|
|||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
// validate={[required]}
|
// validate={[required]}
|
||||||
label={t("newappeal:about-you-agent-reference-label")}
|
label={t("newappeal:about-you-agent-reference-label")}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_agentfirstname"}
|
name={"pinswg_agentfirstname"}
|
||||||
@@ -739,6 +780,7 @@ let AboutYou = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-agent-contact-details-firstname-label"
|
"newappeal:about-you-agent-contact-details-firstname-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_agentlastname"}
|
name={"pinswg_agentlastname"}
|
||||||
@@ -750,6 +792,7 @@ let AboutYou = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-agent-contact-details-lastname-label"
|
"newappeal:about-you-agent-contact-details-lastname-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>{" "}
|
/>{" "}
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_agentaddress"}
|
name={"pinswg_agentaddress"}
|
||||||
@@ -762,6 +805,7 @@ let AboutYou = (props) => {
|
|||||||
"newappeal:about-you-agent-contact-details-address-label"
|
"newappeal:about-you-agent-contact-details-address-label"
|
||||||
)}
|
)}
|
||||||
rows={4}
|
rows={4}
|
||||||
|
maxFieldLength="2000"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_agentemailaddress"}
|
name={"pinswg_agentemailaddress"}
|
||||||
@@ -773,12 +817,13 @@ let AboutYou = (props) => {
|
|||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-agent-contact-details-email-label"
|
"newappeal:about-you-agent-contact-details-email-label"
|
||||||
)}
|
)}
|
||||||
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_agentphonenumber"}
|
name={"pinswg_agentphonenumber"}
|
||||||
id={"pinswg_agentphonenumber"}
|
id={"pinswg_agentphonenumber"}
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="number"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
validate={[required, phoneNumber]}
|
validate={[required, phoneNumber]}
|
||||||
label={t(
|
label={t(
|
||||||
@@ -786,13 +831,13 @@ let AboutYou = (props) => {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Radiofield
|
<Radiofield
|
||||||
name={"pinswg_languagepreference"}
|
name={"pinswg_agentlanguagepreference"}
|
||||||
datafieldname={"pinswg_languagepreference"}
|
datafieldname={"pinswg_agentlanguagepreference"}
|
||||||
label={t(
|
label={t(
|
||||||
"newappeal:about-you-agent-language-preferences-label"
|
"newappeal:about-you-agent-language-preferences-label"
|
||||||
)}
|
)}
|
||||||
options="[846040001|newappeal:about-you-agent-language-preferences-value-welsh,846040000|newappeal:about-you-agent-language-preferences-value-english]"
|
options="[846040001|newappeal:about-you-agent-language-preferences-value-welsh,846040000|newappeal:about-you-agent-language-preferences-value-english]"
|
||||||
id={"pinswg_languagepreference"}
|
id={"pinswg_agentlanguagepreference"}
|
||||||
className="govuk-radios__input"
|
className="govuk-radios__input"
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg={t("newappeal:select-an-option-label")}
|
errorMsg={t("newappeal:select-an-option-label")}
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ 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 xpath from "xpath";
|
import xpath from "xpath";
|
||||||
import { getPickListLabel, getRadioLabel } from "../../components/utils";
|
import {
|
||||||
|
getPickListLabel,
|
||||||
|
getRadioLabel,
|
||||||
|
bytesToSize,
|
||||||
|
getDocumentTypeFromFilename,
|
||||||
|
getThumbnailIconByExtension,
|
||||||
|
} from "../../components/utils";
|
||||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -57,15 +63,31 @@ let BuildCheckRow = (props) => {
|
|||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
const { appealtypes } = router.query;
|
const { appealtypes } = router.query;
|
||||||
|
|
||||||
let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup);
|
let formObj = jsonpath({
|
||||||
|
path: "$['" + appealtypes + "']",
|
||||||
|
json: fieldLookup,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
let labelTrans =
|
let labelTrans =
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath('$..[?(@.value=="' + label + '")].value_cy', formObj)
|
? jsonpath({
|
||||||
|
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
|
||||||
|
json: formObj,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: label;
|
: label;
|
||||||
return labelTrans;
|
return labelTrans;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function isObjectAndNotEmpty(value) {
|
||||||
|
return (
|
||||||
|
value !== null &&
|
||||||
|
typeof value === "object" &&
|
||||||
|
Object.keys(value).length > 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{Object.keys(rowXML).map((key, index) => {
|
{Object.keys(rowXML).map((key, index) => {
|
||||||
@@ -79,11 +101,18 @@ let BuildCheckRow = (props) => {
|
|||||||
var rows = xpath.select("//label/@description", doc);
|
var rows = xpath.select("//label/@description", doc);
|
||||||
var fieldtype = xpath.select("//@classid", doc);
|
var fieldtype = xpath.select("//@classid", doc);
|
||||||
var datafieldname = xpath.select("//@datafieldname", doc);
|
var datafieldname = xpath.select("//@datafieldname", doc);
|
||||||
const isRequiredField = jsonpath(
|
const isRequiredField = jsonpath({
|
||||||
"$..value[?(@.LogicalName=='" +
|
path:
|
||||||
|
"$..value[?(@ && @.LogicalName=='" +
|
||||||
datafieldname[0].value +
|
datafieldname[0].value +
|
||||||
"')]",
|
"')]",
|
||||||
mandatoryFieldsData
|
json: mandatoryFieldsData,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
var documentTypeCode = xpath.select(
|
||||||
|
"//@ishareDocumentCode",
|
||||||
|
doc
|
||||||
);
|
);
|
||||||
|
|
||||||
// if (datafieldname[0].value.indexOf("fileUpload") > 0) {
|
// if (datafieldname[0].value.indexOf("fileUpload") > 0) {
|
||||||
@@ -108,138 +137,252 @@ let BuildCheckRow = (props) => {
|
|||||||
// ]
|
// ]
|
||||||
// );
|
// );
|
||||||
|
|
||||||
if (
|
// if (
|
||||||
typeof props.props.form["appealForm"].values[
|
// typeof props.props.form["appealForm"].values[
|
||||||
datafieldname[0].value
|
// datafieldname[0].value
|
||||||
] != "undefined"
|
// ] != "undefined"
|
||||||
) {
|
// ) {
|
||||||
if (typeof isRequiredField[0] != "undefined") {
|
return (
|
||||||
if (
|
<div className="govuk-summary-list__row" key={key}>
|
||||||
isRequiredField[0].RequiredLevel.Value != "None"
|
<dt className="govuk-summary-list__key">
|
||||||
) {
|
{FieldsTranslations(rows[0].value)}
|
||||||
return (
|
</dt>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{fieldtype[0].value ==
|
||||||
|
"{E0DECE4B-6666-4a8f-A065-082708572369}" ? (
|
||||||
<div
|
<div
|
||||||
className="govuk-summary-list__row"
|
dangerouslySetInnerHTML={{
|
||||||
key={key}
|
__html: props.props.form[
|
||||||
>
|
"appealForm"
|
||||||
<dt className="govuk-summary-list__key">
|
].values[datafieldname[0].value],
|
||||||
{FieldsTranslations(rows[0].value)}
|
}}
|
||||||
</dt>
|
/>
|
||||||
|
) : fieldtype[0].value ==
|
||||||
<dd className="govuk-summary-list__value">
|
"{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}" ? (
|
||||||
{fieldtype[0].value ==
|
formatDate(
|
||||||
"{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}"
|
props.props.form["appealForm"].values[
|
||||||
? formatDate(
|
datafieldname[0].value
|
||||||
props.props.form[
|
]
|
||||||
"appealForm"
|
)
|
||||||
].values[
|
) : fieldtype[0].value ==
|
||||||
datafieldname[0].value
|
"{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}" ? (
|
||||||
]
|
getPickListLabel(
|
||||||
)
|
props.props.formData.pickListData,
|
||||||
: fieldtype[0].value ==
|
datafieldname[0].value,
|
||||||
"{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}"
|
props.props.form["appealForm"].values[
|
||||||
? getPickListLabel(
|
datafieldname[0].value
|
||||||
props.props.formData
|
]
|
||||||
.pickListData,
|
)
|
||||||
datafieldname[0].value,
|
) : fieldtype[0].value ==
|
||||||
props.props.form[
|
"{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}" ? (
|
||||||
"appealForm"
|
getRadioLabel(
|
||||||
].values[
|
props.props.formData.pickListData,
|
||||||
datafieldname[0].value
|
datafieldname[0].value,
|
||||||
]
|
props.props.form["appealForm"].values[
|
||||||
)
|
datafieldname[0].value
|
||||||
: fieldtype[0].value ==
|
]
|
||||||
"{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}"
|
)
|
||||||
? getRadioLabel(
|
) : fieldtype[0].value ==
|
||||||
props.props.formData
|
"{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}" ? (
|
||||||
.pickListData,
|
props.props.form["appealForm"].values[
|
||||||
datafieldname[0].value,
|
datafieldname[0].value
|
||||||
props.props.form[
|
] == "false" ? (
|
||||||
"appealForm"
|
router.locale == "cy" ? (
|
||||||
].values[
|
"Nac ydw"
|
||||||
datafieldname[0].value
|
) : (
|
||||||
]
|
"No"
|
||||||
)
|
)
|
||||||
: fieldtype[0].value ==
|
) : router.locale == "cy" ? (
|
||||||
"{16D63FD6-119B-4353-BDCA-18358721C3FE}"
|
"Oes"
|
||||||
? console.log(
|
) : (
|
||||||
props.props.form[
|
"Yes"
|
||||||
"appealForm"
|
)
|
||||||
].values[
|
) : fieldtype[0].value ==
|
||||||
datafieldname[0].value
|
"{16D63FD6-119B-4353-BDCA-18358721C3FE}" ? (
|
||||||
]
|
<>
|
||||||
)
|
{props.filesArray.map((blob, i) => (
|
||||||
: fieldtype[0].value ==
|
<div key={i}>
|
||||||
"{0273EDBD-AC1D-40d3-9FB2-095C621B552D}"
|
{getDocumentTypeFromFilename(
|
||||||
? props.props.form[
|
blob.name
|
||||||
"appealForm"
|
) ===
|
||||||
].values[
|
documentTypeCode[0]
|
||||||
datafieldname[0].value[0]
|
.value && (
|
||||||
].map((tenant, index) => {
|
<div
|
||||||
return (
|
style={{
|
||||||
<div
|
display: "flex",
|
||||||
key={index}
|
alignItems:
|
||||||
style={{
|
"flex-start",
|
||||||
display:
|
}}
|
||||||
"flex",
|
className="govuk-!-margin-bottom-2"
|
||||||
}}
|
>
|
||||||
>
|
<img
|
||||||
<div className="govuk-!-width-one-half">
|
style={{
|
||||||
{
|
minWidth: "50",
|
||||||
tenant.pinswg_agriculturaltenantname
|
width: "50",
|
||||||
}
|
}}
|
||||||
</div>
|
src={getThumbnailIconByExtension(
|
||||||
<div className="govuk-!-width-one-half">
|
blob.name
|
||||||
Served:{" "}
|
)}
|
||||||
{formatDate(
|
alt={blob.name}
|
||||||
tenant.dateserved
|
width="50"
|
||||||
)}
|
/>
|
||||||
</div>
|
<span
|
||||||
</div>
|
style={{
|
||||||
);
|
maxWidth: "85%",
|
||||||
})
|
}}
|
||||||
: props.props.form["appealForm"]
|
className="govuk-body govuk-!-font-size-14 govuk-!-margin-left-2"
|
||||||
.values[
|
>
|
||||||
datafieldname[0].value
|
{blob.name} -{" "}
|
||||||
]}
|
{bytesToSize(
|
||||||
</dd>
|
blob.size
|
||||||
|
)}{" "}
|
||||||
<dd className="govuk-summary-list__actions">
|
</span>
|
||||||
{rows[0].value !=
|
</div>
|
||||||
"Case reference" && (
|
)}
|
||||||
<a
|
</div>
|
||||||
className="govuk-link"
|
))}
|
||||||
href="#"
|
<br />
|
||||||
onClick={() => {
|
{typeof props.props.form["appealForm"]
|
||||||
setCurrentSection(
|
.values[datafieldname[0].value] !=
|
||||||
whichSection
|
"undefined" &&
|
||||||
);
|
props.props.form[
|
||||||
|
"appealForm"
|
||||||
|
].values[
|
||||||
|
datafieldname[0].value
|
||||||
|
].map(
|
||||||
|
(blob, i) =>
|
||||||
|
isObjectAndNotEmpty(
|
||||||
|
blob
|
||||||
|
) && (
|
||||||
|
<div key={i}>
|
||||||
|
{getDocumentTypeFromFilename(
|
||||||
|
blob.name
|
||||||
|
) ===
|
||||||
|
documentTypeCode[0]
|
||||||
|
.value && (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display:
|
||||||
|
"flex",
|
||||||
|
alignItems:
|
||||||
|
"flex-start",
|
||||||
|
}}
|
||||||
|
className="govuk-!-margin-bottom-2"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
style={{
|
||||||
|
minWidth:
|
||||||
|
"50",
|
||||||
|
width: "50",
|
||||||
|
}}
|
||||||
|
src={getThumbnailIconByExtension(
|
||||||
|
blob.name
|
||||||
|
)}
|
||||||
|
alt={
|
||||||
|
blob.name
|
||||||
|
}
|
||||||
|
width="50"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
maxWidth:
|
||||||
|
"85%",
|
||||||
|
}}
|
||||||
|
className="govuk-body govuk-!-font-size-14 govuk-!-margin-left-2"
|
||||||
|
>
|
||||||
|
{
|
||||||
|
blob.name
|
||||||
|
}{" "}
|
||||||
|
-{" "}
|
||||||
|
{bytesToSize(
|
||||||
|
blob.size
|
||||||
|
)}{" "}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
) : fieldtype[0].value ==
|
||||||
|
"{0273EDBD-AC1D-40d3-9FB2-095C621B552D}" ? (
|
||||||
|
typeof props.props.form["appealForm"]
|
||||||
|
.values[datafieldname[0].value] !=
|
||||||
|
"undefined" &&
|
||||||
|
props.props.form["appealForm"].values[
|
||||||
|
datafieldname[0].value
|
||||||
|
] != null ? (
|
||||||
|
props.props.form["appealForm"].values[
|
||||||
|
datafieldname[0].value
|
||||||
|
].map((tenant, index) => {
|
||||||
|
console.log(
|
||||||
|
typeof tenant.pinswg_owners_firstname
|
||||||
|
);
|
||||||
|
return typeof tenant.pinswg_owners_firstname !=
|
||||||
|
"undefined" ||
|
||||||
|
typeof tenant.pinswg_agriculturaltenantname_firstname !=
|
||||||
|
"undefined" ? (
|
||||||
|
<div
|
||||||
|
key={index}
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{" "}
|
<div className="govuk-!-width-one-half">
|
||||||
{t(
|
{tenant?.pinswg_agriculturaltenantname_firstname &&
|
||||||
"newappeal:change-link-label"
|
tenant.pinswg_agriculturaltenantname_firstname +
|
||||||
)}
|
" " +
|
||||||
<span className="govuk-visually-hidden">
|
tenant.pinswg_agriculturaltenantname_lastname}
|
||||||
{" "}
|
|
||||||
{FieldsTranslations(
|
{tenant?.pinswg_owners_firstname &&
|
||||||
rows[0].value
|
tenant.pinswg_owners_firstname +
|
||||||
|
" " +
|
||||||
|
tenant.pinswg_owners_lastname}
|
||||||
|
</div>
|
||||||
|
<div className="govuk-!-width-one-half">
|
||||||
|
Served:{" "}
|
||||||
|
{formatDate(
|
||||||
|
tenant.dateserved
|
||||||
)}
|
)}
|
||||||
</span>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
)}
|
) : (
|
||||||
</dd>
|
""
|
||||||
</div>
|
);
|
||||||
);
|
})
|
||||||
} else {
|
) : (
|
||||||
return null;
|
"N/A"
|
||||||
}
|
)
|
||||||
} else {
|
) : (
|
||||||
return null;
|
props.props.form["appealForm"].values[
|
||||||
}
|
datafieldname[0].value
|
||||||
} else {
|
]
|
||||||
return null;
|
)}
|
||||||
}
|
</dd>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__actions">
|
||||||
|
{rows[0].value != "Temporary reference" && (
|
||||||
|
<a
|
||||||
|
className="govuk-link"
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentSection(whichSection);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{" "}
|
||||||
|
{t("newappeal:change-link-label")}
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
{" "}
|
||||||
|
{FieldsTranslations(rows[0].value)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -14,7 +14,11 @@ import {
|
|||||||
import BuildCheckRow from "./buildcheckrow";
|
import BuildCheckRow from "./buildcheckrow";
|
||||||
|
|
||||||
import { generateAppealPDF, sendCaseCompleteMessage } from "../../actions";
|
import { generateAppealPDF, sendCaseCompleteMessage } from "../../actions";
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../utils";
|
import {
|
||||||
|
bytesToSize,
|
||||||
|
getThumbnailIconByExtension,
|
||||||
|
updateLinks,
|
||||||
|
} from "../utils";
|
||||||
|
|
||||||
let BuildCheckSection = (props) => {
|
let BuildCheckSection = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -71,17 +75,19 @@ let BuildCheckSection = (props) => {
|
|||||||
|
|
||||||
let buildAppealFilesArray = [];
|
let buildAppealFilesArray = [];
|
||||||
//console.log("attached docs: - ", buildAppealFilesArray);
|
//console.log("attached docs: - ", buildAppealFilesArray);
|
||||||
buildAppealFilesArray = props.props.form.appealForm.values.filesList || [];
|
buildAppealFilesArray = props.props.appealType.fileList?.value[0] || [];
|
||||||
|
//let filesUploadObj = buildAppealFilesArray;
|
||||||
|
// let filesUploadObj = props.appealType.fileList.hasOwnProperty("value")
|
||||||
|
// ? props.appealType.fileList.value[0]
|
||||||
|
// : [];
|
||||||
|
|
||||||
let filesUploadObj = props.appealType.fileList.value[0];
|
// for (let key in filesUploadObj) {
|
||||||
|
// typeof filesUploadObj[key].name != "undefined" &&
|
||||||
for (let key in filesUploadObj) {
|
// buildAppealFilesArray.push({
|
||||||
typeof filesUploadObj[key].name != "undefined" &&
|
// "name": filesUploadObj[key].name,
|
||||||
buildAppealFilesArray.push({
|
// "size": filesUploadObj[key].contentLength,
|
||||||
"name": filesUploadObj[key].name,
|
// });
|
||||||
"size": filesUploadObj[key].contentLength,
|
// }
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
buildAppealFilesArray.filter(function (item, idx) {
|
buildAppealFilesArray.filter(function (item, idx) {
|
||||||
return item.name;
|
return item.name;
|
||||||
@@ -105,7 +111,10 @@ let BuildCheckSection = (props) => {
|
|||||||
|
|
||||||
let pdfObj = props.props.form.appealForm.values;
|
let pdfObj = props.props.form.appealForm.values;
|
||||||
|
|
||||||
|
pdfObj = updateLinks(pdfObj);
|
||||||
|
|
||||||
Object.assign(pdfObj, {
|
Object.assign(pdfObj, {
|
||||||
|
"filesList": buildAppealFilesArray,
|
||||||
"containerID": props.props.accountDetails.containerID,
|
"containerID": props.props.accountDetails.containerID,
|
||||||
"casefolderID": props.appealType.caseReference.ticketnumber,
|
"casefolderID": props.appealType.caseReference.ticketnumber,
|
||||||
});
|
});
|
||||||
@@ -118,37 +127,57 @@ let BuildCheckSection = (props) => {
|
|||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
const { appealtypes } = router.query;
|
const { appealtypes } = router.query;
|
||||||
|
|
||||||
let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup);
|
let formObj = jsonpath({
|
||||||
|
path: "$['" + appealtypes + "']",
|
||||||
|
json: fieldLookup,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
let labelTrans =
|
let labelTrans =
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath('$..[?(@.value=="' + label + '")].value_cy', formObj)
|
? jsonpath({
|
||||||
|
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
|
||||||
|
json: formObj,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: label;
|
: label;
|
||||||
return labelTrans;
|
return labelTrans;
|
||||||
};
|
};
|
||||||
|
|
||||||
const finaliseAppeal = async () => {
|
const finaliseAppeal = async () => {
|
||||||
setFinaliseAppealProcess(true);
|
//console.log("finalising appeal:", pdfObj);
|
||||||
//console.log("finalising appeal:");
|
|
||||||
await generateAppealPDF(
|
const uniqueArray = pdfObj.filesList.filter(
|
||||||
pdfObj,
|
(value, index, self) =>
|
||||||
props.props.accountDetails.containerID,
|
index === self.findIndex((t) => t.name === value.name)
|
||||||
props.appealType.caseReference.ticketnumber,
|
);
|
||||||
router.query.appealtypes,
|
|
||||||
pdfObj.filesList
|
pdfObj.filesList = uniqueArray;
|
||||||
// props.appealType.fileList
|
|
||||||
)
|
confirmSections
|
||||||
.then((data) => {
|
? (setFinaliseAppealProcess(true),
|
||||||
console.log("have generated pdf:", data);
|
await generateAppealPDF(
|
||||||
sendCaseCompleteMessage(
|
pdfObj,
|
||||||
props.props.accountDetails.containerID,
|
props.props.accountDetails.containerID,
|
||||||
props.appealType.caseReference.ticketnumber
|
props.appealType.caseReference.ticketnumber,
|
||||||
);
|
router.query.appealtypes,
|
||||||
})
|
pdfObj.filesList
|
||||||
.then(() => {
|
// props.appealType.fileList
|
||||||
//console.log("have sent complete message :");
|
)
|
||||||
setCurrentSection(9999);
|
.then((data) => {
|
||||||
});
|
console.log("have generated pdf:", data);
|
||||||
|
sendCaseCompleteMessage(
|
||||||
|
props.props.accountDetails.containerID,
|
||||||
|
props.appealType.caseReference.ticketnumber,
|
||||||
|
props.props.accountDetails.accountDetails
|
||||||
|
.pinswg_typeofinvolvement
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
//console.log("have sent complete message :");
|
||||||
|
setCurrentSection(9999);
|
||||||
|
}))
|
||||||
|
: setConfirmSections(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -172,11 +201,12 @@ let BuildCheckSection = (props) => {
|
|||||||
props={props}
|
props={props}
|
||||||
key={key}
|
key={key}
|
||||||
mandatoryFieldsData={mandatoryFieldsData}
|
mandatoryFieldsData={mandatoryFieldsData}
|
||||||
|
filesArray={buildAppealFilesArray}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</dl>
|
</dl>
|
||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9 at-summary-list">
|
{/* <dl className="govuk-summary-list govuk-!-margin-bottom-9 at-summary-list">
|
||||||
{buildAppealFilesArray.length > 0
|
{buildAppealFilesArray.length > 0
|
||||||
? buildAppealFilesArray.map((blob, i) => {
|
? buildAppealFilesArray.map((blob, i) => {
|
||||||
return (
|
return (
|
||||||
@@ -227,18 +257,19 @@ let BuildCheckSection = (props) => {
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
: ""}
|
: ""}
|
||||||
</dl>
|
</dl> */}
|
||||||
</div>
|
</div>
|
||||||
{finaliseAppealProcess ? (
|
{finaliseAppealProcess ? (
|
||||||
<div className="">
|
<div className="">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
||||||
Finalising your appeal submission
|
{t("newappeal:new-appeal-finalising-heading")}
|
||||||
</h3>
|
</h3>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
Currenly uploading files and finalising your appeal
|
{t("newappeal:new-appeal-finalising-label")}
|
||||||
submission
|
</p>
|
||||||
|
<p className="govuk-body textloading">
|
||||||
|
{t("newappeal:new-appeal-wait-label")}
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body textloading">Please wait</p>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
@@ -282,6 +313,7 @@ let BuildCheckSection = (props) => {
|
|||||||
"newappeal:new-appeal-check-confirm-paragraph-two"
|
"newappeal:new-appeal-check-confirm-paragraph-two"
|
||||||
)}{" "}
|
)}{" "}
|
||||||
<Link
|
<Link
|
||||||
|
target="_blank"
|
||||||
href={t(
|
href={t(
|
||||||
"newappeal:new-appeal-check-confirm-paragraph-two-link"
|
"newappeal:new-appeal-check-confirm-paragraph-two-link"
|
||||||
)}
|
)}
|
||||||
@@ -308,9 +340,7 @@ let BuildCheckSection = (props) => {
|
|||||||
<a
|
<a
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() =>
|
onClick={() => setCurrentSection(sectionCount)}
|
||||||
setCurrentSection(sectionCount - 1)
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{t("common:back-link")}
|
{t("common:back-link")}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
+216
-228
@@ -17,239 +17,227 @@ import {
|
|||||||
} from "../elements";
|
} from "../elements";
|
||||||
|
|
||||||
export default function BuildField(props) {
|
export default function BuildField(props) {
|
||||||
let { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const { locale } = useRouter();
|
||||||
|
|
||||||
const router = useRouter();
|
// Destructure frequently used props for clarity
|
||||||
const { locale } = router;
|
const {
|
||||||
const { fieldType, label, datafieldname, mandatoryFieldData } = props;
|
fieldType,
|
||||||
const parser = new DOMParser();
|
label,
|
||||||
|
datafieldname,
|
||||||
|
picklistData,
|
||||||
|
validation,
|
||||||
|
hint,
|
||||||
|
maxFieldLength,
|
||||||
|
dateStart,
|
||||||
|
dateEnd,
|
||||||
|
documentTypeCode,
|
||||||
|
uploadCount,
|
||||||
|
setUploadCount,
|
||||||
|
setFileCount,
|
||||||
|
parentField,
|
||||||
|
parentFieldShowOnValue,
|
||||||
|
requiredDocumentValue,
|
||||||
|
requiredDocumentLabel,
|
||||||
|
setDocumentsList,
|
||||||
|
documentList,
|
||||||
|
maxSubField,
|
||||||
|
datafieldcontent,
|
||||||
|
} = props;
|
||||||
|
|
||||||
const whichFieldType = (classid) => {
|
// Extract deeply nested props for convenience (avoid props.props.props all over)
|
||||||
//console.log(props.datafieldname, classid);
|
// Defensive checks in case nested props don't exist
|
||||||
|
const appealType = props?.props?.props?.appealType || {};
|
||||||
|
const form = props?.props?.props?.form || {};
|
||||||
|
const formProps = props?.props?.props?.props?.form || {};
|
||||||
|
const setFilesForAppeal = props?.props?.props?.setFilesForAppeal;
|
||||||
|
const accountDetails = props?.props?.props?.props?.accountDetails || {};
|
||||||
|
const ticketnumber = appealType.caseReference?.ticketnumber || "";
|
||||||
|
const fileList = appealType.fileList || {};
|
||||||
|
const containerID = accountDetails.containerID || "";
|
||||||
|
|
||||||
switch (classid) {
|
// Mapping fieldType to components
|
||||||
case "{270BD3DB-D9AF-4782-9025-509E298DEC0A}":
|
const fieldTypeMap = {
|
||||||
return (
|
"{270BD3DB-D9AF-4782-9025-509E298DEC0A}": (
|
||||||
<ReadOnlyfield
|
<ReadOnlyfield
|
||||||
name={props.datafieldname}
|
name={datafieldname}
|
||||||
label={props.label}
|
label={label}
|
||||||
value={
|
value={ticketnumber}
|
||||||
props.props.props.appealType.caseReference
|
props={props}
|
||||||
.ticketnumber
|
ticketnumber={ticketnumber}
|
||||||
}
|
/>
|
||||||
props={props}
|
),
|
||||||
ticketnumber={
|
"{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}": (
|
||||||
props.props.props.appealType.caseReference
|
<PickList
|
||||||
.ticketnumber
|
name={datafieldname}
|
||||||
}
|
label={label}
|
||||||
/>
|
datafieldname={datafieldname}
|
||||||
);
|
picklistData={picklistData}
|
||||||
break;
|
validation={validation}
|
||||||
case "{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}":
|
hint={hint}
|
||||||
return (
|
/>
|
||||||
<PickList
|
),
|
||||||
name={props.datafieldname}
|
"{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}": (
|
||||||
label={props.label}
|
<YesNofield
|
||||||
datafieldname={props.datafieldname}
|
name={datafieldname}
|
||||||
picklistData={props.picklistData}
|
label={label}
|
||||||
validation={props.validation}
|
requiredDocumentValue={requiredDocumentValue}
|
||||||
hint={props.hint}
|
requiredDocumentLabel={requiredDocumentLabel}
|
||||||
/>
|
validation={validation}
|
||||||
);
|
setDocumentsList={setDocumentsList}
|
||||||
break;
|
documentList={documentList}
|
||||||
case "{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
|
form={form}
|
||||||
return (
|
formProps={formProps}
|
||||||
<YesNofield
|
parentField={parentField}
|
||||||
name={props.datafieldname}
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
label={props.label}
|
/>
|
||||||
requiredDocumentValue={props.requiredDocumentValue}
|
),
|
||||||
requiredDocumentLabel={props.requiredDocumentLabel}
|
"{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}": (
|
||||||
validation={props.validation}
|
<Radiofield
|
||||||
setDocumentsList={props.setDocumentsList}
|
name={datafieldname}
|
||||||
documentList={props.documentList}
|
label={label}
|
||||||
form={props.props.props.form}
|
datafieldname={datafieldname}
|
||||||
formProps={props.props.props.props.form}
|
options={datafieldcontent}
|
||||||
parentField={props.parentField}
|
inline={false}
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
hint={hint}
|
||||||
/>
|
form={form}
|
||||||
);
|
formProps={formProps}
|
||||||
break;
|
parentField={parentField}
|
||||||
case "{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
return (
|
validation={validation}
|
||||||
<Radiofield
|
setDocumentsList={setDocumentsList}
|
||||||
name={props.datafieldname}
|
documentList={documentList}
|
||||||
label={props.label}
|
requiredDocumentValue={requiredDocumentValue}
|
||||||
datafieldname={props.datafieldname}
|
requiredDocumentLabel={requiredDocumentLabel}
|
||||||
options={props.datafieldcontent}
|
/>
|
||||||
inline={false}
|
),
|
||||||
hint={props.hint}
|
"{4273EDBD-AC1D-40d3-9FB2-095C621B552D}": (
|
||||||
form={props.props.props.form}
|
<Textfield
|
||||||
formProps={props.props.props.props.form}
|
name={datafieldname}
|
||||||
parentField={props.parentField}
|
label={label}
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
props={props}
|
||||||
validation={props.validation}
|
ticketnumber={ticketnumber}
|
||||||
setDocumentsList={props.setDocumentsList}
|
form={form}
|
||||||
documentList={props.documentList}
|
formProps={formProps}
|
||||||
requiredDocumentValue={props.requiredDocumentValue}
|
parentField={parentField}
|
||||||
requiredDocumentLabel={props.requiredDocumentLabel}
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
/>
|
validation={validation}
|
||||||
);
|
hint={hint}
|
||||||
break;
|
maxFieldLength={maxFieldLength}
|
||||||
case "{4273EDBD-AC1D-40d3-9FB2-095C621B552D}":
|
/>
|
||||||
const required = (value) => (value ? undefined : "Is required");
|
),
|
||||||
|
"{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}": (
|
||||||
return (
|
<DateFieldPicker
|
||||||
<Textfield
|
name={datafieldname}
|
||||||
name={props.datafieldname}
|
label={label}
|
||||||
label={props.label}
|
form={form}
|
||||||
props={props}
|
formProps={formProps}
|
||||||
ticketnumber={
|
parentField={parentField}
|
||||||
props.props.props.appealType.caseReference
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
.ticketnumber
|
validation={validation}
|
||||||
}
|
dateStart={dateStart}
|
||||||
form={props.props.props.form}
|
dateEnd={dateEnd}
|
||||||
formProps={props.props.props.props.form}
|
hint={hint}
|
||||||
parentField={props.parentField}
|
/>
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
),
|
||||||
validation={props.validation}
|
"{E0DECE4B-6FC8-4a8f-A065-082708572369}": (
|
||||||
hint={props.hint}
|
<MultiLinefield
|
||||||
maxFieldLength={props.maxFieldLength}
|
name={datafieldname}
|
||||||
/>
|
label={label}
|
||||||
);
|
form={form}
|
||||||
break;
|
formProps={formProps}
|
||||||
case "{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}":
|
parentField={parentField}
|
||||||
return (
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
<DateFieldPicker
|
validation={validation}
|
||||||
name={props.datafieldname}
|
maxFieldLength={maxFieldLength}
|
||||||
label={props.label}
|
hint={hint}
|
||||||
form={props.props.props.form}
|
/>
|
||||||
formProps={props.props.props.props.form}
|
),
|
||||||
parentField={props.parentField}
|
"{E0DECE4B-6666-4a8f-A065-082708572369}": (
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
<RichMultiLinefield
|
||||||
validation={props.validation}
|
name={datafieldname}
|
||||||
dateStart={props.dateStart}
|
label={label}
|
||||||
dateEnd={props.dateEnd}
|
form={form}
|
||||||
/>
|
formProps={formProps}
|
||||||
);
|
parentField={parentField}
|
||||||
break;
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
case "{E0DECE4B-6FC8-4a8f-A065-082708572369}":
|
validation={validation}
|
||||||
return (
|
maxFieldLength={maxFieldLength}
|
||||||
<MultiLinefield
|
hint={hint}
|
||||||
name={props.datafieldname}
|
/>
|
||||||
label={props.label}
|
),
|
||||||
form={props.props.props.form}
|
"{C6D124CA-7EDA-4a60-AEA9-7FB8D318B68F}": (
|
||||||
formProps={props.props.props.props.form}
|
<NumericField
|
||||||
parentField={props.parentField}
|
name={datafieldname}
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
label={label}
|
||||||
validation={props.validation}
|
form={form}
|
||||||
maxFieldLength={props.maxFieldLength}
|
formProps={formProps}
|
||||||
hint={props.hint}
|
validation={validation}
|
||||||
/>
|
parentField={parentField}
|
||||||
);
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
break;
|
maxFieldLength={maxFieldLength}
|
||||||
case "{E0DECE4B-6666-4a8f-A065-082708572369}":
|
/>
|
||||||
return (
|
),
|
||||||
<RichMultiLinefield
|
"{C3EFE0C3-0EC6-42be-8349-CBD9079DFD8E}": (
|
||||||
name={props.datafieldname}
|
<DecimalField
|
||||||
label={props.label}
|
name={datafieldname}
|
||||||
form={props.props.props.form}
|
label={label}
|
||||||
formProps={props.props.props.props.form}
|
form={form}
|
||||||
parentField={props.parentField}
|
formProps={formProps}
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
validation={validation}
|
||||||
validation={props.validation}
|
parentField={parentField}
|
||||||
maxFieldLength={props.maxFieldLength}
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
hint={props.hint}
|
maxFieldLength={maxFieldLength}
|
||||||
/>
|
/>
|
||||||
);
|
),
|
||||||
break;
|
"{16D63FD6-119B-4353-BDCA-18358721C3FE}": (
|
||||||
case "{C6D124CA-7EDA-4a60-AEA9-7FB8D318B68F}":
|
<div className="govuk-!-margin-bottom-9">
|
||||||
return (
|
<FileUploadField
|
||||||
<NumericField
|
name={datafieldname}
|
||||||
name={props.datafieldname}
|
label={label}
|
||||||
label={props.label}
|
ticketnumber={ticketnumber}
|
||||||
form={props.props.props.form}
|
documentTypeCode={documentTypeCode}
|
||||||
formProps={props.props.props.props.form}
|
hint={hint}
|
||||||
validation={props.validation}
|
fileList={fileList}
|
||||||
parentField={props.parentField}
|
setFilesForAppeal={setFilesForAppeal}
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
containerID={containerID}
|
||||||
maxFieldLength={props.maxFieldLength}
|
uploadCount={uploadCount}
|
||||||
/>
|
setFileCount={setFileCount}
|
||||||
);
|
setUploadCount={setUploadCount}
|
||||||
break;
|
props={props?.props?.props}
|
||||||
case "{C3EFE0C3-0EC6-42be-8349-CBD9079DFD8E}":
|
/>
|
||||||
return (
|
</div>
|
||||||
<DecimalField
|
),
|
||||||
name={props.datafieldname}
|
"{0273EDBD-AC1D-40d3-9FB2-095C621B552D}": (
|
||||||
label={props.label}
|
<FieldArrayForm
|
||||||
form={props.props.props.form}
|
name={datafieldname}
|
||||||
formProps={props.props.props.props.form}
|
label={label}
|
||||||
validation={props.validation}
|
form={form}
|
||||||
parentField={props.parentField}
|
formProps={formProps}
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
parentField={parentField}
|
||||||
maxFieldLength={props.maxFieldLength}
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
/>
|
maxSubField={maxSubField}
|
||||||
);
|
/>
|
||||||
break;
|
),
|
||||||
case "{16D63FD6-119B-4353-BDCA-18358721C3FE}":
|
"{9EF39988-22BB-4f0b-BBBE-64B5A3748AEE}": (
|
||||||
return (
|
<CheckBoxfield
|
||||||
<div className="govuk-!-margin-bottom-9">
|
name={datafieldname}
|
||||||
<FileUploadField
|
label={label}
|
||||||
name={props.datafieldname}
|
props={props}
|
||||||
label={props.label}
|
form={form}
|
||||||
ticketnumber={
|
formProps={formProps}
|
||||||
props.props.props.props.appealType.caseReference
|
parentField={parentField}
|
||||||
.ticketnumber
|
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||||
}
|
validation={validation}
|
||||||
documentTypeCode={props.documentTypeCode}
|
/>
|
||||||
hint={props.hint}
|
),
|
||||||
fileList={
|
|
||||||
props.props.props.props.appealType.fileList
|
|
||||||
}
|
|
||||||
setFilesForAppeal={
|
|
||||||
props.props.props.setFilesForAppeal
|
|
||||||
}
|
|
||||||
containerID={
|
|
||||||
props.props.props.props.accountDetails
|
|
||||||
.containerID
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "{0273EDBD-AC1D-40d3-9FB2-095C621B552D}":
|
|
||||||
return (
|
|
||||||
<FieldArrayForm
|
|
||||||
name={props.datafieldname}
|
|
||||||
label={props.label}
|
|
||||||
form={props.props.props.form}
|
|
||||||
formProps={props.props.props.props.form}
|
|
||||||
parentField={props.parentField}
|
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
case "{9EF39988-22BB-4f0b-BBBE-64B5A3748AEE}":
|
|
||||||
return (
|
|
||||||
<CheckBoxfield
|
|
||||||
name={props.datafieldname}
|
|
||||||
label={props.label}
|
|
||||||
props={props}
|
|
||||||
form={props.props.props.form}
|
|
||||||
formProps={props.props.props.props.form}
|
|
||||||
parentField={props.parentField}
|
|
||||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
|
||||||
validation={props.validation}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return (
|
|
||||||
<Textfield name={props.datafieldname} label={props.label} />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">{whichFieldType(props.fieldType)}</div>
|
<div className="govuk-grid-row">
|
||||||
|
{fieldTypeMap[fieldType] || (
|
||||||
|
<Textfield name={datafieldname} label={label} />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,31 +4,65 @@ import { connect } from "react-redux";
|
|||||||
import { setCurrentSection } from "../../store/appealType/action";
|
import { setCurrentSection } from "../../store/appealType/action";
|
||||||
import { FieldsTranslations } from "../elements";
|
import { FieldsTranslations } from "../elements";
|
||||||
|
|
||||||
const BuildProgress = (props) => {
|
const BuildProgress = ({
|
||||||
let { t } = useTranslation();
|
progObj,
|
||||||
|
titleList,
|
||||||
|
currentSection,
|
||||||
|
documentListObj,
|
||||||
|
formObjXML,
|
||||||
|
mandatoryFieldsData,
|
||||||
|
gotoSection,
|
||||||
|
setCurrentSection,
|
||||||
|
props: outerProps,
|
||||||
|
}) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
const {
|
// Helper to safely access nested form values
|
||||||
progObj,
|
const getFormValue = (field) =>
|
||||||
titleList,
|
outerProps?.props?.form?.appealForm?.values?.[field];
|
||||||
currentSection,
|
|
||||||
documentListObj,
|
|
||||||
formObjXML,
|
|
||||||
mandatoryFieldsData,
|
|
||||||
gotoSection,
|
|
||||||
setCurrentSection,
|
|
||||||
} = props;
|
|
||||||
const parser = new DOMParser();
|
|
||||||
|
|
||||||
//const progObj = getProgressObj(
|
const renderDocumentList = () => {
|
||||||
// formObjXML,
|
const formValues = outerProps?.props?.form?.appealForm?.values || {};
|
||||||
// titleList,
|
|
||||||
// mandatoryFieldsData,
|
|
||||||
// props
|
|
||||||
// );
|
|
||||||
|
|
||||||
//console.log(progObj);
|
return (
|
||||||
|
<>
|
||||||
|
<li>{t("newappeal:application-form")}</li>
|
||||||
|
|
||||||
|
{formValues.pinswg_developmentdescriptionchanged === "true" && (
|
||||||
|
<li>Description of development change confirmation</li>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{formValues.pinswg_caseworkreason === "846040005" && (
|
||||||
|
<li>{t("newappeal:registration-of-application-letter")}</li>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{formValues.pinswg_caseworkreason === "846040000" && (
|
||||||
|
<li>Decision notice</li>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{formValues.pinswg_attachsoc === "true" && (
|
||||||
|
<li>{t("newappeal:statement-of-case")}</li>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{formValues.pinswg_attachcostapplication === "true" && (
|
||||||
|
<li>{t("newappeal:cost-application")}</li>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{formValues.pinswg_s106unilateralsubmitted === "true" && (
|
||||||
|
<li>Planning obligation (S106/Unilateral)</li>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Additional document list items from documentListObj if needed */}
|
||||||
|
{/* {Object.entries(documentListObj).map(([key, value]) => (
|
||||||
|
<li key={key}>{value}</li>
|
||||||
|
))} */}
|
||||||
|
|
||||||
|
<li>{t("newappeal:site-location-plan")}</li>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -40,16 +74,17 @@ const BuildProgress = (props) => {
|
|||||||
<h2 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey progress-heading">
|
<h2 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey progress-heading">
|
||||||
{t("newappeal:new-appeal-progress-nav-label")}:{" "}
|
{t("newappeal:new-appeal-progress-nav-label")}:{" "}
|
||||||
<span className="progress-case-reference">
|
<span className="progress-case-reference">
|
||||||
{props.props.appealType.caseReference.ticketnumber}
|
{
|
||||||
|
outerProps?.props?.appealType?.caseReference
|
||||||
|
?.ticketnumber
|
||||||
|
}
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{/* <hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" /> */}
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
id="step-by-step-navigation"
|
id="step-by-step-navigation"
|
||||||
data-module="gemstepnav"
|
data-module="gemstepnav"
|
||||||
className="app-step-nav app-step-nav--active"
|
className="app-step-nav app-step-nav--active"
|
||||||
data-id="e01e924b-9c7c-4c71-8241-66a575c2f61f"
|
data-id="e01e924b-9c7c-4c71-8241-66a575c2f61f"
|
||||||
data-show-text="show"
|
data-show-text="show"
|
||||||
data-hide-text="hide"
|
data-hide-text="hide"
|
||||||
@@ -57,168 +92,105 @@ const BuildProgress = (props) => {
|
|||||||
data-hide-all-text="Hide all"
|
data-hide-all-text="Hide all"
|
||||||
>
|
>
|
||||||
<ol className="app-step-nav__steps">
|
<ol className="app-step-nav__steps">
|
||||||
{Object.keys(progObj).map((key, index) => (
|
{Object.keys(progObj).map((key, index) => {
|
||||||
<li
|
const step = progObj[index];
|
||||||
key={key}
|
const stepId = FieldsTranslations(step.title)
|
||||||
className={
|
.toString()
|
||||||
"app-step-nav__step js-step app-step-nav__step--active" +
|
.replace(/\s+/g, "-")
|
||||||
(progObj[index].allFieldsComplete
|
.toLowerCase();
|
||||||
? " sectionComplete"
|
|
||||||
: " sectionIncomplete")
|
return (
|
||||||
}
|
<li
|
||||||
aria-current="step"
|
key={key}
|
||||||
data-show=""
|
className={`app-step-nav__step js-step app-step-nav__step--active ${
|
||||||
id={FieldsTranslations(progObj[index].title)
|
step.allFieldsComplete
|
||||||
.toString()
|
? "sectionComplete"
|
||||||
.replace(/\s+/g, "-")
|
: "sectionIncomplete"
|
||||||
.toLowerCase()}
|
}`}
|
||||||
>
|
aria-current="step"
|
||||||
<div
|
data-show=""
|
||||||
className="app-step-nav__header js-toggle-panel "
|
id={stepId}
|
||||||
data-position={index}
|
|
||||||
>
|
>
|
||||||
<h3 className="app-step-nav__title ">
|
<div
|
||||||
<span className="app-step-nav__circle app-step-nav__circle--number">
|
className="app-step-nav__header js-toggle-panel"
|
||||||
<span className="app-step-nav__circle-inner">
|
data-position={index}
|
||||||
<span className="app-step-nav__circle-background">
|
>
|
||||||
<span className="app-step-nav__circle-step-label govuk-visually-hidden">
|
<h3 className="app-step-nav__title">
|
||||||
Step
|
<span className="app-step-nav__circle app-step-nav__circle--number">
|
||||||
</span>{" "}
|
<span className="app-step-nav__circle-inner">
|
||||||
{index + 1}
|
<span className="app-step-nav__circle-background">
|
||||||
<span
|
<span className="app-step-nav__circle-step-label govuk-visually-hidden">
|
||||||
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
Step
|
||||||
aria-hidden="true"
|
</span>{" "}
|
||||||
>
|
{index + 1}
|
||||||
:
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
|
||||||
|
|
||||||
<span className="js-step-title">
|
<span className="js-step-title">
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
gotoSection(
|
e.preventDefault();
|
||||||
parseInt(key) + 1
|
gotoSection(
|
||||||
);
|
parseInt(key, 10) +
|
||||||
}}
|
1
|
||||||
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
);
|
||||||
aria-expanded="false"
|
}}
|
||||||
aria-controls={
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
"step-panel-" +
|
aria-expanded="false"
|
||||||
FieldsTranslations(
|
aria-controls={`step-panel-${stepId}`}
|
||||||
progObj[index].title
|
|
||||||
)
|
|
||||||
.toString()
|
|
||||||
.replace(/\s+/g, "-")
|
|
||||||
.toLowerCase()
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span className="js-step-title-text govuk-!-font-size-16">
|
|
||||||
{FieldsTranslations(
|
|
||||||
progObj[index].title
|
|
||||||
)}{" "}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
{/* <li
|
|
||||||
className={
|
|
||||||
"app-step-nav__step js-step app-step-nav__step--active"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
className="app-step-nav__header js-toggle-panel "
|
|
||||||
data-position={10}
|
|
||||||
>
|
|
||||||
<h3 className="app-step-nav__title ">
|
|
||||||
<span className="app-step-nav__circle app-step-nav__circle--number">
|
|
||||||
<span className="app-step-nav__circle-inner">
|
|
||||||
<span className="app-step-nav__circle-background">
|
|
||||||
<span className="app-step-nav__circle-step-label govuk-visually-hidden">
|
|
||||||
Step
|
|
||||||
</span>{" "}
|
|
||||||
{progObj.length + 1}
|
|
||||||
<span
|
|
||||||
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
>
|
||||||
:
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
</span>
|
{FieldsTranslations(
|
||||||
|
step.title
|
||||||
|
)}{" "}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</h3>
|
||||||
</span>
|
</div>
|
||||||
|
</li>
|
||||||
<span className="js-step-title">
|
);
|
||||||
<a
|
})}
|
||||||
href="#"
|
|
||||||
onClick={() => {
|
|
||||||
gotoSection(progObj.length + 1);
|
|
||||||
}}
|
|
||||||
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
|
||||||
aria-expanded="false"
|
|
||||||
aria-controls={
|
|
||||||
"step-panel-confirmation"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span className="js-step-title-text govuk-!-font-size-16">
|
|
||||||
Confirmation
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
</li> */}
|
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{Object.keys(documentListObj).length > 0 && (
|
<section>
|
||||||
<div>
|
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
|
||||||
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
|
{t("newappeal:new-appeal-documentlist-nav")}:
|
||||||
{t("newappeal:new-appeal-documentlist-nav")}:
|
</h3>
|
||||||
</h3>
|
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
||||||
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
<ol className="govuk-list document-list">
|
||||||
<ol className="govuk-list document-list">
|
<li className="at-nav__page">
|
||||||
<ul className="govuk-list ">
|
<ol className="govuk-list govuk-list--bullet">
|
||||||
<li className="at-nav__page">
|
{renderDocumentList()}
|
||||||
<ol className="govuk-list govuk-list--bullet">
|
</ol>
|
||||||
{Object.entries(documentListObj).map(
|
</li>
|
||||||
([key, value]) => {
|
</ol>
|
||||||
return <li key={key}>{value}</li>;
|
</section>
|
||||||
}
|
|
||||||
)}
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) => {
|
const mapStateToProps = (state) => ({
|
||||||
return {
|
search: state.search,
|
||||||
search: state.search,
|
searchResultsObj: state.searchResultsObj,
|
||||||
searchResultsObj: state.searchResultsObj,
|
formData: state.formData,
|
||||||
formData: state.formData,
|
appealType: state.appealType,
|
||||||
appealType: state.appealType,
|
initialValues: state.appealType.caseReference.caseDetails,
|
||||||
initialValues: state.appealType.caseReference.caseDetails,
|
//form: state.form,
|
||||||
//form: state.form,
|
});
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
return {
|
gotoSection: (thisSection) => dispatch(setCurrentSection(thisSection)),
|
||||||
gotoSection: (thisSection) => {
|
});
|
||||||
dispatch(setCurrentSection(thisSection));
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(BuildProgress);
|
export default connect(mapStateToProps, mapDispatchToProps)(BuildProgress);
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ export default function BuildRow(props) {
|
|||||||
sectionCount,
|
sectionCount,
|
||||||
onSubmit,
|
onSubmit,
|
||||||
mandatoryFieldsData,
|
mandatoryFieldsData,
|
||||||
|
setUploadCount,
|
||||||
|
uploadCount,
|
||||||
|
setFileCount,
|
||||||
|
completedUploadFilesCount,
|
||||||
|
setCompletedUploadFilesCount,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
@@ -34,6 +39,7 @@ export default function BuildRow(props) {
|
|||||||
var fieldtype = xpath.select("//@classid", doc);
|
var fieldtype = xpath.select("//@classid", doc);
|
||||||
var validation = xpath.select("//@validation", doc);
|
var validation = xpath.select("//@validation", doc);
|
||||||
var maxFieldLength = xpath.select("//@maxFieldLength", doc);
|
var maxFieldLength = xpath.select("//@maxFieldLength", doc);
|
||||||
|
var maxSubField = xpath.select("//@maxsubfield", doc);
|
||||||
var datafieldname = xpath.select("//@datafieldname", doc);
|
var datafieldname = xpath.select("//@datafieldname", doc);
|
||||||
var datafieldcontent = xpath.select(
|
var datafieldcontent = xpath.select(
|
||||||
"//@datafieldcontent",
|
"//@datafieldcontent",
|
||||||
@@ -74,6 +80,9 @@ export default function BuildRow(props) {
|
|||||||
maxFieldLength =
|
maxFieldLength =
|
||||||
!_.isEmpty(maxFieldLength) && maxFieldLength[0].value;
|
!_.isEmpty(maxFieldLength) && maxFieldLength[0].value;
|
||||||
|
|
||||||
|
maxSubField =
|
||||||
|
!_.isEmpty(maxSubField) && maxSubField[0].value;
|
||||||
|
|
||||||
parentField =
|
parentField =
|
||||||
!_.isEmpty(parentField) && parentField[0].value;
|
!_.isEmpty(parentField) && parentField[0].value;
|
||||||
|
|
||||||
@@ -101,8 +110,8 @@ export default function BuildRow(props) {
|
|||||||
|
|
||||||
dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value;
|
dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value;
|
||||||
|
|
||||||
//const isRequiredField = jsonpath(
|
//const isRequiredField = jsonpath({path:
|
||||||
// "$..value[?(@.LogicalName=='" +
|
// "$..value[?(@ && @.LogicalName=='" +
|
||||||
// datafieldname[0].value +
|
// datafieldname[0].value +
|
||||||
// "')]",
|
// "')]",
|
||||||
// mandatoryFieldsData
|
// mandatoryFieldsData
|
||||||
@@ -123,6 +132,9 @@ export default function BuildRow(props) {
|
|||||||
}
|
}
|
||||||
mandatoryFieldsData={mandatoryFieldsData}
|
mandatoryFieldsData={mandatoryFieldsData}
|
||||||
documentTypeCode={documentTypeCode}
|
documentTypeCode={documentTypeCode}
|
||||||
|
setFileCount={setFileCount}
|
||||||
|
setUploadCount={setUploadCount}
|
||||||
|
uploadCount={uploadCount}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -164,6 +176,7 @@ export default function BuildRow(props) {
|
|||||||
setFilesForAppeal={
|
setFilesForAppeal={
|
||||||
props.props.setFilesForAppeal
|
props.props.setFilesForAppeal
|
||||||
}
|
}
|
||||||
|
maxSubField={maxSubField}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
// } else {
|
// } else {
|
||||||
|
|||||||
@@ -11,8 +11,9 @@ import {
|
|||||||
setDocumentsList,
|
setDocumentsList,
|
||||||
setFilesForAppeal,
|
setFilesForAppeal,
|
||||||
setNewAppealProgress,
|
setNewAppealProgress,
|
||||||
|
setFileCount,
|
||||||
} from "../../store/appealType/action";
|
} from "../../store/appealType/action";
|
||||||
import { getFormCollectionByID, getProgressObj } from "../utils";
|
import { getFormCollectionByID, getProgressObj, updateLinks } from "../utils";
|
||||||
import BuildRow from "./buildrow";
|
import BuildRow from "./buildrow";
|
||||||
|
|
||||||
import { FieldsTranslations } from "../elements";
|
import { FieldsTranslations } from "../elements";
|
||||||
@@ -21,8 +22,14 @@ import BuildProgress from "./buildprogress";
|
|||||||
let BuildSection = (props) => {
|
let BuildSection = (props) => {
|
||||||
const [currentSectionSelected, setCurrentSectionSelected] = useState(1);
|
const [currentSectionSelected, setCurrentSectionSelected] = useState(1);
|
||||||
const [pickupWhereLeftOff, setPickupWhereLeftOff] = useState(true);
|
const [pickupWhereLeftOff, setPickupWhereLeftOff] = useState(true);
|
||||||
|
|
||||||
const [savingStatus, setSavingStatus] = useState(false);
|
const [savingStatus, setSavingStatus] = useState(false);
|
||||||
|
const [allFilesUploaded, setAllFilesuploaded] = useState(false);
|
||||||
|
const [showCompletedUploadFiles, setShowCompletedUploadFiles] =
|
||||||
|
useState(false);
|
||||||
|
const [completedUploadFiles, setCompletedUploadFiles] = useState(false);
|
||||||
|
const [uploadCount, setUploadCount] = useState(0);
|
||||||
|
const [completedUploadFilesCount, setCompletedUploadFilesCount] =
|
||||||
|
useState(0);
|
||||||
|
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
@@ -91,12 +98,14 @@ let BuildSection = (props) => {
|
|||||||
|
|
||||||
const handleParam = (setValue) => (e) => setValue(e.target.value);
|
const handleParam = (setValue) => (e) => setValue(e.target.value);
|
||||||
|
|
||||||
const uploadAppealFiles = (values) => {
|
const uploadAppealFiles = async (values) => {
|
||||||
// get filelists from values object
|
// get filelists from values object
|
||||||
let fileListObj = _.filter(values, function (v, key) {
|
let fileListObj = _.filter(values, function (v, key) {
|
||||||
return _.includes(key, "pinswg_fileUpload");
|
return _.includes(key, "pinswg_fileUpload");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fileListObj = [];
|
||||||
|
|
||||||
//console.log(fileListObj);
|
//console.log(fileListObj);
|
||||||
|
|
||||||
// console.log(
|
// console.log(
|
||||||
@@ -110,14 +119,14 @@ let BuildSection = (props) => {
|
|||||||
// _.includes(key, "pinswg_fileUpload") == true && delete dataObj[key];
|
// _.includes(key, "pinswg_fileUpload") == true && delete dataObj[key];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
uploadFiles(
|
await uploadFiles(
|
||||||
dataObj,
|
dataObj,
|
||||||
fileListObj,
|
fileListObj,
|
||||||
props.props.accountDetails.containerID,
|
props.props.accountDetails.containerID,
|
||||||
props.props.appealType.caseReference.ticketnumber
|
props.props.appealType.caseReference.ticketnumber
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
//console.log("hello", data);
|
console.log("$1", data);
|
||||||
|
setCompletedUploadFiles(true);
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -132,6 +141,8 @@ let BuildSection = (props) => {
|
|||||||
let buildAppealFilesArray = [];
|
let buildAppealFilesArray = [];
|
||||||
//console.log("attached docs: - ", buildAppealFilesArray);
|
//console.log("attached docs: - ", buildAppealFilesArray);
|
||||||
|
|
||||||
|
values = updateLinks(values);
|
||||||
|
|
||||||
let filesUploadObj = Object.keys(values)
|
let filesUploadObj = Object.keys(values)
|
||||||
.filter(function (k) {
|
.filter(function (k) {
|
||||||
return k.indexOf("pinswg_fileUpload") == 0;
|
return k.indexOf("pinswg_fileUpload") == 0;
|
||||||
@@ -166,7 +177,9 @@ let BuildSection = (props) => {
|
|||||||
|
|
||||||
setSavingStatus(useSaveStatus);
|
setSavingStatus(useSaveStatus);
|
||||||
|
|
||||||
|
//not sure we need this here if it does it on drop of file
|
||||||
uploadAppealFiles(values);
|
uploadAppealFiles(values);
|
||||||
|
|
||||||
// console.log(
|
// console.log(
|
||||||
// "\n////////////////////////\n appeal pdf payload",
|
// "\n////////////////////////\n appeal pdf payload",
|
||||||
// values,
|
// values,
|
||||||
@@ -279,7 +292,7 @@ let BuildSection = (props) => {
|
|||||||
useSaveStatus &&
|
useSaveStatus &&
|
||||||
router.replace(
|
router.replace(
|
||||||
router.locale != "en"
|
router.locale != "en"
|
||||||
? "/" + router.locale + "/myportal"
|
? "/" + router.locale + "/fymhorth"
|
||||||
: "/myportal"
|
: "/myportal"
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -313,11 +326,33 @@ let BuildSection = (props) => {
|
|||||||
|
|
||||||
// Object.assign(values, { "filesList": buildAppealFilesArray });
|
// Object.assign(values, { "filesList": buildAppealFilesArray });
|
||||||
|
|
||||||
|
// Function to parse a specific key (e.g., 'price') in an array of objects
|
||||||
|
const parseFloatForKeyInObject = (obj, key) => {
|
||||||
|
// Check if the object has the key and the value can be parsed as a float
|
||||||
|
if (
|
||||||
|
obj.hasOwnProperty(key) &&
|
||||||
|
typeof obj[key] === "string" &&
|
||||||
|
!isNaN(obj[key].trim())
|
||||||
|
) {
|
||||||
|
// Parse the value as a float and update the object
|
||||||
|
return { ...obj, [key]: parseFloat(obj[key]) };
|
||||||
|
}
|
||||||
|
// If the key doesn't exist or value can't be parsed, return the original object
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
|
||||||
|
valuesObj = parseFloatForKeyInObject(
|
||||||
|
valuesObj,
|
||||||
|
"pinswg_areaofsiteinhectaresdec"
|
||||||
|
);
|
||||||
|
|
||||||
delete valuesObj["_pinswg_appellant_value"];
|
delete valuesObj["_pinswg_appellant_value"];
|
||||||
//console.log("has errors:", props.invalid);
|
//console.log("has errors:", props.invalid);
|
||||||
props.invalid == false && updateCaseProgress(valuesObj, false, false);
|
props.invalid == false &&
|
||||||
|
updateCaseProgress(valuesObj, false, false).then((data) => {
|
||||||
setCurrentSection(currentSection + 1);
|
console.log(data);
|
||||||
|
setCurrentSection(currentSection + 1);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const [hasErrors, setHasErrors] = useState("");
|
const [hasErrors, setHasErrors] = useState("");
|
||||||
@@ -386,6 +421,16 @@ let BuildSection = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const hasUploadFiles = () => {
|
||||||
|
const formArr = props.props.form["appealForm"].values;
|
||||||
|
const prefix = "pinswg_fileUpload";
|
||||||
|
const hasFiles = Object.keys(formArr).some((key) =>
|
||||||
|
key.startsWith(prefix)
|
||||||
|
);
|
||||||
|
|
||||||
|
return hasFiles;
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-two-thirds wgForm ">
|
<div className="govuk-grid-column-two-thirds wgForm ">
|
||||||
@@ -409,6 +454,15 @@ let BuildSection = (props) => {
|
|||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
mandatoryFieldsData={mandatoryFieldsData}
|
mandatoryFieldsData={mandatoryFieldsData}
|
||||||
props={props}
|
props={props}
|
||||||
|
allFilesUploaded={allFilesUploaded}
|
||||||
|
setAllFilesuploaded={setAllFilesuploaded}
|
||||||
|
setFileCount={setFileCount}
|
||||||
|
setUploadCount={setUploadCount}
|
||||||
|
uploadCount={uploadCount}
|
||||||
|
completedUploadFilesCount={completedUploadFilesCount}
|
||||||
|
setCompletedUploadFilesCount={
|
||||||
|
setCompletedUploadFilesCount
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
@@ -440,10 +494,82 @@ let BuildSection = (props) => {
|
|||||||
false,
|
false,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
// currentSection == 1 &&
|
||||||
|
// setCurrentSection(1);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
|
{currentSection > 1 &&
|
||||||
|
(savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// "valuesobj:",
|
||||||
|
// valuesObj
|
||||||
|
// );
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
// console.log("on save:", valuesObj);
|
||||||
|
updateCaseProgress(
|
||||||
|
valuesObj,
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
{/* <span
|
||||||
|
onClick={() =>
|
||||||
|
setCurrentSection(sectionCount + 1)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
goto check
|
||||||
|
</span> */}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
|
{props.sectionCount == currentSection ? (
|
||||||
|
<>
|
||||||
|
<div>
|
||||||
|
{showCompletedUploadFiles
|
||||||
|
? "UPlodeding, pleas ewait "
|
||||||
|
: ""}
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
disabled={!isProgressComplete(progObj)}
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:submit-button")}{" "}
|
||||||
|
</button>
|
||||||
{savingStatus ? (
|
{savingStatus ? (
|
||||||
<span className=" progress-save-active">
|
<span className=" progress-save-active">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
@@ -476,71 +602,7 @@ let BuildSection = (props) => {
|
|||||||
"_pinswg_appellant_value"
|
"_pinswg_appellant_value"
|
||||||
];
|
];
|
||||||
|
|
||||||
// console.log("on save:", valuesObj);
|
//console.log("on save:", valuesObj);
|
||||||
updateCaseProgress(
|
|
||||||
valuesObj,
|
|
||||||
true,
|
|
||||||
true
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("common:save-exit-button")}
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
{/* <span
|
|
||||||
onClick={() =>
|
|
||||||
setCurrentSection(sectionCount + 1)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
goto check
|
|
||||||
</span> */}
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
{props.sectionCount == currentSection ? (
|
|
||||||
<>
|
|
||||||
<button
|
|
||||||
disabled={!isProgressComplete(progObj)}
|
|
||||||
type="submit"
|
|
||||||
className="govuk-button"
|
|
||||||
data-module="govuk-button"
|
|
||||||
>
|
|
||||||
{t("common:submit-button")}
|
|
||||||
</button>
|
|
||||||
{savingStatus ? (
|
|
||||||
<span className=" progress-save-active">
|
|
||||||
{router.locale == "cy"
|
|
||||||
? "Nôl data"
|
|
||||||
: "Saving data"}
|
|
||||||
<img
|
|
||||||
className="data-loading-icon"
|
|
||||||
src="/assets/images/loading.gif"
|
|
||||||
alt={
|
|
||||||
router.locale == "cy"
|
|
||||||
? "Nôl data"
|
|
||||||
: "Saving data"
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<button
|
|
||||||
className="govuk-button progress-save "
|
|
||||||
onClick={() => {
|
|
||||||
let valuesObj =
|
|
||||||
props.props.form[props.form]
|
|
||||||
.values || {};
|
|
||||||
|
|
||||||
console.log(
|
|
||||||
"valuesobj:",
|
|
||||||
valuesObj
|
|
||||||
);
|
|
||||||
|
|
||||||
delete valuesObj[
|
|
||||||
"_pinswg_appellant_value"
|
|
||||||
];
|
|
||||||
|
|
||||||
console.log("on save:", valuesObj);
|
|
||||||
updateCaseProgress(
|
updateCaseProgress(
|
||||||
valuesObj,
|
valuesObj,
|
||||||
true,
|
true,
|
||||||
@@ -589,40 +651,6 @@ let BuildSection = (props) => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
||||||
|
|
||||||
{/*
|
|
||||||
Mpved save and exit button from progess section
|
|
||||||
{savingStatus ? (
|
|
||||||
<span className=" progress-save-active">
|
|
||||||
{router.locale == "cy" ? "Nôl data" : "Saving data"}
|
|
||||||
<img
|
|
||||||
className="data-loading-icon"
|
|
||||||
src="/assets/images/loading.gif"
|
|
||||||
alt={
|
|
||||||
router.locale == "cy"
|
|
||||||
? "Nôl data"
|
|
||||||
: "Saving data"
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<button
|
|
||||||
className="govuk-button progress-save "
|
|
||||||
onClick={() => {
|
|
||||||
let valuesObj =
|
|
||||||
props.props.form[props.form].values || {};
|
|
||||||
|
|
||||||
console.log("valuesobj:", valuesObj);
|
|
||||||
|
|
||||||
delete valuesObj["_pinswg_appellant_value"];
|
|
||||||
|
|
||||||
console.log("on save:", valuesObj);
|
|
||||||
updateCaseProgress(valuesObj, true, true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("common:save-exit-button")}
|
|
||||||
</button>
|
|
||||||
)} */}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -637,12 +665,14 @@ const mapStateToProps = (state, ownProps) => {
|
|||||||
formData: state.formData,
|
formData: state.formData,
|
||||||
appealType: state.appealType,
|
appealType: state.appealType,
|
||||||
initialValues: state.appealType.caseReference.caseDetails,
|
initialValues: state.appealType.caseReference.caseDetails,
|
||||||
|
currentView: state.currentView,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
search: state.search,
|
search: state.search,
|
||||||
searchResultsObj: state.searchResultsObj,
|
searchResultsObj: state.searchResultsObj,
|
||||||
formData: state.formData,
|
formData: state.formData,
|
||||||
appealType: state.appealType,
|
appealType: state.appealType,
|
||||||
|
currentView: state.currentView,
|
||||||
//form: state.form,
|
//form: state.form,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -664,11 +694,62 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
setNewAppealProgress: (progressObj) => {
|
setNewAppealProgress: (progressObj) => {
|
||||||
dispatch(setNewAppealProgress(progressObj));
|
dispatch(setNewAppealProgress(progressObj));
|
||||||
},
|
},
|
||||||
|
setFileCount: (fileCount) => {
|
||||||
|
dispatch(setFileCount(fileCount));
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const selector = formValueSelector("appealForm"); // <-- same as form name
|
const selector = formValueSelector("appealForm"); // <-- same as form name
|
||||||
|
|
||||||
|
const validate = (values, props) => {
|
||||||
|
const errors = {};
|
||||||
|
|
||||||
|
const strippedHtml = (htmlStr) => {
|
||||||
|
return htmlStr.replace(/(<([^>]+)>)/gi, "").trim();
|
||||||
|
};
|
||||||
|
|
||||||
|
const locale = props.currentView.locale;
|
||||||
|
|
||||||
|
if (values.hasOwnProperty("pinswg_attachsoc")) {
|
||||||
|
if (values.pinswg_attachsoc == "false") {
|
||||||
|
if (values.hasOwnProperty("pinswg_statementofcase")) {
|
||||||
|
if (strippedHtml(values.pinswg_statementofcase).length == 0)
|
||||||
|
errors.pinswg_statementofcase =
|
||||||
|
locale != "cy"
|
||||||
|
? "Submit your Statement of Case or select Yes to attach a separate Statement of Case Document"
|
||||||
|
: "Cyflwynwch eich Datganiad Achos neu dewiswch Ie i atodi Dogfen Datganiad Achos ar wahân";
|
||||||
|
} else {
|
||||||
|
errors.pinswg_statementofcase =
|
||||||
|
locale != "cy"
|
||||||
|
? "Submit your Statement of Case or select Yes to attach a separate Statement of Case Document"
|
||||||
|
: "Cyflwynwch eich Datganiad Achos neu dewiswch Ie i atodi Dogfen Datganiad Achos ar wahân";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (values.hasOwnProperty("pinswg_costappliedforindicator")) {
|
||||||
|
if (values.pinswg_costappliedforindicator == "true") {
|
||||||
|
if (values.pinswg_attachcostapplication == "false") {
|
||||||
|
if (values.hasOwnProperty("pinswg_costapplication")) {
|
||||||
|
if (strippedHtml(values.pinswg_costapplication).length == 0)
|
||||||
|
errors.pinswg_costapplication =
|
||||||
|
locale != "cy"
|
||||||
|
? "Submit a Costs application or select Yes to attach a separate Costs application"
|
||||||
|
: "Cyflwyno cais Costau neu ddewis Ie i atodi cais Costau ar wahân";
|
||||||
|
} else {
|
||||||
|
errors.pinswg_costapplication =
|
||||||
|
locale != "cy"
|
||||||
|
? "Submit a Costs application or select Yes to attach a separate Costs application"
|
||||||
|
: "Cyflwyno cais Costau neu ddewis Ie i atodi cais Costau ar wahân";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors;
|
||||||
|
};
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
@@ -677,5 +758,6 @@ export default connect(
|
|||||||
form: "appealForm",
|
form: "appealForm",
|
||||||
destroyOnUnmount: false,
|
destroyOnUnmount: false,
|
||||||
enableReinitialize: true, // this is needed!!
|
enableReinitialize: true, // this is needed!!
|
||||||
|
validate,
|
||||||
})(BuildSection)
|
})(BuildSection)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -123,13 +123,13 @@ let CompleteAppeal = (props) => {
|
|||||||
{t("newappeal:new-appeal-complete-paragraph-2")}
|
{t("newappeal:new-appeal-complete-paragraph-2")}
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("newappeal:new-appeal-complete-paragraph-3")}::
|
{t("newappeal:new-appeal-complete-paragraph-3")}
|
||||||
<Link href={"mailto:" + t("home:login-contact-email")}>
|
<Link href={"mailto:" + t("home:login-contact-email")}>
|
||||||
{t("home:login-contact-email")}
|
{t("home:login-contact-email")}
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("newappeal:new-appeal-complete-paragraph-4")}:
|
{t("newappeal:new-appeal-complete-paragraph-4")}
|
||||||
{router.locale == "cy" ? (
|
{router.locale == "cy" ? (
|
||||||
<Link href="https://www.llyw.cymru/diweddariad-i-wasanaeth-penderfyniadau-cynllunio-ac-amgylchedd-cymru-pcac">
|
<Link href="https://www.llyw.cymru/diweddariad-i-wasanaeth-penderfyniadau-cynllunio-ac-amgylchedd-cymru-pcac">
|
||||||
https://www.llyw.cymru/diweddariad-i-wasanaeth-penderfyniadau-cynllunio-ac-amgylchedd-cymru-pcac
|
https://www.llyw.cymru/diweddariad-i-wasanaeth-penderfyniadau-cynllunio-ac-amgylchedd-cymru-pcac
|
||||||
|
|||||||
@@ -65,12 +65,14 @@ const RenderLPAList = ({
|
|||||||
value={optionsObj[key].accountid}
|
value={optionsObj[key].accountid}
|
||||||
>
|
>
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
optionsObj[key].name +
|
optionsObj[key].name +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: optionsObj[key].name}
|
: optionsObj[key].name}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
@@ -147,12 +149,14 @@ const RenderAppealTypeList = ({
|
|||||||
: _.isEmpty(optionsObj[key].value)
|
: _.isEmpty(optionsObj[key].value)
|
||||||
? ""
|
? ""
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath({
|
||||||
'$..[?(@.value=="' +
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
optionsObj[key].value +
|
optionsObj[key].value +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
json: transLookup,
|
||||||
)
|
eval: true,
|
||||||
|
})
|
||||||
: optionsObj[key].value}
|
: optionsObj[key].value}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
@@ -372,25 +376,15 @@ let CreateCase = (props) => {
|
|||||||
|
|
||||||
const { LPAData, onSubmit, handleSubmit, formData } = props;
|
const { LPAData, onSubmit, handleSubmit, formData } = props;
|
||||||
|
|
||||||
const appealOptionsObj = _.isEmpty(props)
|
const appealOptionsObj =
|
||||||
? [{}]
|
props?.appealType?.appealTypeOptions?.value?.length > 0
|
||||||
: _.isEmpty(props.appealType)
|
? props.appealType.appealTypeOptions.value
|
||||||
? [{}]
|
: [{}];
|
||||||
: _.isEmpty(props.appealType.appealTypeOptions)
|
|
||||||
? [{}]
|
|
||||||
: _.isEmpty(props.appealType.appealTypeOptions.value)
|
|
||||||
? [{}]
|
|
||||||
: props.appealType.appealTypeOptions.value;
|
|
||||||
|
|
||||||
let lpaOptionsObj = _.isEmpty(props)
|
const lpaOptionsObj =
|
||||||
? [{}]
|
props?.LPAData?.LPAData?.value?.length > 0
|
||||||
: _.isEmpty(props.LPAData)
|
? props.LPAData.LPAData.value
|
||||||
? [{}]
|
: [{}];
|
||||||
: _.isEmpty(props.LPAData.LPAData)
|
|
||||||
? [{}]
|
|
||||||
: _.isEmpty(props.LPAData.LPAData)
|
|
||||||
? [{}]
|
|
||||||
: props.LPAData.LPAData.value;
|
|
||||||
|
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user