@paro.io/expert-shared-components 1.13.3 → 1.13.4

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.
@@ -42,10 +42,8 @@ const FileUploader_1 = require("../FileUploader");
42
42
  const EscalationRespondForm_1 = require("./EscalationRespondForm");
43
43
  const utils_1 = require("../shared/utils");
44
44
  const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, createEscalationChatMessage, documentUploadUrl, bucketName, uploadExpertClientFiles, updateProjectEscalation, isExpert, }) => {
45
- var _a, _b, _c, _d;
46
- const [uploadFiles, setUploadFiles] = (0, react_1.useState)(isExpert
47
- ? (((_a = activeChatIssue === null || activeChatIssue === void 0 ? void 0 : activeChatIssue.expertSupportingDocuments) === null || _a === void 0 ? void 0 : _a.split(",")) || [])
48
- : (((_b = activeChatIssue === null || activeChatIssue === void 0 ? void 0 : activeChatIssue.clientSupportingDocuments) === null || _b === void 0 ? void 0 : _b.split(",")) || []));
45
+ var _a, _b;
46
+ const [uploadFiles, setUploadFiles] = (0, react_1.useState)([]);
49
47
  const [uploadingFile, setUploadingFile] = (0, react_1.useState)(false);
50
48
  const fileInputRef = (0, react_1.useRef)(null);
51
49
  const handleFileUpload = (event) => __awaiter(void 0, void 0, void 0, function* () {
@@ -111,7 +109,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, cr
111
109
  const docs = [activeChatIssue.expertSupportingDocuments, activeChatIssue.clientSupportingDocuments, activeChatIssue.internalSupportingDocuments, ...uploadFiles];
112
110
  const processedDocs = (0, utils_1.processDocs)(docs);
113
111
  const project = activeChatIssue.projectDetails && Array.isArray(activeChatIssue.projectDetails) && activeChatIssue.projectDetails.length > 0
114
- ? `${(_c = activeChatIssue.projectDetails[0]) === null || _c === void 0 ? void 0 : _c.projectName}${activeChatIssue.projectDetails.length > 1 ? ` +${activeChatIssue.projectDetails.length - 1} more` : ''} `
112
+ ? `${(_a = activeChatIssue.projectDetails[0]) === null || _a === void 0 ? void 0 : _a.projectName}${activeChatIssue.projectDetails.length > 1 ? ` +${activeChatIssue.projectDetails.length - 1} more` : ''} `
115
113
  : '';
116
114
  return (react_1.default.createElement(core_1.Dialog, { open: showEscalationChat, onClose: onClose, maxWidth: 'sm' },
117
115
  react_1.default.createElement(core_1.DialogTitle, null,
@@ -121,7 +119,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, cr
121
119
  react_1.default.createElement("h1", { className: "text-md font-bold mr-2" },
122
120
  "Escalation Chat #",
123
121
  activeChatIssue.escalationNumber),
124
- react_1.default.createElement(EscalationIssueCard_1.CustomTag, { label: activeChatIssue.status === "InProgress" ? "In Progress" : activeChatIssue.status })),
122
+ react_1.default.createElement(EscalationIssueCard_1.CustomTag, { label: activeChatIssue.status === "InProgress" ? "In Progress" : activeChatIssue.status, customColor: isExpert ? 'bg-neutral border-neutral' : 'bg-[#B0B5D3] border-[#181027]' })),
125
123
  react_1.default.createElement("p", { className: "text-xs" },
126
124
  activeChatIssue.problem,
127
125
  " \u2022 ",
@@ -131,7 +129,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, cr
131
129
  react_1.default.createElement(base_icons_1.IconX, null))))),
132
130
  react_1.default.createElement(core_1.DialogContent, null,
133
131
  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: (_d = activeChatIssue === null || activeChatIssue === void 0 ? void 0 : activeChatIssue.chatMessages) !== null && _d !== void 0 ? _d : [], onCreateMessage: createEscalationChatMessage, isInternal: false }),
132
+ 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
133
  processedDocs && processedDocs.length > 0 && (react_1.default.createElement("div", { className: "flex flex-wrap gap-2 mt-4 mb-2" },
136
134
  react_1.default.createElement("span", { className: "text-sm font-bold text-gray-500 items-center" }, "Supporting Documents: "),
137
135
  processedDocs.map((d, idx) => (react_1.default.createElement(EscalationIssueCard_1.CustomTag, { key: idx, label: d.split('%2F')[1], customColor: `bg-success border-success` }))))),
@@ -76,12 +76,9 @@ const responseTypes = [
76
76
  },
77
77
  ];
78
78
  const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, updateProjectEscalation, bucketName, goHome, isExpert, userId, }) => {
79
- var _a, _b;
80
79
  const [selectedType, setSelectedType] = (0, react_1.useState)(responseTypes[0].value);
81
80
  const [responseInput, setResponseInput] = (0, react_1.useState)('');
82
- const [uploadFiles, setUploadFiles] = (0, react_1.useState)(isExpert
83
- ? (((_a = selectedIssue === null || selectedIssue === void 0 ? void 0 : selectedIssue.expertSupportingDocuments) === null || _a === void 0 ? void 0 : _a.split(",")) || [])
84
- : (((_b = selectedIssue === null || selectedIssue === void 0 ? void 0 : selectedIssue.clientSupportingDocuments) === null || _b === void 0 ? void 0 : _b.split(",")) || []));
81
+ const [uploadFiles, setUploadFiles] = (0, react_1.useState)([]);
85
82
  const [uploadingFile, setUploadingFile] = (0, react_1.useState)(false);
86
83
  const [submitting, setSubmitting] = (0, react_1.useState)(false);
87
84
  const fileInputRef = (0, react_1.useRef)(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.13.3",
3
+ "version": "1.13.4",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {