Merged PR 1339: uat fixes as per seans issues
Related work items: #12956
This commit is contained in:
@@ -341,7 +341,13 @@ export const createAppealPDFBlob = async (
|
|||||||
let month = repDate.getMonth() + 1;
|
let month = repDate.getMonth() + 1;
|
||||||
let year = repDate.getFullYear();
|
let year = repDate.getFullYear();
|
||||||
|
|
||||||
const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form";
|
const pdfFileName =
|
||||||
|
year +
|
||||||
|
"-" +
|
||||||
|
("0" + month).slice(-2) +
|
||||||
|
"-" +
|
||||||
|
("0" + day).slice(-2) +
|
||||||
|
"_-_Appeal_Form";
|
||||||
|
|
||||||
//console.log(content);
|
//console.log(content);
|
||||||
const blobName = caseID + "/files/" + pdfFileName + ".pdf";
|
const blobName = caseID + "/files/" + pdfFileName + ".pdf";
|
||||||
|
|||||||
+3
-7
@@ -813,8 +813,7 @@ export const getMyRepresentations = (loggedInUserId) => {
|
|||||||
export const getMyRepresentationsProxy = (loggedInUserId) => {
|
export const getMyRepresentationsProxy = (loggedInUserId) => {
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
"/api/endpoint/getmyrepresentationsproxy_api?loggedInUserId=" +
|
||||||
"/api/endpoint/getmyrepresentationsproxy_api?loggedInUserId=" +
|
|
||||||
loggedInUserId
|
loggedInUserId
|
||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
@@ -835,9 +834,7 @@ export const getRepresentations = (incidentID) => {
|
|||||||
export const getRepresentationsProxy = (incidentID) => {
|
export const getRepresentationsProxy = (incidentID) => {
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
"/api/endpoint/getrepresentationsproxy_api?incidentID=" + incidentID
|
||||||
"/api/endpoint/getrepresentationsproxy_api?incidentID=" +
|
|
||||||
incidentID
|
|
||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@@ -873,8 +870,7 @@ export const getWatchedCasesProxy = (loggedInUserId) => {
|
|||||||
export const getAwaitingSubmissionProxy = (loggedInUserId) => {
|
export const getAwaitingSubmissionProxy = (loggedInUserId) => {
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
"/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" +
|
||||||
"/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" +
|
|
||||||
loggedInUserId
|
loggedInUserId
|
||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
|
|||||||
@@ -196,9 +196,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
style={
|
style={styles.questionAnswerMid}
|
||||||
styles.questionAnswerWide
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{formatDate(
|
{formatDate(
|
||||||
props.props[
|
props.props[
|
||||||
@@ -341,7 +339,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{props.props[
|
{props.props[
|
||||||
datafieldname[0].value
|
datafieldname[0].value
|
||||||
] || ""}{" "}
|
] || ""}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -179,46 +179,57 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{Object.keys(titles).map((key) => (
|
{Object.keys(titles).map(
|
||||||
<View key={key}>
|
(key) =>
|
||||||
<View
|
key != 0 && (
|
||||||
style={{
|
<View key={key}>
|
||||||
marginTop: 10,
|
|
||||||
fontFamily: "Helvetica-Bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text style={{ fontSize: 14 }}>
|
|
||||||
{parseInt(key) + 1} {titles[key].value}
|
|
||||||
</Text>
|
|
||||||
<View style={styles.sectionContainer}>
|
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
flexDirection: "row",
|
marginTop: 10,
|
||||||
marginBottom: 10,
|
fontFamily: "Helvetica-Bold",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View
|
<Text style={{ fontSize: 14 }}>
|
||||||
style={{
|
{parseInt(key)} {titles[key].value}
|
||||||
flexDirection: "column",
|
</Text>
|
||||||
marginBottom: 10,
|
<View style={styles.sectionContainer}>
|
||||||
}}
|
<View
|
||||||
>
|
style={{
|
||||||
<AppealRow_pdf
|
flexDirection: "row",
|
||||||
formXML={xmlStr}
|
marginBottom: 10,
|
||||||
whichSection={parseInt(key) + 1}
|
}}
|
||||||
sectionCount={key}
|
>
|
||||||
props={docProps}
|
<View
|
||||||
key={key}
|
style={{
|
||||||
mandatoryFieldsData={null}
|
flexDirection: "column",
|
||||||
pickListData={pickListData}
|
marginBottom: 10,
|
||||||
filesList={values.filesList}
|
}}
|
||||||
/>
|
>
|
||||||
|
<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>
|
||||||
</View>
|
)
|
||||||
</View>
|
)}
|
||||||
))}
|
|
||||||
</View>
|
</View>
|
||||||
<Text
|
<Text
|
||||||
style={styles.pageNumber}
|
style={styles.pageNumber}
|
||||||
|
|||||||
@@ -284,7 +284,7 @@
|
|||||||
"pinswg_lpa": 846040003
|
"pinswg_lpa": 846040003
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Cardiff County Council",
|
"value": "Cardiff Council",
|
||||||
"value_cy": "Cyngor Caerdydd",
|
"value_cy": "Cyngor Caerdydd",
|
||||||
"pinswg_lpa": 846040004
|
"pinswg_lpa": 846040004
|
||||||
},
|
},
|
||||||
@@ -364,7 +364,7 @@
|
|||||||
"pinswg_lpa": 846040019
|
"pinswg_lpa": 846040019
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Snowdonia National Park Authority",
|
"value": "Eryri National Park Authority",
|
||||||
"value_cy": "Awdurdod Parc Cenedlaethol Eryri",
|
"value_cy": "Awdurdod Parc Cenedlaethol Eryri",
|
||||||
"pinswg_lpa": 846040020
|
"pinswg_lpa": 846040020
|
||||||
},
|
},
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
"pinswg_lpa": 846040023
|
"pinswg_lpa": 846040023
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Brecon Beacons National Park Authority",
|
"value": "Bannau Brycheiniog National Park Authority",
|
||||||
"value_cy": "Awdurdod Parc Cenedlaethol Bannau Brycheiniog",
|
"value_cy": "Awdurdod Parc Cenedlaethol Bannau Brycheiniog",
|
||||||
"pinswg_lpa": 846040024
|
"pinswg_lpa": 846040024
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -6,7 +6,7 @@
|
|||||||
"accountid": "01297616-dc16-ec11-a985-00224800f523"
|
"accountid": "01297616-dc16-ec11-a985-00224800f523"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Brecon Beacons National Park Authority",
|
"name": "Bannau Brycheiniog National Park Authority",
|
||||||
"accountid": "03297616-dc16-ec11-a985-00224800f523"
|
"accountid": "03297616-dc16-ec11-a985-00224800f523"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"accountid": "07297616-dc16-ec11-a985-00224800f523"
|
"accountid": "07297616-dc16-ec11-a985-00224800f523"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Cardiff County Council",
|
"name": "Cardiff Council",
|
||||||
"accountid": "09297616-dc16-ec11-a985-00224800f523"
|
"accountid": "09297616-dc16-ec11-a985-00224800f523"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
"accountid": "29297616-dc16-ec11-a985-00224800f523"
|
"accountid": "29297616-dc16-ec11-a985-00224800f523"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Snowdonia National Park Authority",
|
"name": "Eryri National Park Authority",
|
||||||
"accountid": "2b297616-dc16-ec11-a985-00224800f523"
|
"accountid": "2b297616-dc16-ec11-a985-00224800f523"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17722,7 +17722,7 @@
|
|||||||
"Label": {
|
"Label": {
|
||||||
"LocalizedLabels": [
|
"LocalizedLabels": [
|
||||||
{
|
{
|
||||||
"Label": "Cardiff County Council",
|
"Label": "Cardiff Council",
|
||||||
"LanguageCode": 1033,
|
"LanguageCode": 1033,
|
||||||
"IsManaged": false,
|
"IsManaged": false,
|
||||||
"MetadataId": "002c16aa-848c-eb11-aac2-00224800be9c",
|
"MetadataId": "002c16aa-848c-eb11-aac2-00224800be9c",
|
||||||
@@ -17730,7 +17730,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UserLocalizedLabel": {
|
"UserLocalizedLabel": {
|
||||||
"Label": "Cardiff County Council",
|
"Label": "Cardiff Council",
|
||||||
"LanguageCode": 1033,
|
"LanguageCode": 1033,
|
||||||
"IsManaged": false,
|
"IsManaged": false,
|
||||||
"MetadataId": "002c16aa-848c-eb11-aac2-00224800be9c",
|
"MetadataId": "002c16aa-848c-eb11-aac2-00224800be9c",
|
||||||
@@ -18410,7 +18410,7 @@
|
|||||||
"Label": {
|
"Label": {
|
||||||
"LocalizedLabels": [
|
"LocalizedLabels": [
|
||||||
{
|
{
|
||||||
"Label": "Snowdonia National Park Authority",
|
"Label": "Eryri National Park Authority",
|
||||||
"LanguageCode": 1033,
|
"LanguageCode": 1033,
|
||||||
"IsManaged": false,
|
"IsManaged": false,
|
||||||
"MetadataId": "302c16aa-848c-eb11-aac2-00224800be9c",
|
"MetadataId": "302c16aa-848c-eb11-aac2-00224800be9c",
|
||||||
@@ -18418,7 +18418,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UserLocalizedLabel": {
|
"UserLocalizedLabel": {
|
||||||
"Label": "Snowdonia National Park Authority",
|
"Label": "Eryri National Park Authority",
|
||||||
"LanguageCode": 1033,
|
"LanguageCode": 1033,
|
||||||
"IsManaged": false,
|
"IsManaged": false,
|
||||||
"MetadataId": "302c16aa-848c-eb11-aac2-00224800be9c",
|
"MetadataId": "302c16aa-848c-eb11-aac2-00224800be9c",
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
"new-appeal-introduction-paragraph": "Mae'r ffurflen hon ar gyfer apelio yn erbyn:",
|
"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-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-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-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-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",
|
"new-appeal-introduction-warning-bullet-two": "darparu'r holl ddogfennau ategol hanfodol o fewn y cyfnod apelio",
|
||||||
|
|||||||
@@ -187,7 +187,13 @@ export default async function handler(req, res) {
|
|||||||
let month = repDate.getMonth() + 1;
|
let month = repDate.getMonth() + 1;
|
||||||
let year = repDate.getFullYear();
|
let year = repDate.getFullYear();
|
||||||
|
|
||||||
const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form";
|
const pdfFileName =
|
||||||
|
year +
|
||||||
|
"-" +
|
||||||
|
("0" + month).slice(-2) +
|
||||||
|
"-" +
|
||||||
|
("0" + day).slice(-2) +
|
||||||
|
"_-_Appeal_Form";
|
||||||
|
|
||||||
await createAppealPDFBlob(
|
await createAppealPDFBlob(
|
||||||
renderedPDF,
|
renderedPDF,
|
||||||
|
|||||||
Reference in New Issue
Block a user