@paro.io/expert-shared-components 1.12.56 → 1.12.58

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.
@@ -68,6 +68,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, setShowEscalation
68
68
  file: selectedFile,
69
69
  documentName: selectedFile.name,
70
70
  escalationId: activeChatIssue.escalationId,
71
+ escalationNumber: activeChatIssue.escalationNumber,
71
72
  projectId: activeChatIssue.projectDetails.length > 0 ? activeChatIssue.projectDetails[0].projectId : '',
72
73
  documentUploadUrl: documentUploadUrl,
73
74
  bucketName: bucketName,
@@ -106,6 +106,7 @@ const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downl
106
106
  file: selectedFile,
107
107
  documentName: selectedFile.name,
108
108
  escalationId: selectedIssue === null || selectedIssue === void 0 ? void 0 : selectedIssue.escalationId,
109
+ escalationNumber: selectedIssue === null || selectedIssue === void 0 ? void 0 : selectedIssue.escalationNumber,
109
110
  projectId: (_b = (_a = selectedIssue === null || selectedIssue === void 0 ? void 0 : selectedIssue.projectDetails) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.projectId,
110
111
  documentUploadUrl: documentUploadUrl,
111
112
  bucketName: bucketName,
@@ -150,7 +151,7 @@ const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downl
150
151
  escalationId: selectedIssue.escalationId,
151
152
  [isExpert ? 'expertResponse' : 'clientResponse']: responseInput,
152
153
  [isExpert ? 'expertSupportingDocuments' : 'clientSupportingDocuments']: uploadFiles.length > 0 ? uploadFiles.join(", ") : '',
153
- statuschangedby: isExpert ? selectedIssue.freelancer.id : selectedIssue.client.id,
154
+ statusChangedBy: isExpert ? selectedIssue.freelancer.id : selectedIssue.client.id,
154
155
  }
155
156
  }
156
157
  });
@@ -183,8 +183,6 @@ const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, docu
183
183
  status: 'InProgress',
184
184
  [isExpert ? 'expertSupportingDocuments' : 'clientSupportingDocuments']: uploadFiles.length > 0 ? uploadFiles.join(", ") : '',
185
185
  statusChangedBy: user.userId,
186
- firstReviewerId: isExpert ? user.userId : selectedUser === null || selectedUser === void 0 ? void 0 : selectedUser.id,
187
- followOnReviewerId: isExpert ? selectedUser === null || selectedUser === void 0 ? void 0 : selectedUser.id : clientId,
188
186
  };
189
187
  try {
190
188
  yield createProjectEscalation({
@@ -39,6 +39,7 @@ const AccountSuspensionBanner_1 = __importDefault(require("./AccountSuspensionBa
39
39
  const AccountSuspensionModal_1 = __importDefault(require("./AccountSuspensionModal"));
40
40
  const base_icons_1 = require("@paro.io/base-icons");
41
41
  const EscalationIssueCard_1 = require("./EscalationIssueCard");
42
+ const react_hot_toast_1 = require("react-hot-toast");
42
43
  const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, createProjectEscalation, updateProjectEscalation, createEscalationChatMessage, bucketName, user, clientId = 0, }) => {
43
44
  const [activeSection, setActiveSection] = (0, react_1.useState)('support');
44
45
  const [selectedProject, setSelectedProject] = (0, react_1.useState)(null);
@@ -87,10 +88,10 @@ const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations
87
88
  activeSection === 'support' && selectedIssueId === null && react_1.default.createElement("div", null,
88
89
  react_1.default.createElement("div", { className: "flex justify-between items-center mb-1 mt-2" },
89
90
  react_1.default.createElement("h2", { className: "text-xl font-bold" }, "Support & Escalation Management"),
90
- activeIssues.length && react_1.default.createElement("div", { className: "flex items-center space-x-2" },
91
+ activeIssues.length > 0 ? react_1.default.createElement("div", { className: "flex items-center space-x-2" },
91
92
  react_1.default.createElement("div", { className: `border box-border text-center px-4 pb-0.5 pt-1 text-sm inline-block break-words text-[#A73A43] rounded-full bg-[#F9BABF] border-[#F9BABF] font-medium` },
92
93
  activeIssues.length,
93
- " ACTIVE ISSUES"))),
94
+ " ACTIVE ISSUES")) : null),
94
95
  react_1.default.createElement("div", { className: "border-b pb-4 mb-6" },
95
96
  react_1.default.createElement("p", { className: "text-gray-600" }, `Manage escalations with integrated chat between you, your ${isExpert ? 'client' : 'expert'}, and Paro support. All conversations are organized by priority and status.`)),
96
97
  react_1.default.createElement("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6" },
@@ -150,12 +151,18 @@ const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations
150
151
  react_1.default.createElement(AccountSuspensionBanner_1.default, { setShowSuspensionModal: setShowSuspensionModal, suspended: false }),
151
152
  !isExpert &&
152
153
  react_1.default.createElement(EscalationReportBanner_1.default, { onReport: () => setSelectedIssueId(0) }),
153
- react_1.default.createElement(EscalationTabs_1.default, { activeTab: activeEscalationTab, setActiveTab: setActiveEscalationTab, activeIssues: activeIssues.length, inProgressIssues: inProgressIssues.length, resolvedIssues: resolvedIssues.length }),
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,
154
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 })),
155
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
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 })),
157
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 })),
158
159
  showSuspensionModal &&
159
- react_1.default.createElement(AccountSuspensionModal_1.default, { showSuspensionModal: showSuspensionModal, onClose: () => setShowSuspensionModal(false) }))));
160
+ react_1.default.createElement(AccountSuspensionModal_1.default, { showSuspensionModal: showSuspensionModal, onClose: () => setShowSuspensionModal(false) })),
161
+ react_1.default.createElement(react_hot_toast_1.Toaster, { position: "top-center", toastOptions: {
162
+ style: {
163
+ zIndex: 9999,
164
+ backgroundColor: 'transparent'
165
+ },
166
+ } })));
160
167
  };
161
168
  exports.Escalations = Escalations;
@@ -49,7 +49,7 @@ const MarkResolvedModal = ({ escalationId, expertName, open, onClose, updateProj
49
49
  escalationId: escalationId,
50
50
  clientResolution: resolutionText,
51
51
  status: 'Resolved',
52
- statuschangedby: clientId,
52
+ statusChangedBy: clientId,
53
53
  }
54
54
  }
55
55
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.12.56",
3
+ "version": "1.12.58",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {