@@ -171,7 +171,7 @@ const DocumentListPage = ({ perPage }) => {
|
|||||||
if (!group) {
|
if (!group) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
console.log("allDocs", allDocs);
|
||||||
const DesktopContent = () => {
|
const DesktopContent = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -201,17 +201,17 @@ const DocumentListPage = ({ perPage }) => {
|
|||||||
<DocCard
|
<DocCard
|
||||||
key={`doccard-${i}`}
|
key={`doccard-${i}`}
|
||||||
title={doc.docTitle}
|
title={doc.docTitle}
|
||||||
parentCaseNumber={doc.parentCaseNumber}
|
parentCaseNumber={doc?.parentCaseNumber}
|
||||||
parentCaseName={doc.parentCaseName}
|
parentCaseName={doc?.parentCaseName}
|
||||||
parentCaseId={doc.parentCaseId}
|
parentCaseId={doc?.parentCaseId}
|
||||||
createdAt={doc.createdAt}
|
createdAt={doc?.createdAt}
|
||||||
docType={doc.docType}
|
docType={doc?.docType}
|
||||||
documentId={doc.documentId}
|
documentId={doc?.documentId}
|
||||||
dateServed={doc.dateServed}
|
dateServed={doc?.dateServed}
|
||||||
confirmDelete={confirmDelete}
|
confirmDelete={confirmDelete}
|
||||||
handleNavigate={handleNavigate}
|
handleNavigate={handleNavigate}
|
||||||
displayDeleteButton={true}
|
displayDeleteButton={true}
|
||||||
responseGenerations={doc.responseGenerations}
|
responseGenerations={doc?.responseGenerations}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const UploadModal = (props) => {
|
|||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? process.env.REACT_APP_API_DEV
|
? process.env.REACT_APP_API_DEV
|
||||||
: process.env.REACT_APP_API_PROD;
|
: process.env.REACT_APP_API_PROD;
|
||||||
|
console.log("apiUrl", apiUrl);
|
||||||
async function saveToDb(uuidName) {
|
async function saveToDb(uuidName) {
|
||||||
const createdAt = new Date();
|
const createdAt = new Date();
|
||||||
const data = {
|
const data = {
|
||||||
@@ -69,16 +69,13 @@ const UploadModal = (props) => {
|
|||||||
setFileToParse(file);
|
setFileToParse(file);
|
||||||
setFileChanged(true);
|
setFileChanged(true);
|
||||||
}
|
}
|
||||||
|
console.log("full request url:", `${apiUrl}/parseNewDoc`);
|
||||||
async function uploadFile(file) {
|
async function uploadFile(file) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(`${apiUrl}/parseNewDoc`, {
|
||||||
`https://www.novodraft.ai:4000/parseNewDoc`,
|
|
||||||
{
|
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: file,
|
body: file,
|
||||||
}
|
});
|
||||||
);
|
|
||||||
const res = response;
|
const res = response;
|
||||||
return res;
|
return res;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -275,9 +275,16 @@ export const DocCard = (props) => {
|
|||||||
confirmDelete,
|
confirmDelete,
|
||||||
createdAt,
|
createdAt,
|
||||||
} = props;
|
} = props;
|
||||||
|
const createdAtTime = createdAt?.seconds
|
||||||
|
? createdAt?.seconds
|
||||||
|
: new Date().getTime();
|
||||||
const now = 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;
|
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 disabled = docType ? false : true;
|
||||||
const tooltipText =
|
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.";
|
"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;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 90px;
|
width: 120px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user