applied reps documents naming conventions

This commit is contained in:
2024-05-14 19:06:20 +01:00
parent 5987ecacf2
commit 0e3df85fdc
13 changed files with 273 additions and 137 deletions
@@ -37,56 +37,58 @@ const RepCompleteSubmit = (props) => {
const repFormData = formObj.representationForm.values;
const repDate = new Date();
// const repDate = new Date();
let day = repDate.getDate();
let month = repDate.getMonth() + 1;
let year = repDate.getFullYear();
let time = repDate.getTime();
// 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 = "APPELLANT";
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;
// 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
}
// default:
// // code block
// }
Object.assign(repFormData, {
"repfile_name": repFormData.hasOwnProperty("repfile_name")
? repFormData.repfile_name
: year +
"-" +
month +
"-" +
day +
"-" +
time +
"-" +
repType +
"-REP" +
"_" +
props.props.props.accountDetails.accountDetails.lastname,
"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,
});
// 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);