show submitted reps on dashboard

This commit is contained in:
2024-05-28 18:44:52 +01:00
parent 229e21cdb0
commit f8b7d22802
15 changed files with 174 additions and 19 deletions
@@ -4,7 +4,11 @@ import { useRouter } from "next/router";
import { useEffect } from "react";
import { useDropzone } from "react-dropzone";
import { sendEmail, sendRepCompleteMessage } from "../../../actions";
import {
sendEmail,
sendRepCompleteMessage,
createWatchedCases,
} from "../../../actions";
import { setRepresentationReset } from "../../../store/currentView/action";
const RepComplete = (props) => {
@@ -51,6 +55,22 @@ const RepComplete = (props) => {
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.loggedinUserId +
")",
"pinswg_appealcasetype":
props.props.currentView.caseReference.appealType,
"pinswg_representationsubmitted": new Date(Date.now()),
"pinswg_representationtype":
props.props.currentView.caseReference.repDetails
.representationType,
}),
setRepresentationMessageSent(true));
});
return (