Merged PR 1339: uat fixes as per seans issues

Related work items: #12956
This commit is contained in:
Robert Bond
2024-12-12 14:22:32 +00:00
9 changed files with 74 additions and 57 deletions
+7 -1
View File
@@ -341,7 +341,13 @@ export const createAppealPDFBlob = async (
let month = repDate.getMonth() + 1;
let year = repDate.getFullYear();
const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form";
const pdfFileName =
year +
"-" +
("0" + month).slice(-2) +
"-" +
("0" + day).slice(-2) +
"_-_Appeal_Form";
//console.log(content);
const blobName = caseID + "/files/" + pdfFileName + ".pdf";
+3 -7
View File
@@ -813,8 +813,7 @@ export const getMyRepresentations = (loggedInUserId) => {
export const getMyRepresentationsProxy = (loggedInUserId) => {
return axios
.get(
BASE_URL +
"/api/endpoint/getmyrepresentationsproxy_api?loggedInUserId=" +
"/api/endpoint/getmyrepresentationsproxy_api?loggedInUserId=" +
loggedInUserId
)
.then((res) => res.data)
@@ -835,9 +834,7 @@ export const getRepresentations = (incidentID) => {
export const getRepresentationsProxy = (incidentID) => {
return axios
.get(
BASE_URL +
"/api/endpoint/getrepresentationsproxy_api?incidentID=" +
incidentID
"/api/endpoint/getrepresentationsproxy_api?incidentID=" + incidentID
)
.then((res) => res.data)
.catch((error) => {
@@ -873,8 +870,7 @@ export const getWatchedCasesProxy = (loggedInUserId) => {
export const getAwaitingSubmissionProxy = (loggedInUserId) => {
return axios
.get(
BASE_URL +
"/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" +
"/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" +
loggedInUserId
)
.then((res) => res.data)
+2 -4
View File
@@ -196,9 +196,7 @@ export const AppealRow_pdf = (props) => {
</Text>
<Text
style={
styles.questionAnswerWide
}
style={styles.questionAnswerMid}
>
{formatDate(
props.props[
@@ -341,7 +339,7 @@ export const AppealRow_pdf = (props) => {
<Html style={styles.richArea}>
{props.props[
datafieldname[0].value
] || ""}{" "}
] || ""}
</Html>
</View>
</View>
@@ -179,46 +179,57 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
/>
</View>
{Object.keys(titles).map((key) => (
<View key={key}>
<View
style={{
marginTop: 10,
fontFamily: "Helvetica-Bold",
}}
>
<Text style={{ fontSize: 14 }}>
{parseInt(key) + 1} {titles[key].value}
</Text>
<View style={styles.sectionContainer}>
{Object.keys(titles).map(
(key) =>
key != 0 && (
<View key={key}>
<View
style={{
flexDirection: "row",
marginBottom: 10,
marginTop: 10,
fontFamily: "Helvetica-Bold",
}}
>
<View
style={{
flexDirection: "column",
marginBottom: 10,
}}
>
<AppealRow_pdf
formXML={xmlStr}
whichSection={parseInt(key) + 1}
sectionCount={key}
props={docProps}
key={key}
mandatoryFieldsData={null}
pickListData={pickListData}
filesList={values.filesList}
/>
<Text style={{ fontSize: 14 }}>
{parseInt(key)} {titles[key].value}
</Text>
<View style={styles.sectionContainer}>
<View
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<View
style={{
flexDirection: "column",
marginBottom: 10,
}}
>
<AppealRow_pdf
formXML={xmlStr}
whichSection={
parseInt(key) + 1
}
sectionCount={key}
props={docProps}
key={key}
mandatoryFieldsData={
null
}
pickListData={
pickListData
}
filesList={
values.filesList
}
/>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
))}
)
)}
</View>
<Text
style={styles.pageNumber}
+3 -3
View File
@@ -284,7 +284,7 @@
"pinswg_lpa": 846040003
},
{
"value": "Cardiff County Council",
"value": "Cardiff Council",
"value_cy": "Cyngor Caerdydd",
"pinswg_lpa": 846040004
},
@@ -364,7 +364,7 @@
"pinswg_lpa": 846040019
},
{
"value": "Snowdonia National Park Authority",
"value": "Eryri National Park Authority",
"value_cy": "Awdurdod Parc Cenedlaethol Eryri",
"pinswg_lpa": 846040020
},
@@ -384,7 +384,7 @@
"pinswg_lpa": 846040023
},
{
"value": "Brecon Beacons National Park Authority",
"value": "Bannau Brycheiniog National Park Authority",
"value_cy": "Awdurdod Parc Cenedlaethol Bannau Brycheiniog",
"pinswg_lpa": 846040024
}
+3 -3
View File
@@ -6,7 +6,7 @@
"accountid": "01297616-dc16-ec11-a985-00224800f523"
},
{
"name": "Brecon Beacons National Park Authority",
"name": "Bannau Brycheiniog National Park Authority",
"accountid": "03297616-dc16-ec11-a985-00224800f523"
},
{
@@ -18,7 +18,7 @@
"accountid": "07297616-dc16-ec11-a985-00224800f523"
},
{
"name": "Cardiff County Council",
"name": "Cardiff Council",
"accountid": "09297616-dc16-ec11-a985-00224800f523"
},
{
@@ -90,7 +90,7 @@
"accountid": "29297616-dc16-ec11-a985-00224800f523"
},
{
"name": "Snowdonia National Park Authority",
"name": "Eryri National Park Authority",
"accountid": "2b297616-dc16-ec11-a985-00224800f523"
},
{
@@ -17722,7 +17722,7 @@
"Label": {
"LocalizedLabels": [
{
"Label": "Cardiff County Council",
"Label": "Cardiff Council",
"LanguageCode": 1033,
"IsManaged": false,
"MetadataId": "002c16aa-848c-eb11-aac2-00224800be9c",
@@ -17730,7 +17730,7 @@
}
],
"UserLocalizedLabel": {
"Label": "Cardiff County Council",
"Label": "Cardiff Council",
"LanguageCode": 1033,
"IsManaged": false,
"MetadataId": "002c16aa-848c-eb11-aac2-00224800be9c",
@@ -18410,7 +18410,7 @@
"Label": {
"LocalizedLabels": [
{
"Label": "Snowdonia National Park Authority",
"Label": "Eryri National Park Authority",
"LanguageCode": 1033,
"IsManaged": false,
"MetadataId": "302c16aa-848c-eb11-aac2-00224800be9c",
@@ -18418,7 +18418,7 @@
}
],
"UserLocalizedLabel": {
"Label": "Snowdonia National Park Authority",
"Label": "Eryri National Park Authority",
"LanguageCode": 1033,
"IsManaged": false,
"MetadataId": "302c16aa-848c-eb11-aac2-00224800be9c",
+1 -1
View File
@@ -59,7 +59,7 @@
"new-appeal-introduction-paragraph": "Mae'r ffurflen hon ar gyfer apelio yn erbyn:",
"new-appeal-introduction-paragraph-bullet-one": "penderfyniad i wrthod cais cynllunio",
"new-appeal-introduction-paragraph-bullet-two": "methiant yr Awdurdod Cynllunio Lleol i roi penderfyniad o fewn 8 wythnos",
"new-appeal-introduction-paragraph-two": "Nid yw'n cynnwys ceisiadau gan Ddeiliaid Tai.",
"new-appeal-introduction-paragraph-two": "Nid yw'n cynnwys ceisiadau Ddeiliaid Tai.",
"new-appeal-introduction-warning-paragraph": "Rhaid i chi:",
"new-appeal-introduction-warning-bullet-one": "gyflwyno eich apêl o fewn 6 mis o ddyddiad hysbysiad o benderfyniad yr Awdurdod Cynllunio Lleol",
"new-appeal-introduction-warning-bullet-two": "darparu'r holl ddogfennau ategol hanfodol o fewn y cyfnod apelio",
+7 -1
View File
@@ -187,7 +187,13 @@ export default async function handler(req, res) {
let month = repDate.getMonth() + 1;
let year = repDate.getFullYear();
const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form";
const pdfFileName =
year +
"-" +
("0" + month).slice(-2) +
"-" +
("0" + day).slice(-2) +
"_-_Appeal_Form";
await createAppealPDFBlob(
renderedPDF,