Merge pull request #139 from kjannette/thrice

more
This commit is contained in:
S Jannette
2024-03-07 18:53:10 -06:00
committed by GitHub
3 changed files with 26 additions and 7 deletions

View File

@@ -99,7 +99,6 @@ const CaseDetailsPage = () => {
};
const handleConfirmDocType = (docType) => {
console.log("docType", docType);
setShowConfirmModal(true);
};
@@ -187,6 +186,7 @@ const CaseDetailsPage = () => {
caseData={subCase}
handleConfirmDocType={handleConfirmDocType}
fbUserId={fbUserId}
clientPosition={subCase.clientPosition}
/>
) : null
) : null}

View File

@@ -62,7 +62,7 @@ const RequestEditPage = () => {
process.env.NODE_ENV === "development"
? process.env.REACT_APP_API_DEV
: process.env.REACT_APP_API_PROD;
console.log("documentId", documentId);
useEffect(() => {
if (!appUserId || !docId) {
setDocument(null);

View File

@@ -33,7 +33,7 @@ const UploadModal = (props) => {
caseData,
handleSuccess,
setIsLoading,
clientPositiion,
clientPosition,
handleConfirmDocType,
fbUserId,
} = props;
@@ -119,17 +119,32 @@ const UploadModal = (props) => {
}
async function uploadFile(file) {
console.log(
"uploadFile radioValue, clientPosition",
radioValue,
clientPosition
);
if (!clientPosition) {
return;
}
try {
if (radioValue === "complaint") {
if (clientPositiion === "Plaintiff") {
if (radioValue.toLowerCase() === "complaint") {
if (clientPosition === "Plaintiff") {
console.log(
"111111111--------------------------sending POST to:",
`${apiUrl}/v1/gen-disc-request-pl`
);
const response = await fetch(`${apiUrl}/v1/gen-disc-request-pl`, {
method: "POST",
body: file,
});
const res = response;
return res;
} else {
console.log("sending POST to:", `${apiUrl}/v1/gen-disc-request-df`);
} else if (radioValue.toLowerCase() === "defendant") {
console.log(
"222222222------------------------------sending POST to:",
`${apiUrl}/v1/gen-disc-request-df`
);
const response = await fetch(`${apiUrl}/v1/gen-disc-request-df`, {
method: "POST",
body: file,
@@ -138,6 +153,10 @@ const UploadModal = (props) => {
return res;
}
} else {
console.log(
"3333333333333 -------------------------sending POST to:",
`${apiUrl}/v1/parse-new-req-doc`
);
const response = await fetch(`${apiUrl}/v1/parse-new-req-doc`, {
method: "POST",
body: file,