@@ -171,7 +171,7 @@ const DocumentListPage = ({ perPage }) => {
|
||||
if (!group) {
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log("allDocs", allDocs);
|
||||
const DesktopContent = () => {
|
||||
return (
|
||||
<>
|
||||
@@ -201,17 +201,17 @@ const DocumentListPage = ({ perPage }) => {
|
||||
<DocCard
|
||||
key={`doccard-${i}`}
|
||||
title={doc.docTitle}
|
||||
parentCaseNumber={doc.parentCaseNumber}
|
||||
parentCaseName={doc.parentCaseName}
|
||||
parentCaseId={doc.parentCaseId}
|
||||
createdAt={doc.createdAt}
|
||||
docType={doc.docType}
|
||||
documentId={doc.documentId}
|
||||
dateServed={doc.dateServed}
|
||||
parentCaseNumber={doc?.parentCaseNumber}
|
||||
parentCaseName={doc?.parentCaseName}
|
||||
parentCaseId={doc?.parentCaseId}
|
||||
createdAt={doc?.createdAt}
|
||||
docType={doc?.docType}
|
||||
documentId={doc?.documentId}
|
||||
dateServed={doc?.dateServed}
|
||||
confirmDelete={confirmDelete}
|
||||
handleNavigate={handleNavigate}
|
||||
displayDeleteButton={true}
|
||||
responseGenerations={doc.responseGenerations}
|
||||
responseGenerations={doc?.responseGenerations}
|
||||
/>
|
||||
))
|
||||
) : (
|
||||
|
||||
@@ -40,7 +40,7 @@ const UploadModal = (props) => {
|
||||
process.env.NODE_ENV === "development"
|
||||
? process.env.REACT_APP_API_DEV
|
||||
: process.env.REACT_APP_API_PROD;
|
||||
|
||||
console.log("apiUrl", apiUrl);
|
||||
async function saveToDb(uuidName) {
|
||||
const createdAt = new Date();
|
||||
const data = {
|
||||
@@ -69,16 +69,13 @@ const UploadModal = (props) => {
|
||||
setFileToParse(file);
|
||||
setFileChanged(true);
|
||||
}
|
||||
|
||||
console.log("full request url:", `${apiUrl}/parseNewDoc`);
|
||||
async function uploadFile(file) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://www.novodraft.ai:4000/parseNewDoc`,
|
||||
{
|
||||
method: "POST",
|
||||
body: file,
|
||||
}
|
||||
);
|
||||
const response = await fetch(`${apiUrl}/parseNewDoc`, {
|
||||
method: "POST",
|
||||
body: file,
|
||||
});
|
||||
const res = response;
|
||||
return res;
|
||||
} catch (error) {
|
||||
|
||||
@@ -275,9 +275,16 @@ export const DocCard = (props) => {
|
||||
confirmDelete,
|
||||
createdAt,
|
||||
} = props;
|
||||
const createdAtTime = createdAt?.seconds
|
||||
? createdAt?.seconds
|
||||
: new Date().getTime();
|
||||
const now = new Date().getTime();
|
||||
const uploadedAt = createdAt.toDate();
|
||||
const uploadedAt = new Date(createdAtTime * 1000);
|
||||
const isReportable = Math.round((now - uploadedAt) / 60 / 1000) > 15;
|
||||
console.log(
|
||||
"(now - uploadedAt) / 60 / 1000)",
|
||||
(now - uploadedAt) / 60 / 1000
|
||||
);
|
||||
const disabled = docType ? false : true;
|
||||
const tooltipText =
|
||||
"Parsing is taking a bit longer than usual. This usually resolves within 15 minutes. If it does not, click “report” and support will address the issue within 24 hours.";
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
width: 90px;
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
padding-right: 10px;
|
||||
margin-right: 20px;
|
||||
|
||||
Reference in New Issue
Block a user