@paro.io/expert-shared-components 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -309,7 +309,7 @@ const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClient
|
|
|
309
309
|
fileId && setFileId(fileId);
|
|
310
310
|
if (docSize >= 5) {
|
|
311
311
|
const downloadFileName = `project-${projectId}/${fileName}`;
|
|
312
|
-
const downloadClient = new DownloadClient_1.default({ downloadDocumentUrl: downloadDocumentUrl
|
|
312
|
+
const downloadClient = new DownloadClient_1.default({ downloadDocumentUrl: downloadDocumentUrl, fileKey: downloadFileName });
|
|
313
313
|
const downloadData = yield downloadClient.downloadDocument();
|
|
314
314
|
(0, utils_1.handleDownloadPdf)({ fileData: downloadData, downloadFilename: fileName, streamData: true });
|
|
315
315
|
updateLastViewed();
|
|
@@ -19,6 +19,7 @@ interface DocumentCenterProps {
|
|
|
19
19
|
expertProjectsList?: any[];
|
|
20
20
|
getFreelancerLazyQuery?: any;
|
|
21
21
|
documentUploadUrl?: string;
|
|
22
|
+
downloadDocumentUrl?: string;
|
|
22
23
|
}
|
|
23
|
-
export declare const DocumentCenter: ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, }: DocumentCenterProps) => JSX.Element;
|
|
24
|
+
export declare const DocumentCenter: ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, downloadDocumentUrl, }: DocumentCenterProps) => JSX.Element;
|
|
24
25
|
export {};
|
|
@@ -80,7 +80,7 @@ const CustomDialogContent = (0, core_1.styled)(core_1.DialogContent)(({ theme })
|
|
|
80
80
|
background: '#707070',
|
|
81
81
|
},
|
|
82
82
|
}));
|
|
83
|
-
const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal = false, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, }) => {
|
|
83
|
+
const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal = false, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, downloadDocumentUrl, }) => {
|
|
84
84
|
var _a;
|
|
85
85
|
const [value, setValue] = (0, react_1.useState)(0);
|
|
86
86
|
const [expertClientFiles, setExpertClientFiles] = (0, react_1.useState)([]);
|
|
@@ -172,7 +172,7 @@ const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertCli
|
|
|
172
172
|
react_1.default.createElement("b", null, value === 0 ? ((expertClientFiles === null || expertClientFiles === void 0 ? void 0 : expertClientFiles.length) ? (_a = expertClientFiles === null || expertClientFiles === void 0 ? void 0 : expertClientFiles.filter((file) => !(file === null || file === void 0 ? void 0 : file.lastViewed))) === null || _a === void 0 ? void 0 : _a.length : 0) : expertFiles === null || expertFiles === void 0 ? void 0 : expertFiles.length),
|
|
173
173
|
" Documents Unread")))),
|
|
174
174
|
react_1.default.createElement(lab_1.TabPanel, { value: '0', style: { paddingTop: '0px' } },
|
|
175
|
-
react_1.default.createElement(ClientDocumentsTable_1.ClientDocumentsTable, { legacyFreelancerId: legacyFreelancerId, expertFiles: expertClientFiles, setExpertClientFiles: setExpertClientFiles, clientAndProjectsList: clientAndProjects, uploadExpertClientFiles: uploadExpertClientFiles, updateFileLastViewed: updateFileLastViewed, deleteExpertClientFile: deleteExpertClientFile, paroDocuments: false, freelancerName: freelancerName !== null && freelancerName !== void 0 ? freelancerName : '', freelancerEmail: freelancerEmail !== null && freelancerEmail !== void 0 ? freelancerEmail : '', getFileLazyQuery: getFileLazyQuery, expertClientFilesLazyQuery: expertClientFilesLazyQuery, isClientPortal: isClientPortal, documentUploadUrl: documentUploadUrl })),
|
|
175
|
+
react_1.default.createElement(ClientDocumentsTable_1.ClientDocumentsTable, { legacyFreelancerId: legacyFreelancerId, expertFiles: expertClientFiles, setExpertClientFiles: setExpertClientFiles, clientAndProjectsList: clientAndProjects, uploadExpertClientFiles: uploadExpertClientFiles, updateFileLastViewed: updateFileLastViewed, deleteExpertClientFile: deleteExpertClientFile, paroDocuments: false, freelancerName: freelancerName !== null && freelancerName !== void 0 ? freelancerName : '', freelancerEmail: freelancerEmail !== null && freelancerEmail !== void 0 ? freelancerEmail : '', getFileLazyQuery: getFileLazyQuery, expertClientFilesLazyQuery: expertClientFilesLazyQuery, isClientPortal: isClientPortal, documentUploadUrl: documentUploadUrl, downloadDocumentUrl: downloadDocumentUrl })),
|
|
176
176
|
react_1.default.createElement(lab_1.TabPanel, { value: '1' },
|
|
177
177
|
react_1.default.createElement(ParoDocumentsTable_1.ParoDocumentsTable, { legacyFreelancerId: legacyFreelancerId, expiryDate: insuranceExpiryDate !== null && insuranceExpiryDate !== void 0 ? insuranceExpiryDate : '', setExpiryDate: setInsuranceExpiryDate, expertFiles: expertFiles, setExpertFiles: setExpertFiles, uploadFileData: uploadFileData, deleteFileMutation: deleteFileMutation, updateFreelancerExpiryMutation: updateFreelancerExpiryMutation, foldername: foldername !== null && foldername !== void 0 ? foldername : '', paroDocuments: true, getFileLazyQuery: getFileLazyQuery, getFilesLazyQuery: getFilesLazyQuery }))))),
|
|
178
178
|
react_1.default.createElement(react_hot_toast_1.Toaster, { position: "top-center", toastOptions: {
|