diff --git a/actions/azurestorage.js b/actions/azurestorage.js index 56526010..b41984a9 100644 --- a/actions/azurestorage.js +++ b/actions/azurestorage.js @@ -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"; diff --git a/actions/index.js b/actions/index.js index dea4c2a2..2513ca08 100644 --- a/actions/index.js +++ b/actions/index.js @@ -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) diff --git a/components/pdftemplates/appealRow_pdf.js b/components/pdftemplates/appealRow_pdf.js index a4efd46c..c749036c 100644 --- a/components/pdftemplates/appealRow_pdf.js +++ b/components/pdftemplates/appealRow_pdf.js @@ -196,9 +196,7 @@ export const AppealRow_pdf = (props) => { {formatDate( props.props[ @@ -341,7 +339,7 @@ export const AppealRow_pdf = (props) => { {props.props[ datafieldname[0].value - ] || ""}{" "} + ] || ""} diff --git a/components/pdftemplates/planningappeals78_pdf.js b/components/pdftemplates/planningappeals78_pdf.js index 47024d09..0e599d70 100644 --- a/components/pdftemplates/planningappeals78_pdf.js +++ b/components/pdftemplates/planningappeals78_pdf.js @@ -179,46 +179,57 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => { /> - {Object.keys(titles).map((key) => ( - - - - {parseInt(key) + 1} {titles[key].value} - - + {Object.keys(titles).map( + (key) => + key != 0 && ( + - - + + {parseInt(key)} {titles[key].value} + + + + + + + - - - ))} + ) + )}