more
This commit is contained in:
@@ -88,11 +88,11 @@ const RequestEditPage = () => {
|
||||
}
|
||||
getOutgoingRequests(documentId)
|
||||
.then((data) => {
|
||||
console.log("data in useEffect", data);
|
||||
const resp = data[0].requests.map((item, index) => {
|
||||
// NEVER CHANGE THIS:
|
||||
return { showInputEle: false, resp: item.text, index: index };
|
||||
return { showInputEle: false, req: item.text, index: index };
|
||||
});
|
||||
console.log("reqwuests in useEffect", requests);
|
||||
setRequests(resp);
|
||||
})
|
||||
.catch((err) => console.log(err));
|
||||
@@ -330,26 +330,18 @@ const RequestEditPage = () => {
|
||||
? fetchedCase?.plaintiffParties
|
||||
: fetchedCase?.defendantParties;
|
||||
console.log("requests", requests);
|
||||
|
||||
const editingContent = () => {
|
||||
return (
|
||||
<>
|
||||
<div> {headerPicker()}</div>
|
||||
<div className="doc-editing-wrapper">
|
||||
<div className="pleading-header">{headerString}</div>
|
||||
<div>
|
||||
{displayCopy.prelimaryStatement(
|
||||
documentType,
|
||||
respondent,
|
||||
servingParty
|
||||
)}
|
||||
</div>
|
||||
{/*displayCopy.prelimaryStatement*/}
|
||||
<div className="doc-editing-sub-wrapper">
|
||||
{requests?.map((req, i) => (
|
||||
<div className="req-item-outer-div">
|
||||
<div className="request-text-up">
|
||||
{numberingContent(i)}
|
||||
{req?.text}
|
||||
</div>
|
||||
<div className="request-text-up">{req?.text}</div>
|
||||
</div>
|
||||
))}
|
||||
<div
|
||||
@@ -358,74 +350,14 @@ const RequestEditPage = () => {
|
||||
>
|
||||
<div className="docedit-report-link">Report an issue</div>
|
||||
</div>
|
||||
<div className="doc-editing-button-container">
|
||||
<div className="generate-button-box">
|
||||
<Button
|
||||
className="primary-button create-gen-button"
|
||||
onClick={createAndReturnDocx}
|
||||
labelText={"Create .docx File"}
|
||||
/>
|
||||
</div>
|
||||
<div className="details-button-box">
|
||||
<div>
|
||||
<Button
|
||||
className="pt-2 pb-2 mr-4 secondary-button edit-back-button"
|
||||
onClick={handleBack}
|
||||
labelText="Back To Documents Page"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Button
|
||||
className="pt-2 pb-2 mr-2 primary-button"
|
||||
onClick={handleConfirmSave}
|
||||
labelText="Save Changes"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{showSaveModal && !isReport && documentId !== null ? (
|
||||
<ConfirmModal
|
||||
onCancel={handleCancelSave}
|
||||
onConfirm={handleSave}
|
||||
buttonLabelText="Confirm Save"
|
||||
modalText={
|
||||
"Are you sure? This will overrwrite any previously-saved edits."
|
||||
}
|
||||
/>
|
||||
) : null}
|
||||
{showSaveModal && isReport && documentId !== null ? (
|
||||
<ConfirmModal
|
||||
isReport={isReport}
|
||||
onCancel={handleCancelSave}
|
||||
onConfirm={handleReport}
|
||||
buttonLabelText="Report Issue"
|
||||
documentId={documentId}
|
||||
caseId={caseId}
|
||||
appUserId={appUserId}
|
||||
issuetext={issueText}
|
||||
setIssueText={setIssueText}
|
||||
modalText={
|
||||
"Date/time and document id automatically logged. Support will address this within 24 hours."
|
||||
}
|
||||
/>
|
||||
) : null}
|
||||
{showErrorModal ? (
|
||||
<ConfirmModal
|
||||
onCancel={() => setShowErrorModal(false)}
|
||||
onConfirm={() => setShowErrorModal(false)}
|
||||
buttonLabelText="Confirm"
|
||||
modalText={
|
||||
"There was a problem. Support was notified and will respond within 24 hours."
|
||||
}
|
||||
/>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const readyToEdit = fetchedCase && requests.length > 1;
|
||||
//const readyToEdit = fetchedCase && requests.length > 1;
|
||||
const readyToEdit = true;
|
||||
const messages = [
|
||||
"Generating responses. Please be patient, this may take several minutes.",
|
||||
];
|
||||
@@ -451,6 +383,17 @@ export default RequestEditPage;
|
||||
|
||||
/*
|
||||
|
||||
<div>
|
||||
{displayCopy.prelimaryStatement(
|
||||
documentType,
|
||||
respondent,
|
||||
servingParty
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
console.log("reqwuests in useEffect", requests);
|
||||
|
||||
{headerPicker(state, fetchedCase, onScrollClick)}
|
||||
|
||||
<EditElement
|
||||
|
||||
Reference in New Issue
Block a user