@paro.io/expert-shared-components 1.12.58 → 1.12.60
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.
- package/lib/components/DocumentCenter/ClientDocumentsTable.js +7 -1
- package/lib/components/Escalations/EscalationChat.js +3 -0
- package/lib/components/Escalations/EscalationRespondForm.d.ts +2 -1
- package/lib/components/Escalations/EscalationRespondForm.js +5 -2
- package/lib/components/Escalations/EscalationSubmitForm.js +3 -0
- package/lib/components/Escalations/Escalations.js +1 -1
- package/lib/components/shared/utils.d.ts +1 -0
- package/lib/components/shared/utils.js +2 -1
- package/package.json +1 -1
|
@@ -307,7 +307,11 @@ const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClient
|
|
|
307
307
|
const handleDownloadFile = (fileName, fileId, projectId, docSize, docType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
308
308
|
(0, utils_1.showToast)('success', 'Starting File Download...');
|
|
309
309
|
fileId && setFileId(fileId);
|
|
310
|
-
const bucketName = docType === '
|
|
310
|
+
const bucketName = docType === 'Escalation Documents'
|
|
311
|
+
? `expert-client-escalation-files${!stage || stage === 'dev' ? '' : `-${stage}`}`
|
|
312
|
+
: docType === 'Dispute Documents'
|
|
313
|
+
? `expert-client-dispute-files${!stage || stage === 'dev' ? '' : `-${stage}`}`
|
|
314
|
+
: `expert-client-files-${stage}`;
|
|
311
315
|
if (docSize >= 5) {
|
|
312
316
|
const downloadFileName = `project-${projectId}/${fileName}`;
|
|
313
317
|
const downloadClient = new DownloadClient_1.default({ downloadDocumentUrl: downloadDocumentUrl, fileKey: downloadFileName, bucketName: bucketName });
|
|
@@ -335,6 +339,8 @@ const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClient
|
|
|
335
339
|
}
|
|
336
340
|
fileId && setFileId(fileId);
|
|
337
341
|
};
|
|
342
|
+
console.log("files here are", files);
|
|
343
|
+
console.log("expertFiles here are", expertFiles);
|
|
338
344
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
339
345
|
react_1.default.createElement(DocumentUploadRow_1.DocumentUploadRow, { clientAndProject: clientAndProject, setClientAndProject: setClientAndProject, clientAndProjectsList: clientAndProjectsList, docType: docType, setDocType: setDocType, paroDocuments: paroDocuments, uploadExpertClientFiles: uploadExpertClientFiles, refetchFiles: refetchFiles, legacyFreelancerId: legacyFreelancerId, freelancerName: freelancerName, freelancerEmail: freelancerEmail, isClientPortal: isClientPortal, documentUploadUrl: documentUploadUrl }),
|
|
340
346
|
react_1.default.createElement(utils_1.CustomPaper, { style: { height: `${(files === null || files === void 0 ? void 0 : files.length) === 0 ? '30vh' : 'auto'}` } },
|
|
@@ -53,11 +53,13 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, setShowEscalation
|
|
|
53
53
|
const selectedFiles = event.target.files;
|
|
54
54
|
if (!selectedFiles) {
|
|
55
55
|
setUploadingFile(false);
|
|
56
|
+
setUploadFiles([]);
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
59
|
const validFiles = Array.from(selectedFiles).filter(file => (0, EscalationRespondForm_1.validateFileUpload)(file));
|
|
59
60
|
if (validFiles.length === 0) {
|
|
60
61
|
setUploadingFile(false);
|
|
62
|
+
setUploadFiles([]);
|
|
61
63
|
return;
|
|
62
64
|
}
|
|
63
65
|
const uploadPromises = validFiles.map((selectedFile) => {
|
|
@@ -102,6 +104,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, setShowEscalation
|
|
|
102
104
|
}
|
|
103
105
|
finally {
|
|
104
106
|
setUploadingFile(false);
|
|
107
|
+
setUploadFiles([]);
|
|
105
108
|
}
|
|
106
109
|
});
|
|
107
110
|
const docs = [activeChatIssue.expertSupportingDocuments, activeChatIssue.clientSupportingDocuments, activeChatIssue.internalSupportingDocuments, ...uploadFiles];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const ACCEPTED_FILE_TYPES: string[];
|
|
2
2
|
export declare const validateFileUpload: (file: File | null) => boolean;
|
|
3
|
-
declare const EscalationRespondForm: ({ goBack, selectedIssue, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, updateProjectEscalation, bucketName, goHome, isExpert, }: {
|
|
3
|
+
declare const EscalationRespondForm: ({ goBack, selectedIssue, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, updateProjectEscalation, bucketName, goHome, isExpert, userId, }: {
|
|
4
4
|
goBack: () => void;
|
|
5
5
|
selectedIssue: any;
|
|
6
6
|
documentUploadUrl: string;
|
|
@@ -10,5 +10,6 @@ declare const EscalationRespondForm: ({ goBack, selectedIssue, documentUploadUrl
|
|
|
10
10
|
bucketName: string;
|
|
11
11
|
goHome: () => void;
|
|
12
12
|
isExpert: boolean;
|
|
13
|
+
userId: number;
|
|
13
14
|
}) => JSX.Element;
|
|
14
15
|
export default EscalationRespondForm;
|
|
@@ -75,7 +75,7 @@ const responseTypes = [
|
|
|
75
75
|
value: "NoResponse",
|
|
76
76
|
},
|
|
77
77
|
];
|
|
78
|
-
const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, updateProjectEscalation, bucketName, goHome, isExpert, }) => {
|
|
78
|
+
const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, updateProjectEscalation, bucketName, goHome, isExpert, userId, }) => {
|
|
79
79
|
var _a, _b;
|
|
80
80
|
const [selectedType, setSelectedType] = (0, react_1.useState)(responseTypes[0].value);
|
|
81
81
|
const [responseInput, setResponseInput] = (0, react_1.useState)('');
|
|
@@ -91,11 +91,13 @@ const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downl
|
|
|
91
91
|
const selectedFiles = event.target.files;
|
|
92
92
|
if (!selectedFiles) {
|
|
93
93
|
setUploadingFile(false);
|
|
94
|
+
setUploadFiles([]);
|
|
94
95
|
return;
|
|
95
96
|
}
|
|
96
97
|
const validFiles = Array.from(selectedFiles).filter(file => (0, exports.validateFileUpload)(file));
|
|
97
98
|
if (validFiles.length === 0) {
|
|
98
99
|
setUploadingFile(false);
|
|
100
|
+
setUploadFiles([]);
|
|
99
101
|
return;
|
|
100
102
|
}
|
|
101
103
|
const uploadPromises = validFiles.map((selectedFile) => {
|
|
@@ -140,6 +142,7 @@ const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downl
|
|
|
140
142
|
}
|
|
141
143
|
finally {
|
|
142
144
|
setUploadingFile(false);
|
|
145
|
+
setUploadFiles([]);
|
|
143
146
|
}
|
|
144
147
|
});
|
|
145
148
|
const submitResponse = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -151,7 +154,7 @@ const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downl
|
|
|
151
154
|
escalationId: selectedIssue.escalationId,
|
|
152
155
|
[isExpert ? 'expertResponse' : 'clientResponse']: responseInput,
|
|
153
156
|
[isExpert ? 'expertSupportingDocuments' : 'clientSupportingDocuments']: uploadFiles.length > 0 ? uploadFiles.join(", ") : '',
|
|
154
|
-
statusChangedBy:
|
|
157
|
+
statusChangedBy: userId,
|
|
155
158
|
}
|
|
156
159
|
}
|
|
157
160
|
});
|
|
@@ -105,11 +105,13 @@ const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, docu
|
|
|
105
105
|
const selectedFiles = event.target.files;
|
|
106
106
|
if (!selectedFiles) {
|
|
107
107
|
setUploadingFile(false);
|
|
108
|
+
setUploadFiles([]);
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
111
|
const validFiles = Array.from(selectedFiles).filter(file => (0, EscalationRespondForm_1.validateFileUpload)(file));
|
|
111
112
|
if (validFiles.length === 0) {
|
|
112
113
|
setUploadingFile(false);
|
|
114
|
+
setUploadFiles([]);
|
|
113
115
|
return;
|
|
114
116
|
}
|
|
115
117
|
const uploadPromises = validFiles.map((selectedFile) => {
|
|
@@ -152,6 +154,7 @@ const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, docu
|
|
|
152
154
|
}
|
|
153
155
|
finally {
|
|
154
156
|
setUploadingFile(false);
|
|
157
|
+
setUploadFiles([]);
|
|
155
158
|
}
|
|
156
159
|
});
|
|
157
160
|
const isFormValid = () => {
|
|
@@ -153,7 +153,7 @@ const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations
|
|
|
153
153
|
react_1.default.createElement(EscalationReportBanner_1.default, { onReport: () => setSelectedIssueId(0) }),
|
|
154
154
|
escalations.length > 0 ? react_1.default.createElement(EscalationTabs_1.default, { activeTab: activeEscalationTab, setActiveTab: setActiveEscalationTab, activeIssues: activeIssues.length, inProgressIssues: inProgressIssues.length, resolvedIssues: resolvedIssues.length }) : null,
|
|
155
155
|
react_1.default.createElement(EscalationTabsContent_1.default, { activeTab: activeEscalationTab, openEscalationChat: openEscalationChat, setSelectedIssueId: setSelectedIssueId, activeIssues: activeIssues, inProgressIssues: inProgressIssues, resolvedIssues: resolvedIssues, updateProjectEscalation: updateProjectEscalation, isExpert: isExpert, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName })),
|
|
156
|
-
activeSection === 'support' && activeIssues.filter((issue) => issue.escalationNumber === selectedIssueId).length > 0 && (react_1.default.createElement(EscalationRespondForm_1.default, { goBack: goBack, selectedIssue: activeIssues.find((issue) => issue.escalationNumber === selectedIssueId), documentUploadUrl: documentUploadUrl, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName, uploadExpertClientFiles: uploadExpertClientFiles, updateProjectEscalation: updateProjectEscalation, goHome: goHome, isExpert: isExpert })),
|
|
156
|
+
activeSection === 'support' && activeIssues.filter((issue) => issue.escalationNumber === selectedIssueId).length > 0 && (react_1.default.createElement(EscalationRespondForm_1.default, { goBack: goBack, selectedIssue: activeIssues.find((issue) => issue.escalationNumber === selectedIssueId), documentUploadUrl: documentUploadUrl, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName, uploadExpertClientFiles: uploadExpertClientFiles, updateProjectEscalation: updateProjectEscalation, goHome: goHome, isExpert: isExpert, userId: user.userId })),
|
|
157
157
|
activeSection === 'support' && selectedIssueId === 0 && (react_1.default.createElement(EscalationSubmitForm_1.default, { goBack: goBack, goHome: goHome, expertsOrClients: expertsOrClients, projects: projects, documentUploadUrl: documentUploadUrl, bucketName: bucketName, uploadExpertClientFiles: uploadExpertClientFiles, createProjectEscalation: createProjectEscalation, isExpert: isExpert, user: user, clientId: clientId })),
|
|
158
158
|
showEscalationChat && activeChatIssue && (react_1.default.createElement(EscalationChat_1.default, { activeChatIssue: activeChatIssue, showEscalationChat: showEscalationChat, setShowEscalationChat: setShowEscalationChat, user: user, createEscalationChatMessage: createEscalationChatMessage, documentUploadUrl: documentUploadUrl, bucketName: bucketName, uploadExpertClientFiles: uploadExpertClientFiles, createProjectEscalation: createProjectEscalation, isExpert: isExpert })),
|
|
159
159
|
showSuspensionModal &&
|
|
@@ -34,6 +34,7 @@ export declare const DOCUMENT_TYPE_CONSTANTS: {
|
|
|
34
34
|
"Tax and Compliance Documents": string;
|
|
35
35
|
"Project Specific Documents": string;
|
|
36
36
|
"Dispute Documents": string;
|
|
37
|
+
"Escalation Documents": string;
|
|
37
38
|
};
|
|
38
39
|
export declare const titleMappings: Record<string, string>;
|
|
39
40
|
export declare const features: string[];
|
|
@@ -272,7 +272,8 @@ exports.DOCUMENT_TYPE_CONSTANTS = {
|
|
|
272
272
|
"Operational and Management Documents": "OPERATIONAL_AND_MANAGEMENT_DOCUMENTS",
|
|
273
273
|
"Tax and Compliance Documents": "TAX_AND_COMPLIANCE_DOCUMENTS",
|
|
274
274
|
"Project Specific Documents": "PROJECT_SPECIFIC_DOCUMENTS",
|
|
275
|
-
"Dispute Documents": "DISPUTE_DOCUMENTS"
|
|
275
|
+
"Dispute Documents": "DISPUTE_DOCUMENTS",
|
|
276
|
+
"Escalation Documents": "ESCALATION_DOCUMENTS"
|
|
276
277
|
};
|
|
277
278
|
exports.titleMappings = {
|
|
278
279
|
"CFO": "Chief Financial Officer (CFO)",
|