more
This commit is contained in:
@@ -4,6 +4,7 @@ import { useParams } from "react-router-dom";
|
|||||||
import { Link, useNavigate } from "react-router-dom";
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
import { AppContext } from "../../Hooks/useContext/appContext";
|
import { AppContext } from "../../Hooks/useContext/appContext";
|
||||||
import EditElement from "../../pageElements/EditElement";
|
import EditElement from "../../pageElements/EditElement";
|
||||||
|
import LoadingSpinner from "../../pageElements/LoadingSpinner";
|
||||||
import { docEditCopy } from "../../Constants/Copy/docEditCopy.js";
|
import { docEditCopy } from "../../Constants/Copy/docEditCopy.js";
|
||||||
import ConfirmModal from "../Modals/ConfirmModal";
|
import ConfirmModal from "../Modals/ConfirmModal";
|
||||||
import Button from "../../pageElements/Button";
|
import Button from "../../pageElements/Button";
|
||||||
@@ -358,7 +359,6 @@ const RequestEditPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="doc-editing-button-container">
|
<div className="doc-editing-button-container">
|
||||||
<div className="generate-button-box">
|
<div className="generate-button-box">
|
||||||
{/* TODO: add tooltip: "This will save the document and create a .docx file that will (be downloaded? saved somewhere?" */}
|
|
||||||
<Button
|
<Button
|
||||||
className="primary-button create-gen-button"
|
className="primary-button create-gen-button"
|
||||||
onClick={createAndReturnDocx}
|
onClick={createAndReturnDocx}
|
||||||
@@ -425,10 +425,26 @@ const RequestEditPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const readyToEdit = fetchedCase && requests.length > 1;
|
const readyToEdit = fetchedCase && requests.length > 1;
|
||||||
|
const messages = [
|
||||||
|
"Generating responses. Please be patient, this may take several minutes.",
|
||||||
|
];
|
||||||
|
|
||||||
return (
|
return isLoading ? (
|
||||||
<div>
|
<LoadingSpinner message={messages[0]} />
|
||||||
<div> </div>
|
) : isBusy ? (
|
||||||
|
<LoadingSpinner message={"Downloading .docx"} loaderType="MoonLoader" />
|
||||||
|
) : readyToEdit ? (
|
||||||
|
editingContent()
|
||||||
|
) : (
|
||||||
|
<div className="docedit-errstate-container">
|
||||||
|
<div className="nodocs-text-container">
|
||||||
|
<p>
|
||||||
|
{" "}
|
||||||
|
Response content for this document cannot be displayed at this time.
|
||||||
|
</p>
|
||||||
|
<p>Support has been notified and will respond within 24 hours.</p>
|
||||||
|
<Link to="/dashboard">Return to Dashboard</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -457,5 +473,5 @@ export default RequestEditPage;
|
|||||||
handleBlur={handleBlur}
|
handleBlur={handleBlur}
|
||||||
i={i}
|
i={i}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user