Compare commits
880
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 | ||
|
|
0059c13966 | ||
|
|
dc71d16a1f | ||
|
|
02d1bb313f | ||
|
|
a1524c5018 | ||
|
|
fc4f5928ef | ||
|
|
113c39a7e9 | ||
|
|
4dc1e4f233 | ||
|
|
5458fddc99 | ||
|
|
f678b5a2ff | ||
|
|
22aa3e8404 | ||
|
|
7d6115486a | ||
|
|
cb96609f54 | ||
|
|
781c77840d | ||
|
|
a000c70243 | ||
|
|
5eeb098ae0 | ||
|
|
a2ff59f32d | ||
|
|
934342b8e3 | ||
|
|
9e345631f6 | ||
|
|
bb4df4c195 | ||
|
|
8239d9ff77 | ||
|
|
ba05741b8e | ||
|
|
de8319db54 | ||
|
|
8fbec7e794 | ||
|
|
9509971ffd | ||
|
|
062d8e8cb5 | ||
|
|
589577fb45 | ||
|
|
a362a2c00f | ||
|
|
00359e2f7d | ||
|
|
67782a35da | ||
|
|
9bc8b65e3d | ||
|
|
79e1afb3e1 | ||
|
|
d53c49ba56 | ||
|
|
90780354f6 | ||
|
|
a86a75676d | ||
|
|
a15482bb63 | ||
|
|
c658e8065a | ||
|
|
3135eb345d | ||
|
|
8ce491846b | ||
|
|
8dbfda7dde | ||
|
|
fe5c683a80 | ||
|
|
390c010e7c | ||
|
|
2839a91195 | ||
|
|
c0404d138a | ||
|
|
afe79b079a | ||
|
|
570b7ff79d | ||
|
|
f6f69a6305 | ||
|
|
d8bf893049 | ||
|
|
3cb22b0415 | ||
|
|
2fd0396566 | ||
|
|
e9668a67ec | ||
|
|
279af0184d | ||
|
|
88ab1f3fc5 | ||
|
|
88fa4d90f0 | ||
|
|
80f499c072 | ||
|
|
c93e9e0056 | ||
|
|
c73cf2a013 | ||
|
|
83d9df0219 | ||
|
|
795dc5a39d | ||
|
|
fd1d38c3ba | ||
|
|
c6c37f27ac | ||
|
|
0886367f9c | ||
|
|
07de9705e4 | ||
|
|
b49016270e | ||
|
|
8b2dc95e84 | ||
|
|
4091bfa82e | ||
|
|
c134af5450 | ||
|
|
37ab7e5248 | ||
|
|
6e692ebef3 | ||
|
|
b02b7d937e | ||
|
|
45e359155d | ||
|
|
9b5f6d4f74 | ||
|
|
ce3b8cbad2 | ||
|
|
be99db0774 | ||
|
|
d01179c724 | ||
|
|
b0e2bb6e14 | ||
|
|
e4a1903b48 | ||
|
|
2b9c160aee | ||
|
|
e8c3d97f30 | ||
|
|
da05499a12 | ||
|
|
f8a2d44443 | ||
|
|
ab7f050a1e | ||
|
|
8807eb32ac | ||
|
|
247230f1cd | ||
|
|
94868a6d31 | ||
|
|
a2d3d8352c | ||
|
|
6e0e44567a | ||
|
|
6f6262fefa | ||
|
|
28db6d87f5 | ||
|
|
04b3326e4e | ||
|
|
87672a14b9 | ||
|
|
300a45ee0f | ||
|
|
2a6cd32452 | ||
|
|
3284bce649 | ||
|
|
8f08ce35df | ||
|
|
557d81110a | ||
|
|
5001fbcbfe | ||
|
|
7d82328b02 | ||
|
|
adc657c383 | ||
|
|
ef630596e2 | ||
|
|
787e06ceb8 | ||
|
|
ef2e41a377 | ||
|
|
daef08f98f | ||
|
|
53e96b18bd | ||
|
|
04dec99af1 | ||
|
|
c947995e7b | ||
|
|
c63ea33c64 | ||
|
|
4c534f9319 | ||
|
|
9fa64d4b30 | ||
|
|
04b0ea9f0e | ||
|
|
c9fa8c4177 | ||
|
|
7bba9ea362 | ||
|
|
86ead475c0 | ||
|
|
cf8ff7f45f | ||
|
|
ec6c76ded0 | ||
|
|
2c41f2476b | ||
|
|
9b8936198a | ||
|
|
01f2d7d766 | ||
|
|
d2f1a7d8b7 | ||
|
|
0878fd1575 | ||
|
|
371ebceb49 | ||
|
|
ab54fdd8d8 | ||
|
|
fa117fdd1a | ||
|
|
9549318b64 | ||
|
|
c40c41d5b3 | ||
|
|
f8b7d22802 | ||
|
|
229e21cdb0 | ||
|
|
8b385217c3 | ||
|
|
6b36c5dc51 | ||
|
|
980f6b1cd0 | ||
|
|
df705aa501 | ||
|
|
6714de87b4 | ||
|
|
cf798f57cf | ||
|
|
c546ea6c04 | ||
|
|
63c91de09e | ||
|
|
30ee6f02d7 | ||
|
|
8fad2208f6 | ||
|
|
59907fed0a | ||
|
|
871710b00f | ||
|
|
8eae6d1f38 | ||
|
|
5022afe05d | ||
|
|
a5d7fe2b74 | ||
|
|
ddfef67fa9 | ||
|
|
37233b4c1a | ||
|
|
4f10118020 | ||
|
|
6282388021 | ||
|
|
f2efa2a6cf | ||
|
|
c00eef718c | ||
|
|
56fbb3fdc0 | ||
|
|
6978c37592 | ||
|
|
6bf933b2f1 | ||
|
|
f4c821a5d4 | ||
|
|
a7d3cfdd3f | ||
|
|
df6007dde3 | ||
|
|
d829213a6a | ||
|
|
206d08fa5e | ||
|
|
bba054e698 | ||
|
|
7938da6472 | ||
|
|
20a15d424f | ||
|
|
5a8e1e8d5b | ||
|
|
9f3f1c996c | ||
|
|
90e9c6335e | ||
|
|
0e3df85fdc | ||
|
|
5987ecacf2 | ||
|
|
2722d472e3 | ||
|
|
d5e8a00350 | ||
|
|
c3b5f1a6ce | ||
|
|
62e8179e3a | ||
|
|
c94e61196a | ||
|
|
815a8ec818 | ||
|
|
b57d73dec3 | ||
|
|
322078ce7f | ||
|
|
af5a1c037a | ||
|
|
08ddfa386a | ||
|
|
5eab395968 | ||
|
|
e401a5b10e | ||
|
|
bc5ad561ab | ||
|
|
33d3ab0fda | ||
|
|
4d7a56f31d | ||
|
|
4735993ae5 | ||
|
|
467852cb07 | ||
|
|
46582d761c | ||
|
|
e420f66ced | ||
|
|
0f3d20ca80 | ||
|
|
0bcb4462a9 | ||
|
|
eb08e67546 | ||
|
|
d22651f4f6 | ||
|
|
4010712e93 | ||
|
|
d6c43409bf | ||
|
|
7976ac9bfb | ||
|
|
7eb4949643 | ||
|
|
923ed0c47d | ||
|
|
25bb0fa421 | ||
|
|
5a411dc290 | ||
|
|
d2cfbdb6f6 | ||
|
|
3fb9a7fbfb | ||
|
|
cfc58e9619 | ||
|
|
821b534e7b | ||
|
|
07faac40a7 | ||
|
|
51f2a74b9b | ||
|
|
53c78e07d8 | ||
|
|
2d906fd360 | ||
|
|
550c4ee3b5 | ||
|
|
89c02fda6d | ||
|
|
b6f40bea45 | ||
|
|
5e5f6e5c82 | ||
|
|
1b8db8044d | ||
|
|
695a16c5a6 | ||
|
|
af2b7f2063 | ||
|
|
147299ba78 | ||
|
|
38f373864e | ||
|
|
a1e297f862 | ||
|
|
ab59f01bce | ||
|
|
bb718c3b0c | ||
|
|
72a540436b | ||
|
|
6ed1d36c3c | ||
|
|
cb27f80e7f | ||
|
|
282879c702 | ||
|
|
d28ba5037b | ||
|
|
f80f020636 | ||
|
|
f50b893c1f | ||
|
|
8a2724d5de | ||
|
|
30d75493a4 | ||
|
|
ba06f14b4a | ||
|
|
44f067d2aa | ||
|
|
7014323161 | ||
|
|
c8aa3db174 | ||
|
|
a836c667b8 | ||
|
|
f2e143ab1f | ||
|
|
2e812b546d | ||
|
|
20cd10394f | ||
|
|
37d76d3dc9 | ||
|
|
fac12242e9 | ||
|
|
e532e0a0ab | ||
|
|
31ab76a9fe | ||
|
|
298436544b | ||
|
|
24eed0e44b | ||
|
|
fe89da6a55 | ||
|
|
86f15ba949 | ||
|
|
9142870457 | ||
|
|
51a09dc546 | ||
|
|
57ba3b8f52 | ||
|
|
802bb3c9f7 | ||
|
|
37b9549cd1 | ||
|
|
2f3902a119 | ||
|
|
49f6c76e2f | ||
|
|
e2edee35c6 | ||
|
|
ff6ff9842c | ||
|
|
a973f94995 | ||
|
|
292f28364a | ||
|
|
f5409ff243 | ||
|
|
e218a027d9 | ||
|
|
50e97f2d84 | ||
|
|
1bde89454f | ||
|
|
dc933087d2 | ||
|
|
7c09367be4 | ||
|
|
20226bab8d | ||
|
|
7d37babfff | ||
|
|
876dc5bd92 | ||
|
|
ef009fcea1 | ||
|
|
15f4f10a10 | ||
|
|
7aea356a52 | ||
|
|
dbf1bcdd35 | ||
|
|
aade8ec7d3 | ||
|
|
e8c4f9a903 | ||
|
|
e0f8cf57b1 | ||
|
|
c9f9aa65f5 | ||
|
|
6cc8d8aa8d | ||
|
|
f177a6bf2e | ||
|
|
1049da3787 | ||
|
|
bb4c783b9a | ||
|
|
c929aaa493 | ||
|
|
10756a54b4 | ||
|
|
f434fcf4f8 | ||
|
|
25d611b3e4 | ||
|
|
e99a0263af | ||
|
|
3ede3985b4 | ||
|
|
abf280a990 | ||
|
|
4824bf5d9d | ||
|
|
60b610054b | ||
|
|
cb7647f237 | ||
|
|
fc7b9a5d2c | ||
|
|
683c486b14 | ||
|
|
4d037ffeb8 | ||
|
|
866b085254 | ||
|
|
82dbeb8d16 | ||
|
|
17a1f1f414 | ||
|
|
2f676805a5 | ||
|
|
5596c8d570 | ||
|
|
dcdda6eb6e | ||
|
|
7dbc978f00 | ||
|
|
c98e05d549 | ||
|
|
cf04ceba50 | ||
|
|
114f57aa5d | ||
|
|
cb5280b525 | ||
|
|
d09782aa41 | ||
|
|
401dcbceac | ||
|
|
6e9a1ace97 | ||
|
|
3135f4e1a6 | ||
|
|
d3b9b1bf34 | ||
|
|
e12bcbd60c | ||
|
|
a404f3f238 | ||
|
|
41861d8e98 | ||
|
|
c7fba57922 | ||
|
|
2af463fbe9 | ||
|
|
f034f4be3d | ||
|
|
60ac61b23e | ||
|
|
7059e37fb5 | ||
|
|
12d1fbc55e | ||
|
|
1e1b97f2a9 | ||
|
|
87019693e2 | ||
|
|
c3a4b4bb10 | ||
|
|
3e83332d28 | ||
|
|
888ddf60bd | ||
|
|
79da26733c | ||
|
|
c5f61da8ed | ||
|
|
b7a643a6b1 | ||
|
|
a650452d18 | ||
|
|
6e4287b591 | ||
|
|
5f317cdef5 | ||
|
|
89c38fe4c9 | ||
|
|
9e3454e7bf | ||
|
|
d04eac4913 | ||
|
|
e53592b953 | ||
|
|
01f768c624 | ||
|
|
d8fc51c281 | ||
|
|
2f7790e66a | ||
|
|
2b203f6b2b | ||
|
|
5f82c59abb | ||
|
|
e0badd6b11 | ||
|
|
5ffd09f825 | ||
|
|
593d416c18 | ||
|
|
1afb2da7de | ||
|
|
30ff0f294b | ||
|
|
6ec0d58aff | ||
|
|
197313e9fa | ||
|
|
e7f4c5d847 | ||
|
|
1f677139f1 | ||
|
|
d22045c9c5 | ||
|
|
6426f8370b | ||
|
|
7e4de4e694 | ||
|
|
72c44cd8f3 | ||
|
|
ccd3b8ffc5 | ||
|
|
3c8fd36f7d | ||
|
|
0714a09f49 | ||
|
|
6a18c7df09 | ||
|
|
ad618376d2 | ||
|
|
d313ce6592 | ||
|
|
33df7e25d7 | ||
|
|
b0e740ba8c | ||
|
|
98e32f0b20 | ||
|
|
e0a26a3fa4 | ||
|
|
6a927155bc | ||
|
|
ef1f773022 | ||
|
|
e7afa582ff | ||
|
|
08552da757 | ||
|
|
1477ed74e4 | ||
|
|
2cbd2d731c | ||
|
|
48bfa5e0be | ||
|
|
1807749bba | ||
|
|
f3da69dc75 | ||
|
|
fdf5be3415 | ||
|
|
c4fcb6fa56 | ||
|
|
798ba01ea6 | ||
|
|
0c98bcd831 | ||
|
|
0f0e3ed85e | ||
|
|
f53faf47e2 | ||
|
|
1f669a5efe | ||
|
|
f78210c24c | ||
|
|
2ce248fba8 | ||
|
|
b56f73d854 | ||
|
|
41847b3433 | ||
|
|
34c3e06ee3 | ||
|
|
dcf220198d | ||
|
|
daa8b1c96d | ||
|
|
3ff708737c | ||
|
|
31375a5999 | ||
|
|
3dd4525770 | ||
|
|
275258562e | ||
|
|
dc43d7f2b4 | ||
|
|
98ed833a47 | ||
|
|
53914bfe80 | ||
|
|
091e23c820 | ||
|
|
6dc71b894a | ||
|
|
d8f0972170 | ||
|
|
c38d67a37f | ||
|
|
9fe6c24f71 | ||
|
|
fc5217daf8 | ||
|
|
316e66a96f | ||
|
|
1e5a007c5e | ||
|
|
511520bb84 | ||
|
|
31362e4446 | ||
|
|
a2ee8c58a6 | ||
|
|
b8de41e592 | ||
|
|
cdc687959b | ||
|
|
061fd71e1e | ||
|
|
2a5ea53536 | ||
|
|
d3bba6c620 | ||
|
|
0c1de7d26b | ||
|
|
ee4d00a500 | ||
|
|
98aefdd867 |
+119
@@ -0,0 +1,119 @@
|
|||||||
|
ACCESS_TOKEN_ENDPOINT = https://login.microsoftonline.com/
|
||||||
|
//ESNR Tenant
|
||||||
|
//TENANT = a8d860de-d5e1-45af-8376-d93f02e6b502
|
||||||
|
//WGO Tenant
|
||||||
|
TENANT = 9ac1a5ab-cd58-409e-a1b6-6b10422a68f5
|
||||||
|
GRANT_TYPE = "client_credentials"
|
||||||
|
|
||||||
|
HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
||||||
|
NEXT_PUBLIC_HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
||||||
|
|
||||||
|
|
||||||
|
//Dev oauth ESNR
|
||||||
|
CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
||||||
|
//CLIENT_SECRET = 4Vt8Q~olL1hx7n01B0~tXf-N2YL5DyC_Fk6waagX
|
||||||
|
CLIENT_SECRET = AU88Q~NBOVOXqwb4mBx9y.NMIZ9s1o7boqZoKcSE
|
||||||
|
RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||||
|
RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||||
|
RELAYPATH = "dev-pedw-hc"
|
||||||
|
|
||||||
|
|
||||||
|
//Test Oauth ESNR
|
||||||
|
//CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
||||||
|
//CLIENT_SECRET = IXI8Q~D5oqsC-nrtayHHc~tUAfjQFzNiKVQ~fc2S
|
||||||
|
//RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
||||||
|
//RELAYURI = "test-pedw-ns.servicebus.windows.net"
|
||||||
|
//RELAYPATH = "test-pedw-hc"
|
||||||
|
|
||||||
|
|
||||||
|
//Preprod Oauth WGO
|
||||||
|
//CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
||||||
|
//CLIENT_SECRET = Ioo7Q~RJfhWsE45wPsuHm1CzRk1SppnNN3lZF
|
||||||
|
//RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/
|
||||||
|
//RELAYURI = "pp-pedw-ns.servicebus.windows.net"
|
||||||
|
//RELAYPATH = "pp-pedw-hc"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Prod Oauth WGO
|
||||||
|
//CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc
|
||||||
|
//CLIENT_SECRET = mJN7Q~lFu.xFGa5KCc.zwIm_fJAWxajyQaFo~
|
||||||
|
//RELAY_ROOT = https://prod-pedw-ns.servicebus.windows.net/prod-pedw-hc/
|
||||||
|
//RELAYURI = "prod-pedw-ns.servicebus.windows.net"
|
||||||
|
//RELAYPATH = "prod-pedw-hc"
|
||||||
|
|
||||||
|
|
||||||
|
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||||
|
SHOWLOGIN = "true"
|
||||||
|
SHOWREPRESENTATIONS = true
|
||||||
|
SHOWFILEUPLOAD = "false"
|
||||||
|
SHOWMAPS = "false"
|
||||||
|
//BASIC_AUTH_CREDENTIALS = pinswg:password|pinswg2:password2
|
||||||
|
|
||||||
|
|
||||||
|
PORT= "3000"
|
||||||
|
DEFAULT_DOMAIN = "localhost"
|
||||||
|
I18N_DOMAIN = "cymru.local"
|
||||||
|
//I18N_DOMAIN ="dev-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
||||||
|
//I18N_DOMAIN ="stage-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
||||||
|
//I18N_DOMAIN ="pp-gwaithcynllunio.gwasanaeth.llyw.cymru"s
|
||||||
|
//I18N_DOMAIN ="gwaithcynllunio.gwasanaeth.llyw.cymru"
|
||||||
|
|
||||||
|
|
||||||
|
//gov gateway
|
||||||
|
GG_PROVIDER_CONFIG_ENDPOINT = "https://api.ete.access.service.gov.uk/.well-known/openid-configuration"
|
||||||
|
GG_CLIENT_ID = 5vTukeSpN7d6uBV7YLb7A5wOctzzkZ
|
||||||
|
GG_CLIENT_SECRET = z1PGLAKPxIhjMBegTdzX22AayIORc1GsCbMQZ6mieBn7zChjzzxup5lkIByEmsYS
|
||||||
|
//GG_REDIRECT_URI = "http://localhost:3000"
|
||||||
|
GG_REDIRECT_URI = "https://dev-planningcasework.service.gov.wales"
|
||||||
|
|
||||||
|
NEXT_PUBLIC_GG_CLIENT_ID = 5vTukeSpN7d6uBV7YLb7A5wOctzzkZ
|
||||||
|
NEXT_PUBLIC_GG_REDIRECT_URI = "http://localhost:3000"
|
||||||
|
|
||||||
|
API_ROOT = "http://localhost:3000"
|
||||||
|
|
||||||
|
|
||||||
|
GOOGLE_MAP_API_KEY = AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Next Auth vars
|
||||||
|
//EMAIL_SERVER_HOST=smtp.sendgrid.net
|
||||||
|
//EMAIL_SERVER_PORT=465
|
||||||
|
//EMAIL_SERVER_USER=apikey
|
||||||
|
//EMAIL_SERVER_PASSWORD=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
|
||||||
|
//EMAIL_FROM=rob@rdbsolutions.co.uk
|
||||||
|
|
||||||
|
|
||||||
|
EMAIL_SERVER_HOST=rdbdigital.com
|
||||||
|
EMAIL_SERVER_PORT=465
|
||||||
|
EMAIL_SERVER_USER=rob@rdbdigital.com
|
||||||
|
EMAIL_SERVER_PASSWORD=!Sky9fish2020
|
||||||
|
EMAIL_FROM=no-reply@rdbdigital.com
|
||||||
|
|
||||||
|
NEXTAUTH_URL=http://localhost:3000
|
||||||
|
NEXTAUTH_URL_INTERNAL=http://localhost:3000
|
||||||
|
//DATABASE_URL=mysql://nextAuthAdmin:!Sky9fish1972@77.68.17.157:3306/nextauthDB?synchronise=true
|
||||||
|
DATABASE_URL = sqlserver://pedw-dev-test-sql-svr.database.windows.net:1433;database=PEDWDev;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
|
SECRET = SuperSecret
|
||||||
|
|
||||||
|
|
||||||
|
//Azure Storage Account
|
||||||
|
|
||||||
|
AZURE_CLIENT_ID = $CLIENT_ID
|
||||||
|
AZURE_TENANT_ID = $TENANT
|
||||||
|
AZURE_CLIENT_SECRET = $CLIENT_SECRET
|
||||||
|
AZURE_STORAGE_ACCOUNT_NAME= "pedwdev"
|
||||||
|
AZURE_STORAGE_ACCOUNT_KEY = JS3ZIXianhYhB1lZrHB+bXbdzaLlON0alCyKrFAb+jVEwr9iqo2dty92EBxwnufNFM+CSN/fKX2R+AStDn0byg==
|
||||||
|
|
||||||
|
|
||||||
|
AZURE_PEDW_STORAGE_ENDPOINT = https://pedwdev.blob.core.windows.net
|
||||||
|
AZURE_PEDW_CONTAINER = "pedwapplications"
|
||||||
|
AZURE_PEDW_QUEUE_ENDPOINT = https://$AZURE_STORAGE_ACCOUNT_NAME.queue.core.windows.net
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//gov.notify
|
||||||
|
|
||||||
|
NOTIFY_API_KEY = pedwnextauthkey-90f93710-9dae-423e-aea1-11eccd0dc132-0c9469d9-d671-444d-9e9d-3e5a62001043
|
||||||
+120
-89
@@ -1,118 +1,149 @@
|
|||||||
ACCESS_TOKEN_ENDPOINT = https://login.microsoftonline.com/
|
ACCESS_TOKEN_ENDPOINT = https://login.microsoftonline.com/
|
||||||
//ESNR Tenant
|
|
||||||
//TENANT = a8d860de-d5e1-45af-8376-d93f02e6b502
|
|
||||||
//WGO Tenant
|
|
||||||
TENANT = 9ac1a5ab-cd58-409e-a1b6-6b10422a68f5
|
TENANT = 9ac1a5ab-cd58-409e-a1b6-6b10422a68f5
|
||||||
GRANT_TYPE = "client_credentials"
|
GRANT_TYPE = "client_credentials"
|
||||||
|
|
||||||
HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
||||||
NEXT_PUBLIC_HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
|
||||||
|
# //CNR oauth CNR
|
||||||
|
# CLIENT_ID = 3125ac03-91ac-46a7-a166-0086f0ed90b3
|
||||||
|
# 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/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-cnr-uks-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-cnr-uks-01"
|
||||||
|
# CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
||||||
|
|
||||||
|
# //New Dev oauth ESNR
|
||||||
|
# CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
||||||
|
# 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/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-dev-uks-01"
|
||||||
|
# CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
||||||
|
|
||||||
|
# //New Test
|
||||||
|
# CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
||||||
|
# CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM
|
||||||
|
# RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-test-uks-01"
|
||||||
|
# CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS"
|
||||||
|
|
||||||
|
# //New PreProd
|
||||||
|
CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
||||||
|
CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E
|
||||||
|
RELAY_ROOT = https://ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-uks-01/
|
||||||
|
RELAYURI = "ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net"
|
||||||
|
RELAYPATH = "ar-hc-lz-pedw-ppe-uks-01"
|
||||||
|
# RELAY_ROOT = https://ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-ukw-01/
|
||||||
|
# RELAYURI = "ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net"
|
||||||
|
# RELAYPATH = "ar-hc-lz-pedw-ppe-ukw-01"
|
||||||
|
CRMURL = "ppcrm2016.llcdt.gov.wales/PPPINSWales"
|
||||||
|
|
||||||
|
|
||||||
//Dev oauth ESNR
|
# //Prod Oauth WGO
|
||||||
CLIENT_ID = 9b834097-03d7-409b-b038-ecfec31a394a
|
# CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc
|
||||||
//CLIENT_SECRET = 4Vt8Q~olL1hx7n01B0~tXf-N2YL5DyC_Fk6waagX
|
# CLIENT_SECRET = tFk8Q~E.R-HFjROTu1sRKqwb_ONzy05uPYoF6awR
|
||||||
CLIENT_SECRET = AU88Q~NBOVOXqwb4mBx9y.NMIZ9s1o7boqZoKcSE
|
# RELAY_ROOT = https://prod-pedw-ns.servicebus.windows.net/prod-pedw-hc/
|
||||||
RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
# RELAYURI = "prod-pedw-ns.servicebus.windows.net"
|
||||||
RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
# RELAYPATH = "prod-pedw-hc"
|
||||||
RELAYPATH = "dev-pedw-hc"
|
# CRMURL = "crm2016.llc.gov.wales/PEDW"
|
||||||
|
|
||||||
|
|
||||||
//Test Oauth ESNR
|
//GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||||
//CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
GOOGLE_TAG_MANAGER = G-GTWW3JT03Z
|
||||||
//CLIENT_SECRET = IXI8Q~D5oqsC-nrtayHHc~tUAfjQFzNiKVQ~fc2S
|
SHOWLOGIN = true
|
||||||
//RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
SHOWREPRESENTATIONS = true
|
||||||
//RELAYURI = "test-pedw-ns.servicebus.windows.net"
|
|
||||||
//RELAYPATH = "test-pedw-hc"
|
|
||||||
|
|
||||||
|
|
||||||
//Preprod Oauth WGO
|
|
||||||
//CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
|
||||||
//CLIENT_SECRET = Ioo7Q~RJfhWsE45wPsuHm1CzRk1SppnNN3lZF
|
|
||||||
//RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/
|
|
||||||
//RELAYURI = "pp-pedw-ns.servicebus.windows.net"
|
|
||||||
//RELAYPATH = "pp-pedw-hc"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Prod Oauth WGO
|
|
||||||
//CLIENT_ID = 3e4141a3-1fbd-454e-98f0-7f3a4f14a3cc
|
|
||||||
//CLIENT_SECRET = mJN7Q~lFu.xFGa5KCc.zwIm_fJAWxajyQaFo~
|
|
||||||
//RELAY_ROOT = https://prod-pedw-ns.servicebus.windows.net/prod-pedw-hc/
|
|
||||||
//RELAYURI = "prod-pedw-ns.servicebus.windows.net"
|
|
||||||
//RELAYPATH = "prod-pedw-hc"
|
|
||||||
|
|
||||||
|
|
||||||
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
|
||||||
SHOWLOGIN = "true"
|
|
||||||
SHOWREPRESENTATIONS = false
|
|
||||||
SHOWFILEUPLOAD = "false"
|
SHOWFILEUPLOAD = "false"
|
||||||
SHOWMAPS = "true"
|
SHOWMAPS = false
|
||||||
//BASIC_AUTH_CREDENTIALS = pinswg:password|pinswg2:password2
|
|
||||||
|
|
||||||
|
|
||||||
PORT= "3000"
|
|
||||||
DEFAULT_DOMAIN = "localhost"
|
|
||||||
I18N_DOMAIN = "cymru.local"
|
|
||||||
//I18N_DOMAIN ="dev-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
|
||||||
//I18N_DOMAIN ="stage-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
|
||||||
//I18N_DOMAIN ="pp-gwaithcynllunio.gwasanaeth.llyw.cymru"s
|
|
||||||
//I18N_DOMAIN ="gwaithcynllunio.gwasanaeth.llyw.cymru"
|
|
||||||
|
|
||||||
|
|
||||||
//gov gateway
|
|
||||||
GG_PROVIDER_CONFIG_ENDPOINT = "https://api.ete.access.service.gov.uk/.well-known/openid-configuration"
|
|
||||||
GG_CLIENT_ID = 5vTukeSpN7d6uBV7YLb7A5wOctzzkZ
|
|
||||||
GG_CLIENT_SECRET = z1PGLAKPxIhjMBegTdzX22AayIORc1GsCbMQZ6mieBn7zChjzzxup5lkIByEmsYS
|
|
||||||
//GG_REDIRECT_URI = "http://localhost:3000"
|
|
||||||
GG_REDIRECT_URI = "https://dev-planningcasework.service.gov.wales"
|
|
||||||
|
|
||||||
NEXT_PUBLIC_GG_CLIENT_ID = 5vTukeSpN7d6uBV7YLb7A5wOctzzkZ
|
|
||||||
NEXT_PUBLIC_GG_REDIRECT_URI = "http://localhost:3000"
|
|
||||||
|
|
||||||
API_ROOT = "http://localhost:3000"
|
API_ROOT = "http://localhost:3000"
|
||||||
|
CY_API_ROOT = "http://cymru.local:3000"
|
||||||
|
I18N_DOMAIN = "cymru.local"
|
||||||
|
DOCAPI_OFFLINE = "12:00:00,14:00:00"
|
||||||
|
SHOWFILTERDOCS = false
|
||||||
|
|
||||||
|
|
||||||
GOOGLE_MAP_API_KEY = AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo
|
// Next Auth vars
|
||||||
|
NEXTAUTH_URL = $API_ROOT
|
||||||
|
NEXTAUTH_URL_INTERNAL = $API_ROOT
|
||||||
|
NEXTAUTH_SECRET = SuperSecret
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// dev test sql server
|
||||||
|
# DATABASE_URL = sqlserver://pedw-dev-test-sql-svr.database.windows.net:1433;database=PEDWDev;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
# DATABASE_URL = sqlserver://sql-srv-plt-pedw-dev-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
||||||
|
|
||||||
|
// Pre prod sql server
|
||||||
|
DATABASE_URL = sqlserver://sql-srv-plt-pedw-ppe-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustservercertificate=true;hostnameincertificate=*.database.windows.net;logintimeout=30;authentication=SqlPassword
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
|
||||||
|
SECRET = SuperSecret
|
||||||
|
|
||||||
//Next Auth vars
|
|
||||||
//EMAIL_SERVER_HOST=smtp.sendgrid.net
|
|
||||||
//EMAIL_SERVER_PORT=465
|
|
||||||
//EMAIL_SERVER_USER=apikey
|
|
||||||
//EMAIL_SERVER_PASSWORD=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
|
|
||||||
//EMAIL_FROM=rob@rdbsolutions.co.uk
|
|
||||||
|
|
||||||
|
|
||||||
EMAIL_SERVER_HOST=rdbdigital.com
|
|
||||||
EMAIL_SERVER_PORT=465
|
|
||||||
EMAIL_SERVER_USER=rob@rdbdigital.com
|
|
||||||
EMAIL_SERVER_PASSWORD=!Sky9fish2020
|
|
||||||
EMAIL_FROM=no-reply@rdbdigital.com
|
|
||||||
|
|
||||||
NEXTAUTH_URL=http://localhost:3000
|
|
||||||
NEXTAUTH_URL_INTERNAL=http://localhost:3000
|
|
||||||
//DATABASE_URL=mysql://nextAuthAdmin:!Sky9fish1972@77.68.17.157:3306/nextauthDB?synchronise=true
|
|
||||||
DATABASE_URL = sqlserver://pedw-dev-test-sql-svr.database.windows.net:1433;database=PEDWDev;user=RobBondSQL;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
|
|
||||||
|
|
||||||
SECRET=SuperSecret
|
|
||||||
|
|
||||||
|
|
||||||
//Azure Storage Account
|
//Azure Storage Account
|
||||||
|
|
||||||
AZURE_CLIENT_ID = $CLIENT_ID
|
AZURE_CLIENT_ID = $CLIENT_ID
|
||||||
AZURE_TENANT_ID = $TENANT
|
AZURE_TENANT_ID = $TENANT
|
||||||
AZURE_CLIENT_SECRET = $CLIENT_SECRET
|
AZURE_CLIENT_SECRET = $CLIENT_SECRET
|
||||||
AZURE_STORAGE_ACCOUNT_KEY = JS3ZIXianhYhB1lZrHB+bXbdzaLlON0alCyKrFAb+jVEwr9iqo2dty92EBxwnufNFM+CSN/fKX2R+AStDn0byg==
|
|
||||||
|
// CNR key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwcnruks"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = hRffHq4IwctpaTKdS/U33Xq6nyTDF1t++WJgIwsw7gzstktZin/rRwbTIAL9KKqesVsK7EHrTTG6+ASt4+7skw==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwcnruks.blob.core.windows.net
|
||||||
|
|
||||||
|
// new dev key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwdevuks"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = MmrsrCjBfop9pI2oImsP/+lJUWU2DrXsAB8nq5bOVROTmPovSGxjCjKw9+TAFr00k8WDUK9r6mVx+AStcMLyAA==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwdevuks.blob.core.windows.net
|
||||||
|
|
||||||
|
// New test key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net
|
||||||
|
|
||||||
|
// New preprod key
|
||||||
|
AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwppeuks"
|
||||||
|
AZURE_STORAGE_ACCOUNT_KEY = B4GRKr+cA9b9mNM/GHFivzhzflJIZltG8bMmooXlYvGYySPAspTTHistAT30sHipnR+hh6dqUc9q+ASttAjPRQ==
|
||||||
|
AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwppeuks.blob.core.windows.net
|
||||||
|
|
||||||
|
|
||||||
|
// PROD key
|
||||||
|
# AZURE_STORAGE_ACCOUNT_NAME = "pedwprod"
|
||||||
|
# AZURE_STORAGE_ACCOUNT_KEY = koZ46STRqapSa2Dod8MLL6aju1eYLhhyJ6DXpCLMTnFLJvbDT6CHUv/jwr5U/Ta8a60MWzwToHQy+AStADO7sg==
|
||||||
|
# AZURE_PEDW_STORAGE_ENDPOINT = https://pedwprod.blob.core.windows.net
|
||||||
|
|
||||||
|
|
||||||
AZURE_PEDW_STORAGE_ENDPOINT = https://pedwdev.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 = pedwnextauthlivekey-90f93710-9dae-423e-aea1-11eccd0dc132-5c0ed187-754a-4b04-8c99-978e5710c2c1
|
||||||
|
|
||||||
NOTIFY_API_KEY = pedwnextauthkey-90f93710-9dae-423e-aea1-11eccd0dc132-0c9469d9-d671-444d-9e9d-3e5a62001043
|
SHOW_DEBUG = true
|
||||||
|
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
//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
|
||||||
|
//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
|
||||||
|
//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
|
||||||
@@ -3,7 +3,32 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"@next/next/no-img-element": "off",
|
"@next/next/no-img-element": "off",
|
||||||
"react/no-unknown-property": "error"
|
"react/no-unknown-property": "error"
|
||||||
}
|
|
||||||
|
}//,
|
||||||
|
//...your configuration
|
||||||
|
// "overrides": [
|
||||||
|
// //...your overrides
|
||||||
|
// {
|
||||||
|
// // Force the setting of a swagger description on each api endpoint
|
||||||
|
// "files": ["pages/api/**/*.js"],
|
||||||
|
// "plugins": ["jsdoc"],
|
||||||
|
// "rules": {
|
||||||
|
// "jsdoc/no-missing-syntax": [
|
||||||
|
// "error",
|
||||||
|
// {
|
||||||
|
// "contexts": [
|
||||||
|
// {
|
||||||
|
// "comment": "JsdocBlock:has(JsdocTag[tag=swagger])",
|
||||||
|
// "context": "any",
|
||||||
|
// "message": "@swagger documentation is required on each API. Check this out for syntax info: https://github.com/jellydn/next-swagger-doc"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+24
-2
@@ -13,7 +13,29 @@ node_modules/
|
|||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
.yarn
|
||||||
|
|
||||||
#lock files
|
#lock files
|
||||||
yarn.lock
|
# yarn.lock
|
||||||
package-lock.json
|
# package-lock.json
|
||||||
|
|
||||||
|
tmp
|
||||||
|
|
||||||
|
*env*.sample
|
||||||
|
docker
|
||||||
|
dockerfile*
|
||||||
|
.dockerignore
|
||||||
|
Makefile
|
||||||
|
docker*.yml
|
||||||
|
|
||||||
|
# Polling
|
||||||
|
|
||||||
|
pages/api/poll-queue.js
|
||||||
|
pages/polling.js
|
||||||
|
|
||||||
|
# dev apis to no include
|
||||||
|
|
||||||
|
pages/api/endpoint/getaccounts_api.js
|
||||||
|
|
||||||
|
# certs
|
||||||
|
certificates/*
|
||||||
|
|||||||
Vendored
+7
-1
@@ -5,11 +5,17 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
|
"name": "Next.js: debug server-side",
|
||||||
|
"type": "node-terminal",
|
||||||
|
"request": "launch",
|
||||||
|
"command": "yarn run dev"
|
||||||
|
},
|
||||||
|
{"name": "Launch Chrome against localhost",
|
||||||
"type": "pwa-chrome",
|
"type": "pwa-chrome",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Launch Chrome against localhost",
|
|
||||||
"url": "http://localhost:3000",
|
"url": "http://localhost:3000",
|
||||||
"webRoot": "${workspaceFolder}"
|
"webRoot": "${workspaceFolder}"
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+1218
-86
File diff suppressed because it is too large
Load Diff
@@ -1,147 +0,0 @@
|
|||||||
import axios from "axios";
|
|
||||||
import { hashAPIPath, consoleLogger } from "./";
|
|
||||||
|
|
||||||
const configEndpoint = process.env.GG_PROVIDER_CONFIG_ENDPOINT;
|
|
||||||
const ggClientID = process.env.GG_CLIENT_ID;
|
|
||||||
const ggClientSecret = process.env.GG_CLIENT_SECRET;
|
|
||||||
const WEBAPI_URL =
|
|
||||||
process.env.RELAY_ROOT ||
|
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
|
||||||
|
|
||||||
const azureHeaders = (access_token) => {
|
|
||||||
return {
|
|
||||||
headers: {
|
|
||||||
"OData-MaxVersion": "4.0",
|
|
||||||
"OData-Version": "4.0",
|
|
||||||
"Accept": "application/json;odata.metadata=none",
|
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
"Authorization": "Bearer " + access_token,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getProviderConfig = () => {
|
|
||||||
return axios
|
|
||||||
.get(configEndpoint)
|
|
||||||
.then((res) => res.data)
|
|
||||||
.catch((error) => {
|
|
||||||
console.log("error :", error.response);
|
|
||||||
// return error;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getUserInfo = (userInfoURL, authToken) => {
|
|
||||||
const tokenConfig = {
|
|
||||||
headers: {
|
|
||||||
"Authorization": "Bearer " + authToken,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
return axios
|
|
||||||
.get(userInfoURL, tokenConfig)
|
|
||||||
.then((res) => res)
|
|
||||||
.catch((error) => {
|
|
||||||
//console.log(`Error: ${err?.response?.data}`);
|
|
||||||
//return error;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var Base64 = {
|
|
||||||
_keyStr:
|
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
||||||
encode: function (e) {
|
|
||||||
var t = "";
|
|
||||||
var n, r, i, s, o, u, a;
|
|
||||||
var f = 0;
|
|
||||||
e = Base64._utf8_encode(e);
|
|
||||||
while (f < e.length) {
|
|
||||||
n = e.charCodeAt(f++);
|
|
||||||
r = e.charCodeAt(f++);
|
|
||||||
i = e.charCodeAt(f++);
|
|
||||||
s = n >> 2;
|
|
||||||
o = ((n & 3) << 4) | (r >> 4);
|
|
||||||
u = ((r & 15) << 2) | (i >> 6);
|
|
||||||
a = i & 63;
|
|
||||||
if (isNaN(r)) {
|
|
||||||
u = a = 64;
|
|
||||||
} else if (isNaN(i)) {
|
|
||||||
a = 64;
|
|
||||||
}
|
|
||||||
t =
|
|
||||||
t +
|
|
||||||
this._keyStr.charAt(s) +
|
|
||||||
this._keyStr.charAt(o) +
|
|
||||||
this._keyStr.charAt(u) +
|
|
||||||
this._keyStr.charAt(a);
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
},
|
|
||||||
decode: function (e) {
|
|
||||||
var t = "";
|
|
||||||
var n, r, i;
|
|
||||||
var s, o, u, a;
|
|
||||||
var f = 0;
|
|
||||||
//e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
|
||||||
while (f < e.length) {
|
|
||||||
s = this._keyStr.indexOf(e.charAt(f++));
|
|
||||||
o = this._keyStr.indexOf(e.charAt(f++));
|
|
||||||
u = this._keyStr.indexOf(e.charAt(f++));
|
|
||||||
a = this._keyStr.indexOf(e.charAt(f++));
|
|
||||||
n = (s << 2) | (o >> 4);
|
|
||||||
r = ((o & 15) << 4) | (u >> 2);
|
|
||||||
i = ((u & 3) << 6) | a;
|
|
||||||
t = t + String.fromCharCode(n);
|
|
||||||
if (u != 64) {
|
|
||||||
t = t + String.fromCharCode(r);
|
|
||||||
}
|
|
||||||
if (a != 64) {
|
|
||||||
t = t + String.fromCharCode(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
t = Base64._utf8_decode(t);
|
|
||||||
return t;
|
|
||||||
},
|
|
||||||
_utf8_encode: function (e) {
|
|
||||||
e = e.replace(/\r\n/g, "\n");
|
|
||||||
var t = "";
|
|
||||||
for (var n = 0; n < e.length; n++) {
|
|
||||||
var r = e.charCodeAt(n);
|
|
||||||
if (r < 128) {
|
|
||||||
t += String.fromCharCode(r);
|
|
||||||
} else if (r > 127 && r < 2048) {
|
|
||||||
t += String.fromCharCode((r >> 6) | 192);
|
|
||||||
t += String.fromCharCode((r & 63) | 128);
|
|
||||||
} else {
|
|
||||||
t += String.fromCharCode((r >> 12) | 224);
|
|
||||||
t += String.fromCharCode(((r >> 6) & 63) | 128);
|
|
||||||
t += String.fromCharCode((r & 63) | 128);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
},
|
|
||||||
_utf8_decode: function (e) {
|
|
||||||
var t = "";
|
|
||||||
var n = 0;
|
|
||||||
var r = (c1 = c2 = 0);
|
|
||||||
while (n < e.length) {
|
|
||||||
r = e.charCodeAt(n);
|
|
||||||
if (r < 128) {
|
|
||||||
t += String.fromCharCode(r);
|
|
||||||
n++;
|
|
||||||
} else if (r > 191 && r < 224) {
|
|
||||||
c2 = e.charCodeAt(n + 1);
|
|
||||||
t += String.fromCharCode(((r & 31) << 6) | (c2 & 63));
|
|
||||||
n += 2;
|
|
||||||
} else {
|
|
||||||
c2 = e.charCodeAt(n + 1);
|
|
||||||
c3 = e.charCodeAt(n + 2);
|
|
||||||
t += String.fromCharCode(
|
|
||||||
((r & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)
|
|
||||||
);
|
|
||||||
n += 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
+880
-146
File diff suppressed because it is too large
Load Diff
+44
-19
@@ -1,63 +1,88 @@
|
|||||||
export const getSelectQuery = (appealTypeName) => {
|
export const getSelectQuery = (appealTypeName) => {
|
||||||
switch (appealTypeName) {
|
switch (appealTypeName) {
|
||||||
case "pinswg_advertses":
|
case "pinswg_advertses":
|
||||||
return "&$select=_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";
|
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=_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=_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";
|
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=_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_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;
|
||||||
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=_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";
|
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=_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=_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";
|
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=_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=_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_otherpartiesstatement,pinswg_otherpartiesstatement,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=_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=_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=_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=_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=_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":
|
||||||
return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_typeofevent";
|
//console.log(
|
||||||
|
// "///////////////\n path:",
|
||||||
|
// process.env.RELAYPATH == "test-pedw-hc"
|
||||||
|
// );
|
||||||
|
return process.env.RELAYPATH == "dev-pedw-hc"
|
||||||
|
? "&$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=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=_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=_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_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";
|
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;
|
||||||
|
case "pinswg_ldps":
|
||||||
|
return "&$select=pinswg_eiarequired,modifiedon,pinswg_name";
|
||||||
|
break;
|
||||||
|
case "pinswg_nonvalidations":
|
||||||
|
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,statuscode";
|
||||||
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import AccessibilityEN from "./footerDocs/accessibility_en";
|
import { useRouter } from "next/router";
|
||||||
import AccessibilityCY from "./footerDocs/accessibility_cy";
|
import AccessibilityCY from "./footerDocs/accessibility_cy";
|
||||||
|
import AccessibilityEN from "./footerDocs/accessibility_en";
|
||||||
|
|
||||||
const AccessibilityStatement = (props) => {
|
const AccessibilityStatement = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import _ from "lodash";
|
|
||||||
import React, { useState, useEffect } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import {
|
import Link from "next/link";
|
||||||
Field,
|
import { useRouter } from "next/router";
|
||||||
reduxForm,
|
import React, { useState } from "react";
|
||||||
formValueSelector,
|
import { connect } from "react-redux";
|
||||||
getFormSubmitErrors,
|
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||||
} from "redux-form";
|
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
|
||||||
import { updatePassword } from "../../actions";
|
import { updatePassword } from "../../actions";
|
||||||
|
|
||||||
const RenderTextfield = ({
|
const RenderTextfield = ({
|
||||||
@@ -133,8 +127,9 @@ const ChangePassword = (props) => {
|
|||||||
"/myportal?q=" +
|
"/myportal?q=" +
|
||||||
props.accountDetails.loggedinUserId
|
props.accountDetails.loggedinUserId
|
||||||
}
|
}
|
||||||
|
className="govuk-link"
|
||||||
>
|
>
|
||||||
<a className="govuk-link">Cancel</a>
|
Cancel
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -146,8 +141,9 @@ const ChangePassword = (props) => {
|
|||||||
"/myportal?q=" +
|
"/myportal?q=" +
|
||||||
props.accountDetails.loggedinUserId
|
props.accountDetails.loggedinUserId
|
||||||
}
|
}
|
||||||
|
className="govuk-link"
|
||||||
>
|
>
|
||||||
<a className="govuk-link">Go to My Portal</a>
|
Go to My Portal
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
import _ from "lodash";
|
|
||||||
import Link from "next/link";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import {
|
import Link from "next/link";
|
||||||
Field,
|
import { useRouter } from "next/router";
|
||||||
reduxForm,
|
import React, { useState } from "react";
|
||||||
formValueSelector,
|
import { connect } from "react-redux";
|
||||||
getFormSubmitErrors,
|
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||||
} from "redux-form";
|
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
|
||||||
|
|
||||||
import BuildCheckPersonalDetails from "./personaldetailsCheck";
|
import BuildCheckPersonalDetails from "./personaldetailsCheck";
|
||||||
import PersonalDetailsComplete from "./personaldetailsComplete";
|
import PersonalDetailsComplete from "./personaldetailsComplete";
|
||||||
@@ -57,12 +51,148 @@ const RenderTextfield = ({
|
|||||||
id={id}
|
id={id}
|
||||||
type={type}
|
type={type}
|
||||||
disabled={disabled ? true : false}
|
disabled={disabled ? true : false}
|
||||||
|
maxLength="50"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const RenderRadioList = ({
|
||||||
|
datafieldname,
|
||||||
|
name,
|
||||||
|
label,
|
||||||
|
id,
|
||||||
|
errorMsg,
|
||||||
|
options,
|
||||||
|
input: { onChange, value },
|
||||||
|
meta: { touched, error },
|
||||||
|
...custom
|
||||||
|
}) => {
|
||||||
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
touched && error
|
||||||
|
? "govuk-form-group govuk-form-group--error"
|
||||||
|
: "govuk-form-group "
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby={name + "-hint"}
|
||||||
|
>
|
||||||
|
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s govuk-!-font-weight-regular">
|
||||||
|
<label
|
||||||
|
className="govuk-fieldset__heading govuk-body-m"
|
||||||
|
id={id + "_label"}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</label>
|
||||||
|
</legend>
|
||||||
|
{touched && error && (
|
||||||
|
<span
|
||||||
|
id={id + "-error"}
|
||||||
|
className="govuk-error-message"
|
||||||
|
>
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
Error:
|
||||||
|
</span>{" "}
|
||||||
|
{errorMsg}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
<div className="govuk-radios govuk-radios--small govuk-radios--inline">
|
||||||
|
{Object.keys(options).map((key, index) => (
|
||||||
|
<div
|
||||||
|
className="govuk-radios__item"
|
||||||
|
data-children-count={key}
|
||||||
|
key={key}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
id={id + "_" + index}
|
||||||
|
name={id}
|
||||||
|
component="input"
|
||||||
|
type="radio"
|
||||||
|
className="govuk-radios__input"
|
||||||
|
value={options[key]}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-radios__label"
|
||||||
|
htmlFor={id + "_" + index}
|
||||||
|
>
|
||||||
|
{options[key]}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const RenderPickList = ({
|
||||||
|
datafieldname,
|
||||||
|
name,
|
||||||
|
label,
|
||||||
|
input,
|
||||||
|
optionsArr,
|
||||||
|
meta: { touched, error },
|
||||||
|
errorMsg,
|
||||||
|
}) => {
|
||||||
|
let { t, lang } = useTranslation();
|
||||||
|
optionsArr = [
|
||||||
|
t("account:account-preferred-language-english") + ":846040001",
|
||||||
|
t("account:account-preferred-language-welsh") + ":846040000",
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
touched && error
|
||||||
|
? "govuk-form-group govuk-form-group--error"
|
||||||
|
: "govuk-form-group "
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<label className="govuk-label" htmlFor={datafieldname}>
|
||||||
|
{label}
|
||||||
|
</label>
|
||||||
|
{touched && error && (
|
||||||
|
<span id={name + "-error"} className="govuk-error-message">
|
||||||
|
<span className="govuk-visually-hidden">Error:</span>{" "}
|
||||||
|
{errorMsg}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<select
|
||||||
|
{...input}
|
||||||
|
className="govuk-select "
|
||||||
|
id={datafieldname}
|
||||||
|
name={datafieldname}
|
||||||
|
>
|
||||||
|
<option value="" disabled defaultValue>
|
||||||
|
{t("common:drop-down-select")}
|
||||||
|
</option>
|
||||||
|
{Object.keys(optionsArr).map((key, index) => {
|
||||||
|
return (
|
||||||
|
<option
|
||||||
|
key={key}
|
||||||
|
value={optionsArr[key].split(":")[1]}
|
||||||
|
>
|
||||||
|
{optionsArr[key].split(":")[0]}
|
||||||
|
</option>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
let PersonalDetails = (props) => {
|
let PersonalDetails = (props) => {
|
||||||
const {
|
const {
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
@@ -81,18 +211,31 @@ let PersonalDetails = (props) => {
|
|||||||
|
|
||||||
let errorsobj = {};
|
let errorsobj = {};
|
||||||
|
|
||||||
const required = (value) => (value ? undefined : "Is required");
|
const required = (value) =>
|
||||||
|
value
|
||||||
|
? undefined
|
||||||
|
: t("account:register-new-account-postcode-label-errormsg");
|
||||||
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("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;
|
||||||
|
|
||||||
|
const postcode = (value) =>
|
||||||
|
value &&
|
||||||
|
!/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/i.test(
|
||||||
|
value
|
||||||
|
)
|
||||||
|
? t("account:register-new-account-postcode-invalid-label-errormsg")
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
const [hasErrors, setHasErrors] = useState("");
|
const [hasErrors, setHasErrors] = useState("");
|
||||||
@@ -103,167 +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">
|
||||||
About you
|
<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 ">
|
||||||
Role:{" "}
|
<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="firstname"
|
) : (
|
||||||
id="firstname"
|
<>
|
||||||
component={RenderTextfield}
|
<BuildCheckPersonalDetails
|
||||||
type="text"
|
props={props}
|
||||||
className="govuk-input govuk-input--width-20"
|
setPersonalDetailsComplete={
|
||||||
validate={[required]}
|
setPersonalDetailsComplete
|
||||||
label="First name"
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="lastname"
|
|
||||||
id="lastname"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
validate={[required]}
|
|
||||||
label="Last name"
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="emailaddress1"
|
|
||||||
id="emailaddress1"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="email"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
validate={[required, email]}
|
|
||||||
label="Email address"
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="telephone1"
|
|
||||||
id="telephone1"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="number"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
validate={[required, phoneNumber]}
|
|
||||||
label="Telephone"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Field
|
|
||||||
name="company"
|
|
||||||
id="company"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
label="Company/Group"
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
</fieldset>
|
|
||||||
<fieldset className="govuk-fieldset">
|
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
|
||||||
<h2 className="govuk-fieldset__heading">
|
|
||||||
What is your address?
|
|
||||||
</h2>
|
|
||||||
</legend>
|
|
||||||
|
|
||||||
<Field
|
|
||||||
name="address1_line1"
|
|
||||||
id="address1_line1"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
label="Address line 1"
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_line2"
|
|
||||||
id="address1_line2"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
label="Address line 2"
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_city"
|
|
||||||
id="address1_city"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-10"
|
|
||||||
label="Town/City"
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_county"
|
|
||||||
id="address1_county"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-10"
|
|
||||||
label="County"
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_postalcode"
|
|
||||||
id="address1_postalcode"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-5"
|
|
||||||
label="Postcode"
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg="Is required"
|
|
||||||
/>
|
|
||||||
</fieldset>
|
|
||||||
<div className="govuk-button-group">
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
className="govuk-button"
|
|
||||||
data-module="govuk-button"
|
|
||||||
>
|
|
||||||
Continue
|
|
||||||
</button>
|
|
||||||
<Link
|
|
||||||
href={
|
|
||||||
"/myportal?q=" +
|
|
||||||
props.props.accountDetails.loggedinUserId
|
|
||||||
}
|
}
|
||||||
>
|
setAccountUpdatedComplete={
|
||||||
<a className="govuk-link">Cancel</a>
|
setAccountUpdatedComplete
|
||||||
</Link>
|
}
|
||||||
</div>
|
/>
|
||||||
</form>
|
</>
|
||||||
|
)
|
||||||
) : (
|
) : (
|
||||||
<>
|
<PersonalDetailsComplete props={props} />
|
||||||
<BuildCheckPersonalDetails
|
)}
|
||||||
props={props}
|
</div>
|
||||||
setPersonalDetailsComplete={
|
|
||||||
setPersonalDetailsComplete
|
|
||||||
}
|
|
||||||
setAccountUpdatedComplete={
|
|
||||||
setAccountUpdatedComplete
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
) : (
|
|
||||||
<PersonalDetailsComplete props={props} />
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,15 +1,8 @@
|
|||||||
import _ from "lodash";
|
|
||||||
import Link from "next/link";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import {
|
import Link from "next/link";
|
||||||
Field,
|
import { useRouter } from "next/router";
|
||||||
reduxForm,
|
import React from "react";
|
||||||
formValueSelector,
|
import { connect } from "react-redux";
|
||||||
getFormSubmitErrors,
|
|
||||||
} from "redux-form";
|
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
|
||||||
|
|
||||||
const BuildCheckPersonalDetails = (props) => {
|
const BuildCheckPersonalDetails = (props) => {
|
||||||
const {
|
const {
|
||||||
@@ -25,12 +18,22 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
|
const getPreferredLanguageLabel = (id) => {
|
||||||
|
return id == 846040001
|
||||||
|
? t("account:account-preferred-language-english")
|
||||||
|
: t("account:account-preferred-language-welsh");
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<h2 className="govuk-heading-m">About you</h2>
|
<h2 className="govuk-heading-m">
|
||||||
|
{t("account:account-about-you-label")}
|
||||||
|
</h2>
|
||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">First name</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("account:account-first-name-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -45,15 +48,18 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
first name
|
{t("account:account-first-name-label")}{" "}
|
||||||
</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">Last name</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{" "}
|
||||||
|
{t("account:account-last-name-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -68,16 +74,19 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
last name
|
{t("account:account-last-name-label")}
|
||||||
</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">Email address</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{" "}
|
||||||
|
{t("account:account-email-address-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -92,16 +101,18 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
email address
|
{t("account:account-email-address-label")}
|
||||||
</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">Telephone</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("account:account-telephone-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -116,15 +127,18 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
telephone
|
{t("account:account-telephone-label")}
|
||||||
</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">Company/Group</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{" "}
|
||||||
|
{t("account:account-company-group-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -139,20 +153,50 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
company/group
|
{t("account:account-company-group-label")}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("account:account-preferred-language-label")}
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{getPreferredLanguageLabel(
|
||||||
|
props.props.props.form.personalDetailsForm.values
|
||||||
|
.pinswg_preferredlanguage
|
||||||
|
)}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__actions">
|
||||||
|
<a
|
||||||
|
className="govuk-link"
|
||||||
|
href="#company"
|
||||||
|
onClick={() => {
|
||||||
|
setPersonalDetailsComplete(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:change-link-label")}
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
{" "}
|
||||||
|
{t("account:account-preferred-language-label")}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
|
<h2 className="govuk-heading-m">
|
||||||
|
{" "}
|
||||||
|
{t("account:account-your-address-label")}
|
||||||
|
</h2>
|
||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
||||||
<h2 className="govuk-heading-m">Your address</h2>
|
|
||||||
|
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">Address Line 1</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("account:account-address-line-1-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -167,16 +211,18 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
address line 1
|
{t("account:account-address-line-1-label")}
|
||||||
</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">Address line 2</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("account:account-address-line-2-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -191,16 +237,18 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
address line 2
|
{t("account:account-address-line-2-label")}
|
||||||
</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">Town/City</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("account:account-town-city-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -215,16 +263,19 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
town/city
|
{t("account:account-town-city-label")}
|
||||||
</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">County</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{" "}
|
||||||
|
{t("account:account-county-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -239,16 +290,19 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
county
|
{t("account:account-county-label")}
|
||||||
</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">Postcode</dt>
|
<dt className="govuk-summary-list__key">
|
||||||
|
{" "}
|
||||||
|
{t("account:account-postcode-label")}
|
||||||
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
@@ -263,10 +317,10 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setPersonalDetailsComplete(false);
|
setPersonalDetailsComplete(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Change
|
{t("common:change-link-label")}
|
||||||
<span className="govuk-visually-hidden">
|
<span className="govuk-visually-hidden">
|
||||||
{" "}
|
{" "}
|
||||||
postcode
|
{t("account:account-postcode-label")}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -281,12 +335,13 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
setAccountUpdatedComplete(true);
|
setAccountUpdatedComplete(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Continue
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
<Link
|
<Link
|
||||||
href={"/myportal?q=" + props.accountDetails.loggedinUserId}
|
href={"/myportal?q=" + props.accountDetails.loggedinUserId}
|
||||||
|
className="govuk-link"
|
||||||
>
|
>
|
||||||
<a className="govuk-link">Cancel</a>
|
{t("common:back-link")}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,23 +1,10 @@
|
|||||||
import _ from "lodash";
|
|
||||||
import Link from "next/link";
|
|
||||||
import React, { useState, useEffect } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import {
|
import Link from "next/link";
|
||||||
Field,
|
import { useRouter } from "next/router";
|
||||||
reduxForm,
|
import React, { useEffect } from "react";
|
||||||
formValueSelector,
|
import { connect } from "react-redux";
|
||||||
getFormSubmitErrors,
|
|
||||||
} from "redux-form";
|
|
||||||
import {
|
|
||||||
useDispatch,
|
|
||||||
useSelector,
|
|
||||||
shallowEqual,
|
|
||||||
connect,
|
|
||||||
setRegisterFormComplete,
|
|
||||||
setAccountCreatedComplete,
|
|
||||||
} from "react-redux";
|
|
||||||
import { updateAccount } from "../../actions";
|
import { updateAccount } from "../../actions";
|
||||||
|
import { setCookie } from "nookies";
|
||||||
|
|
||||||
const PersonalDetailsComplete = (props) => {
|
const PersonalDetailsComplete = (props) => {
|
||||||
const {
|
const {
|
||||||
@@ -31,30 +18,50 @@ 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">Your details have been updated</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">
|
<p className="govuk-body">
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi a
|
<Link href={"/"} className="govuk-link">
|
||||||
metus non quam mollis egestas. Integer ac leo cursus, laoreet
|
{" "}
|
||||||
nulla sed, tempus tellus. Mauris condimentum erat arcu.
|
{t("account:account-complete-return-to-portal-link")}
|
||||||
</p>
|
|
||||||
|
|
||||||
<p className="govuk-body">
|
|
||||||
<Link
|
|
||||||
href={"/myportal?q=" + props.accountDetails.loggedinUserId}
|
|
||||||
>
|
|
||||||
<a className="govuk-link">Return to My Portal</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
import _ from "lodash";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import {
|
import { useRouter } from "next/router";
|
||||||
Field,
|
import React from "react";
|
||||||
reduxForm,
|
import { connect } from "react-redux";
|
||||||
formValueSelector,
|
|
||||||
getFormSubmitErrors,
|
|
||||||
} from "redux-form";
|
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
|
||||||
import { setAccCr } from "../../store/accountDetails/action";
|
import { setAccCr } from "../../store/accountDetails/action";
|
||||||
|
|
||||||
const RegisterFormCheck = (props) => {
|
const RegisterFormCheck = (props) => {
|
||||||
@@ -144,30 +137,6 @@ const RegisterFormCheck = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{/* <div className="govuk-summary-list__row">
|
|
||||||
<dt className="govuk-summary-list__key">Company/Group</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{
|
|
||||||
props.props.props.form.accountRegisterForm.values
|
|
||||||
.companygroup
|
|
||||||
}
|
|
||||||
</dd>
|
|
||||||
<dd className="govuk-summary-list__actions">
|
|
||||||
<a
|
|
||||||
className="govuk-link"
|
|
||||||
href="#"
|
|
||||||
onClick={() => {
|
|
||||||
setRegisterFormComplete(false);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Change
|
|
||||||
<span className="govuk-visually-hidden">
|
|
||||||
{" "}
|
|
||||||
company/group
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</dd>
|
|
||||||
</div> */}
|
|
||||||
</dl>
|
</dl>
|
||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
||||||
<h2 className="govuk-heading-m">
|
<h2 className="govuk-heading-m">
|
||||||
|
|||||||
@@ -1,28 +1,14 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import Link from "next/link";
|
|
||||||
import React, { useEffect, useState } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
|
||||||
import jsonpath from "jsonpath";
|
import { connect } from "react-redux";
|
||||||
import {
|
|
||||||
Field,
|
|
||||||
reduxForm,
|
|
||||||
formValueSelector,
|
|
||||||
getFormSubmitErrors,
|
|
||||||
} from "redux-form";
|
|
||||||
import {
|
|
||||||
useDispatch,
|
|
||||||
useSelector,
|
|
||||||
shallowEqual,
|
|
||||||
connect,
|
|
||||||
setRegisterFormComplete,
|
|
||||||
setAccountCreatedComplete,
|
|
||||||
} from "react-redux";
|
|
||||||
|
|
||||||
import { setAccCr, setLogout } from "../../store/accountDetails/action";
|
import { setAccCr, setLogout } from "../../store/accountDetails/action";
|
||||||
|
|
||||||
import { getEmailAccountCheck, createAccount } from "../../actions";
|
import { createAccount, getEmailAccountCheck } from "../../actions";
|
||||||
|
|
||||||
const RegisterComplete = (props) => {
|
const RegisterComplete = (props) => {
|
||||||
const {
|
const {
|
||||||
@@ -45,14 +31,17 @@ 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"]);
|
||||||
|
|
||||||
let checkEmailObj = {};
|
let checkEmailObj = {};
|
||||||
|
|
||||||
|
console.log("props.accountDetails.accCr :", props.accountDetails.accCr);
|
||||||
switch (props.accountDetails.accCr) {
|
switch (props.accountDetails.accCr) {
|
||||||
case "created":
|
case "created":
|
||||||
case "exists":
|
case "exists":
|
||||||
@@ -66,7 +55,6 @@ const RegisterComplete = (props) => {
|
|||||||
? setAccCr("exists")
|
? setAccCr("exists")
|
||||||
: (checkEmailObj = createAccount(accountBody).then(
|
: (checkEmailObj = createAccount(accountBody).then(
|
||||||
(data) => {
|
(data) => {
|
||||||
//console.log(data);
|
|
||||||
setAccCr("created");
|
setAccCr("created");
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
@@ -95,20 +83,12 @@ const RegisterComplete = (props) => {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
<Link href="/">
|
{t("account:register-new-account-paragraph-thanks")}
|
||||||
<a
|
</p>
|
||||||
className="govuk-link"
|
|
||||||
onClick={() => {
|
<p className="govuk-body">
|
||||||
setLogout(),
|
<Link href="/" className="govuk-link">
|
||||||
window.localStorage.clear(),
|
{t("account:register-new-account-my-portal-link")}
|
||||||
destroyCookie({}, "pinsUser"),
|
|
||||||
signOut({ callbackUrl: "/logout" });
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
"account:register-new-account-my-portal-link"
|
|
||||||
)}
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
|
|||||||
+161
-190
@@ -1,14 +1,8 @@
|
|||||||
import _ from "lodash";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import {
|
import { useRouter } from "next/router";
|
||||||
Field,
|
import React, { useState } from "react";
|
||||||
reduxForm,
|
import { connect } from "react-redux";
|
||||||
formValueSelector,
|
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||||
getFormSubmitErrors,
|
|
||||||
} from "redux-form";
|
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
|
||||||
|
|
||||||
import RegisterFormCheck from "./registerCheck";
|
import RegisterFormCheck from "./registerCheck";
|
||||||
import RegisterComplete from "./registerComplete";
|
import RegisterComplete from "./registerComplete";
|
||||||
@@ -84,7 +78,10 @@ const RegisterForm = (props) => {
|
|||||||
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 required = (value) => (value ? undefined : "Is required");
|
const required = (value) =>
|
||||||
|
value
|
||||||
|
? undefined
|
||||||
|
: t("account:register-new-account-postcode-label-errormsg");
|
||||||
const email = (value) =>
|
const email = (value) =>
|
||||||
value && !emailRegex.test(value) ? "Invalid email address" : undefined;
|
value && !emailRegex.test(value) ? "Invalid email address" : undefined;
|
||||||
const phoneNumber = (value) =>
|
const phoneNumber = (value) =>
|
||||||
@@ -106,14 +103,20 @@ const RegisterForm = (props) => {
|
|||||||
: undefined;
|
: undefined;
|
||||||
const minLength5 = minLength(5);
|
const minLength5 = minLength(5);
|
||||||
|
|
||||||
|
const postcode = (value) =>
|
||||||
|
value &&
|
||||||
|
!/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/i.test(
|
||||||
|
value
|
||||||
|
)
|
||||||
|
? t("account:register-new-account-postcode-invalid-label-errormsg")
|
||||||
|
: undefined;
|
||||||
|
|
||||||
const [hasErrors, setHasErrors] = useState("");
|
const [hasErrors, setHasErrors] = useState("");
|
||||||
|
|
||||||
const onHandleSubmit = (values) => {
|
const onHandleSubmit = (values) => {
|
||||||
//console.log(values);
|
|
||||||
setRegisterFormComplete(true);
|
setRegisterFormComplete(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
//console.log(pristine);
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!pristine && !valid && (
|
{!pristine && !valid && (
|
||||||
@@ -134,185 +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">
|
||||||
|
<h2 className="govuk-fieldset__heading">
|
||||||
|
{t(
|
||||||
|
"account:register-new-account-sub-heading-2"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
</legend>
|
||||||
|
|
||||||
{/* <Field
|
<Field
|
||||||
name="pinswg_custom_password"
|
name="address1_line1"
|
||||||
id="pinswg_custom_password"
|
id="address1_line1"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="password"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
label={t(
|
label={t(
|
||||||
"account:register-new-account-password-label"
|
"account:register-new-account-address-line-1-label"
|
||||||
)}
|
)}
|
||||||
validate={[required, minLength5]}
|
validate={[required]}
|
||||||
errorMsg={t(
|
errorMsg={t(
|
||||||
"account:register-new-account-password-label-errormsg"
|
"account:register-new-account-address-line-1-label-errormsg"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name="custom_password_check"
|
name="address1_line2"
|
||||||
id="custom_password_check"
|
id="address1_line2"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="password"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
label={t(
|
label={t(
|
||||||
"account:register-new-account-confirm-password-label"
|
"account:register-new-account-address-line-2-label"
|
||||||
)}
|
)}
|
||||||
validate={[
|
/>
|
||||||
required,
|
<Field
|
||||||
passwordsMatch,
|
name="address1_city"
|
||||||
minLength5,
|
id="address1_city"
|
||||||
]}
|
component={RenderTextfield}
|
||||||
errorMsg={t(
|
type="text"
|
||||||
"account:register-new-account-confirm-password-label-errormsg"
|
className="govuk-input govuk-input--width-10"
|
||||||
)}
|
label={t(
|
||||||
/> */}
|
"account:register-new-account-town-label"
|
||||||
</fieldset>
|
)}
|
||||||
<fieldset className="govuk-fieldset">
|
validate={[required]}
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
errorMsg={t(
|
||||||
<h2 className="govuk-fieldset__heading">
|
"account:register-new-account-town-label-errormsg"
|
||||||
{t(
|
)}
|
||||||
"account:register-new-account-sub-heading-2"
|
/>
|
||||||
)}
|
<Field
|
||||||
</h2>
|
name="address1_county"
|
||||||
</legend>
|
id="address1_county"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-10"
|
||||||
|
label={t(
|
||||||
|
"account:register-new-account-county-label"
|
||||||
|
)}
|
||||||
|
validate={[required]}
|
||||||
|
errorMsg={t(
|
||||||
|
"account:register-new-account-county-label-errormsg"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Field
|
||||||
|
name="address1_postalcode"
|
||||||
|
id="address1_postalcode"
|
||||||
|
component={RenderTextfield}
|
||||||
|
type="text"
|
||||||
|
className="govuk-input govuk-input--width-5"
|
||||||
|
label={t(
|
||||||
|
"account:register-new-account-postcode-label"
|
||||||
|
)}
|
||||||
|
validate={[required, postcode]}
|
||||||
|
/>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<Field
|
<div className="govuk-button-group">
|
||||||
name="address1_line1"
|
<button
|
||||||
id="address1_line1"
|
type="submit"
|
||||||
component={RenderTextfield}
|
className="govuk-button"
|
||||||
type="text"
|
data-module="govuk-button"
|
||||||
className="govuk-input govuk-input--width-20"
|
>
|
||||||
label={t(
|
{t("common:continue-button")}
|
||||||
"account:register-new-account-address-line-1-label"
|
</button>
|
||||||
)}
|
</div>
|
||||||
validate={[required]}
|
</div>
|
||||||
errorMsg={t(
|
|
||||||
"account:register-new-account-address-line-1-label-errormsg"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_line2"
|
|
||||||
id="address1_line2"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
label={t(
|
|
||||||
"account:register-new-account-address-line-2-label"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_city"
|
|
||||||
id="address1_city"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-10"
|
|
||||||
label={t(
|
|
||||||
"account:register-new-account-town-label"
|
|
||||||
)}
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg={t(
|
|
||||||
"account:register-new-account-town-label-errormsg"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_county"
|
|
||||||
id="address1_county"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-10"
|
|
||||||
label={t(
|
|
||||||
"account:register-new-account-county-label"
|
|
||||||
)}
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg={t(
|
|
||||||
"account:register-new-account-county-label-errormsg"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<Field
|
|
||||||
name="address1_postalcode"
|
|
||||||
id="address1_postalcode"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-5"
|
|
||||||
label={t(
|
|
||||||
"account:register-new-account-postcode-label"
|
|
||||||
)}
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg={t(
|
|
||||||
"account:register-new-account-postcode-label-errormsg"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<div className="govuk-button-group">
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
className="govuk-button"
|
|
||||||
data-module="govuk-button"
|
|
||||||
>
|
|
||||||
{t("common:continue-button")}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import AddressSearch from "./search/addresssearch";
|
||||||
|
|
||||||
|
export default function Search(props) {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
//console.log("props here:", props.myportal || false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main
|
||||||
|
className="govuk-main-wrapper govuk-main-wrapper--auto-spacing"
|
||||||
|
id="main-content"
|
||||||
|
role="main"
|
||||||
|
>
|
||||||
|
<AddressSearch myportal={props.myportal || false} />
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import CRMError from "./crmError";
|
||||||
|
import SearchResults from "./search/addresssearchresults";
|
||||||
|
|
||||||
|
export default function Search(props) {
|
||||||
|
const {
|
||||||
|
searchString,
|
||||||
|
searchResultsObj,
|
||||||
|
advancedSearch,
|
||||||
|
myportal,
|
||||||
|
watchedCases,
|
||||||
|
isLinkedCase,
|
||||||
|
showLoginCheck,
|
||||||
|
} = props;
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
|
||||||
|
var hasError = _.has(searchResultsObj.searchResultsObj, "errorCode")
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
|
||||||
|
//console.log("has an error", hasError);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main
|
||||||
|
className="govuk-main-wrapper govuk-main-wrapper--auto-spacing"
|
||||||
|
id="main-content"
|
||||||
|
role="main"
|
||||||
|
>
|
||||||
|
{hasError ? (
|
||||||
|
<CRMError props={props} />
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<SearchResults
|
||||||
|
advancedSearch={advancedSearch}
|
||||||
|
searchString={searchString}
|
||||||
|
searchResultsObj={
|
||||||
|
searchResultsObj.searchResultsObj
|
||||||
|
}
|
||||||
|
searchDetailsObj={
|
||||||
|
searchResultsObj.searchDetailsObj
|
||||||
|
}
|
||||||
|
myportal={myportal}
|
||||||
|
watchedCases={watchedCases}
|
||||||
|
isLinkedCase={isLinkedCase}
|
||||||
|
showLoginCheck={showLoginCheck}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<Link
|
||||||
|
href="/addresssearch"
|
||||||
|
className="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:breadcrumb-address-search")}
|
||||||
|
</Link>
|
||||||
|
{/* <a
|
||||||
|
onClick={() => router.back()}
|
||||||
|
className="govuk-button govuk-button--secondary"
|
||||||
|
>
|
||||||
|
{t("search:searchresults-new-search-button-label")}
|
||||||
|
</a> */}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { ApplicationInsights } from "@microsoft/applicationinsights-web";
|
||||||
|
import {
|
||||||
|
ReactPlugin,
|
||||||
|
withAITracking,
|
||||||
|
AppInsightsContext,
|
||||||
|
} from "@microsoft/applicationinsights-react-js";
|
||||||
|
|
||||||
|
let reactPlugin = new ReactPlugin();
|
||||||
|
let appInsights = new ApplicationInsights({
|
||||||
|
config: {
|
||||||
|
connectionString:
|
||||||
|
process.env.APPLICATIONINSIGHTS_CONNECTIONSTRING ||
|
||||||
|
process.env.NEXT_PUBLIC_APP_INSIGHT,
|
||||||
|
enableAutoRouteTracking: true,
|
||||||
|
enableCorsCorrelation: true,
|
||||||
|
enableRequestHeaderTracking: true,
|
||||||
|
enableResponseHeaderTracking: true,
|
||||||
|
enableAjaxPerfTracking: true,
|
||||||
|
isBrowserLinkTrackingEnabled: true,
|
||||||
|
extensions: [reactPlugin],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
appInsights.loadAppInsights();
|
||||||
|
|
||||||
|
const AzureAppInsights = ({ children }) => {
|
||||||
|
return (
|
||||||
|
<AppInsightsContext.Provider value={reactPlugin}>
|
||||||
|
{children}
|
||||||
|
</AppInsightsContext.Provider>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default withAITracking(reactPlugin, AzureAppInsights);
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
export default function Banner() {
|
export default function Banner() {
|
||||||
|
|||||||
+875
-498
File diff suppressed because it is too large
Load Diff
+10
-13
@@ -1,10 +1,8 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Summary from "./case/summary";
|
import { useRouter } from "next/router";
|
||||||
import Documents from "./case/documents";
|
import Documents from "./case/documents";
|
||||||
import RepresentationList from "./case/representationList";
|
import RepresentationList from "./case/representationList";
|
||||||
|
import Summary from "./case/summary";
|
||||||
|
|
||||||
const Case = (props) => {
|
const Case = (props) => {
|
||||||
const { showRepresentations } = props;
|
const { showRepresentations } = props;
|
||||||
@@ -32,20 +30,19 @@ const Case = (props) => {
|
|||||||
currentType={props.currentType}
|
currentType={props.currentType}
|
||||||
appealTypeID={props.appealTypeID}
|
appealTypeID={props.appealTypeID}
|
||||||
searchResultsObj={props.searchResultsObj}
|
searchResultsObj={props.searchResultsObj}
|
||||||
|
directSearchResultsObj={props.directSearchResultsObj}
|
||||||
searchDetailsObj={props.searchDetailsObj}
|
searchDetailsObj={props.searchDetailsObj}
|
||||||
searchString={props.searchString}
|
searchString={props.searchString}
|
||||||
incidentid={props.incidentid}
|
incidentid={props.incidentid}
|
||||||
showMap={props.showMap}
|
showMap={props.showMaps}
|
||||||
showLoginCheck={props.showLoginCheck}
|
currentView={props.currentView}
|
||||||
/>
|
messagesObj={props.messagesObj}
|
||||||
<Documents
|
docsOffline={props.props.docsOffline}
|
||||||
incidentid={props.incidentid}
|
|
||||||
caseReference={props.caseReference}
|
|
||||||
searchResultsObj={props.searchResultsObj}
|
|
||||||
searchDetailsObj={props.searchDetailsObj}
|
|
||||||
documentDetailsObj={props.documentDetailsObj}
|
documentDetailsObj={props.documentDetailsObj}
|
||||||
|
showFilteredDocs={props.showFilteredDocs}
|
||||||
|
eventsObj={props.eventsObj}
|
||||||
/>
|
/>
|
||||||
{showRepresentations == "true" && (
|
{showRepresentations == true && (
|
||||||
<RepresentationList
|
<RepresentationList
|
||||||
incidentid={props.incidentid}
|
incidentid={props.incidentid}
|
||||||
caseReference={props.caseReference}
|
caseReference={props.caseReference}
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
import cookie from "cookie-cutter";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { formatDates } from "../utils";
|
||||||
|
export default function CaseNoticeBanner(props) {
|
||||||
|
let { t, lang } = useTranslation();
|
||||||
|
|
||||||
|
const { messagesObj } = props;
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const noticeContent = messagesObj.value[0].description;
|
||||||
|
const noticeTitle = messagesObj.value[0].subject.split("Banner ")[1];
|
||||||
|
|
||||||
|
const bannerOpenCookie = typeof cookie.get("pedwNotice") == "undefined";
|
||||||
|
let messagesObjArr = messagesObj.value;
|
||||||
|
|
||||||
|
let todaysDate = new Date();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{messagesObjArr.map((message, index) => (
|
||||||
|
<div key={index}>
|
||||||
|
{todaysDate.toISOString() >= message.scheduledstart &&
|
||||||
|
todaysDate.toISOString() <= message.scheduledend && (
|
||||||
|
<div
|
||||||
|
className="govuk-warning-text noticebanner"
|
||||||
|
key={index}
|
||||||
|
>
|
||||||
|
<strong className="govuk-warning-text__text">
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
{t("case:notice-label")}
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
|
<div>
|
||||||
|
<div className=" govuk-body-s">
|
||||||
|
<h2 className="govuk-heading-s">
|
||||||
|
{(
|
||||||
|
message.subject.match(
|
||||||
|
new RegExp(">>>", "g")
|
||||||
|
) || []
|
||||||
|
).length > 0
|
||||||
|
? router.locale == "cy"
|
||||||
|
? message.subject
|
||||||
|
.split("Banner ")[1]
|
||||||
|
.split(">>>")[1]
|
||||||
|
: message.subject
|
||||||
|
.split("Banner ")[1]
|
||||||
|
.split(">>>")[0]
|
||||||
|
: (
|
||||||
|
message.subject.match(
|
||||||
|
new RegExp(";", "g")
|
||||||
|
) || []
|
||||||
|
).length > 0
|
||||||
|
? router.locale == "cy"
|
||||||
|
? message.subject
|
||||||
|
.split("Banner ")[1]
|
||||||
|
.split(";")[1]
|
||||||
|
: message.subject
|
||||||
|
.split("Banner ")[1]
|
||||||
|
.split(";")[0]
|
||||||
|
: message.subject.split(
|
||||||
|
"Banner "
|
||||||
|
)[1]}
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-body-s">
|
||||||
|
{(
|
||||||
|
message.description.match(
|
||||||
|
new RegExp(">>>", "g")
|
||||||
|
) || []
|
||||||
|
).length > 0
|
||||||
|
? router.locale == "cy"
|
||||||
|
? message.description.split(
|
||||||
|
">>>"
|
||||||
|
)[1]
|
||||||
|
: message.description.split(
|
||||||
|
">>>"
|
||||||
|
)[0]
|
||||||
|
: (
|
||||||
|
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>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
+704
-146
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useState } from "react";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { setCurrentPage } from "../../store/currentView/action";
|
import { setCurrentPage } from "../../store/currentView/action";
|
||||||
|
|
||||||
@@ -27,14 +25,12 @@ const PaginationControl = (props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const getRange = (start, end) => {
|
const getRange = (start, end) => {
|
||||||
//console.log(start, end);
|
|
||||||
return Array(end - start + 1)
|
return Array(end - start + 1)
|
||||||
.fill()
|
.fill()
|
||||||
.map((v, i) => i + start);
|
.map((v, i) => i + start);
|
||||||
};
|
};
|
||||||
|
|
||||||
const paginationNumbers = (currentPage, pageCount) => {
|
const paginationNumbers = (currentPage, pageCount) => {
|
||||||
//console.log(currentPage);
|
|
||||||
let delta;
|
let delta;
|
||||||
|
|
||||||
if (pageCount <= 7) {
|
if (pageCount <= 7) {
|
||||||
@@ -76,7 +72,6 @@ const PaginationControl = (props) => {
|
|||||||
pages = pages.concat(withDots(pageCount, ["...", pageCount]));
|
pages = pages.concat(withDots(pageCount, ["...", pageCount]));
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log(pages);
|
|
||||||
return pages;
|
return pages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
);
|
||||||
@@ -1,212 +0,0 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useState, useEffect } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
|
||||||
import { Field, FieldArray, reduxForm, formValueSelector } from "redux-form";
|
|
||||||
import { connect } from "react-redux";
|
|
||||||
import { useDropzone } from "react-dropzone";
|
|
||||||
|
|
||||||
import { setRepresentationCapacity } from "../../../store/currentView/action";
|
|
||||||
import RepCapacitySelection from "./representationCapacitySelection";
|
|
||||||
import RepDetails from "./representationDetails";
|
|
||||||
import RepAppellant from "./representationAppellant";
|
|
||||||
import RepAgent from "./representationAgent";
|
|
||||||
import RepInterestedPartyPerson from "./representationInterestedPartyPerson";
|
|
||||||
import RepLandOwner from "./representationLandowner";
|
|
||||||
import {
|
|
||||||
RenderPickList,
|
|
||||||
RenderRadioList,
|
|
||||||
RenderTextfield,
|
|
||||||
} from "./representationElements";
|
|
||||||
|
|
||||||
let MakeRepresentation = (props) => {
|
|
||||||
let { t } = useTranslation();
|
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
|
||||||
|
|
||||||
const [clearRepForm, setClearRepForm] = useState(false);
|
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
const { locale } = router;
|
|
||||||
const {
|
|
||||||
caseReference,
|
|
||||||
myCases,
|
|
||||||
myRepresentations,
|
|
||||||
watchedCases,
|
|
||||||
awaitingSubmission,
|
|
||||||
searchResultsObj,
|
|
||||||
currentType,
|
|
||||||
currentView,
|
|
||||||
setRepresentationCapacity,
|
|
||||||
} = props;
|
|
||||||
const formObj = props.props.form;
|
|
||||||
let setCaseQueryObj = props[currentType];
|
|
||||||
var casesObj = {};
|
|
||||||
|
|
||||||
currentType == "searchResultsObj"
|
|
||||||
? (casesObj = jsonpath.query(
|
|
||||||
setCaseQueryObj,
|
|
||||||
'$..[?(@.title=="' + caseReference + '")]'
|
|
||||||
))
|
|
||||||
: (casesObj = jsonpath.query(
|
|
||||||
setCaseQueryObj,
|
|
||||||
'$..[?(@.reference=="' + caseReference + '")]'
|
|
||||||
));
|
|
||||||
|
|
||||||
casesObj = Object.assign({}, ...casesObj);
|
|
||||||
|
|
||||||
const capacityOptionsArr = [
|
|
||||||
"Appellant",
|
|
||||||
"Agent",
|
|
||||||
"Interested Party/Person",
|
|
||||||
"Land Owner",
|
|
||||||
];
|
|
||||||
|
|
||||||
const appellantApplicantRepresentationArr = [
|
|
||||||
"Other",
|
|
||||||
"Statement",
|
|
||||||
"Statement of common ground",
|
|
||||||
"Written statement of evidence",
|
|
||||||
];
|
|
||||||
|
|
||||||
const interestedPersonRepresentationArr = [
|
|
||||||
"Interested Party/Person correspondence",
|
|
||||||
];
|
|
||||||
|
|
||||||
const landOwnerRepresentationArr = [
|
|
||||||
"Other",
|
|
||||||
"Statement",
|
|
||||||
"Written statement of evidence",
|
|
||||||
];
|
|
||||||
|
|
||||||
const repCapacityType = () => {
|
|
||||||
currentView.representationCapacity == false
|
|
||||||
? false
|
|
||||||
: _.isEmpty(formObj["representationForm"])
|
|
||||||
? false
|
|
||||||
: _.isEmpty(formObj["representationForm"].values)
|
|
||||||
? false
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"].values.representationCapacity
|
|
||||||
)
|
|
||||||
? setRepresentationCapacity(false)
|
|
||||||
: setRepresentationCapacity(
|
|
||||||
formObj["representationForm"].values.representationCapacity
|
|
||||||
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
|
||||||
.toLowerCase()
|
|
||||||
);
|
|
||||||
|
|
||||||
return currentView.representationCapacity;
|
|
||||||
};
|
|
||||||
|
|
||||||
const whichControl = () => {
|
|
||||||
repCapacityType();
|
|
||||||
switch (currentView.representationCapacity) {
|
|
||||||
case false:
|
|
||||||
return (
|
|
||||||
<RepCapacitySelection
|
|
||||||
formObj={formObj}
|
|
||||||
capacityOptionsArr={capacityOptionsArr}
|
|
||||||
currentType={currentType}
|
|
||||||
casesObj={casesObj}
|
|
||||||
setRepresentationCapacity={setRepresentationCapacity}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case "appellant":
|
|
||||||
setRepresentationCapacity("appellant");
|
|
||||||
return (
|
|
||||||
<RepAppellant
|
|
||||||
formObj={formObj}
|
|
||||||
appellantApplicantRepresentationArr={
|
|
||||||
appellantApplicantRepresentationArr
|
|
||||||
}
|
|
||||||
setRepresentationCapacity={setRepresentationCapacity}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case "agent":
|
|
||||||
setRepresentationCapacity("agent");
|
|
||||||
return (
|
|
||||||
<RepAgent
|
|
||||||
formObj={formObj}
|
|
||||||
appellantApplicantRepresentationArr={
|
|
||||||
appellantApplicantRepresentationArr
|
|
||||||
}
|
|
||||||
setRepresentationCapacity={setRepresentationCapacity}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case "interestedpartyperson":
|
|
||||||
setRepresentationCapacity("interestedpartyperson");
|
|
||||||
return (
|
|
||||||
<RepInterestedPartyPerson
|
|
||||||
formObj={formObj}
|
|
||||||
interestedPersonRepresentationArr={
|
|
||||||
interestedPersonRepresentationArr
|
|
||||||
}
|
|
||||||
setRepresentationCapacity={setRepresentationCapacity}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case "landowner":
|
|
||||||
setRepresentationCapacity("landowner");
|
|
||||||
return (
|
|
||||||
<RepLandOwner
|
|
||||||
formObj={formObj}
|
|
||||||
landOwnerRepresentationArr={landOwnerRepresentationArr}
|
|
||||||
setRepresentationCapacity={setRepresentationCapacity}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return (
|
|
||||||
<RepCapacitySelection
|
|
||||||
formObj={formObj}
|
|
||||||
capacityOptionsArr={capacityOptionsArr}
|
|
||||||
currentType={currentType}
|
|
||||||
casesObj={casesObj}
|
|
||||||
setRepresentationCapacity={setRepresentationCapacity}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{whichControl()} - {props.firstValue}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const mapStateToProps = (state) => {
|
|
||||||
return {
|
|
||||||
search: state.search,
|
|
||||||
searchResultsObj: state.searchResultsObj,
|
|
||||||
formData: state.formData,
|
|
||||||
appealType: state.appealType,
|
|
||||||
currentView: state.currentView,
|
|
||||||
//form: state.form,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
|
||||||
return {
|
|
||||||
setRepresentationCapacity: (representationCapacity) => {
|
|
||||||
dispatch(setRepresentationCapacity(representationCapacity));
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const selector = formValueSelector("representationForm");
|
|
||||||
|
|
||||||
export default connect(
|
|
||||||
mapStateToProps,
|
|
||||||
mapDispatchToProps
|
|
||||||
)(
|
|
||||||
reduxForm({
|
|
||||||
form: "representationForm",
|
|
||||||
destroyOnUnmount: false,
|
|
||||||
})(MakeRepresentation)
|
|
||||||
);
|
|
||||||
+1036
-185
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,24 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { Field, reduxForm } from "redux-form";
|
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 {
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderCondtionalRadioList,
|
||||||
RenderPickList,
|
RenderPickList,
|
||||||
RenderTextfield,
|
RenderRichMultiline,
|
||||||
RenderRadioList,
|
shouldDisableButton,
|
||||||
RenderMultiline,
|
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
|
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
import {
|
import {
|
||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
} from "../../../store/currentView/action";
|
} from "../../../store/currentView/action";
|
||||||
import { useDropzone } from "react-dropzone";
|
|
||||||
|
|
||||||
const RepAgent = (props) => {
|
const RepAgent = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -25,109 +31,139 @@ const RepAgent = (props) => {
|
|||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
currentView,
|
currentView,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const files = acceptedFiles.map((file) => (
|
|
||||||
<li key={file.path}>
|
|
||||||
{file.path} - {file.size} bytes
|
|
||||||
</li>
|
|
||||||
));
|
|
||||||
|
|
||||||
return (
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
<div id="rep-appellant">
|
setRepFileName(formObj.representationForm.values);
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<h2 className="govuk-heading-m ">Representation - agent</h2>
|
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
<label
|
"repDetails"
|
||||||
className="govuk-label govuk-body-m"
|
)
|
||||||
htmlFor="representationType"
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
>
|
"filesList"
|
||||||
What kind of representation are you making?
|
)
|
||||||
</label>
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
<Field
|
function (el) {
|
||||||
name="representationType"
|
return el != null;
|
||||||
component={RenderPickList}
|
}
|
||||||
datafieldname="representationType"
|
)
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
: []
|
||||||
/>
|
: [];
|
||||||
</div>
|
|
||||||
</div>
|
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-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
{typeof formObj.representationForm.values
|
||||||
className="govuk-input govuk-!-width-three-quarters"
|
.representationType == "undefined" &&
|
||||||
id="representationDescription"
|
props.representationType != "Select..." ? (
|
||||||
name="representationDescription"
|
<>
|
||||||
value="email"
|
<h2 className="govuk-heading-m ">
|
||||||
data-aria-controls="representationDescription"
|
{t(
|
||||||
type="text"
|
"myrepresentations:representation-from-an-agent-heading"
|
||||||
component={RenderTextfield}
|
)}
|
||||||
label="Description of representation"
|
</h2>
|
||||||
/>
|
|
||||||
</div>
|
<label
|
||||||
</div>
|
className="govuk-label govuk-body-m"
|
||||||
<div className="govuk-grid-row">
|
htmlFor="representationType"
|
||||||
<div className="govuk-form-group">
|
|
||||||
<p className="govuk-body">
|
|
||||||
You can enter your comments in the space provided or
|
|
||||||
attach a separate document.
|
|
||||||
</p>
|
|
||||||
<fieldset
|
|
||||||
className="govuk-fieldset"
|
|
||||||
aria-describedby="commentBox-hint"
|
|
||||||
>
|
|
||||||
<div id="commentBox-hint" className="govuk-hint">
|
|
||||||
My comments are set out in:*
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="govuk-checkboxes"
|
|
||||||
data-module="govuk-checkboxes"
|
|
||||||
>
|
|
||||||
<div className="govuk-checkboxes__item">
|
|
||||||
<Field
|
|
||||||
className="govuk-checkboxes__input"
|
|
||||||
id="commentBox"
|
|
||||||
name="commentBox"
|
|
||||||
value="email"
|
|
||||||
data-aria-controls="commentBox"
|
|
||||||
type="checkbox"
|
|
||||||
component={RenderTextfield}
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-checkboxes__label"
|
|
||||||
htmlFor="commentBox"
|
|
||||||
>
|
|
||||||
the box below{" "}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
_.isEmpty(formObj["representationForm"])
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values
|
|
||||||
)
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values.commentBox
|
|
||||||
)
|
|
||||||
? formObj["representationForm"]
|
|
||||||
.values.commentBox == false
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
|
||||||
: "govuk-checkboxes__conditional"
|
|
||||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
|
||||||
}
|
|
||||||
id="conditional-commentBox"
|
|
||||||
>
|
>
|
||||||
|
{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={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">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
name="representationComments"
|
name="representationComments"
|
||||||
id="representationComments"
|
id="representationComments"
|
||||||
component={RenderMultiline}
|
component={RenderRichMultiline}
|
||||||
type="text"
|
type="text"
|
||||||
rows="5"
|
rows="5"
|
||||||
className="govuk-textarea govuk-input--width-30"
|
className="govuk-textarea govuk-input--width-30"
|
||||||
@@ -135,101 +171,154 @@ const RepAgent = (props) => {
|
|||||||
props.name + "-hint"
|
props.name + "-hint"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
</div>
|
{t(
|
||||||
<div className="govuk-checkboxes__item">
|
"myrepresentations:publish-policy-label"
|
||||||
<Field
|
)}{" "}
|
||||||
className="govuk-checkboxes__input"
|
<a
|
||||||
id="documentBox"
|
href={t(
|
||||||
name="documentBox"
|
"myrepresentations:publish-policy-link"
|
||||||
value="email"
|
)}
|
||||||
data-aria-controls="documentBox"
|
|
||||||
type="checkbox"
|
|
||||||
component={RenderTextfield}
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-checkboxes__label"
|
|
||||||
htmlFor="documentBox"
|
|
||||||
>
|
|
||||||
separate documents
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
_.isEmpty(formObj["representationForm"])
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values
|
|
||||||
)
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values.documentBox
|
|
||||||
)
|
|
||||||
? formObj["representationForm"]
|
|
||||||
.values.documentBox == false
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
|
||||||
: "govuk-checkboxes__conditional"
|
|
||||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
|
||||||
}
|
|
||||||
id="conditional-documentBox"
|
|
||||||
>
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<section className="container">
|
|
||||||
<div
|
|
||||||
{...getRootProps({
|
|
||||||
className: "dropzone",
|
|
||||||
})}
|
|
||||||
>
|
>
|
||||||
<input {...getInputProps()} />
|
{t(
|
||||||
<p>
|
"myrepresentations:publish-policy-link-label"
|
||||||
Drag and drop files here or
|
)}
|
||||||
click to select files
|
</a>{" "}
|
||||||
</p>
|
{t(
|
||||||
</div>
|
"myrepresentations:publish-policy-label-two"
|
||||||
<aside>
|
)}
|
||||||
<h4>Files</h4>
|
</p>
|
||||||
<ul>{files}</ul>
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
</div>
|
<FileUploadField
|
||||||
</fieldset>
|
name={"representationDocuments"}
|
||||||
</div>{" "}
|
id={"representationDocuments"}
|
||||||
</div>
|
label={t(
|
||||||
<div className="govuk-grid-row">
|
"myrepresentations:add-files-label"
|
||||||
<div className="govuk-button-group">
|
)}
|
||||||
<button
|
ticketnumber={
|
||||||
type="submit"
|
props.props.caseReference
|
||||||
className="govuk-button"
|
}
|
||||||
data-module="govuk-button"
|
hint={"sdsd"}
|
||||||
>
|
fileList={
|
||||||
Continue
|
props.currentView.fileList
|
||||||
</button>
|
|
||||||
{/* <a
|
|
||||||
onClick={() => {
|
|
||||||
setRepresentationSubmit(false);
|
|
||||||
}}
|
|
||||||
className="govuk-button"
|
|
||||||
>
|
|
||||||
Continue
|
|
||||||
</a> */}
|
|
||||||
|
|
||||||
<a
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
onClick={() => {
|
// "repDetails"
|
||||||
setRepresentationCapacity();
|
// )
|
||||||
}}
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
className="govuk-link"
|
// "filesList"
|
||||||
>
|
// ) &&
|
||||||
Back
|
// props.currentView
|
||||||
</a>
|
// .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>
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</>
|
||||||
</div>
|
);
|
||||||
);
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RepAgent;
|
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,
|
||||||
|
})(RepAgent)
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { connect } from "react-redux";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { Field, reduxForm, reset } from "redux-form";
|
import { useRouter } from "next/router";
|
||||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
import { connect } from "react-redux";
|
||||||
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
import {
|
import {
|
||||||
|
FileUploadField,
|
||||||
RenderPickList,
|
RenderPickList,
|
||||||
RenderTextfield,
|
RenderRichMultiline,
|
||||||
RenderRadioList,
|
shouldDisableButton,
|
||||||
RenderMultiline,
|
|
||||||
RenderFileUpload,
|
|
||||||
} 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();
|
||||||
@@ -29,207 +30,287 @@ const RepAppellant = (props) => {
|
|||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
currentView,
|
currentView,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
// console.log(props);
|
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
||||||
|
|
||||||
return (
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
<div id="rep-appellant">
|
setRepFileName(formObj.representationForm.values);
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
|
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-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label
|
{typeof formObj.representationForm.values
|
||||||
className="govuk-label govuk-body-m"
|
.representationType == "undefined" &&
|
||||||
htmlFor="representationType"
|
props.representationType != "Select..." ? (
|
||||||
>
|
<>
|
||||||
What kind of representation are you making?
|
<h2 className="govuk-heading-m ">
|
||||||
</label>
|
{t(
|
||||||
<Field
|
"myrepresentations:representation-from-an-appellant-heading"
|
||||||
name="representationType"
|
)}
|
||||||
component={RenderPickList}
|
</h2>
|
||||||
datafieldname="representationType"
|
<label
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
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>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
{(typeof props.representationType != "undefined" ||
|
||||||
<div className="govuk-form-group">
|
typeof formObj.representationForm.values
|
||||||
<Field
|
.representationType != "undefined") && (
|
||||||
className="govuk-input govuk-!-width-three-quarters"
|
<div className="govuk-grid-row">
|
||||||
id="representationDescription"
|
<div className="govuk-form-group">
|
||||||
name="representationDescription"
|
<p className="govuk-body">
|
||||||
value="email"
|
{t("myrepresentations:enter-comment-label")}
|
||||||
data-aria-controls="representationDescription"
|
</p>
|
||||||
type="text"
|
<fieldset
|
||||||
component={RenderTextfield}
|
className="govuk-fieldset"
|
||||||
label="Description of representation"
|
aria-describedby="commentBox-hint"
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<p className="govuk-body">
|
|
||||||
You can enter your comments in the space provided or
|
|
||||||
attach a separate document.
|
|
||||||
</p>
|
|
||||||
<fieldset
|
|
||||||
className="govuk-fieldset"
|
|
||||||
aria-describedby="commentBox-hint"
|
|
||||||
>
|
|
||||||
<div id="commentBox-hint" className="govuk-hint">
|
|
||||||
My comments are set out in:*
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="govuk-checkboxes"
|
|
||||||
data-module="govuk-checkboxes"
|
|
||||||
>
|
>
|
||||||
<div className="govuk-checkboxes__item">
|
{/* <div
|
||||||
<Field
|
id="commentBox-hint"
|
||||||
className="govuk-checkboxes__input"
|
className="govuk-hint"
|
||||||
id="commentBox"
|
|
||||||
name="commentBox"
|
|
||||||
value="email"
|
|
||||||
data-aria-controls="commentBox"
|
|
||||||
type="checkbox"
|
|
||||||
component={RenderTextfield}
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-checkboxes__label"
|
|
||||||
htmlFor="commentBox"
|
|
||||||
>
|
|
||||||
the box below{" "}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
_.isEmpty(formObj["representationForm"])
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values
|
|
||||||
)
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values.commentBox
|
|
||||||
)
|
|
||||||
? formObj["representationForm"]
|
|
||||||
.values.commentBox == false
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
|
||||||
: "govuk-checkboxes__conditional"
|
|
||||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
|
||||||
}
|
|
||||||
id="conditional-commentBox"
|
|
||||||
>
|
>
|
||||||
<div className="govuk-form-group">
|
{t(
|
||||||
<Field
|
"myrepresentations:comments-set-out-label"
|
||||||
name="representationComments"
|
)}
|
||||||
id="representationComments"
|
:
|
||||||
component={RenderMultiline}
|
</div> */}
|
||||||
type="text"
|
<div className="govuk-form-group">
|
||||||
rows="5"
|
|
||||||
className="govuk-textarea govuk-input--width-30"
|
|
||||||
aria-describedby={
|
|
||||||
props.name + "-hint"
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="govuk-checkboxes__item">
|
|
||||||
<Field
|
<Field
|
||||||
className="govuk-checkboxes__input"
|
name="representationComments"
|
||||||
id="documentBox"
|
id="representationComments"
|
||||||
name="documentBox"
|
component={RenderRichMultiline}
|
||||||
data-aria-controls="documentBox"
|
type="text"
|
||||||
type="checkbox"
|
rows="5"
|
||||||
component={RenderTextfield}
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={props.name + "-hint"}
|
||||||
/>
|
/>
|
||||||
<label
|
{formObj.representationForm.values
|
||||||
className="govuk-label govuk-checkboxes__label"
|
.appealType == "846040004" ? (
|
||||||
htmlFor="documentBox"
|
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||||
>
|
{t(
|
||||||
separate documents
|
"myrepresentations:publish-policy-label"
|
||||||
</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>
|
||||||
<div
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
className={
|
<FileUploadField
|
||||||
_.isEmpty(formObj["representationForm"])
|
name={"representationDocuments"}
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
id={"representationDocuments"}
|
||||||
: _.isEmpty(
|
label={t(
|
||||||
formObj["representationForm"]
|
"myrepresentations:add-files-label"
|
||||||
.values
|
)}
|
||||||
)
|
ticketnumber={props.props.caseReference}
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
hint={"sdsd"}
|
||||||
: _.isEmpty(
|
fileList={
|
||||||
formObj["representationForm"]
|
props.currentView.fileList
|
||||||
.values.documentBox
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
)
|
// "repDetails"
|
||||||
? formObj["representationForm"]
|
// )
|
||||||
.values.documentBox == false
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
// "filesList"
|
||||||
: "govuk-checkboxes__conditional"
|
// ) &&
|
||||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
// props.currentView
|
||||||
}
|
// .caseReference.repDetails
|
||||||
id="conditional-documentBox"
|
// .filesList.length > 0
|
||||||
>
|
// ? props.currentView
|
||||||
<h2 className="govuk-heading-s">
|
// .caseReference
|
||||||
{props.label}{" "}
|
// .repDetails.filesList
|
||||||
</h2>
|
// : []
|
||||||
<Field
|
// : []
|
||||||
name="repsFiles"
|
|
||||||
id="repsFiles"
|
|
||||||
component={RenderFileUpload}
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
//validate={[required]}
|
|
||||||
label={props.label}
|
|
||||||
errorMsg="Is required"
|
|
||||||
ticketnumber={props.caseReference}
|
|
||||||
documentTypeCode={
|
|
||||||
props.documentTypeCode
|
|
||||||
}
|
}
|
||||||
hint={props.hint}
|
setFilesForRepresentations={
|
||||||
fileList={props.fileList}
|
setFilesForRepresentations
|
||||||
setFilesForAppeal={
|
}
|
||||||
props.setFilesForAppeal
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
}
|
}
|
||||||
containerID={props.containerID}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</fieldset>
|
||||||
</fieldset>
|
</div>{" "}
|
||||||
</div>{" "}
|
|
||||||
</div>
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-button-group">
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
className="govuk-button"
|
|
||||||
data-module="govuk-button"
|
|
||||||
>
|
|
||||||
Continue
|
|
||||||
</button>
|
|
||||||
{/* <a
|
|
||||||
onClick={() => {
|
|
||||||
setRepresentationSubmit(true);
|
|
||||||
}}
|
|
||||||
className="govuk-button"
|
|
||||||
>
|
|
||||||
Continue ww
|
|
||||||
</a> */}
|
|
||||||
<a
|
|
||||||
onClick={() => {
|
|
||||||
setRepresentationCapacity();
|
|
||||||
}}
|
|
||||||
className="govuk-link"
|
|
||||||
>
|
|
||||||
Back
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
</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>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RepAppellant;
|
//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,
|
||||||
|
})(RepAppellant)
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,23 +1,9 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { connect } from "react-redux";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import {
|
import { useRouter } from "next/router";
|
||||||
Field,
|
|
||||||
reduxForm,
|
|
||||||
formValueSelector,
|
|
||||||
handleSubmit,
|
|
||||||
reset,
|
|
||||||
} from "redux-form";
|
|
||||||
import {
|
|
||||||
RenderPickList,
|
|
||||||
RenderTextfield,
|
|
||||||
RenderRadioList,
|
|
||||||
RenderMultiline,
|
|
||||||
} from "./representationElements";
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import { Field } from "redux-form";
|
||||||
import RepDetails from "./representationDetails";
|
import RepDetails from "./representationDetails";
|
||||||
import { setRepresentationCapacity } from "../../../store/currentView/action";
|
import { RenderRadioListWithText } from "./representationElements";
|
||||||
|
|
||||||
let RepCapacitySelection = (props) => {
|
let RepCapacitySelection = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -31,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) => (
|
||||||
@@ -40,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 (
|
||||||
<>
|
<>
|
||||||
@@ -47,22 +35,41 @@ let RepCapacitySelection = (props) => {
|
|||||||
formObj={formObj}
|
formObj={formObj}
|
||||||
currentType={currentType}
|
currentType={currentType}
|
||||||
casesObj={casesObj}
|
casesObj={casesObj}
|
||||||
|
caseReference={props.props.caseReference}
|
||||||
|
searchResultsObj={props.props.searchResultsObj}
|
||||||
|
myRepresentations={props.props.myRepresentations}
|
||||||
|
props={props}
|
||||||
|
setCurrentReference={setCurrentReference}
|
||||||
|
appealType={appealType}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
<div id="rep-details" className="vo_hiddens">
|
<div id="rep-details" className="">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<h2 className="govuk-heading-m ">
|
<h2 className="govuk-heading-m ">
|
||||||
Your details - {props.firstValue}
|
{t(
|
||||||
|
"myrepresentations:capacity-select-your-details"
|
||||||
|
)}{" "}
|
||||||
|
- {props.firstValue}
|
||||||
</h2>
|
</h2>
|
||||||
<Field
|
<Field
|
||||||
name="representationCapacity"
|
name="representationCapacity"
|
||||||
datafieldname="representationCapacity"
|
datafieldname="representationCapacity"
|
||||||
label="In what capacity do you wish to make representations on this case?"
|
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"
|
||||||
errorMsg={t("newappeal:select-an-option-label")}
|
errorMsg={t(
|
||||||
component={RenderRadioList}
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
component={RenderRadioListWithText}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,7 +82,7 @@ let RepCapacitySelection = (props) => {
|
|||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
>
|
>
|
||||||
Continue
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import { useEffect } from "react";
|
||||||
import { Field, reduxForm } from "redux-form";
|
import { connect } from "react-redux";
|
||||||
import {
|
|
||||||
RenderPickList,
|
|
||||||
RenderTextfield,
|
|
||||||
RenderRadioList,
|
|
||||||
RenderMultiline,
|
|
||||||
} from "./representationElements";
|
|
||||||
import {
|
|
||||||
setRepresentationCapacity,
|
|
||||||
setRepresentationSubmit,
|
|
||||||
setSubmitBack,
|
|
||||||
} from "../../../store/currentView/action";
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
createWatchedCases,
|
||||||
|
sendEmail,
|
||||||
|
sendRepCompleteMessage,
|
||||||
|
setRepInvolvment,
|
||||||
|
} from "../../../actions";
|
||||||
|
import { setRepresentationReset } from "../../../store/currentView/action";
|
||||||
|
|
||||||
const RepComplete = (props) => {
|
const RepComplete = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -28,6 +26,8 @@ const RepComplete = (props) => {
|
|||||||
currentView,
|
currentView,
|
||||||
setSubmitBack,
|
setSubmitBack,
|
||||||
setRepresentationSubmitConfirmation,
|
setRepresentationSubmitConfirmation,
|
||||||
|
setRepresentationMessageSent,
|
||||||
|
repFormData,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
@@ -36,35 +36,74 @@ const RepComplete = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const reference = "PEDW-REPRESENTATION-COMPLETE";
|
||||||
|
const templateId = "c49785e7-3217-40b6-b33f-dffc4e58d5c1";
|
||||||
|
const emailAddress =
|
||||||
|
props.props.props.props.accountDetails.accountDetails.emailaddress1;
|
||||||
|
const personalisation = {
|
||||||
|
"caseReference":
|
||||||
|
props.props.currentView.caseReference.currentReference,
|
||||||
|
"emailAddress":
|
||||||
|
props.props.props.props.accountDetails.accountDetails
|
||||||
|
.emailaddress1,
|
||||||
|
"linkExpiry": 10 * 60,
|
||||||
|
};
|
||||||
|
|
||||||
|
props.props.currentView.representationMessageSent != true &&
|
||||||
|
(setRepInvolvment(
|
||||||
|
props.props.currentView.caseReference.incidentid,
|
||||||
|
props.props.props.props.accountDetails.accountDetails.contactid
|
||||||
|
),
|
||||||
|
sendRepCompleteMessage(
|
||||||
|
props.props.props.props.accountDetails.containerID,
|
||||||
|
props.props.currentView.caseReference.currentReference,
|
||||||
|
props.repFormData.repfile_name
|
||||||
|
),
|
||||||
|
sendEmail(templateId, emailAddress, personalisation, reference),
|
||||||
|
createWatchedCases({
|
||||||
|
"pinswg_WatchedCase@odata.bind":
|
||||||
|
"/incidents(" +
|
||||||
|
props.props.currentView.caseReference.incidentid +
|
||||||
|
")",
|
||||||
|
"pinswg_Contact@odata.bind":
|
||||||
|
"/contacts(" +
|
||||||
|
props.props.props.props.accountDetails.accountDetails
|
||||||
|
.contactid +
|
||||||
|
")",
|
||||||
|
"pinswg_appealcasetype":
|
||||||
|
props.props.currentView.caseReference.appealType,
|
||||||
|
"pinswg_representationsubmitted": new Date(Date.now()),
|
||||||
|
"pinswg_representationtype":
|
||||||
|
props.props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
)
|
||||||
|
? props.props.currentView.caseReference.repDetails
|
||||||
|
.representationType
|
||||||
|
: props.props.currentView.caseReference
|
||||||
|
.representationType,
|
||||||
|
}),
|
||||||
|
setRepresentationMessageSent(true));
|
||||||
|
});
|
||||||
return (
|
return (
|
||||||
<div id="rep-appellant">
|
<div id="rep-appellant">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-grid-row govuk-body">
|
<div className="govuk-grid-row govuk-body">
|
||||||
<h1 className="govuk-heading-m ">
|
<h1 className="govuk-heading-m ">
|
||||||
Submission of Representation
|
{t("myrepresentations:rep-complete-heading")}
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>{t("myrepresentations:rep-complete-para-one")}</p>
|
||||||
Thank you for submitting your representation(s) using
|
<p>{t("myrepresentations:rep-complete-para-two")}</p>
|
||||||
the Appeals Casework Portal.
|
<p> {t("myrepresentations:rep-complete-para-three")}</p>
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Please remember that any supporting documentation needs
|
|
||||||
to be received by us within the appropriate deadline for
|
|
||||||
the case. Anything you send to us must be clearly marked
|
|
||||||
with the case reference number and the site address
|
|
||||||
(including the postcode, where known).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You will shortly receive confirmation to the email
|
|
||||||
address you have provided.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<Link href="/myportal">
|
<Link
|
||||||
<a className="govuk-button">Continue</a>
|
href="/"
|
||||||
|
onClick={() => setRepresentationReset()}
|
||||||
|
className="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,4 +112,22 @@ const RepComplete = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RepComplete;
|
const mapStateToProps = (state) => {
|
||||||
|
return {
|
||||||
|
search: state.search,
|
||||||
|
searchResultsObj: state.searchResultsObj,
|
||||||
|
formData: state.formData,
|
||||||
|
appealType: state.appealType,
|
||||||
|
currentView: state.currentView,
|
||||||
|
myRepresentations: state.myRepresentations,
|
||||||
|
initialValues: state.currentView.caseReference.repDetails,
|
||||||
|
accountDetails: state.accountDetails,
|
||||||
|
//form: state.form,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(RepComplete);
|
||||||
|
|||||||
@@ -1,24 +1,28 @@
|
|||||||
import Link from "next/link";
|
import _ from "lodash";
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { Field, reduxForm } from "redux-form";
|
import { useRouter } from "next/router";
|
||||||
import {
|
import { useState } from "react";
|
||||||
RenderPickList,
|
|
||||||
RenderTextfield,
|
|
||||||
RenderRadioList,
|
|
||||||
RenderMultiline,
|
|
||||||
} from "./representationElements";
|
|
||||||
import {
|
|
||||||
setRepresentationCapacity,
|
|
||||||
setRepresentationSubmit,
|
|
||||||
setSubmitBack,
|
|
||||||
setRepresentationSubmitConfirmation,
|
|
||||||
} from "../../../store/currentView/action";
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import { connect } from "react-redux";
|
||||||
import RepComplete from "./representationComplete";
|
import RepComplete from "./representationComplete";
|
||||||
|
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
||||||
|
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
||||||
|
import Link from "next/link";
|
||||||
|
import {
|
||||||
|
bytesToSize,
|
||||||
|
getThumbnailIconByExtension,
|
||||||
|
formatDates,
|
||||||
|
updateLinks,
|
||||||
|
} 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;
|
||||||
@@ -30,6 +34,13 @@ const RepCompleteSubmit = (props) => {
|
|||||||
currentView,
|
currentView,
|
||||||
setSubmitBack,
|
setSubmitBack,
|
||||||
setRepresentationSubmitConfirmation,
|
setRepresentationSubmitConfirmation,
|
||||||
|
setRepresentationMessageSent,
|
||||||
|
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) => (
|
||||||
@@ -38,79 +49,661 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
let repFormData = formObj.representationForm.values;
|
||||||
|
|
||||||
|
repFormData = updateLinks(repFormData);
|
||||||
|
|
||||||
|
//const repDate = new Date();
|
||||||
|
|
||||||
|
// let day = repDate.getDate();
|
||||||
|
// let month = repDate.getMonth() + 1;
|
||||||
|
// let year = repDate.getFullYear();
|
||||||
|
|
||||||
|
// let repType = "";
|
||||||
|
// switch (repFormData.representationCapacity) {
|
||||||
|
// case t("myrepresentations:capacity-options-arr-appellant"):
|
||||||
|
// repType = "APP";
|
||||||
|
// break;
|
||||||
|
// case t("myrepresentations:capacity-options-arr-agent"):
|
||||||
|
// repType = "AGENT";
|
||||||
|
// break;
|
||||||
|
// case t("myrepresentations:capacity-options-arr-interested"):
|
||||||
|
// repType = "IP";
|
||||||
|
// break;
|
||||||
|
// case "Land Owner":
|
||||||
|
// repType = "LO";
|
||||||
|
// break;
|
||||||
|
// case "lpa":
|
||||||
|
// repType = "LPA";
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// default:
|
||||||
|
// // code block
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Object.assign(repFormData, {
|
||||||
|
// "repfile_name": repFormData.hasOwnProperty("repfile_name")
|
||||||
|
// ? repFormData.repfile_name
|
||||||
|
// : year +
|
||||||
|
// "-" +
|
||||||
|
// month +
|
||||||
|
// "-" +
|
||||||
|
// day +
|
||||||
|
// "-" +
|
||||||
|
// repDate.getHours() +
|
||||||
|
// repDate.getMinutes() +
|
||||||
|
// repDate.getSeconds() +
|
||||||
|
// "_" +
|
||||||
|
// repType +
|
||||||
|
// "_" +
|
||||||
|
// props.props.props.accountDetails.accountDetails.lastname +
|
||||||
|
// "_" +
|
||||||
|
// props.props.props.accountDetails.accountDetails.firstname,
|
||||||
|
// "pinswg_name": props.props.currentView.caseReference.currentReference,
|
||||||
|
// "containerID": props.props.props.accountDetails.containerID,
|
||||||
|
// "appealType": props.props.currentView.caseReference.appealType,
|
||||||
|
// "incidentID": props.props.currentView.caseReference.incidentid,
|
||||||
|
// "caseRef": props.props.currentView.caseReference.currentReference,
|
||||||
|
// });
|
||||||
|
|
||||||
|
//console.log("///////// repFormData:", repFormData);
|
||||||
|
|
||||||
|
const whichQuestionnaireCheck = () => {
|
||||||
|
{
|
||||||
|
switch (currentView.caseReference.appealType) {
|
||||||
|
case 846040000:
|
||||||
|
case 846040001:
|
||||||
|
case 846040025:
|
||||||
|
case 846040004:
|
||||||
|
case 846040018:
|
||||||
|
case 846040003:
|
||||||
|
case 846040009:
|
||||||
|
case 846040008:
|
||||||
|
case 846040017:
|
||||||
|
return (
|
||||||
|
<RepLPAQuestionnaireCheck_s78
|
||||||
|
props={props}
|
||||||
|
formObj={formObj}
|
||||||
|
setSubmitBack={setSubmitBack}
|
||||||
|
setShowQuestionnaireSection={
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
}
|
||||||
|
setRepresentationSubmit={setRepresentationSubmit}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 846040005:
|
||||||
|
case 846040006:
|
||||||
|
case 846040007:
|
||||||
|
return (
|
||||||
|
<RepLPAQuestionnaireCheck_enforcement
|
||||||
|
props={props}
|
||||||
|
formObj={formObj}
|
||||||
|
setSubmitBack={setSubmitBack}
|
||||||
|
setShowQuestionnaireSection={
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
}
|
||||||
|
setRepresentationSubmit={setRepresentationSubmit}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return <></>;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let buildAppealFilesArray = [];
|
||||||
|
|
||||||
|
let filesUploadObj = props.currentView.fileList;
|
||||||
|
|
||||||
|
// formObj.representationForm.values.representationDocuments;
|
||||||
|
|
||||||
|
for (let key in filesUploadObj) {
|
||||||
|
typeof filesUploadObj[key].name != "undefined" &&
|
||||||
|
buildAppealFilesArray.push({
|
||||||
|
"name": filesUploadObj[key].name,
|
||||||
|
"size": filesUploadObj[key].contentLength,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// buildAppealFilesArray,
|
||||||
|
// formObj.representationForm.values.filesList
|
||||||
|
// );
|
||||||
|
|
||||||
|
// buildAppealFilesArray = formObj.representationForm.values.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// )
|
||||||
|
// ? formObj.representationForm.values.filesList
|
||||||
|
// : [];
|
||||||
|
|
||||||
|
let arrUniq = [
|
||||||
|
...new Map(buildAppealFilesArray.map((v) => [v.name, v])).values(),
|
||||||
|
];
|
||||||
|
|
||||||
|
buildAppealFilesArray = buildAppealFilesArray.filter(function (el) {
|
||||||
|
return el != null;
|
||||||
|
});
|
||||||
|
|
||||||
|
// const arrUniq = buildAppealFilesArray.filter(
|
||||||
|
// (obj1, i, arr) => arr.findIndex((obj2) => obj2.name === obj1.name) === i
|
||||||
|
// );
|
||||||
|
|
||||||
|
//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, {
|
||||||
|
"filesList": arrUniq,
|
||||||
|
});
|
||||||
|
|
||||||
|
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 ? (
|
||||||
<RepComplete />
|
<RepComplete
|
||||||
|
repFormData={repFormData}
|
||||||
|
props={props}
|
||||||
|
setRepresentationMessageSent={setRepresentationMessageSent}
|
||||||
|
setRepresentationReset={setRepresentationReset}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div id="rep-appellant">
|
<div id="rep-appellant">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-grid-row govuk-body">
|
<div className="govuk-grid-row govuk-body">
|
||||||
<h1 className="govuk-heading-m ">Submit</h1>
|
<h1 className="govuk-heading-m ">
|
||||||
|
{" "}
|
||||||
|
{repFormData.appealType == 846040002
|
||||||
|
? t(
|
||||||
|
"myrepresentations:consultation-check-submit-heading"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:rep-check-submit-heading"
|
||||||
|
)}
|
||||||
|
</h1>
|
||||||
|
<dl className="govuk-summary-list ">
|
||||||
|
<h2 className="govuk-heading-m govuk-!-margin-top-9">
|
||||||
|
{repFormData.appealType == 846040002
|
||||||
|
? t(
|
||||||
|
"myrepresentations:consultation-check-your-rep-heading"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:rep-check-your-rep-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{repFormData.appealType == 846040002
|
||||||
|
? t(
|
||||||
|
"case:consultation-representation-type"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:representation-representation-type"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? repFormData.representationType ==
|
||||||
|
"Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: repFormData.representationType ==
|
||||||
|
"Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: repFormData.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: repFormData.representationType
|
||||||
|
: repFormData.representationType}
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__actions">
|
||||||
|
{/* <a
|
||||||
|
className="govuk-link"
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setSubmitBack();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:change-link-label")}
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
{" "}
|
||||||
|
{FieldsTranslations(
|
||||||
|
rows[0].value
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a> */}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
{_.has(
|
||||||
|
repFormData,
|
||||||
|
"representationOnBehalfOf"
|
||||||
|
) && (
|
||||||
|
<>
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t(
|
||||||
|
"case:representation-onbehalfof"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{
|
||||||
|
repFormData.representationOnBehalfOf
|
||||||
|
}
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__actions">
|
||||||
|
<a
|
||||||
|
className="govuk-link"
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
// setSubmitBack();
|
||||||
|
setCurrentReference({
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
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
|
||||||
|
)} */}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
{repFormData.representationOnBehalfOf ==
|
||||||
|
"Yes" && (
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t(
|
||||||
|
"case:representation-onbehalfof-details"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{
|
||||||
|
repFormData.representationOnBehalfOf_details
|
||||||
|
}
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__actions">
|
||||||
|
<a
|
||||||
|
className="govuk-link"
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
// setSubmitBack();
|
||||||
|
setCurrentReference(
|
||||||
|
{
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
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
|
||||||
|
)} */}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{repFormData.representationType !=
|
||||||
|
"Questionnaire" &&
|
||||||
|
repFormData.appealType != 846040002 && (
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t(
|
||||||
|
"case:representation-comments"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
<span
|
||||||
|
className="multiline-elipsis"
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: repFormData.representationComments,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__actions">
|
||||||
|
<a
|
||||||
|
className="govuk-link"
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
// setSubmitBack();
|
||||||
|
|
||||||
|
setCurrentReference({
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
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
|
||||||
|
)} */}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("case:representation-files")}
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{arrUniq.length > 0
|
||||||
|
? arrUniq.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>
|
||||||
|
))
|
||||||
|
: ""}
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dd className="govuk-summary-list__actions">
|
||||||
|
<a
|
||||||
|
className="govuk-link"
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
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")}
|
||||||
|
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
{" "}
|
||||||
|
{/* {FieldsTranslations(
|
||||||
|
rows[0].value
|
||||||
|
)} */}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
{repFormData.representationType ==
|
||||||
|
"Questionnaire"
|
||||||
|
? whichQuestionnaireCheck()
|
||||||
|
: ""}
|
||||||
|
</dl>
|
||||||
<p>
|
<p>
|
||||||
The gathering and subsequent processing of the
|
{t(
|
||||||
personal data supplied by you in this form, is
|
"myrepresentations:rep-check-tandc-para-one"
|
||||||
in accordance with the terms of our registration
|
)}
|
||||||
under the Data Protection Act 2018.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The Planning Inspectorate takes its data
|
{t(
|
||||||
protection responsibilities for the information
|
"myrepresentations:rep-check-tandc-para-two"
|
||||||
you provide us with very seriously. To find out
|
)}{" "}
|
||||||
more about how we use and manage your personal
|
<Link
|
||||||
data, please go to our privacy notice.
|
href={t("common:footer-privacy-link")}
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"common:footer-privacy-notice-link-label"
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
I confirm that all sections of this form have
|
{t(
|
||||||
been fully completed and that the details are
|
"myrepresentations:rep-check-tandc-para-three"
|
||||||
correct to the best of my knowledge.
|
)}
|
||||||
</p>
|
</p>
|
||||||
|
{checkRepDatePassed() ? (
|
||||||
|
<div className="govuk-warning-text noticebanner">
|
||||||
|
<strong className="govuk-warning-text__text">
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
Warning
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
|
<div>
|
||||||
|
<div className=" govuk-body-s">
|
||||||
|
<h2 className="govuk-heading-s">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:rep-period-passed-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
<p className="govuk-body-s">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:rep-period-notice-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
</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>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-grid-row">
|
||||||
<label
|
<div className="govuk-button-group">
|
||||||
className="govuk-label govuk-body-m"
|
<button
|
||||||
htmlFor="representationType"
|
disabled={
|
||||||
>
|
confirmSections
|
||||||
I confirm I have read the above.
|
? false
|
||||||
</label>
|
: true
|
||||||
{/* <Field
|
}
|
||||||
name="representationType"
|
type="submit"
|
||||||
component={RenderPickList}
|
className="govuk-button"
|
||||||
datafieldname="representationType"
|
data-module="govuk-button"
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
onClick={() => {
|
||||||
/> */}
|
// setRepresentationSubmitConfirmation(
|
||||||
</div>
|
// true
|
||||||
</div>
|
// );
|
||||||
<div className="govuk-grid-row">
|
setRepresentationSubmit(
|
||||||
<div className="govuk-button-group">
|
true
|
||||||
<button
|
);
|
||||||
type="submit"
|
}}
|
||||||
className="govuk-button"
|
>
|
||||||
data-module="govuk-button"
|
{t("common:continue-button")}
|
||||||
onClick={() =>
|
</button>
|
||||||
setRepresentationSubmitConfirmation()
|
<a
|
||||||
}
|
onClick={() => setSubmitBack()}
|
||||||
>
|
className="govuk-link"
|
||||||
Continue
|
>
|
||||||
</button>
|
{t(
|
||||||
{/* <a
|
"case:summary-back-button-label"
|
||||||
onClick={() => {
|
)}
|
||||||
setRepresentationSubmit(false);
|
</a>
|
||||||
}}
|
</div>
|
||||||
className="govuk-button"
|
</div>
|
||||||
>
|
</>
|
||||||
Continue
|
)}
|
||||||
</a> */}
|
|
||||||
|
|
||||||
<a
|
|
||||||
onClick={() => setSubmitBack()}
|
|
||||||
className="govuk-link"
|
|
||||||
>
|
|
||||||
Back
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -119,4 +712,26 @@ const RepCompleteSubmit = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RepCompleteSubmit;
|
const mapStateToProps = (state) => {
|
||||||
|
return {
|
||||||
|
search: state.search,
|
||||||
|
searchResultsObj: state.searchResultsObj,
|
||||||
|
formData: state.formData,
|
||||||
|
appealType: state.appealType,
|
||||||
|
currentView: state.currentView,
|
||||||
|
myRepresentations: state.myRepresentations,
|
||||||
|
initialValues: state.currentView.caseReference.repDetails,
|
||||||
|
accountDetails: state.accountDetails,
|
||||||
|
//form: state.form,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
setCurrentReference: (currentReference) => {
|
||||||
|
dispatch(setCurrentReference(currentReference));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(RepCompleteSubmit);
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import Link from "next/link";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { Field, reduxForm } from "redux-form";
|
import { useRouter } from "next/router";
|
||||||
import { RenderPickList, RenderTextfield } from "./representationElements";
|
|
||||||
|
|
||||||
const RepDetails = (props) => {
|
const RepDetails = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -10,7 +8,33 @@ 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 setCaseDetailsObj = router.query.hasOwnProperty("state")
|
||||||
|
? router.query.state == "edit"
|
||||||
|
? props.myRepresentations.myRepresentations
|
||||||
|
: props.searchResultsObj.searchDetailsObj
|
||||||
|
: props.currentType == "watchedCases"
|
||||||
|
? props.props.props.props.watchedCases.watchedCasesDetails
|
||||||
|
: props.props.props.searchResultsObj.searchDetailsObj;
|
||||||
|
|
||||||
|
var detailsObj = {};
|
||||||
|
|
||||||
|
caseReference = router.query.hasOwnProperty("state")
|
||||||
|
? router.query.state == "edit"
|
||||||
|
? router.query.case
|
||||||
|
: caseReference
|
||||||
|
: caseReference;
|
||||||
|
|
||||||
|
detailsObj = jsonpath({
|
||||||
|
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
|
||||||
|
json: setCaseDetailsObj,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -24,41 +48,63 @@ const RepDetails = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{casesObj.appellantApplicant || ""}
|
{casesObj.appellantApplicant || ""}
|
||||||
|
{
|
||||||
|
detailsObj[
|
||||||
|
"_pinswg_appellant_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-agent-label")}
|
|
||||||
</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
Mr A Agent
|
|
||||||
</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-site-address-label")}
|
{t("case:summary-site-address-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{casesObj.address1 || ""}
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
<br />
|
? detailsObj.pinswg_siteaddressline1
|
||||||
{casesObj.town || ""}
|
: ""}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddressline1") &&
|
||||||
<br />
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
{casesObj.postcode || ""}
|
null && <br />}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddressline2")
|
||||||
|
? detailsObj.pinswg_siteaddressline2
|
||||||
|
: ""}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddressline2") &&
|
||||||
|
detailsObj.pinswg_siteaddressline2 !=
|
||||||
|
null && <br />}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||||
|
? detailsObj.pinswg_siteaddresstown
|
||||||
|
: ""}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
||||||
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
|
null && <br />}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||||
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
|
: ""}
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_siteaddresscounty"
|
||||||
|
) &&
|
||||||
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
|
null && <br />}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddresspostcode")
|
||||||
|
? detailsObj.pinswg_siteaddresspostcode
|
||||||
|
: ""}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
This form enables you to submit comments on a case to
|
{appealType == 846040002
|
||||||
Planning and Environment Decisions Wales.{" "}
|
? t("myrepresentations:sips-capacity-para-one")
|
||||||
|
: t("myrepresentations:capacity-para-one")}
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
Please note that comments from interested parties need
|
{appealType == 846040002
|
||||||
to be made within the timetable. This can be found on
|
? t("myrepresentations:sips-capacity-para-two")
|
||||||
the previous ‘Case Summary‘ page. Comments
|
: t("myrepresentations:capacity-para-two")}
|
||||||
submitted after this date may be considered invalid.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,24 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { Field, reduxForm } from "redux-form";
|
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 {
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderCondtionalRadioList,
|
||||||
RenderPickList,
|
RenderPickList,
|
||||||
RenderTextfield,
|
RenderRichMultiline,
|
||||||
RenderRadioList,
|
shouldDisableButton,
|
||||||
RenderMultiline,
|
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
|
|
||||||
import { useDropzone } from "react-dropzone";
|
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();
|
||||||
@@ -20,311 +30,306 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
interestedPersonRepresentationArr,
|
interestedPersonRepresentationArr,
|
||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const required = (value) => (value ? undefined : "Required");
|
||||||
const files = acceptedFiles.map((file) => (
|
|
||||||
<li key={file.path}>
|
|
||||||
{file.path} - {file.size} bytes
|
|
||||||
</li>
|
|
||||||
));
|
|
||||||
return (
|
|
||||||
<div id="rep-interested">
|
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<h2 className="govuk-heading-m ">
|
|
||||||
Representation - interested
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
|
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">
|
<div className="govuk-form-group">
|
||||||
<label
|
{typeof formObj.representationForm.values
|
||||||
className="govuk-label govuk-body-m"
|
.representationType == "undefined" &&
|
||||||
htmlFor="representationType"
|
props.representationType != "Select..." ? (
|
||||||
>
|
<>
|
||||||
What kind of representation are you making?
|
<h2 className="govuk-heading-m ">
|
||||||
</label>
|
{t(
|
||||||
<Field
|
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||||
name="representationType"
|
)}
|
||||||
component={RenderPickList}
|
</h2>
|
||||||
datafieldname="representationType"
|
|
||||||
optionsArr={interestedPersonRepresentationArr}
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
{(typeof props.representationType != "undefined" ||
|
||||||
<div className="govuk-form-group">
|
typeof formObj.representationForm.values
|
||||||
<Field
|
.representationType != "undefined") && (
|
||||||
className="govuk-input govuk-!-width-three-quarters"
|
<>
|
||||||
id="representationDescription"
|
<div className="govuk-grid-row">
|
||||||
name="representationDescription"
|
<div className="govuk-form-group">
|
||||||
value="email"
|
<Field
|
||||||
data-aria-controls="representationDescription"
|
name="representationOnBehalfOf"
|
||||||
type="text"
|
datafieldname="representationOnBehalfOf"
|
||||||
component={RenderTextfield}
|
// label="In what capacity do you wish to make representations on this case?"
|
||||||
label="Description of representation"
|
options={[
|
||||||
/>
|
t(
|
||||||
</div>
|
"myrepresentations:questionnaire-yes"
|
||||||
<div className="govuk-grid-row">
|
),
|
||||||
<div className="govuk-form-group">
|
t("myrepresentations:questionnaire-no"),
|
||||||
<fieldset
|
]}
|
||||||
className="govuk-fieldset"
|
id="representationOnBehalfOf"
|
||||||
aria-describedby="contact-hint"
|
className="govuk-radios__input"
|
||||||
>
|
errorMsg={t(
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--l">
|
"myrepresentations:select-an-option-label"
|
||||||
<label
|
)}
|
||||||
className="govuk-fieldset__heading govuk-body-m"
|
component={RenderCondtionalRadioList}
|
||||||
id="representationCapacity_label"
|
validate={[required]}
|
||||||
>
|
legend={t("case:representation-onbehalfof")}
|
||||||
Are you acting on behalf of a company,
|
hint={t(
|
||||||
group or organisation?
|
"myrepresentations:representation-onbehalfof-hint"
|
||||||
</label>
|
)}
|
||||||
</legend>
|
/>
|
||||||
<div id="contact-hint" className="govuk-hint">
|
</div>
|
||||||
e.g. ‘Owners of Numbers 1-5 High
|
|
||||||
Street‘, or ‘Mr and Mrs
|
|
||||||
Smith‘ or ‘The executors of Mr
|
|
||||||
Evans‘ estate‘
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="govuk-radios govuk-radios--conditional"
|
|
||||||
data-module="govuk-radios"
|
|
||||||
>
|
|
||||||
<div className="govuk-radios__item">
|
|
||||||
<input
|
|
||||||
className="govuk-radios__input"
|
|
||||||
id="contact"
|
|
||||||
name="contact"
|
|
||||||
type="radio"
|
|
||||||
value="email"
|
|
||||||
data-aria-controls="conditional-contact"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-radios__label"
|
|
||||||
htmlFor="contact"
|
|
||||||
>
|
|
||||||
Yes
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="govuk-radios__conditional govuk-radios__conditional--hidden"
|
|
||||||
id="conditional-contact"
|
|
||||||
>
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<label
|
|
||||||
className="govuk-label"
|
|
||||||
htmlFor="contact-by-email"
|
|
||||||
>
|
|
||||||
Enter the name of the
|
|
||||||
company/group/organisation *
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
className="govuk-input govuk-!-width-one-third"
|
|
||||||
id="contact-by-email"
|
|
||||||
name="contact-by-email"
|
|
||||||
type="email"
|
|
||||||
spellCheck="false"
|
|
||||||
autoComplete="email"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="govuk-radios__item">
|
|
||||||
<input
|
|
||||||
className="govuk-radios__input"
|
|
||||||
id="contact-2"
|
|
||||||
name="contact"
|
|
||||||
type="radio"
|
|
||||||
value="phone"
|
|
||||||
data-aria-controls="conditional-contact-2"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-radios__label"
|
|
||||||
htmlFor="contact-2"
|
|
||||||
>
|
|
||||||
No
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
You can enter your comments in the space
|
{t("myrepresentations:enter-comment-label")}
|
||||||
provided or attach a separate document.
|
</p>
|
||||||
</p>
|
<fieldset
|
||||||
<fieldset
|
className="govuk-fieldset"
|
||||||
className="govuk-fieldset"
|
aria-describedby="commentBox-hint"
|
||||||
aria-describedby="commentBox-hint"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
id="commentBox-hint"
|
|
||||||
className="govuk-hint"
|
|
||||||
>
|
>
|
||||||
My comments are set out in:*
|
{/* <div
|
||||||
</div>
|
id="commentBox-hint"
|
||||||
<div
|
className="govuk-hint"
|
||||||
className="govuk-checkboxes"
|
|
||||||
data-module="govuk-checkboxes"
|
|
||||||
>
|
|
||||||
<div className="govuk-checkboxes__item">
|
|
||||||
<Field
|
|
||||||
className="govuk-checkboxes__input"
|
|
||||||
id="commentBox"
|
|
||||||
name="commentBox"
|
|
||||||
value="email"
|
|
||||||
data-aria-controls="commentBox"
|
|
||||||
type="checkbox"
|
|
||||||
component={RenderTextfield}
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-checkboxes__label"
|
|
||||||
htmlFor="commentBox"
|
|
||||||
>
|
|
||||||
the box below{" "}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
_.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
)
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj[
|
|
||||||
"representationForm"
|
|
||||||
].values
|
|
||||||
)
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj[
|
|
||||||
"representationForm"
|
|
||||||
].values.commentBox
|
|
||||||
)
|
|
||||||
? formObj["representationForm"]
|
|
||||||
.values.commentBox ==
|
|
||||||
false
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
|
||||||
: "govuk-checkboxes__conditional"
|
|
||||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
|
||||||
}
|
|
||||||
id="conditional-commentBox"
|
|
||||||
>
|
>
|
||||||
<div className="govuk-form-group">
|
{t(
|
||||||
<Field
|
"myrepresentations:comments-set-out-label"
|
||||||
name="representationComments"
|
)}
|
||||||
id="representationComments"
|
:
|
||||||
component={RenderMultiline}
|
</div> */}
|
||||||
type="text"
|
<div className="govuk-form-group">
|
||||||
rows="5"
|
|
||||||
className="govuk-textarea govuk-input--width-30"
|
|
||||||
aria-describedby={
|
|
||||||
props.name + "-hint"
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="govuk-checkboxes__item">
|
|
||||||
<Field
|
<Field
|
||||||
className="govuk-checkboxes__input"
|
name="representationComments"
|
||||||
id="documentBox"
|
id="representationComments"
|
||||||
name="documentBox"
|
component={RenderRichMultiline}
|
||||||
value="email"
|
type="text"
|
||||||
data-aria-controls="documentBox"
|
rows="5"
|
||||||
type="checkbox"
|
className="govuk-textarea govuk-input--width-30"
|
||||||
component={RenderTextfield}
|
aria-describedby={
|
||||||
|
props.name + "-hint"
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<label
|
|
||||||
className="govuk-label govuk-checkboxes__label"
|
|
||||||
htmlFor="documentBox"
|
|
||||||
>
|
|
||||||
separate documents
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
className={
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
_.isEmpty(
|
<FileUploadField
|
||||||
formObj["representationForm"]
|
name={"representationDocuments"}
|
||||||
)
|
id={"representationDocuments"}
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
label={t(
|
||||||
: _.isEmpty(
|
"myrepresentations:add-files-label"
|
||||||
formObj[
|
)}
|
||||||
"representationForm"
|
ticketnumber={
|
||||||
].values
|
props.props.caseReference
|
||||||
)
|
}
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
hint={"sdsd"}
|
||||||
: _.isEmpty(
|
fileList={
|
||||||
formObj[
|
props.currentView.fileList
|
||||||
"representationForm"
|
|
||||||
].values.documentBox
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
)
|
// "repDetails"
|
||||||
? formObj["representationForm"]
|
// )
|
||||||
.values.documentBox ==
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
false
|
// "filesList"
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
// ) &&
|
||||||
: "govuk-checkboxes__conditional"
|
// props.currentView
|
||||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
// .caseReference
|
||||||
}
|
// .repDetails.filesList
|
||||||
id="conditional-documentBox"
|
// .length > 0
|
||||||
>
|
// ? props.currentView
|
||||||
<div className="govuk-form-group">
|
// .caseReference
|
||||||
<section className="container">
|
// .repDetails
|
||||||
<div
|
// .filesList
|
||||||
{...getRootProps({
|
// : []
|
||||||
className: "dropzone",
|
// : []
|
||||||
})}
|
}
|
||||||
>
|
setFilesForRepresentations={
|
||||||
<input
|
setFilesForRepresentations
|
||||||
{...getInputProps()}
|
}
|
||||||
/>
|
containerID={
|
||||||
<p>
|
props.props.props.accountDetails
|
||||||
Drag and drop files here
|
.containerID
|
||||||
or click to select files
|
}
|
||||||
</p>
|
filenamePrefix={props.formObj}
|
||||||
</div>
|
props={props.props.props}
|
||||||
<aside>
|
setCurrentReference={
|
||||||
<h4>Files</h4>
|
props.setCurrentReference
|
||||||
<ul>{files}</ul>
|
}
|
||||||
</aside>
|
/>
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</fieldset>
|
||||||
</fieldset>
|
</div>{" "}
|
||||||
</div>{" "}
|
</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-button-group">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
|
disabled={shouldDisableButton({
|
||||||
|
props,
|
||||||
|
formObj,
|
||||||
|
})}
|
||||||
>
|
>
|
||||||
Continue
|
{t("common:continue-button")}
|
||||||
</button>
|
</button>
|
||||||
{/* <Link href="/representation">
|
{/*
|
||||||
<a
|
<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={() => {
|
onClick={() => {
|
||||||
setRepresentationSubmit(true);
|
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
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
className="govuk-button"
|
|
||||||
>
|
>
|
||||||
Continue
|
{t("common:save-exit-button")}
|
||||||
</a>
|
</button>
|
||||||
</Link> */}
|
)}
|
||||||
<a
|
|
||||||
onClick={() => {
|
|
||||||
setRepresentationCapacity();
|
|
||||||
}}
|
|
||||||
className="govuk-link"
|
|
||||||
>
|
|
||||||
Back
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</>
|
||||||
</div>
|
);
|
||||||
);
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RepInterestedPartyPerson;
|
//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,
|
||||||
|
})(RepInterestedPartyPerson)
|
||||||
|
);
|
||||||
|
|||||||
@@ -0,0 +1,669 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { Field, change, formValueSelector, reduxForm } from "redux-form";
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
|
||||||
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderMultiline,
|
||||||
|
RenderPickList,
|
||||||
|
shouldDisableButton,
|
||||||
|
} from "./representationElements";
|
||||||
|
import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement";
|
||||||
|
import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78";
|
||||||
|
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
||||||
|
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||||
|
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
setCurrentPage,
|
||||||
|
setCurrentReference,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
|
let RepLPA = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const {
|
||||||
|
onSubmit,
|
||||||
|
handleSubmit,
|
||||||
|
formObj,
|
||||||
|
appellantApplicantRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
currentView,
|
||||||
|
procedureTypeValue,
|
||||||
|
onBehalfOfLPA,
|
||||||
|
setShowQuestionnaireSection,
|
||||||
|
showQuestionnaireSection,
|
||||||
|
questionnaireCount,
|
||||||
|
setQuestionnaireCount,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} = props;
|
||||||
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
|
const files = acceptedFiles.map((file) => (
|
||||||
|
<li key={file.path}>
|
||||||
|
{file.path} - {file.size} bytes
|
||||||
|
</li>
|
||||||
|
));
|
||||||
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
|
const whichQuestionnaire = () => {
|
||||||
|
{
|
||||||
|
switch (currentView.caseReference.appealType) {
|
||||||
|
case 846040000:
|
||||||
|
case 846040001:
|
||||||
|
case 846040025:
|
||||||
|
case 846040004:
|
||||||
|
case 846040018:
|
||||||
|
case 846040003:
|
||||||
|
case 846040009:
|
||||||
|
case 846040008:
|
||||||
|
case 846040010:
|
||||||
|
case 846040017:
|
||||||
|
return (
|
||||||
|
<S78_Questionnaire
|
||||||
|
questionnaireType={"s78"}
|
||||||
|
props={props}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails.containerID
|
||||||
|
}
|
||||||
|
currentView={currentView}
|
||||||
|
showQuestionnaireSection={showQuestionnaireSection}
|
||||||
|
setShowQuestionnaireSection={
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
}
|
||||||
|
questionnaireCount={questionnaireCount}
|
||||||
|
setRepresentationSubmit={setRepresentationSubmit}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 846040005:
|
||||||
|
case 846040006:
|
||||||
|
case 846040007:
|
||||||
|
return (
|
||||||
|
<Enforcement_Questionnaire
|
||||||
|
questionnaireType={"enf"}
|
||||||
|
props={props}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails.containerID
|
||||||
|
}
|
||||||
|
currentView={currentView}
|
||||||
|
showQuestionnaireSection={showQuestionnaireSection}
|
||||||
|
setShowQuestionnaireSection={
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
}
|
||||||
|
questionnaireCount={questionnaireCount}
|
||||||
|
setRepresentationSubmit={setRepresentationSubmit}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return <></>;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const whichProgress = () => {
|
||||||
|
{
|
||||||
|
switch (currentView.caseReference.appealType) {
|
||||||
|
case 846040000:
|
||||||
|
case 846040001:
|
||||||
|
case 846040025:
|
||||||
|
case 846040004:
|
||||||
|
case 846040018:
|
||||||
|
case 846040003:
|
||||||
|
case 846040009:
|
||||||
|
case 846040008:
|
||||||
|
case 846040010:
|
||||||
|
case 846040017:
|
||||||
|
return (
|
||||||
|
<RepresentationProgress_s78
|
||||||
|
props={props}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails.containerID
|
||||||
|
}
|
||||||
|
currentView={currentView}
|
||||||
|
showQuestionnaireSection={showQuestionnaireSection}
|
||||||
|
setShowQuestionnaireSection={
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 846040005:
|
||||||
|
case 846040006:
|
||||||
|
case 846040007:
|
||||||
|
return (
|
||||||
|
<RepresentationProgress_enforcement
|
||||||
|
props={props}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails.containerID
|
||||||
|
}
|
||||||
|
currentView={currentView}
|
||||||
|
showQuestionnaireSection={showQuestionnaireSection}
|
||||||
|
setShowQuestionnaireSection={
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return <></>;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let setCaseDetailsObj = router.query.hasOwnProperty("state")
|
||||||
|
? router.query.state == "edit"
|
||||||
|
? props.props.myRepresentations.myRepresentations
|
||||||
|
: props.props.searchResultsObj.searchDetailsObj
|
||||||
|
: props.props.searchResultsObj.searchDetailsObj;
|
||||||
|
|
||||||
|
var detailsObj = {};
|
||||||
|
|
||||||
|
detailsObj = jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_name=="' +
|
||||||
|
currentView.caseReference.currentReference +
|
||||||
|
'")]',
|
||||||
|
json: setCaseDetailsObj,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||||
|
? router.query.state == "edit"
|
||||||
|
? props.props.myRepresentations.myRepresentations
|
||||||
|
: props.props.searchResultsObj.searchResultsObj
|
||||||
|
: props.props.searchResultsObj.searchResultsObj;
|
||||||
|
|
||||||
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
|
var resultsObj = {};
|
||||||
|
|
||||||
|
resultsObj = jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?@ && @.pinswg_name=="' +
|
||||||
|
currentView.caseReference.currentReference +
|
||||||
|
'")]',
|
||||||
|
json: setCaseResultssObj,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
|
props.formObj.hasOwnProperty("representationForm") &&
|
||||||
|
props.formObj["representationForm"].hasOwnProperty("values") &&
|
||||||
|
props.formObj["representationForm"].values.hasOwnProperty(
|
||||||
|
"representationCapacity"
|
||||||
|
) &&
|
||||||
|
props.formObj["representationForm"].values.hasOwnProperty(
|
||||||
|
"representationType"
|
||||||
|
) &&
|
||||||
|
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 (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{!_.has(
|
||||||
|
formObj["representationForm"],
|
||||||
|
["values", "representationType"] ||
|
||||||
|
typeof props.currentView.caseReference.repDetails !=
|
||||||
|
"undefined"
|
||||||
|
) ? (
|
||||||
|
<>
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:representation-from-an-lpa-heading"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
id="representationType"
|
||||||
|
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>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{(_.has(formObj["representationForm"], [
|
||||||
|
"values",
|
||||||
|
"representationType",
|
||||||
|
]) ||
|
||||||
|
typeof props.representationType != "undefined") &&
|
||||||
|
(props.representationType != "Questionnaire" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<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={RenderMultiline}
|
||||||
|
type="text"
|
||||||
|
rows="5"
|
||||||
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={
|
||||||
|
props.name + "-hint"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset govuk-!-margin-top-9"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
{" "}
|
||||||
|
<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
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={
|
||||||
|
props.props.caseReference
|
||||||
|
}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
// (props.formObj.hasOwnProperty(
|
||||||
|
// "representationForm"
|
||||||
|
// ) &&
|
||||||
|
// props.formObj[
|
||||||
|
// "representationForm"
|
||||||
|
// ].hasOwnProperty(
|
||||||
|
// "values"
|
||||||
|
// ) &&
|
||||||
|
// props.formObj[
|
||||||
|
// "representationForm"
|
||||||
|
// ].values.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.props.props.form[
|
||||||
|
// "representationForm"
|
||||||
|
// ].values.filesList) ||
|
||||||
|
// []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{/* // )} */}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
whichQuestionnaire()
|
||||||
|
))}
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
_.has(formObj, "values", "representationType")) &&
|
||||||
|
props.representationType == "Questionnaire" && (
|
||||||
|
<>
|
||||||
|
{showQuestionnaireSection <
|
||||||
|
questionnaireCount && (
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
// <a
|
||||||
|
// href="#"
|
||||||
|
// onClick={() => {
|
||||||
|
// setShowQuestionnaireSection(
|
||||||
|
// showQuestionnaireSection + 1
|
||||||
|
// );
|
||||||
|
// }}
|
||||||
|
// className="govuk-button"
|
||||||
|
// >
|
||||||
|
// Next section
|
||||||
|
// </a>
|
||||||
|
)}
|
||||||
|
{showQuestionnaireSection ==
|
||||||
|
questionnaireCount && (
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
{showQuestionnaireSection > 1 && (
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
// window.scrollTo({
|
||||||
|
// top: 0,
|
||||||
|
// behavior: "smooth",
|
||||||
|
// });
|
||||||
|
setRepFileName(
|
||||||
|
props.formObj[
|
||||||
|
"representationForm"
|
||||||
|
].values
|
||||||
|
),
|
||||||
|
setShowQuestionnaireSection(
|
||||||
|
showQuestionnaireSection - 1
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
Back
|
||||||
|
</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>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}{" "}
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
_.has(formObj, "values", "representationType")) &&
|
||||||
|
props.representationType != "Questionnaire" && (
|
||||||
|
<>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="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")}
|
||||||
|
</button>
|
||||||
|
{/* {router.query.state != "edit" && (
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
//setRepresentationCapacity();
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationType",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
{t("common:back-link")}www
|
||||||
|
</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 selector = formValueSelector("representationForm"); // <-- same as form name
|
||||||
|
|
||||||
|
RepLPA = connect((state) => {
|
||||||
|
const representationType = selector(state, "representationType");
|
||||||
|
const procedureType = selector(state, "procedureType");
|
||||||
|
|
||||||
|
return {
|
||||||
|
procedureType,
|
||||||
|
representationType,
|
||||||
|
};
|
||||||
|
})(RepLPA);
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
setCurrentReference: (currentReference) => {
|
||||||
|
dispatch(setCurrentReference(currentReference));
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const mapStateToProps = (state, props) => {
|
||||||
|
let initialValuesTemp = Object.assign(
|
||||||
|
state.currentView.caseReference.hasOwnProperty("repDetails")
|
||||||
|
? state.currentView.caseReference.repDetails
|
||||||
|
: state.currentView.caseReference,
|
||||||
|
{
|
||||||
|
"representationCapacity": "LPA",
|
||||||
|
"onBehalfOfLPA":
|
||||||
|
props.props.props.accountDetails.accountDetails[
|
||||||
|
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||||
|
],
|
||||||
|
"firstname":
|
||||||
|
props.props.props.accountDetails.accountDetails.firstname,
|
||||||
|
"lastname":
|
||||||
|
props.props.props.accountDetails.accountDetails.lastname,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return {
|
||||||
|
search: state.search,
|
||||||
|
searchResultsObj: state.searchResultsObj,
|
||||||
|
formData: state.formData,
|
||||||
|
appealType: state.appealType,
|
||||||
|
currentView: state.currentView,
|
||||||
|
myRepresentations: state.myRepresentations,
|
||||||
|
watchedCases: state.watchedCases,
|
||||||
|
initialValues: initialValuesTemp,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
|
reduxForm({
|
||||||
|
form: "representationForm",
|
||||||
|
enableReinitialize: true,
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
})(RepLPA)
|
||||||
|
);
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import RepLPADetails from "./representationLPADetails";
|
||||||
|
|
||||||
|
let RepLPACapacitySelection = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
capacityOptionsArr,
|
||||||
|
currentType,
|
||||||
|
casesObj,
|
||||||
|
detailsObj,
|
||||||
|
validate,
|
||||||
|
handleSubmit,
|
||||||
|
} = props;
|
||||||
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
const files = acceptedFiles.map((file) => (
|
||||||
|
<li key={file.path}>
|
||||||
|
{file.path} - {file.size} bytes
|
||||||
|
</li>
|
||||||
|
));
|
||||||
|
|
||||||
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<RepLPADetails
|
||||||
|
formObj={formObj}
|
||||||
|
currentType={currentType}
|
||||||
|
casesObj={casesObj}
|
||||||
|
detailsObj={detailsObj}
|
||||||
|
caseReference={props.props.caseReference}
|
||||||
|
searchResultsObj={props.props.searchResultsObj}
|
||||||
|
props={props.props}
|
||||||
|
/>{" "}
|
||||||
|
<div id="rep-details" className="vo_hiddens">
|
||||||
|
<div className="govuk-grid-column-three-quarters">
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
{/* <h2 className="govuk-heading-m ">
|
||||||
|
Your details - {props.firstValue}
|
||||||
|
</h2> */}
|
||||||
|
|
||||||
|
{/* <div className="">
|
||||||
|
<label className="govuk-visually-hidden2">
|
||||||
|
<Field
|
||||||
|
name="representationCapacity"
|
||||||
|
datafieldname="representationCapacity"
|
||||||
|
label={t("myrepresentations:capacity-select-what-capacity-label")}
|
||||||
|
options={["LPA"]}
|
||||||
|
id="representationCapacity"
|
||||||
|
//className="govuk-radios__input "
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
component="input"
|
||||||
|
validate={[required]}
|
||||||
|
value="LPA"
|
||||||
|
checked={"true"}
|
||||||
|
type="radio"
|
||||||
|
/>
|
||||||
|
LPA
|
||||||
|
</label>
|
||||||
|
</div> */}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default RepLPACapacitySelection;
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import { connect } from "react-redux";
|
||||||
|
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||||
|
import { RenderMultiline } from "./representationElements";
|
||||||
|
|
||||||
|
let RepLPAQuestionnaire = (props) => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<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={RenderMultiline}
|
||||||
|
type="text"
|
||||||
|
rows="5"
|
||||||
|
className="govuk-textarea govuk-input--width-30"
|
||||||
|
aria-describedby={props.name + "-hint"}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const selector = formValueSelector("representationForm"); // <-- same as form name
|
||||||
|
|
||||||
|
RepLPAQuestionnaire = connect((state) => {
|
||||||
|
const representationTypeValue = selector(state, "representationType");
|
||||||
|
const procedureTypeValue = selector(state, "procedureType");
|
||||||
|
|
||||||
|
return {
|
||||||
|
procedureTypeValue,
|
||||||
|
representationTypeValue,
|
||||||
|
};
|
||||||
|
})(RepLPAQuestionnaire);
|
||||||
|
|
||||||
|
const mapStateToProps = (state, props) => {
|
||||||
|
return {
|
||||||
|
search: state.search,
|
||||||
|
searchResultsObj: state.searchResultsObj,
|
||||||
|
formData: state.formData,
|
||||||
|
appealType: state.appealType,
|
||||||
|
currentView: state.currentView,
|
||||||
|
myRepresentations: state.myRepresentations,
|
||||||
|
initialValues: state.currentView.caseReference.repDetails,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(
|
||||||
|
reduxForm({
|
||||||
|
form: "representationForm",
|
||||||
|
enableReinitialize: true,
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
})(RepLPAQuestionnaire)
|
||||||
|
);
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
|
const RepLPADetails = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
|
||||||
|
const { currentType, casesObj, caseReference } = props;
|
||||||
|
|
||||||
|
let setCaseDetailsObj = router.query.hasOwnProperty("state")
|
||||||
|
? router.query.state == "edit"
|
||||||
|
? props.props.myRepresentations.myRepresentations
|
||||||
|
: props.searchResultsObj.searchDetailsObj
|
||||||
|
: props.currentType == "watchedCases"
|
||||||
|
? props.props.props.watchedCases.watchedCasesDetails
|
||||||
|
: props.props.searchResultsObj.searchDetailsObj;
|
||||||
|
|
||||||
|
var detailsObj = {};
|
||||||
|
|
||||||
|
detailsObj = jsonpath({
|
||||||
|
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
|
||||||
|
json: setCaseDetailsObj,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{" "}
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<div id="rep-sumamry" className="govuk-grid-row">
|
||||||
|
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("case:summary-applicant-label")}
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{casesObj.appellantApplicant || ""}
|
||||||
|
{detailsObj[
|
||||||
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "not entered"}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
{t("case:summary-site-address-label")}
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
|
? detailsObj.pinswg_siteaddressline1
|
||||||
|
: ""}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddressline1") &&
|
||||||
|
detailsObj.pinswg_siteaddressline1 !=
|
||||||
|
null && <br />}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddressline2")
|
||||||
|
? detailsObj.pinswg_siteaddressline2
|
||||||
|
: ""}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddressline2") &&
|
||||||
|
detailsObj.pinswg_siteaddressline2 !=
|
||||||
|
null && <br />}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||||
|
? detailsObj.pinswg_siteaddresstown
|
||||||
|
: ""}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
||||||
|
detailsObj.pinswg_siteaddresstown !=
|
||||||
|
null && <br />}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||||
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
|
: ""}
|
||||||
|
{_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_siteaddresscounty"
|
||||||
|
) &&
|
||||||
|
detailsObj.pinswg_siteaddresscounty !=
|
||||||
|
null && <br />}
|
||||||
|
{_.has(detailsObj, "pinswg_siteaddresspostcode")
|
||||||
|
? detailsObj.pinswg_siteaddresspostcode
|
||||||
|
: ""}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("myrepresentations:lpa-capacity-para-one")}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default RepLPADetails;
|
||||||
@@ -1,18 +1,12 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { Field, reduxForm } from "redux-form";
|
import { useRouter } from "next/router";
|
||||||
import {
|
|
||||||
RenderPickList,
|
|
||||||
RenderTextfield,
|
|
||||||
RenderRadioList,
|
|
||||||
RenderMultiline,
|
|
||||||
} from "./representationElements";
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import { Field } from "redux-form";
|
||||||
import {
|
import {
|
||||||
setRepresentationCapacity,
|
FileUploadField,
|
||||||
setRepresentationSubmit,
|
RenderPickList,
|
||||||
} from "../../../store/currentView/action";
|
RenderRichMultiline,
|
||||||
|
} from "./representationElements";
|
||||||
|
|
||||||
const RepLandOwner = (props) => {
|
const RepLandOwner = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -37,7 +31,7 @@ const RepLandOwner = (props) => {
|
|||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<h2 className="govuk-heading-m ">
|
<h2 className="govuk-heading-m ">
|
||||||
Representation - landowner
|
Representation for a Land owner
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -45,7 +39,10 @@ const RepLandOwner = (props) => {
|
|||||||
className="govuk-label govuk-body-m"
|
className="govuk-label govuk-body-m"
|
||||||
htmlFor="representationType"
|
htmlFor="representationType"
|
||||||
>
|
>
|
||||||
What kind of representation are you making?
|
{t(
|
||||||
|
"myrepresentations:representation-from-an-agent-heading"
|
||||||
|
)}
|
||||||
|
?
|
||||||
</label>
|
</label>
|
||||||
<Field
|
<Field
|
||||||
name="representationType"
|
name="representationType"
|
||||||
@@ -55,180 +52,75 @@ const RepLandOwner = (props) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<Field
|
|
||||||
className="govuk-input govuk-!-width-three-quarters"
|
|
||||||
id="representationDescription"
|
|
||||||
name="representationDescription"
|
|
||||||
value="email"
|
|
||||||
data-aria-controls="representationDescription"
|
|
||||||
type="text"
|
|
||||||
component={RenderTextfield}
|
|
||||||
label="Description of representation"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
You can enter your comments in the space provided or
|
{t("myrepresentations:enter-comment-label")}
|
||||||
attach a separate document.
|
|
||||||
</p>
|
</p>
|
||||||
<fieldset
|
<fieldset
|
||||||
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">
|
||||||
My comments are set out in:*
|
{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>
|
||||||
<div
|
|
||||||
className="govuk-checkboxes"
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
data-module="govuk-checkboxes"
|
<FileUploadField
|
||||||
>
|
name={"representationDocuments"}
|
||||||
<div className="govuk-checkboxes__item">
|
id={"representationDocuments"}
|
||||||
<Field
|
label={t(
|
||||||
className="govuk-checkboxes__input"
|
"myrepresentations:add-files-label"
|
||||||
id="commentBox"
|
)}
|
||||||
name="commentBox"
|
ticketnumber={props.props.caseReference}
|
||||||
value="email"
|
hint={"sdsd"}
|
||||||
data-aria-controls="commentBox"
|
fileList={[]}
|
||||||
type="checkbox"
|
setFilesForRepresentation={[]}
|
||||||
component={RenderTextfield}
|
containerID={
|
||||||
/>
|
props.props.props.accountDetails
|
||||||
<label
|
.containerID
|
||||||
className="govuk-label govuk-checkboxes__label"
|
|
||||||
htmlFor="commentBox"
|
|
||||||
>
|
|
||||||
the box below{" "}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
_.isEmpty(formObj["representationForm"])
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values
|
|
||||||
)
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values.commentBox
|
|
||||||
)
|
|
||||||
? formObj["representationForm"]
|
|
||||||
.values.commentBox == false
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
|
||||||
: "govuk-checkboxes__conditional"
|
|
||||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
|
||||||
}
|
}
|
||||||
id="conditional-commentBox"
|
/>
|
||||||
>
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<Field
|
|
||||||
name="representationComments"
|
|
||||||
id="representationComments"
|
|
||||||
component={RenderMultiline}
|
|
||||||
type="text"
|
|
||||||
rows="5"
|
|
||||||
className="govuk-textarea govuk-input--width-30"
|
|
||||||
aria-describedby={
|
|
||||||
props.name + "-hint"
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="govuk-checkboxes__item">
|
|
||||||
<Field
|
|
||||||
className="govuk-checkboxes__input"
|
|
||||||
id="documentBox"
|
|
||||||
name="documentBox"
|
|
||||||
value="email"
|
|
||||||
data-aria-controls="documentBox"
|
|
||||||
type="checkbox"
|
|
||||||
component={RenderTextfield}
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-checkboxes__label"
|
|
||||||
htmlFor="documentBox"
|
|
||||||
>
|
|
||||||
separate documents
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
_.isEmpty(formObj["representationForm"])
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values
|
|
||||||
)
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
|
||||||
: _.isEmpty(
|
|
||||||
formObj["representationForm"]
|
|
||||||
.values.documentBox
|
|
||||||
)
|
|
||||||
? formObj["representationForm"]
|
|
||||||
.values.documentBox == false
|
|
||||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
|
||||||
: "govuk-checkboxes__conditional"
|
|
||||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
|
||||||
}
|
|
||||||
id="conditional-documentBox"
|
|
||||||
>
|
|
||||||
<div className="govuk-form-group">
|
|
||||||
<section className="container">
|
|
||||||
<div
|
|
||||||
{...getRootProps({
|
|
||||||
className: "dropzone",
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<input {...getInputProps()} />
|
|
||||||
<p>
|
|
||||||
Drag and drop files here or
|
|
||||||
click to select files
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<aside>
|
|
||||||
<h4>Files</h4>
|
|
||||||
<ul>{files}</ul>
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>{" "}
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
<div className="govuk-button-group">
|
"undefined" && (
|
||||||
<button
|
<div className="govuk-grid-row">
|
||||||
type="submit"
|
<div className="govuk-button-group">
|
||||||
className="govuk-button"
|
<button
|
||||||
data-module="govuk-button"
|
type="submit"
|
||||||
>
|
|
||||||
Continue
|
|
||||||
</button>
|
|
||||||
{/* <Link href="/representation">
|
|
||||||
<a
|
|
||||||
onClick={() => {
|
|
||||||
setRepresentationSubmit(true);
|
|
||||||
}}
|
|
||||||
className="govuk-button"
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
>
|
>
|
||||||
Continue
|
{t("common:continue-button")}
|
||||||
</a>
|
</button>
|
||||||
</Link> */}
|
{router.query.state != "edit" && (
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setRepresentationCapacity();
|
setRepresentationCapacity();
|
||||||
}}
|
}}
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
>
|
>
|
||||||
Back
|
{t("common:back-link")}
|
||||||
</a>
|
</a>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+596
@@ -0,0 +1,596 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
|
const RepresentationProgress_enforcement = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
const router = useRouter();
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
appellantApplicantRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
currentView,
|
||||||
|
procedureTypeValue,
|
||||||
|
onBehalfOfLPA,
|
||||||
|
setShowQuestionnaireSection,
|
||||||
|
showQuestionnaireSection,
|
||||||
|
} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<nav role="navigation" aria-label="progress-list" className="at-nav">
|
||||||
|
<div
|
||||||
|
id="step-by-step-navigation"
|
||||||
|
data-module="gemstepnav"
|
||||||
|
className="app-step-nav app-step-nav--active"
|
||||||
|
data-id="e01e924b-9c7c-4c71-8241-66a575c2f61f"
|
||||||
|
data-show-text="show"
|
||||||
|
data-hide-text="hide"
|
||||||
|
data-show-all-text="Show all"
|
||||||
|
data-hide-all-text="Hide all"
|
||||||
|
>
|
||||||
|
<ol className="app-step-nav__steps">
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 1
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:enf-section-heading-one")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
1
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(1);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:enf-section-heading-one"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:enf-section-heading-one"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 2
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:enf-section-heading-two")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
2
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(2);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:enf-section-heading-two"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:enf-section-heading-two"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 3
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:enf-section-heading-three")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
3
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(3);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:enf-section-heading-three"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:enf-section-heading-three"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 4
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:enf-section-heading-four")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
4
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(4);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:enf-section-heading-four"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:enf-section-heading-four"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 5
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:enf-section-heading-five")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
5
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(5);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:enf-section-heading-five"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:enf-section-heading-five"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 6
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:enf-section-heading-six")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
6
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(6);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:enf-section-heading-six"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:enf-section-heading-six"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>{" "}
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 7
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:enf-section-heading-seven")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
7
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(7);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:enf-section-heading-seven"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:s78-section-heading-five-sub"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 8
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:add-files-label")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
8
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(8);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 9
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:enf-section-heading-eight")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
9
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(9);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:enf-section-heading-eight"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:enf-section-heading-eight"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default RepresentationProgress_enforcement;
|
||||||
@@ -0,0 +1,473 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
|
const RepresentationProgress_s78 = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
appellantApplicantRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
currentView,
|
||||||
|
procedureTypeValue,
|
||||||
|
onBehalfOfLPA,
|
||||||
|
setShowQuestionnaireSection,
|
||||||
|
showQuestionnaireSection,
|
||||||
|
} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<nav role="navigation" aria-label="progress-list" className="at-nav">
|
||||||
|
<div
|
||||||
|
id="step-by-step-navigation"
|
||||||
|
data-module="gemstepnav"
|
||||||
|
className="app-step-nav app-step-nav--active"
|
||||||
|
data-id="e01e924b-9c7c-4c71-8241-66a575c2f61f"
|
||||||
|
data-show-text="show"
|
||||||
|
data-hide-text="hide"
|
||||||
|
data-show-all-text="Show all"
|
||||||
|
data-hide-all-text="Hide all"
|
||||||
|
>
|
||||||
|
<ol className="app-step-nav__steps">
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 1
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:s78-section-heading-one")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
1
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(1);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:s78-section-heading-one"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:s78-section-heading-one"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 2
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:s78-section-heading-two")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
2
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(2);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:s78-section-heading-two"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:s78-section-heading-two"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 3
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:s78-section-heading-three")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
3
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(3);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:s78-section-heading-three"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:s78-section-heading-three"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 4
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:s78-section-heading-four")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
4
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(4);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:s78-section-heading-four"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:s78-section-heading-four"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 5
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:s78-section-heading-five")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
5
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(5);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:s78-section-heading-five"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:s78-section-heading-five-sub"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>{" "}
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 6
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:s78-section-heading-six")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
6
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(6);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className={
|
||||||
|
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||||
|
(showQuestionnaireSection >= 7
|
||||||
|
? " sectionComplete"
|
||||||
|
: " sectionIncomplete")
|
||||||
|
}
|
||||||
|
aria-current="step"
|
||||||
|
data-show=""
|
||||||
|
id={t("myrepresentations:s78-section-heading-seven")
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="app-step-nav__header js-toggle-panel "
|
||||||
|
data-position="1"
|
||||||
|
>
|
||||||
|
<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>{" "}
|
||||||
|
7
|
||||||
|
<span
|
||||||
|
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
:
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span className="js-step-title">
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={() => {
|
||||||
|
setShowQuestionnaireSection(7);
|
||||||
|
}}
|
||||||
|
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls={
|
||||||
|
"step-panel-" +
|
||||||
|
t(
|
||||||
|
"myrepresentations:s78-section-heading-seven"
|
||||||
|
)
|
||||||
|
.replace(/\s+/g, "-")
|
||||||
|
.toLowerCase()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<span className="js-step-title-text govuk-!-font-size-16">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:s78-section-heading-seven"
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default RepresentationProgress_s78;
|
||||||
+1348
File diff suppressed because it is too large
Load Diff
+1156
File diff suppressed because it is too large
Load Diff
+2556
File diff suppressed because it is too large
Load Diff
+2023
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,14 @@
|
|||||||
import Link from "next/link";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useState, useEffect, useRef } from "react";
|
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { connect } from "react-redux";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import LoadingOverlay from "react-loading-overlay";
|
|
||||||
import { getRepresentations } from "../../actions";
|
import { getRepresentations } from "../../actions";
|
||||||
import { setRepresentations } from "../../store/searchOutput/action";
|
import { setRepresentations } from "../../store/searchOutput/action";
|
||||||
import PaginationControl from "./pagination";
|
import { formatDates } from "../utils";
|
||||||
|
|
||||||
const RepresentationList = (props) => {
|
const RepresentationList = (props) => {
|
||||||
const { incidentid, representationsObj, setRepresentations } = props;
|
const { incidentid, representationsObj, setRepresentations } = props;
|
||||||
@@ -17,7 +16,7 @@ const RepresentationList = (props) => {
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
// const [showSpinnerState, setShowSpinnerState] = useState(false);
|
//const [showSpinnerState, setShowSpinnerState] = useState(false);
|
||||||
|
|
||||||
// let spinnerState = () => {
|
// let spinnerState = () => {
|
||||||
// showSpinnerState == true
|
// showSpinnerState == true
|
||||||
@@ -28,8 +27,6 @@ const RepresentationList = (props) => {
|
|||||||
var representationsArr = representationsObj || [];
|
var representationsArr = representationsObj || [];
|
||||||
|
|
||||||
const RepresentationsView = (representationsArr) => {
|
const RepresentationsView = (representationsArr) => {
|
||||||
//console.log(documentDetailsArr);
|
|
||||||
|
|
||||||
representationsArr = representationsArr.value;
|
representationsArr = representationsArr.value;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -60,12 +57,14 @@ const RepresentationList = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{representationsArr.map((item, key) => {
|
{representationsArr.map((item, key) => {
|
||||||
let detailsObj = jsonpath.query(
|
let detailsObj = jsonpath({
|
||||||
item,
|
path:
|
||||||
"$..[?(@.pinswg_representationsid=='" +
|
"$..[?(@ && @.pinswg_representationsid=='" +
|
||||||
incidentid +
|
incidentid +
|
||||||
"')]"
|
"')]",
|
||||||
);
|
json: item,
|
||||||
|
eval: true,
|
||||||
|
});
|
||||||
detailsObj = item;
|
detailsObj = item;
|
||||||
|
|
||||||
console.log(detailsObj);
|
console.log(detailsObj);
|
||||||
@@ -90,14 +89,16 @@ const RepresentationList = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
sanbox: {},
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -129,12 +130,6 @@ const RepresentationList = (props) => {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</dl>
|
</dl>
|
||||||
{/* <PaginationControl
|
|
||||||
currentPage={currentPage}
|
|
||||||
searchResultsObj={documentDetailsObj}
|
|
||||||
// spinnerState={spinnerState}
|
|
||||||
getDocumentResults={getDocumentResults}
|
|
||||||
/> */}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -153,15 +148,6 @@ const RepresentationList = (props) => {
|
|||||||
const representationResultsObj = representationDetailsObj();
|
const representationResultsObj = representationDetailsObj();
|
||||||
}, [incidentid, setRepresentations]);
|
}, [incidentid, setRepresentations]);
|
||||||
|
|
||||||
function formatDates(dateObj) {
|
|
||||||
var dateObj = new Date(dateObj);
|
|
||||||
var dd = String(dateObj.getDate()).padStart(2, "0");
|
|
||||||
var mm = String(dateObj.getMonth() + 1).padStart(2, "0"); //January is 0!
|
|
||||||
var yyyy = dateObj.getFullYear();
|
|
||||||
|
|
||||||
return dd + "/" + mm + "/" + yyyy;
|
|
||||||
}
|
|
||||||
|
|
||||||
const pagesCount = Math.ceil(representationsObj["@odata.count"] / 10);
|
const pagesCount = Math.ceil(representationsObj["@odata.count"] / 10);
|
||||||
|
|
||||||
let currentPage = 0;
|
let currentPage = 0;
|
||||||
@@ -224,11 +210,6 @@ const RepresentationList = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* <LoadingOverlay
|
|
||||||
active={showSpinnerState}
|
|
||||||
spinner
|
|
||||||
text={t("common:spinner-searching")}
|
|
||||||
/> */}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
+1955
-645
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";
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_advertsid = (props) => {
|
const Pinswg_advertsid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -43,20 +45,45 @@ const Pinswg_advertsid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
Specialist Case Process
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_speacialistcaseprocess@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-lpa-label")}
|
{t("case:summary-lpa-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,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">
|
||||||
@@ -83,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -137,25 +177,28 @@ const Pinswg_advertsid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</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:summary-decision-label")}
|
{t("case:summary-decision-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +256,7 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_callinss77id = (props) => {
|
const Pinswg_callinss77id = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_commonlandid = (props) => {
|
const Pinswg_commonlandid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
: jsonpath.query(
|
eval: true,
|
||||||
transLookup,
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
) ||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -238,7 +261,7 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -314,13 +337,13 @@ const Pinswg_commonlandid = (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"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_communityinfrastructurelevyid = (props) => {
|
const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_compulsorypurchaseordersid = (props) => {
|
const Pinswg_compulsorypurchaseordersid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -125,19 +140,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
: jsonpath.query(
|
eval: true,
|
||||||
transLookup,
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
) ||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -220,7 +241,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import Head from "next/head";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { useEffect, useRef, ReactElement } from "react";
|
import _ from "lodash";
|
||||||
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _, { round } from "lodash";
|
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
import GoogleMapComponent from "../../mapping/";
|
import GoogleMapComponent from "../../mapping/";
|
||||||
@@ -18,8 +15,8 @@ const Pinswg_dnsid = (props) => {
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
const point = {};
|
let point = {};
|
||||||
const siteCoords = {};
|
let siteCoords = {};
|
||||||
let center = {};
|
let center = {};
|
||||||
|
|
||||||
point = new OSPoint(
|
point = new OSPoint(
|
||||||
@@ -111,7 +108,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
|
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -125,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
|
||||||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -151,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: (
|
: (
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -187,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -228,13 +258,13 @@ 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.query(
|
? jsonpath({path:
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -267,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -334,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -433,11 +467,12 @@ 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.query(
|
? jsonpath({path:
|
||||||
transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@.value=="' +
|
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup,
|
||||||
|
|
||||||
)
|
)
|
||||||
: detailsObj.pinswg_recommendation}
|
: detailsObj.pinswg_recommendation}
|
||||||
</dd>
|
</dd>
|
||||||
@@ -446,7 +481,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_electricityactid = (props) => {
|
const Pinswg_electricityactid = (props) => {
|
||||||
@@ -51,7 +51,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
)}
|
)}
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -297,7 +337,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_enforcementnoticeappeals174id = (props) => {
|
const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_environmentalpermittingid = (props) => {
|
const Pinswg_environmentalpermittingid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
: jsonpath.query(
|
eval: true,
|
||||||
transLookup,
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
) ||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -238,7 +261,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_harbourrevisionorderid = (props) => {
|
const Pinswg_harbourrevisionorderid = (props) => {
|
||||||
@@ -51,7 +51,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
)}
|
)}
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -164,19 +196,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -276,7 +314,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -43,20 +45,45 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
Specialist Case Process
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
</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-lpa-label")}
|
{t("case:summary-lpa-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,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">
|
||||||
@@ -83,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +183,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -217,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
: jsonpath.query(
|
eval: true,
|
||||||
transLookup,
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
) ||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -238,7 +284,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_householderappealhasid = (props) => {
|
const Pinswg_householderappealhasid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -124,19 +139,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -194,7 +211,7 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -296,26 +313,26 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstmt"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
detailsObj.pinswg_otherpartiesstmt
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
detailsObj.pinswg_otherpartiesstmt
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatements"
|
"pinswg_otherpartiesstmt"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
detailsObj.pinswg_otherpartiesstmt
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
detailsObj.pinswg_otherpartiesstmt
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_ldpid = (props) => {
|
const Pinswg_ldpid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +139,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +211,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_listedbuildingandconservationrid = (props) => {
|
const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_maintenanceoflands217id = (props) => {
|
const Pinswg_maintenanceoflands217id = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_miscellaneouscasewordid = (props) => {
|
const Pinswg_miscellaneouscasewordid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
: jsonpath.query(
|
eval: true,
|
||||||
transLookup,
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
) ||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -238,7 +261,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_nonvalidationid = (props) => {
|
const Pinswg_nonvalidationid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({path:
|
||||||
transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@.value=="' +
|
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -124,19 +117,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -152,7 +147,7 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_planningappeals78id = (props) => {
|
const Pinswg_planningappeals78id = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,17 +115,22 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -121,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +163,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -236,7 +258,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_planningconditionss73s79id = (props) => {
|
const Pinswg_planningconditionss73s79id = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_planningobligationappeals106id = (props) => {
|
const Pinswg_planningobligationappeals106id = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -213,7 +232,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_rowid = (props) => {
|
const Pinswg_rowid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -43,20 +45,45 @@ const Pinswg_rowid = (props) => {
|
|||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dt className="govuk-summary-list__key">
|
||||||
|
Specialist Case Process
|
||||||
|
</dt>
|
||||||
|
<dd className="govuk-summary-list__value">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
</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-lpa-label")}
|
{t("case:summary-lpa-label")}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -64,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">
|
||||||
@@ -83,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -102,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] || ""}
|
||||||
@@ -121,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +183,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -217,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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
: jsonpath.query(
|
eval: true,
|
||||||
transLookup,
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
) ||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -238,7 +284,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_transportandworkactid = (props) => {
|
const Pinswg_transportandworkactid = (props) => {
|
||||||
@@ -51,7 +51,7 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
)}
|
)}
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
@@ -128,7 +158,7 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRouter } from "next/router";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import jsonpath from "jsonpath";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const Pinswg_wayleaveid = (props) => {
|
const Pinswg_wayleaveid = (props) => {
|
||||||
@@ -13,7 +13,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="flex-container grid-row govuk-body case">
|
<div className="flex-container grid-row govuk-body case">
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="case-details-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
@@ -143,19 +160,21 @@ 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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -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.query(
|
? jsonpath({
|
||||||
transLookup,
|
path:
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
)
|
json: transLookup,
|
||||||
: jsonpath.query(
|
eval: true,
|
||||||
transLookup,
|
})
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
: jsonpath({
|
||||||
|
path:
|
||||||
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
) ||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
}) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -238,7 +261,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card" id="casescomment-card">
|
<div className="card" id="key-dates-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import SearchForCase from "./search/searchforcase";
|
|
||||||
import SearchResults from "./search/searchresults";
|
import SearchResults from "./search/searchresults";
|
||||||
|
|
||||||
export default function Search({ children, pages }) {
|
export default function Search({ children, pages }) {
|
||||||
@@ -25,17 +23,14 @@ export default function Search({ children, pages }) {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<Link href="/advancedsearch">
|
<Link href="/advancedsearch" className="govuk-button">
|
||||||
<a className="govuk-button">
|
{t("search:searchresults-search-button-label")}
|
||||||
{t("search:searchresults-search-button-label")}
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link href="/advancedsearch">
|
<Link
|
||||||
<a className="govuk-button govuk-button--secondary">
|
href="/advancedsearch"
|
||||||
{t(
|
className="govuk-button govuk-button--secondary"
|
||||||
"search:searchresults-new-search-button-label"
|
>
|
||||||
)}
|
{t("search:searchresults-new-search-button-label")}
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import BuildCheckSection from "./newappeal/buildchecksection";
|
import BuildCheckSection from "./newappeal/buildchecksection";
|
||||||
|
|
||||||
const CheckAnswers = (props) => {
|
const CheckAnswers = (props) => {
|
||||||
@@ -19,7 +17,6 @@ const CheckAnswers = (props) => {
|
|||||||
id="main-content"
|
id="main-content"
|
||||||
role="main"
|
role="main"
|
||||||
>
|
>
|
||||||
sss
|
|
||||||
<BuildCheckSection
|
<BuildCheckSection
|
||||||
formXML={formXML}
|
formXML={formXML}
|
||||||
sectionCount={sectionCount}
|
sectionCount={sectionCount}
|
||||||
|
|||||||
+12
-12
@@ -1,9 +1,9 @@
|
|||||||
import CookieConsent from "react-cookie-consent";
|
import cookie from "cookie-cutter";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import { useState } from "react";
|
||||||
import cookie from "cookie-cutter";
|
import { CookieConsent } from "react-cookie-consent";
|
||||||
import { useState, useEffect } from "react";
|
|
||||||
|
|
||||||
const CookieBanner = () => {
|
const CookieBanner = () => {
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
@@ -26,6 +26,7 @@ const CookieBanner = () => {
|
|||||||
"usage": "accepted",
|
"usage": "accepted",
|
||||||
"communications": "accepted",
|
"communications": "accepted",
|
||||||
"settings": "accepted",
|
"settings": "accepted",
|
||||||
|
"analytics_storage": "granted",
|
||||||
};
|
};
|
||||||
|
|
||||||
cookie.set("CookiePolicy", JSON.stringify(cookieStr).toString(), {
|
cookie.set("CookiePolicy", JSON.stringify(cookieStr).toString(), {
|
||||||
@@ -117,14 +118,13 @@ const CookieBanner = () => {
|
|||||||
{t("common:cookie-banner-accept")}
|
{t("common:cookie-banner-accept")}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link href="/help/cookies">
|
<Link
|
||||||
<a
|
href="/help/cookies"
|
||||||
className="cookies-banner__button govuk-link--no-underline"
|
className="cookies-banner__button govuk-link--no-underline"
|
||||||
id="rcc-decline-button"
|
id="rcc-decline-button"
|
||||||
aria-label="Decline cookies"
|
aria-label="Decline cookies"
|
||||||
>
|
>
|
||||||
{t("common:cookie-banner-change-settings")}
|
{t("common:cookie-banner-change-settings")}
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
const CookiePolicy = (props) => {
|
const CookiePolicy = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useContext, useEffect, useState } from "react";
|
import { parseCookies } from "nookies";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import { useState } from "react";
|
||||||
import { Field, reduxForm } from "redux-form";
|
|
||||||
import { parseCookies, setCookie, destroyCookie } from "nookies";
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import { reduxForm } from "redux-form";
|
||||||
|
|
||||||
import cookie from "cookie-cutter";
|
import cookie from "cookie-cutter";
|
||||||
|
|
||||||
@@ -20,6 +20,8 @@ const CookieManagementMain = (props) => {
|
|||||||
Object.assign(values, {
|
Object.assign(values, {
|
||||||
"essential": "accepted",
|
"essential": "accepted",
|
||||||
"usage": usageState,
|
"usage": usageState,
|
||||||
|
"analytics_storage":
|
||||||
|
usageState == "accepted" ? "granted" : "denied",
|
||||||
// "communications": communicationsState,
|
// "communications": communicationsState,
|
||||||
"settings": settingsState,
|
"settings": settingsState,
|
||||||
});
|
});
|
||||||
@@ -65,7 +67,7 @@ const CookieManagementMain = (props) => {
|
|||||||
const [usageState, setUsageState] = useState(
|
const [usageState, setUsageState] = useState(
|
||||||
typeof cookieCheck.CookiePolicy == "undefined" ? null : cookieObj.usage
|
typeof cookieCheck.CookiePolicy == "undefined" ? null : cookieObj.usage
|
||||||
);
|
);
|
||||||
// const [communicationsState, setCommunicationsState] = useState(
|
//const [communicationsState, setCommunicationsState] = useState(
|
||||||
// typeof cookieCheck.CookiePolicy == "undefined"
|
// typeof cookieCheck.CookiePolicy == "undefined"
|
||||||
// ? null
|
// ? null
|
||||||
// : cookieObj.communications
|
// : cookieObj.communications
|
||||||
@@ -431,12 +433,11 @@ const CookieManagementMain = (props) => {
|
|||||||
href={t(
|
href={t(
|
||||||
"cookies:cookie-settings-essential-link"
|
"cookies:cookie-settings-essential-link"
|
||||||
)}
|
)}
|
||||||
|
className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
>
|
>
|
||||||
<a className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold">
|
{t(
|
||||||
{t(
|
"cookies:cookie-settings-essential-link-label"
|
||||||
"cookies:cookie-settings-essential-link-label"
|
)}
|
||||||
)}
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</legend>
|
</legend>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { DiagConsoleLogger } from "@opentelemetry/api";
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
const CRMError = (props) => {
|
const CRMError = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
const ApplicationSideBar = (props) => {
|
const ApplicationSideBar = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
const ApplicationSummary = (props) => {
|
const ApplicationSummary = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useContext } from "react";
|
|
||||||
import { useState } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import ApplicationTabsTimeLine from "./applicationTabsTimeline";
|
import { useRouter } from "next/router";
|
||||||
|
import { useState } from "react";
|
||||||
import ApplicationSideBar from "./applicationSideBar";
|
import ApplicationSideBar from "./applicationSideBar";
|
||||||
import ApplicationTabsDocuments from "./applicationTabsDocuments";
|
|
||||||
import ApplicationTabsComments from "./applicationTabsComments";
|
import ApplicationTabsComments from "./applicationTabsComments";
|
||||||
|
import ApplicationTabsDocuments from "./applicationTabsDocuments";
|
||||||
import ApplicationTabsRegistrationForm from "./applicationTabsRegistrationForm";
|
import ApplicationTabsRegistrationForm from "./applicationTabsRegistrationForm";
|
||||||
|
import ApplicationTabsTimeLine from "./applicationTabsTimeline";
|
||||||
|
|
||||||
const ApplicationTabs = (props) => {
|
const ApplicationTabs = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
const ApplicationTabsComments = (props) => {
|
const ApplicationTabsComments = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import {
|
import {
|
||||||
Accordion,
|
Accordion,
|
||||||
AccordionItem,
|
AccordionItem,
|
||||||
AccordionItemHeading,
|
|
||||||
AccordionItemButton,
|
AccordionItemButton,
|
||||||
|
AccordionItemHeading,
|
||||||
AccordionItemPanel,
|
AccordionItemPanel,
|
||||||
} from "react-accessible-accordion";
|
} from "react-accessible-accordion";
|
||||||
// import "react-accessible-accordion/dist/fancy-example.css";
|
// import "react-accessible-accordion/dist/fancy-example.css";
|
||||||
@@ -133,7 +132,7 @@ const ApplicationTabsDocuments = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className=" govuk-grid-column-two-thirds govuk-form-group">
|
<div className=" govuk-grid-column-two-thirds govuk-form-group">
|
||||||
<label className="govuk-label-xs " htmlFor="sort">
|
<label className="govuk-label-xs " htmlFor="showNo">
|
||||||
Show{" "}
|
Show{" "}
|
||||||
<select
|
<select
|
||||||
className="govuk-select govuk-select-s"
|
className="govuk-select govuk-select-s"
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
const ApplicationTabsRegistrationForm = (props) => {
|
const ApplicationTabsRegistrationForm = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
const ApplicationTabsTimeLine = (props) => {
|
const ApplicationTabsTimeLine = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
|
|
||||||
const ApplicationIntro = (props) => {
|
const ApplicationIntro = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -27,10 +26,8 @@ const ApplicationIntro = (props) => {
|
|||||||
</ul>
|
</ul>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("dnsApplications:page-intro-paragraph-2")}{" "}
|
{t("dnsApplications:page-intro-paragraph-2")}{" "}
|
||||||
<Link href="/dns/calendar">
|
<Link href="/dns/calendar" className="govuk-link">
|
||||||
<a className="govuk-link">
|
{t("dnsApplications:page-intro-paragraph-2-link")}
|
||||||
{t("dnsApplications:page-intro-paragraph-2-link")}
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
.
|
.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useContext } from "react";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
|
|
||||||
const ApplicationList = (props) => {
|
const ApplicationList = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -14,7 +13,7 @@ const ApplicationList = (props) => {
|
|||||||
<div className="govuk-grid-row govuk-!-margin-top-9">
|
<div className="govuk-grid-row govuk-!-margin-top-9">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label className="govuk-label-s " htmlFor="sort">
|
<label className="govuk-label-s " htmlFor="showNo">
|
||||||
{t("dnsCommon:result-list-show-label")}{" "}
|
{t("dnsCommon:result-list-show-label")}{" "}
|
||||||
<select
|
<select
|
||||||
className="govuk-select"
|
className="govuk-select"
|
||||||
@@ -84,15 +83,13 @@ const ApplicationList = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<Link href="/dns/application-view">
|
<Link href="/dns/application-view">
|
||||||
<a>
|
<span className="results-visually-hidden">
|
||||||
<span className="results-visually-hidden">
|
{t(
|
||||||
{t(
|
"dnsApplications:result-list-heading-label-application"
|
||||||
"dnsApplications:result-list-heading-label-application"
|
)}
|
||||||
)}
|
:{" "}
|
||||||
:{" "}
|
</span>
|
||||||
</span>
|
TWA - Morlais Demonstration Zone
|
||||||
TWA - Morlais Demonstration Zone
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -135,15 +132,13 @@ const ApplicationList = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<Link href="/dns/application-view">
|
<Link href="/dns/application-view">
|
||||||
<a>
|
<span className="results-visually-hidden">
|
||||||
<span className="results-visually-hidden">
|
{t(
|
||||||
{t(
|
"dnsApplications:result-list-heading-label-application"
|
||||||
"dnsApplications:result-list-heading-label-application"
|
)}
|
||||||
)}
|
:{" "}
|
||||||
:{" "}
|
</span>
|
||||||
</span>
|
TWA - Morlais Demonstration Zone
|
||||||
TWA - Morlais Demonstration Zone
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -186,15 +181,13 @@ const ApplicationList = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<Link href="/dns/application-view">
|
<Link href="/dns/application-view">
|
||||||
<a>
|
<span className="results-visually-hidden">
|
||||||
<span className="results-visually-hidden">
|
{t(
|
||||||
{t(
|
"dnsApplications:result-list-heading-label-application"
|
||||||
"dnsApplications:result-list-heading-label-application"
|
)}
|
||||||
)}
|
:{" "}
|
||||||
:{" "}
|
</span>
|
||||||
</span>
|
TWA - Morlais Demonstration Zone
|
||||||
TWA - Morlais Demonstration Zone
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -237,15 +230,13 @@ const ApplicationList = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<Link href="/dns/application-view">
|
<Link href="/dns/application-view">
|
||||||
<a>
|
<span className="results-visually-hidden">
|
||||||
<span className="results-visually-hidden">
|
{t(
|
||||||
{t(
|
"dnsApplications:result-list-heading-label-application"
|
||||||
"dnsApplications:result-list-heading-label-application"
|
)}
|
||||||
)}
|
:{" "}
|
||||||
:{" "}
|
</span>
|
||||||
</span>
|
TWA - Morlais Demonstration Zone
|
||||||
TWA - Morlais Demonstration Zone
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -288,15 +279,13 @@ const ApplicationList = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<Link href="/dns/application-view">
|
<Link href="/dns/application-view">
|
||||||
<a>
|
<span className="results-visually-hidden">
|
||||||
<span className="results-visually-hidden">
|
{t(
|
||||||
{t(
|
"dnsApplications:result-list-heading-label-application"
|
||||||
"dnsApplications:result-list-heading-label-application"
|
)}
|
||||||
)}
|
:{" "}
|
||||||
:{" "}
|
</span>
|
||||||
</span>
|
TWA - Morlais Demonstration Zone
|
||||||
TWA - Morlais Demonstration Zone
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -339,15 +328,13 @@ const ApplicationList = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<Link href="/dns/application-view">
|
<Link href="/dns/application-view">
|
||||||
<a>
|
<span className="results-visually-hidden">
|
||||||
<span className="results-visually-hidden">
|
{t(
|
||||||
{t(
|
"dnsApplications:result-list-heading-label-application"
|
||||||
"dnsApplications:result-list-heading-label-application"
|
)}
|
||||||
)}
|
:{" "}
|
||||||
:{" "}
|
</span>
|
||||||
</span>
|
TWA - Morlais Demonstration Zone
|
||||||
TWA - Morlais Demonstration Zone
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -390,15 +377,13 @@ const ApplicationList = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<Link href="/dns/application-view">
|
<Link href="/dns/application-view">
|
||||||
<a>
|
<span className="results-visually-hidden">
|
||||||
<span className="results-visually-hidden">
|
{t(
|
||||||
{t(
|
"dnsApplications:result-list-heading-label-application"
|
||||||
"dnsApplications:result-list-heading-label-application"
|
)}
|
||||||
)}
|
:{" "}
|
||||||
:{" "}
|
</span>
|
||||||
</span>
|
TWA - Morlais Demonstration Zone
|
||||||
TWA - Morlais Demonstration Zone
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -441,15 +426,13 @@ const ApplicationList = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<Link href="/dns/application-view">
|
<Link href="/dns/application-view">
|
||||||
<a>
|
<span className="results-visually-hidden">
|
||||||
<span className="results-visually-hidden">
|
{t(
|
||||||
{t(
|
"dnsApplications:result-list-heading-label-application"
|
||||||
"dnsApplications:result-list-heading-label-application"
|
)}
|
||||||
)}
|
:{" "}
|
||||||
:{" "}
|
</span>
|
||||||
</span>
|
TWA - Morlais Demonstration Zone
|
||||||
TWA - Morlais Demonstration Zone
|
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -500,7 +483,7 @@ const ApplicationList = (props) => {
|
|||||||
<span>
|
<span>
|
||||||
<Link href="#">5</Link>
|
<Link href="#">5</Link>
|
||||||
</span>{" "}
|
</span>{" "}
|
||||||
<Link href="#">
|
<Link href="#" legacyBehavior>
|
||||||
{t("dnsCommon:result-list-next-label")}
|
{t("dnsCommon:result-list-next-label")}
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
|
|
||||||
const ApplicationsForComment = (props) => {
|
const ApplicationsForComment = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -15,10 +15,11 @@ const ApplicationsForComment = (props) => {
|
|||||||
<div className="govuk-panel__body">
|
<div className="govuk-panel__body">
|
||||||
<ul className="govuk-list">
|
<ul className="govuk-list">
|
||||||
<li>
|
<li>
|
||||||
<Link href="/dns/application-view">
|
<Link
|
||||||
<a className="govuk-body-s ">
|
href="/dns/application-view"
|
||||||
Holyhead Harbour Revision Order
|
className="govuk-body-s "
|
||||||
</a>
|
>
|
||||||
|
Holyhead Harbour Revision Order
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
|
|
||||||
const DNSLinks = (props) => {
|
const DNSLinks = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -13,10 +13,11 @@ const DNSLinks = (props) => {
|
|||||||
<ul className="govuk-list">
|
<ul className="govuk-list">
|
||||||
<li>
|
<li>
|
||||||
<h3 className="govuk-heading-l govuk-!-font-size-27">
|
<h3 className="govuk-heading-l govuk-!-font-size-27">
|
||||||
<Link href="/dnsapplications">
|
<Link
|
||||||
<a className="govuk-link govuk-link--no-underline">
|
href="/dnsapplications"
|
||||||
{t("dnsHome:links-applications-title")}
|
className="govuk-link govuk-link--no-underline"
|
||||||
</a>
|
>
|
||||||
|
{t("dnsHome:links-applications-title")}
|
||||||
</Link>
|
</Link>
|
||||||
<p className="govuk-body-s govuk-!-padding-top-2">
|
<p className="govuk-body-s govuk-!-padding-top-2">
|
||||||
{t(
|
{t(
|
||||||
@@ -43,10 +44,11 @@ const DNSLinks = (props) => {
|
|||||||
<ul className="govuk-list">
|
<ul className="govuk-list">
|
||||||
<li>
|
<li>
|
||||||
<h3 className="govuk-heading-l govuk-!-font-size-27">
|
<h3 className="govuk-heading-l govuk-!-font-size-27">
|
||||||
<Link href="https://gov.wales/developments-national-significance-dns-guidance">
|
<Link
|
||||||
<a className="govuk-link govuk-link--no-underline ">
|
href="https://gov.wales/developments-national-significance-dns-guidance"
|
||||||
{t("dnsHome:links-help-title")}
|
className="govuk-link govuk-link--no-underline "
|
||||||
</a>
|
>
|
||||||
|
{t("dnsHome:links-help-title")}
|
||||||
</Link>
|
</Link>
|
||||||
<p className="govuk-body-s govuk-!-padding-top-2">
|
<p className="govuk-body-s govuk-!-padding-top-2">
|
||||||
{t("dnsHome:links-guidance-intro-paragraph")}
|
{t("dnsHome:links-guidance-intro-paragraph")}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user