@paro.io/expert-shared-components 1.12.48 → 1.12.50
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.
|
@@ -41,7 +41,7 @@ const EscalationIssueCard_1 = require("./EscalationIssueCard");
|
|
|
41
41
|
const FileUploader_1 = require("../FileUploader");
|
|
42
42
|
const EscalationRespondForm_1 = require("./EscalationRespondForm");
|
|
43
43
|
const EscalationChat = ({ activeChatIssue, showEscalationChat, setShowEscalationChat, user, createEscalationChatMessage, documentUploadUrl, bucketName, uploadExpertClientFiles, createProjectEscalation, isExpert, }) => {
|
|
44
|
-
var _a;
|
|
44
|
+
var _a, _b;
|
|
45
45
|
const [uploadFiles, setUploadFiles] = (0, react_1.useState)([]);
|
|
46
46
|
const [uploadingFile, setUploadingFile] = (0, react_1.useState)(false);
|
|
47
47
|
const fileInputRef = (0, react_1.useRef)(null);
|
|
@@ -109,10 +109,13 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, setShowEscalation
|
|
|
109
109
|
});
|
|
110
110
|
const docs = [activeChatIssue.expertSupportingDocuments, activeChatIssue.clientSupportingDocuments, activeChatIssue.internalSupportingDocuments, ...uploadFiles];
|
|
111
111
|
const processedDocs = docs
|
|
112
|
-
.filter(doc => doc !== null && doc !== undefined && doc !== '')
|
|
112
|
+
.filter(doc => doc !== null && doc !== undefined && doc !== '' && doc !== "NULL")
|
|
113
113
|
.flatMap(doc => doc.split(','))
|
|
114
114
|
.map(doc => doc.trim())
|
|
115
|
-
.filter(doc => doc !== '');
|
|
115
|
+
.filter(doc => doc !== '' || doc !== "NULL");
|
|
116
|
+
const project = activeChatIssue.projectDetails && Array.isArray(activeChatIssue.projectDetails) && activeChatIssue.projectDetails.length > 0
|
|
117
|
+
? `${(_a = activeChatIssue.projectDetails[0]) === null || _a === void 0 ? void 0 : _a.projectName}${activeChatIssue.projectDetails.length > 1 ? ` +${activeChatIssue.projectDetails.length - 1} more` : ''} `
|
|
118
|
+
: '';
|
|
116
119
|
return (react_1.default.createElement(core_1.Dialog, { open: showEscalationChat, onClose: () => setShowEscalationChat(false), maxWidth: 'sm' },
|
|
117
120
|
react_1.default.createElement(core_1.DialogTitle, null,
|
|
118
121
|
react_1.default.createElement("div", { className: "text-black mb-1 p-2 pl-4 absolute top-0 left-0 w-full flex flex-row justify-between items-center z-50" },
|
|
@@ -123,15 +126,15 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, setShowEscalation
|
|
|
123
126
|
activeChatIssue.escalationNumber),
|
|
124
127
|
react_1.default.createElement(EscalationIssueCard_1.CustomTag, { label: activeChatIssue.status })),
|
|
125
128
|
react_1.default.createElement("p", { className: "text-xs" },
|
|
126
|
-
activeChatIssue.
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
+
activeChatIssue.problem,
|
|
130
|
+
" \u2022 ",
|
|
131
|
+
project)),
|
|
129
132
|
react_1.default.createElement("div", { className: "flex items-center space-x-4" },
|
|
130
133
|
react_1.default.createElement(core_1.IconButton, { onClick: () => setShowEscalationChat(false) },
|
|
131
134
|
react_1.default.createElement(base_icons_1.IconX, null))))),
|
|
132
135
|
react_1.default.createElement(core_1.DialogContent, null,
|
|
133
136
|
react_1.default.createElement("div", { className: "bg-white rounded-lg w-full overflow-hidden flex flex-col p-2 mt-12" },
|
|
134
|
-
react_1.default.createElement(DiscussionSection_1.DiscussionSection, { escalationNumber: activeChatIssue.escalationNumber, currentUser: user, messages: (
|
|
137
|
+
react_1.default.createElement(DiscussionSection_1.DiscussionSection, { escalationNumber: activeChatIssue.escalationNumber, currentUser: user, messages: (_b = activeChatIssue === null || activeChatIssue === void 0 ? void 0 : activeChatIssue.chatMessages) !== null && _b !== void 0 ? _b : [], onCreateMessage: createEscalationChatMessage, isInternal: false }),
|
|
135
138
|
processedDocs && processedDocs.length > 0 && (react_1.default.createElement("div", { className: "flex flex-wrap gap-2" },
|
|
136
139
|
react_1.default.createElement("span", { className: "text-sm font-bold text-gray-500 items-center" }, "Supporting Documents: "),
|
|
137
140
|
processedDocs.map((d, idx) => (react_1.default.createElement(EscalationIssueCard_1.CustomTag, { key: idx, label: d.split('%2F')[1] }))))),
|