@paro.io/expert-shared-components 1.14.6 → 1.14.8

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.
Files changed (78) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +2 -2
  3. package/lib/components/ClientReferencesSection/DeleteButton.js +11 -11
  4. package/lib/components/ClientReferencesSection/ParoError.js +10 -10
  5. package/lib/components/ClientReferencesSection/TagsSection.js +2 -2
  6. package/lib/components/ClientReferencesSection/styles/BrandedTypography.js +2 -2
  7. package/lib/components/ClientReferencesSection/styles/Buttons.js +15 -15
  8. package/lib/components/ClientReferencesSection/styles/Name.js +5 -5
  9. package/lib/components/ClientReferencesSection/styles/NullContentConditionalColor.js +4 -4
  10. package/lib/components/ClientReferencesSection/styles/SectionBody.js +11 -11
  11. package/lib/components/ClientReferencesSection/styles/SectionTitle.js +6 -6
  12. package/lib/components/ClientReferencesSection/styles/Tags.js +2 -2
  13. package/lib/components/DiscussionThread/chat.d.ts +22 -22
  14. package/lib/components/DiscussionThread/chat.js +106 -106
  15. package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
  16. package/lib/components/DocumentCenter/DocumentTable.js +350 -350
  17. package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
  18. package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
  19. package/lib/components/EarningsTracker/ActiveProjectCard.d.ts +52 -52
  20. package/lib/components/EarningsTracker/ActiveProjectCard.js +161 -161
  21. package/lib/components/EarningsTracker/CenterCardUI.d.ts +13 -13
  22. package/lib/components/EarningsTracker/CenterCardUI.js +134 -134
  23. package/lib/components/EarningsTracker/EarningsTracker.d.ts +52 -52
  24. package/lib/components/EarningsTracker/EarningsTracker.js +508 -508
  25. package/lib/components/EarningsTracker/EditDateModal.d.ts +22 -22
  26. package/lib/components/EarningsTracker/EditDateModal.js +149 -149
  27. package/lib/components/EarningsTracker/EmailModal.d.ts +14 -14
  28. package/lib/components/EarningsTracker/EmailModal.js +79 -79
  29. package/lib/components/EarningsTracker/EndProjectModal.d.ts +56 -56
  30. package/lib/components/EarningsTracker/EndProjectModal.js +221 -221
  31. package/lib/components/EarningsTracker/LeftCardUI.d.ts +18 -18
  32. package/lib/components/EarningsTracker/LeftCardUI.js +189 -189
  33. package/lib/components/EarningsTracker/LogTimeModalAuthenticated.d.ts +52 -52
  34. package/lib/components/EarningsTracker/LogTimeModalAuthenticated.js +358 -358
  35. package/lib/components/EarningsTracker/ProgressBar.d.ts +4 -4
  36. package/lib/components/EarningsTracker/ProgressBar.js +66 -66
  37. package/lib/components/EarningsTracker/ReviewRequestModal.d.ts +17 -17
  38. package/lib/components/EarningsTracker/ReviewRequestModal.js +135 -135
  39. package/lib/components/EarningsTracker/RightCardUI.d.ts +46 -46
  40. package/lib/components/EarningsTracker/RightCardUI.js +231 -231
  41. package/lib/components/EarningsTracker/index.d.ts +1 -1
  42. package/lib/components/EarningsTracker/index.js +5 -5
  43. package/lib/components/Escalations/AccountSuspensionBanner.js +3 -3
  44. package/lib/components/Escalations/AccountSuspensionModal.js +16 -7
  45. package/lib/components/Escalations/CustomTag.d.ts +3 -3
  46. package/lib/components/Escalations/CustomTag.js +25 -25
  47. package/lib/components/Escalations/EscalationChat.js +1 -1
  48. package/lib/components/Escalations/EscalationRespondForm.js +1 -1
  49. package/lib/components/Escalations/EscalationSubmitForm.js +6 -2
  50. package/lib/components/Escalations/Escalations.js +4 -3
  51. package/lib/components/Escalations/ViewReponseModal.d.ts +8 -8
  52. package/lib/components/Escalations/ViewReponseModal.js +27 -27
  53. package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
  54. package/lib/components/ExpertProfileHeader/NetworkSection.js +18 -15
  55. package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
  56. package/lib/components/Invoices/DiscussionSection.d.ts +4 -1
  57. package/lib/components/Invoices/DiscussionSection.js +44 -17
  58. package/lib/components/Invoices/TestDecisionSection.d.ts +1 -1
  59. package/lib/components/Invoices/TestDecisionSection.js +126 -126
  60. package/lib/components/OrganizationChart/OrganizationChart.js +7 -7
  61. package/lib/components/OrganizationChart/PersonCard.js +5 -5
  62. package/lib/components/OrganizationChart/utils.js +79 -79
  63. package/lib/components/ProjectCard/ProgressBar.js +4 -4
  64. package/lib/components/ProjectCard/ReviewRequestModal.js +5 -5
  65. package/lib/components/ProjectIntelligence/MissingInformation/index.js +1 -1
  66. package/lib/components/Reviews/Pagination.js +6 -6
  67. package/lib/components/ReviewsTab/RatingHeader.js +6 -6
  68. package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
  69. package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
  70. package/lib/components/shared/Image.js +13 -13
  71. package/lib/components/shared/ProfileTextField.d.ts +18 -18
  72. package/lib/components/shared/ProfileTextField.js +16 -16
  73. package/lib/components/shared/StyledActionButtons.d.ts +7 -7
  74. package/lib/components/shared/StyledActionButtons.js +15 -15
  75. package/lib/components/shared/ToastNotification.d.ts +10 -10
  76. package/lib/components/shared/ToastNotification.js +63 -63
  77. package/lib/components/shared/utils.js +2 -3
  78. package/package.json +67 -67
@@ -8,7 +8,7 @@ const base_icons_1 = require("@paro.io/base-icons");
8
8
  const core_1 = require("@material-ui/core");
9
9
  const AccountSuspensionModal = ({ showSuspensionModal, onClose }) => {
10
10
  return (react_1.default.createElement(core_1.Dialog, { open: showSuspensionModal, onClose: onClose, "aria-labelledby": "responsive-dialog-title", maxWidth: "sm", scroll: "paper" },
11
- react_1.default.createElement("div", { className: "bg-[#0F172A] text-white mb-1 p-1 pl-4 absolute top-0 left-0 w-full flex flex-row justify-between items-center z-50" },
11
+ react_1.default.createElement("div", { className: "bg-[#282B52] text-white mb-1 p-1 pl-4 absolute top-0 left-0 w-full flex flex-row justify-between items-center z-50" },
12
12
  react_1.default.createElement("b", null, "Automated Suspension Process"),
13
13
  react_1.default.createElement(core_1.IconButton, { onClick: () => onClose() },
14
14
  react_1.default.createElement(base_icons_1.IconX, { className: "text-white" }))),
@@ -20,7 +20,9 @@ const AccountSuspensionModal = ({ showSuspensionModal, onClose }) => {
20
20
  react_1.default.createElement(base_icons_1.IconBriefcase, { className: "h-5 w-5 text-red-500 mt-0.5 mr-2 flex-shrink-0" }),
21
21
  react_1.default.createElement("div", null,
22
22
  react_1.default.createElement("p", { className: "font-medium text-red-800" }, "Critical Information"),
23
- react_1.default.createElement("p", { className: "text-sm text-red-700 mt-1" }, "Engagment support issues require timely attention to maintain client relationships and project success. Multiple unresolved issues may result in account warnings and potential suspension."))))),
23
+ react_1.default.createElement("p", { className: "text-sm text-red-700 mt-1" }, "Engagment support issues require timely attention to maintain client relationships and project success. Multiple unresolved issues may result in account warnings and potential suspension."),
24
+ react_1.default.createElement("p", { className: "text-xs text-red-700 mt-1" },
25
+ react_1.default.createElement("b", null, "\u26A0\uFE0F Suspension thresholds are based on the number of warnings within each severity level, not total warnings across all levels")))))),
24
26
  react_1.default.createElement("div", { className: "space-y-6" },
25
27
  react_1.default.createElement("div", { className: "relative" },
26
28
  react_1.default.createElement("div", { className: "absolute left-4 top-8 bottom-0 w-0.5 bg-gray-200" }),
@@ -43,6 +45,9 @@ const AccountSuspensionModal = ({ showSuspensionModal, onClose }) => {
43
45
  react_1.default.createElement("h4", { className: "font-semibold text-orange-800" }, "Level 2: Medium Severity"),
44
46
  react_1.default.createElement("div", { className: "text-xs bg-orange-100 text-orange-700 px-2 py-1 rounded-full" }, "3 Warnings System")),
45
47
  react_1.default.createElement("p", { className: "text-sm mb-2 font-medium text-red-800" }, "After 3 warnings: 30-day suspension"),
48
+ react_1.default.createElement("div", { className: "text-xs text-gray-500 mb-2" },
49
+ react_1.default.createElement("strong", null, "Examples:"),
50
+ " Poor client communication, missed project deadlines, quality concerns, repeated light violations"),
46
51
  react_1.default.createElement("div", null,
47
52
  react_1.default.createElement("b", null, "Note: "),
48
53
  "Warnings are counted within this level, not as a total. Suspension is triggered after 3 warnings at this severity. ",
@@ -56,6 +61,9 @@ const AccountSuspensionModal = ({ showSuspensionModal, onClose }) => {
56
61
  react_1.default.createElement("h4", { className: "font-semibold text-red-800" }, "Level 3: High Severity"),
57
62
  react_1.default.createElement("div", { className: "text-xs bg-red-100 text-red-700 px-2 py-1 rounded-full" }, "2 Warnings System")),
58
63
  react_1.default.createElement("p", { className: "text-sm mb-2 font-medium text-red-800" }, "After 2 warnings: 60-day suspension"),
64
+ react_1.default.createElement("div", { className: "text-xs text-gray-500 mb-2" },
65
+ react_1.default.createElement("strong", null, "Examples:"),
66
+ " Significant project failures,client relationship damage, contract violations, repeated medium violations"),
59
67
  react_1.default.createElement("div", null,
60
68
  react_1.default.createElement("b", null, "Note: "),
61
69
  "Warnings are counted within this level, not as a total. Suspension is triggered after 2 warnings at this severity. ",
@@ -69,20 +77,21 @@ const AccountSuspensionModal = ({ showSuspensionModal, onClose }) => {
69
77
  react_1.default.createElement("h4", { className: "font-semibold text-gray-900" }, "Level 4: Critical Severity"),
70
78
  react_1.default.createElement("div", { className: "text-xs bg-gray-800 text-white px-2 py-1 rounded-full" }, "One Time Offense")),
71
79
  react_1.default.createElement("p", { className: "text-sm mb-2 font-medium text-red-800" }, "Permanent suspension"),
80
+ react_1.default.createElement("div", { className: "text-xs text-gray-500 mb-2" },
81
+ react_1.default.createElement("strong", null, "Examples:"),
82
+ " Project abandonment, terms of service violations, non-circumvention breaches, fraudulent activity, severe misconduct"),
72
83
  react_1.default.createElement("div", null,
73
84
  react_1.default.createElement("b", null, "Note: "),
74
85
  "Warnings are counted within this level, not as a total. Suspension is triggered after 1 warning at this severity. ",
75
86
  react_1.default.createElement("b", null, "After 1 warning in this level"),
76
- ": Permanent suspension")))),
77
- react_1.default.createElement("div", { className: "text-xs" },
78
- react_1.default.createElement("b", null, "\u26A0\uFE0F Suspension thresholds are based on the number of warnings within each severity level, not total warnings across all levels"))),
87
+ ": Permanent suspension"))))),
79
88
  react_1.default.createElement("div", { className: "mt-6 bg-gray-50 rounded-lg p-4" },
80
89
  react_1.default.createElement("h4", { className: "font-medium text-gray-900 mb-2" }, "Important Reminders"),
81
90
  react_1.default.createElement("ul", { className: "text-sm text-gray-600 space-y-1" },
82
91
  react_1.default.createElement("li", null,
83
- "\u2022 Warnings are tracked separately per severity level. Suspensions are triggered only when the threshold is met ",
92
+ "Warnings are tracked separately per severity level. Suspensions are triggered only when the threshold is met ",
84
93
  react_1.default.createElement("b", null, "within a specific level"),
85
94
  " (e.g., 3 Medium-level warnings = Medium suspension)"),
86
- react_1.default.createElement("li", null, "\u2022 Warnings reset after 6 months of good standing (no new warnings)")))))));
95
+ react_1.default.createElement("li", null, "Warnings reset after 6 months of good standing (no new warnings)")))))));
87
96
  };
88
97
  exports.default = AccountSuspensionModal;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- declare const CustomTag: (label: any) => React.JSX.Element;
3
- export default CustomTag;
1
+ import React from 'react';
2
+ declare const CustomTag: (label: any) => React.JSX.Element;
3
+ export default CustomTag;
@@ -1,25 +1,25 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const getBackgroundColor = (type) => {
8
- switch (type) {
9
- case 'Critical':
10
- return 'danger';
11
- case 'High':
12
- return 'warning';
13
- case 'Medium':
14
- return 'info';
15
- case 'Low':
16
- return 'default';
17
- default:
18
- return 'default';
19
- }
20
- };
21
- const CustomTag = (label) => {
22
- const color = getBackgroundColor(label);
23
- return (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-white cursor-pointer rounded-full bg-${color} border-${color}` }, label));
24
- };
25
- exports.default = CustomTag;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const getBackgroundColor = (type) => {
8
+ switch (type) {
9
+ case 'Critical':
10
+ return 'danger';
11
+ case 'High':
12
+ return 'warning';
13
+ case 'Medium':
14
+ return 'info';
15
+ case 'Low':
16
+ return 'default';
17
+ default:
18
+ return 'default';
19
+ }
20
+ };
21
+ const CustomTag = (label) => {
22
+ const color = getBackgroundColor(label);
23
+ return (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-white cursor-pointer rounded-full bg-${color} border-${color}` }, label));
24
+ };
25
+ exports.default = CustomTag;
@@ -127,7 +127,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, cr
127
127
  react_1.default.createElement(base_icons_1.IconX, null))))),
128
128
  react_1.default.createElement(core_1.DialogContent, null,
129
129
  react_1.default.createElement("div", { className: "bg-white rounded-lg w-full overflow-hidden flex flex-col p-2 mt-12" },
130
- 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 }),
130
+ 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, isExpert: isExpert, internalEscalationTo: activeChatIssue.internalEscalationTo, clientEscalationTo: activeChatIssue.clientEscalationTo }),
131
131
  processedDocs && processedDocs.length > 0 && (react_1.default.createElement("div", { className: "flex flex-wrap gap-2 mt-4 mb-2" },
132
132
  react_1.default.createElement("span", { className: "text-sm font-bold text-gray-500 items-center" }, "Supporting Documents: "),
133
133
  processedDocs.map((d, idx) => (react_1.default.createElement(EscalationIssueCard_1.CustomTag, { key: idx, label: d.split('%2F')[1], customColor: `bg-success border-success` }))))),
@@ -168,7 +168,7 @@ const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downl
168
168
  escalationId: selectedIssue.escalationId,
169
169
  [isExpert ? 'expertResponseType' : 'clientResponseType']: selectedType,
170
170
  [isExpert ? 'expertResponse' : 'clientResponse']: responseInput,
171
- [isExpert ? 'expertSupportingDocuments' : 'clientSupportingDocuments']: uploadFiles.length > 0 ? uploadFiles.join(", ") : '',
171
+ [isExpert ? 'expertSupportingDocuments' : 'clientSupportingDocuments']: uploadFiles.length > 0 ? uploadFiles.filter(f => !!f && f !== "NULL").join(", ") : '',
172
172
  statusChangedBy: userId,
173
173
  }
174
174
  }
@@ -71,7 +71,7 @@ const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, docu
71
71
  const [issueStartDate, setIssueStartDate] = (0, react_1.useState)((0, dayjs_1.default)(new Date).format('MM-DD-YYYY'));
72
72
  const [isDateInvalid, setIsDateInvalid] = (0, react_1.useState)(false);
73
73
  const [submitting, setSubmitting] = (0, react_1.useState)(false);
74
- const [clientEscalationTo, setClientEscalationTo] = (0, react_1.useState)('');
74
+ const [clientEscalationTo, setClientEscalationTo] = (0, react_1.useState)('paro');
75
75
  const fileInputRef = (0, react_1.useRef)(null);
76
76
  const escalationId = (0, utils_1.generateUUID)();
77
77
  (0, react_1.useEffect)(() => {
@@ -328,7 +328,11 @@ const EscalationSubmitForm = ({ goBack, goHome, expertsOrClients, projects, docu
328
328
  react_1.default.createElement(core_1.MenuItem, { value: "paro" }, "Paro only"),
329
329
  react_1.default.createElement(core_1.MenuItem, { value: "both" }, "Both Expert And Paro"))),
330
330
  react_1.default.createElement("div", { className: "bg-[#EFF6FF] p-3 rounded" },
331
- react_1.default.createElement(base_ui_1.Checkbox, { id: "checkbox-1", label: `I understand this will notify my ${isExpert ? 'client' : 'expert'} and the Paro support team`, name: "acknowledge", isChecked: isChecked, onChange: () => setIsChecked(prev => !prev) })),
331
+ react_1.default.createElement(base_ui_1.Checkbox, { id: "checkbox-1", label: isExpert
332
+ ? `I understand this will notify my client and the Paro support team`
333
+ : clientEscalationTo === 'both'
334
+ ? `I understand this will notify my expert and the Paro support team`
335
+ : `I understand this issue will be created for Paro first and internal users could involve the Expert if needed`, name: "acknowledge", isChecked: isChecked, onChange: () => setIsChecked(prev => !prev) })),
332
336
  react_1.default.createElement("div", { className: "flex justify-end space-x-3 pt-4" },
333
337
  react_1.default.createElement(base_ui_1.Button, { label: "Cancel", onClick: goBack, disabled: submitting || uploadingFile }),
334
338
  react_1.default.createElement(base_ui_1.Button, { label: "Submit issue", onClick: handleSubmit, color: "primary", isLoading: submitting, disabled: !isFormValid() || uploadingFile }))))));
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.Escalations = void 0;
30
30
  const react_1 = __importStar(require("react"));
31
+ const dayjs_1 = __importDefault(require("dayjs"));
31
32
  const EscalationReportBanner_1 = __importDefault(require("./EscalationReportBanner"));
32
33
  const base_ui_1 = require("@paro.io/base-ui");
33
34
  const EscalationTabs_1 = __importDefault(require("./EscalationTabs"));
@@ -80,9 +81,9 @@ const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations
80
81
  isValidEscalation &&
81
82
  status === 'InProgress';
82
83
  return shouldInclude;
83
- });
84
- const inProgressIssues = escalations.filter(issue => { var _a; return ((((_a = issue === null || issue === void 0 ? void 0 : issue.submittedByUser) === null || _a === void 0 ? void 0 : _a.userTypeId) === user.userTypeId) || (isExpert ? issue.expertResponse !== null : issue.clientResponse !== null)) && (issue === null || issue === void 0 ? void 0 : issue.status) === 'InProgress'; });
85
- const resolvedIssues = escalations.filter(issue => (issue === null || issue === void 0 ? void 0 : issue.status) === 'Resolved');
84
+ }).sort((a, b) => (0, dayjs_1.default)(b.createdAt).valueOf() - (0, dayjs_1.default)(a.createdAt).valueOf());
85
+ const inProgressIssues = escalations.filter(issue => { var _a; return ((((_a = issue === null || issue === void 0 ? void 0 : issue.submittedByUser) === null || _a === void 0 ? void 0 : _a.userTypeId) === user.userTypeId) || (isExpert ? issue.expertResponse !== null : issue.clientResponse !== null)) && (issue === null || issue === void 0 ? void 0 : issue.status) === 'InProgress'; }).sort((a, b) => (0, dayjs_1.default)(b.createdAt).valueOf() - (0, dayjs_1.default)(a.createdAt).valueOf());
86
+ const resolvedIssues = escalations.filter(issue => (issue === null || issue === void 0 ? void 0 : issue.status) === 'Resolved').sort((a, b) => (0, dayjs_1.default)(b.updatedAt).valueOf() - (0, dayjs_1.default)(a.updatedAt).valueOf());
86
87
  const goBack = () => {
87
88
  if (selectedIssueId !== null) {
88
89
  setSelectedIssueId(null);
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- declare const ViewResponseModal: ({ response, open, onClose, isExpert }: {
3
- response: string | null;
4
- open: boolean;
5
- onClose: () => void;
6
- isExpert: boolean;
7
- }) => React.JSX.Element;
8
- export default ViewResponseModal;
1
+ import React from 'react';
2
+ declare const ViewResponseModal: ({ response, open, onClose, isExpert }: {
3
+ response: string | null;
4
+ open: boolean;
5
+ onClose: () => void;
6
+ isExpert: boolean;
7
+ }) => React.JSX.Element;
8
+ export default ViewResponseModal;
@@ -1,27 +1,27 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const base_icons_1 = require("@paro.io/base-icons");
8
- const core_1 = require("@material-ui/core");
9
- const ViewResponseModal = ({ response, open, onClose, isExpert }) => {
10
- return (react_1.default.createElement(core_1.Dialog, { open: open, onClose: onClose, maxWidth: 'sm' },
11
- react_1.default.createElement(core_1.DialogTitle, null,
12
- 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" },
13
- react_1.default.createElement("div", { className: "flex flex-col items-start" },
14
- react_1.default.createElement("h1", { className: "text-md font-bold mr-2" }, isExpert ? 'Client Response' : 'Expert Response')),
15
- react_1.default.createElement("div", { className: "flex items-center space-x-4" },
16
- react_1.default.createElement(core_1.IconButton, { onClick: onClose },
17
- react_1.default.createElement(base_icons_1.IconX, null))))),
18
- react_1.default.createElement(core_1.DialogContent, null,
19
- react_1.default.createElement("div", { className: "bg-green-50 border-green-800 border border-l-4 rounded p-4 mt-4 mb-4" },
20
- react_1.default.createElement("p", { className: "text-sm font-medium" },
21
- "Status: ",
22
- react_1.default.createElement("span", { className: "font-normal" }, "Responded")),
23
- react_1.default.createElement("p", { className: "text-sm font-medium" },
24
- "Response: ",
25
- react_1.default.createElement("span", { className: "font-normal" }, response))))));
26
- };
27
- exports.default = ViewResponseModal;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const base_icons_1 = require("@paro.io/base-icons");
8
+ const core_1 = require("@material-ui/core");
9
+ const ViewResponseModal = ({ response, open, onClose, isExpert }) => {
10
+ return (react_1.default.createElement(core_1.Dialog, { open: open, onClose: onClose, maxWidth: 'sm' },
11
+ react_1.default.createElement(core_1.DialogTitle, null,
12
+ 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" },
13
+ react_1.default.createElement("div", { className: "flex flex-col items-start" },
14
+ react_1.default.createElement("h1", { className: "text-md font-bold mr-2" }, isExpert ? 'Client Response' : 'Expert Response')),
15
+ react_1.default.createElement("div", { className: "flex items-center space-x-4" },
16
+ react_1.default.createElement(core_1.IconButton, { onClick: onClose },
17
+ react_1.default.createElement(base_icons_1.IconX, null))))),
18
+ react_1.default.createElement(core_1.DialogContent, null,
19
+ react_1.default.createElement("div", { className: "bg-green-50 border-green-800 border border-l-4 rounded p-4 mt-4 mb-4" },
20
+ react_1.default.createElement("p", { className: "text-sm font-medium" },
21
+ "Status: ",
22
+ react_1.default.createElement("span", { className: "font-normal" }, "Responded")),
23
+ react_1.default.createElement("p", { className: "text-sm font-medium" },
24
+ "Response: ",
25
+ react_1.default.createElement("span", { className: "font-normal" }, response))))));
26
+ };
27
+ exports.default = ViewResponseModal;
@@ -11,12 +11,12 @@ const CopyToClipboardAlert_1 = __importDefault(require("../shared/CopyToClipboar
11
11
  const colors_1 = __importDefault(require("../ClientReferencesSection/constants/colors"));
12
12
  const Banner_1 = __importDefault(require("./Banner"));
13
13
  const base_icons_1 = require("@paro.io/base-icons");
14
- const StyledButton = (0, styled_components_1.default)(core_1.Button) `
15
- margin: 0px !important;
16
- padding: 26px 0 18px 0 !important;
17
- span {
18
- color: ${colors_1.default.buttonText} !important
19
- }
14
+ const StyledButton = (0, styled_components_1.default)(core_1.Button) `
15
+ margin: 0px !important;
16
+ padding: 26px 0 18px 0 !important;
17
+ span {
18
+ color: ${colors_1.default.buttonText} !important
19
+ }
20
20
  `;
21
21
  const ActionButton = ({ title, ariaLabel, onClick, icon: Icon }) => (react_1.default.createElement(core_1.Tooltip, { arrow: true, placement: "top", interactive: true, className: "whitespace-nowrap", title: title },
22
22
  react_1.default.createElement(core_1.IconButton, { "aria-label": ariaLabel, onClick: onClick },
@@ -154,21 +154,24 @@ const NetworkSection = ({ handleScrollToBottom, preferenceTasks, isWhiteLabel, d
154
154
  react_1.default.createElement(icons_1.Cached, null))),
155
155
  react_1.default.createElement(core_1.Box, { mt: 1, mb: 1, mr: 2 },
156
156
  react_1.default.createElement(core_1.Divider, null))),
157
- escalationDisputeStatistics &&
158
- react_1.default.createElement(react_1.default.Fragment, null,
159
- react_1.default.createElement(EarningsSection_1.EarningsInfo, { label: "# of Escalations in last 3 months", value: (_c = escalationDisputeStatistics.recentResolvedEscalations) !== null && _c !== void 0 ? _c : 0 }),
160
- react_1.default.createElement(core_1.Box, { mb: 2 },
161
- react_1.default.createElement(core_1.Divider, null)),
162
- react_1.default.createElement(EarningsSection_1.EarningsInfo, { label: "Total # of Escalations", value: (_d = escalationDisputeStatistics.totalResolvedEscalations) !== null && _d !== void 0 ? _d : 0 }),
163
- react_1.default.createElement(core_1.Box, { mb: 2 },
164
- react_1.default.createElement(core_1.Divider, null)),
165
- react_1.default.createElement(EarningsSection_1.EarningsInfo, { label: "# of Disputes in last 3 months", value: (_e = escalationDisputeStatistics.recentResolvedDisputes) !== null && _e !== void 0 ? _e : 0 }),
166
- react_1.default.createElement(core_1.Box, { mb: 2 },
167
- react_1.default.createElement(core_1.Divider, null)),
168
- react_1.default.createElement(EarningsSection_1.EarningsInfo, { label: "Total # of Disputes", value: (_f = escalationDisputeStatistics.totalResolvedDisputes) !== null && _f !== void 0 ? _f : 0 }),
169
- react_1.default.createElement(core_1.Box, { mb: 0.5 },
170
- react_1.default.createElement(core_1.Divider, null)),
171
- !isInternal && react_1.default.createElement("a", { href: `${paroAppUrl}/engagement-support`, className: "text-xs underline text-[#1878BD] cursor-pointer block text-right mb-2", target: "_blank", rel: "noopener noreferrer" }, "See more Disputes & Escalations")),
157
+ react_1.default.createElement(core_1.Grid, { style: { marginRight: '8px', marginLeft: '2px' } },
158
+ react_1.default.createElement(core_1.Box, { mb: 1 },
159
+ react_1.default.createElement("b", null, "Engagement Issues :")),
160
+ escalationDisputeStatistics &&
161
+ react_1.default.createElement(react_1.default.Fragment, null,
162
+ react_1.default.createElement(EarningsSection_1.EarningsInfo, { label: "# of Escalations in last 3 months", value: (_c = escalationDisputeStatistics.recentResolvedEscalations) !== null && _c !== void 0 ? _c : 0 }),
163
+ react_1.default.createElement(core_1.Box, { mb: 2 },
164
+ react_1.default.createElement(core_1.Divider, null)),
165
+ react_1.default.createElement(EarningsSection_1.EarningsInfo, { label: "Total # of Escalations", value: (_d = escalationDisputeStatistics.totalResolvedEscalations) !== null && _d !== void 0 ? _d : 0 }),
166
+ react_1.default.createElement(core_1.Box, { mb: 2 },
167
+ react_1.default.createElement(core_1.Divider, null)),
168
+ react_1.default.createElement(EarningsSection_1.EarningsInfo, { label: "# of Disputes in last 3 months", value: (_e = escalationDisputeStatistics.recentResolvedDisputes) !== null && _e !== void 0 ? _e : 0 }),
169
+ react_1.default.createElement(core_1.Box, { mb: 2 },
170
+ react_1.default.createElement(core_1.Divider, null)),
171
+ react_1.default.createElement(EarningsSection_1.EarningsInfo, { label: "Total # of Disputes", value: (_f = escalationDisputeStatistics.totalResolvedDisputes) !== null && _f !== void 0 ? _f : 0 }),
172
+ react_1.default.createElement(core_1.Box, { mb: 0.5 },
173
+ react_1.default.createElement(core_1.Divider, null)),
174
+ !isInternal && react_1.default.createElement("a", { href: `${paroAppUrl}/engagement-support`, className: "text-xs underline text-[#1878BD] cursor-pointer block text-right mb-2", target: "_blank", rel: "noopener noreferrer" }, "See more Disputes & Escalations"))),
172
175
  react_1.default.createElement(core_1.Grid, { style: { marginRight: '8px', marginLeft: '2px' } },
173
176
  react_1.default.createElement(core_1.Box, { mb: 1 },
174
177
  react_1.default.createElement("b", null, "Network Availability :")),
@@ -53,13 +53,13 @@ const formatPhoneNumber = (phone) => {
53
53
  return `(${numericPhone.slice(0, 3)}) ${numericPhone.slice(3, 6)} - ${numericPhone.slice(6)}`;
54
54
  };
55
55
  exports.formatPhoneNumber = formatPhoneNumber;
56
- exports.ProfilePhotoPreview = styled_components_1.default.img `
57
- height: 86px;
58
- width: 86px;
59
- border: 1px solid ${colors_1.default.lightGray};
60
- border-radius: 50%;
61
- object-fit: cover;
62
- object-position: top;
56
+ exports.ProfilePhotoPreview = styled_components_1.default.img `
57
+ height: 86px;
58
+ width: 86px;
59
+ border: 1px solid ${colors_1.default.lightGray};
60
+ border-radius: 50%;
61
+ object-fit: cover;
62
+ object-position: top;
63
63
  `;
64
64
  const ProfileSection = ({ legacyFreelancerId, imageUrl, shouldAllowEditProfile, firstName, lastName, primaryServiceLine, editServiceLine, city, stateAbbreviation, email, phone, setOpen, paroProjectsData, getUserDocument, uploadUserPhotoMutation, loadingNewImage, imageUpdateError, isInternal, getUserByEmail, updateUserEmail, updateUserMutation, getUserByEmailLazyQuery, updateUserPassword, verifyUserPassword, getExpertRates, paroTenure, hourlyRate, }) => {
65
65
  var _a;
@@ -17,6 +17,9 @@ interface DiscussionSectionProps {
17
17
  messages: Message[];
18
18
  onCreateMessage: (variables: any) => Promise<any>;
19
19
  isInternal?: boolean;
20
+ isExpert?: boolean;
21
+ internalEscalationTo?: string;
22
+ clientEscalationTo?: string;
20
23
  }
21
- export declare const DiscussionSection: ({ disputeId, escalationNumber, currentUser, messages, onCreateMessage, isInternal, }: DiscussionSectionProps) => JSX.Element;
24
+ export declare const DiscussionSection: ({ disputeId, escalationNumber, currentUser, messages, onCreateMessage, isInternal, isExpert, internalEscalationTo, clientEscalationTo, }: DiscussionSectionProps) => JSX.Element;
22
25
  export {};
@@ -40,7 +40,7 @@ const react_1 = __importStar(require("react"));
40
40
  const base_ui_1 = require("@paro.io/base-ui");
41
41
  const dayjs_1 = __importDefault(require("dayjs"));
42
42
  const base_icons_1 = require("@paro.io/base-icons");
43
- const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages, onCreateMessage, isInternal = false, }) => {
43
+ const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages, onCreateMessage, isInternal = false, isExpert = true, internalEscalationTo, clientEscalationTo, }) => {
44
44
  const [newMessage, setNewMessage] = (0, react_1.useState)('');
45
45
  const [visibility, setVisibility] = (0, react_1.useState)('ALL');
46
46
  const [isLoading, setIsLoading] = (0, react_1.useState)(false);
@@ -144,7 +144,10 @@ const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages,
144
144
  react_1.default.createElement("span", null, "\u00A0Paro Support")))),
145
145
  react_1.default.createElement("div", { className: "flex flex-row justify-start mr-4 text-gray-600" },
146
146
  react_1.default.createElement(base_icons_1.IconChat, { size: "sm", className: "text-blue-600 mr-2" }),
147
- react_1.default.createElement("p", null, "This discussion applies to all projects in this dispute."))),
147
+ react_1.default.createElement("p", null,
148
+ "This discussion applies to all projects in this ",
149
+ disputeId ? 'dispute' : 'escalation',
150
+ "."))),
148
151
  react_1.default.createElement("div", { className: "rounded" },
149
152
  messages.length ? react_1.default.createElement("div", { className: "flex-1 max-h-[40vh] overflow-y-auto border rounded-md p-2 space-y-6" },
150
153
  messages.map((message) => (react_1.default.createElement("div", { key: message.id, className: `flex ${getMessageAlignment(message.sender.userTypeId)}` },
@@ -173,21 +176,45 @@ const DiscussionSection = ({ disputeId, escalationNumber, currentUser, messages,
173
176
  react_1.default.createElement("div", { className: "font-bold text-[#333333] mb-2" }, "Add Comment"),
174
177
  react_1.default.createElement("textarea", { value: newMessage, onChange: (e) => setNewMessage(e.target.value), placeholder: "Type your comment here...", className: "w-full h-24 p-3 border border-[#CCCCCC] rounded-lg text-sm resize-none focus:outline-none focus:ring-2 focus:ring-[#248384]" })),
175
178
  react_1.default.createElement("div", { className: "flex items-center justify-between" },
176
- react_1.default.createElement("div", { className: "flex items-center space-x-4" }, isInternal && (react_1.default.createElement(react_1.default.Fragment, null,
177
- react_1.default.createElement("span", { className: "text-sm text-[#666666]" }, "Visible to:"),
178
- react_1.default.createElement("div", { className: "flex items-center space-x-2" },
179
- react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
180
- react_1.default.createElement("input", { type: "radio", checked: visibility === 'EXPERT_INTERNAL_ONLY', onChange: () => setVisibility('EXPERT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
181
- react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Expert Only")),
182
- react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
183
- react_1.default.createElement("input", { type: "radio", checked: visibility === 'CLIENT_INTERNAL_ONLY', onChange: () => setVisibility('CLIENT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
184
- react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Client Only")),
185
- react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
186
- react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
187
- react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only")),
188
- react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
189
- react_1.default.createElement("input", { type: "radio", checked: visibility === 'ALL', onChange: () => setVisibility('ALL'), className: "form-radio text-[#248384]" }),
190
- react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "All")))))),
179
+ react_1.default.createElement("div", { className: "flex items-center space-x-4" },
180
+ isInternal && (react_1.default.createElement(react_1.default.Fragment, null,
181
+ react_1.default.createElement("span", { className: "text-sm text-[#666666]" }, "Visible to:"),
182
+ react_1.default.createElement("div", { className: "flex items-center space-x-2" },
183
+ internalEscalationTo === 'expert' && (react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
184
+ react_1.default.createElement("input", { type: "radio", checked: true, readOnly: true, onChange: () => setVisibility('EXPERT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
185
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Expert Only"))),
186
+ internalEscalationTo === 'client' && (react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
187
+ react_1.default.createElement("input", { type: "radio", checked: true, readOnly: true, className: "form-radio text-[#248384]" }),
188
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Client Only"))),
189
+ internalEscalationTo === 'both' && (react_1.default.createElement(react_1.default.Fragment, null,
190
+ react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
191
+ react_1.default.createElement("input", { type: "radio", checked: visibility === 'EXPERT_INTERNAL_ONLY', onChange: () => setVisibility('EXPERT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
192
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Expert Only")),
193
+ react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
194
+ react_1.default.createElement("input", { type: "radio", checked: visibility === 'CLIENT_INTERNAL_ONLY', onChange: () => setVisibility('CLIENT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
195
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Client Only")),
196
+ react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
197
+ react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
198
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only")),
199
+ react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
200
+ react_1.default.createElement("input", { type: "radio", checked: visibility === 'ALL', onChange: () => setVisibility('ALL'), className: "form-radio text-[#248384]" }),
201
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "All"))))))),
202
+ !isExpert && (react_1.default.createElement(react_1.default.Fragment, null,
203
+ react_1.default.createElement("span", { className: "text-sm text-[#666666]" }, "Visible to:"),
204
+ react_1.default.createElement("div", { className: "flex items-center space-x-2" },
205
+ clientEscalationTo === 'paro' && (react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
206
+ react_1.default.createElement("input", { type: "radio", checked: true, readOnly: true, onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
207
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only"))),
208
+ clientEscalationTo === 'both' && (react_1.default.createElement(react_1.default.Fragment, null,
209
+ react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
210
+ react_1.default.createElement("input", { type: "radio", checked: visibility === 'EXPERT_INTERNAL_ONLY', onChange: () => setVisibility('EXPERT_INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
211
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Expert Only")),
212
+ react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
213
+ react_1.default.createElement("input", { type: "radio", checked: visibility === 'INTERNAL_ONLY', onChange: () => setVisibility('INTERNAL_ONLY'), className: "form-radio text-[#248384]" }),
214
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "Internal Only")),
215
+ react_1.default.createElement("label", { className: "flex items-center space-x-2 cursor-pointer" },
216
+ react_1.default.createElement("input", { type: "radio", checked: visibility === 'ALL', onChange: () => setVisibility('ALL'), className: "form-radio text-[#248384]" }),
217
+ react_1.default.createElement("span", { className: "text-sm text-[#333333]" }, "All")))))))),
191
218
  react_1.default.createElement(base_ui_1.Button, { label: "Reply", color: "primary", isLoading: isLoading, onClick: handleSendMessage, disabled: !newMessage.trim() }))))));
192
219
  };
193
220
  exports.DiscussionSection = DiscussionSection;
@@ -1 +1 @@
1
- export declare const TestDecisionSection: () => JSX.Element;
1
+ export declare const TestDecisionSection: () => JSX.Element;