@paro.io/expert-shared-components 1.12.15 → 1.12.16
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/LICENSE +21 -21
- package/README.md +2 -2
- package/lib/components/ClientReferencesSection/DeleteButton.js +11 -11
- package/lib/components/ClientReferencesSection/ParoError.js +10 -10
- package/lib/components/ClientReferencesSection/TagsSection.js +2 -2
- package/lib/components/ClientReferencesSection/styles/BrandedTypography.js +2 -2
- package/lib/components/ClientReferencesSection/styles/Buttons.js +15 -15
- package/lib/components/ClientReferencesSection/styles/Name.js +5 -5
- package/lib/components/ClientReferencesSection/styles/NullContentConditionalColor.js +4 -4
- package/lib/components/ClientReferencesSection/styles/SectionBody.js +11 -11
- package/lib/components/ClientReferencesSection/styles/SectionTitle.js +6 -6
- package/lib/components/ClientReferencesSection/styles/Tags.js +2 -2
- package/lib/components/DiscussionThread/chat.d.ts +22 -22
- package/lib/components/DiscussionThread/chat.js +106 -106
- package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
- package/lib/components/DocumentCenter/DocumentTable.js +350 -350
- package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
- package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
- package/lib/components/EarningsTracker/ActiveProjectCard.d.ts +52 -52
- package/lib/components/EarningsTracker/ActiveProjectCard.js +161 -161
- package/lib/components/EarningsTracker/CenterCardUI.d.ts +13 -13
- package/lib/components/EarningsTracker/CenterCardUI.js +134 -134
- package/lib/components/EarningsTracker/EarningsTracker.d.ts +52 -52
- package/lib/components/EarningsTracker/EarningsTracker.js +508 -508
- package/lib/components/EarningsTracker/EditDateModal.d.ts +22 -22
- package/lib/components/EarningsTracker/EditDateModal.js +149 -149
- package/lib/components/EarningsTracker/EmailModal.d.ts +14 -14
- package/lib/components/EarningsTracker/EmailModal.js +79 -79
- package/lib/components/EarningsTracker/EndProjectModal.d.ts +56 -56
- package/lib/components/EarningsTracker/EndProjectModal.js +221 -221
- package/lib/components/EarningsTracker/LeftCardUI.d.ts +18 -18
- package/lib/components/EarningsTracker/LeftCardUI.js +189 -189
- package/lib/components/EarningsTracker/LogTimeModalAuthenticated.d.ts +52 -52
- package/lib/components/EarningsTracker/LogTimeModalAuthenticated.js +358 -358
- package/lib/components/EarningsTracker/ProgressBar.d.ts +4 -4
- package/lib/components/EarningsTracker/ProgressBar.js +66 -66
- package/lib/components/EarningsTracker/ReviewRequestModal.d.ts +17 -17
- package/lib/components/EarningsTracker/ReviewRequestModal.js +135 -135
- package/lib/components/EarningsTracker/RightCardUI.d.ts +46 -46
- package/lib/components/EarningsTracker/RightCardUI.js +231 -231
- package/lib/components/EarningsTracker/index.d.ts +1 -1
- package/lib/components/EarningsTracker/index.js +5 -5
- package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
- package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
- package/lib/components/Invoices/DecisionSection.d.ts +2 -1
- package/lib/components/Invoices/DecisionSection.js +5 -7
- package/lib/components/Invoices/DiscussionSection.d.ts +1 -0
- package/lib/components/Invoices/DiscussionSection.js +19 -1
- package/lib/components/Invoices/InvoiceCard.js +1 -1
- package/lib/components/OrganizationChart/OrganizationChart.d.ts +15 -15
- package/lib/components/OrganizationChart/OrganizationChart.js +312 -312
- package/lib/components/OrganizationChart/PersonCard.js +5 -5
- package/lib/components/OrganizationChart/utils.js +79 -79
- package/lib/components/ProjectCard/ProgressBar.js +4 -4
- package/lib/components/ProjectCard/ReviewRequestModal.js +5 -5
- package/lib/components/Reviews/Pagination.js +6 -6
- package/lib/components/ReviewsTab/RatingHeader.js +6 -6
- package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
- package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
- package/lib/components/shared/Image.js +13 -13
- package/lib/components/shared/ProfileTextField.d.ts +18 -18
- package/lib/components/shared/ProfileTextField.js +16 -16
- package/lib/components/shared/StyledActionButtons.d.ts +7 -7
- package/lib/components/shared/StyledActionButtons.js +15 -15
- package/lib/components/shared/ToastNotification.d.ts +10 -10
- package/lib/components/shared/ToastNotification.js +63 -63
- package/package.json +61 -61
|
@@ -31,20 +31,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
35
|
exports.DecisionSection = void 0;
|
|
39
36
|
const react_1 = __importStar(require("react"));
|
|
40
37
|
const base_ui_1 = require("@paro.io/base-ui");
|
|
41
|
-
const
|
|
38
|
+
const utils_1 = require("../shared/utils");
|
|
42
39
|
const RESOLUTION_OPTIONS = [
|
|
43
40
|
{ value: 'APPROVED', label: 'Approve Dispute' },
|
|
44
41
|
{ value: 'DECLINED', label: 'Decline Dispute' },
|
|
45
42
|
{ value: 'PARTIAL', label: 'Partial Approval' },
|
|
46
43
|
];
|
|
47
|
-
const DecisionSection = ({ dispute, onUpdateDispute, }) => {
|
|
44
|
+
const DecisionSection = ({ dispute, onUpdateDispute, user }) => {
|
|
48
45
|
var _a;
|
|
49
46
|
const disputeAmount = (_a = dispute === null || dispute === void 0 ? void 0 : dispute.disputeProjects) === null || _a === void 0 ? void 0 : _a.reduce((acc, project) => acc + (project === null || project === void 0 ? void 0 : project.disputeAmount), 0);
|
|
50
47
|
const [resolution, setResolution] = (0, react_1.useState)('');
|
|
@@ -61,14 +58,15 @@ const DecisionSection = ({ dispute, onUpdateDispute, }) => {
|
|
|
61
58
|
disputeId: dispute.disputeId,
|
|
62
59
|
status: "Resolved", //To-Do - Fix with actual status
|
|
63
60
|
approvedAmount: amount ? parseFloat(amount) : undefined,
|
|
61
|
+
finalDecisionOwnerId: (user === null || user === void 0 ? void 0 : user.userId) || null
|
|
64
62
|
},
|
|
65
63
|
},
|
|
66
64
|
});
|
|
67
|
-
|
|
65
|
+
(0, utils_1.showToast)('success', 'Thank you for resolving the dispute');
|
|
68
66
|
}
|
|
69
67
|
catch (error) {
|
|
70
68
|
console.error('Failed to update dispute:', error);
|
|
71
|
-
|
|
69
|
+
(0, utils_1.showToast)('warning', 'Failed to update dispute');
|
|
72
70
|
}
|
|
73
71
|
finally {
|
|
74
72
|
setIsSubmitting(false);
|
|
@@ -112,6 +112,20 @@ const DiscussionSection = ({ disputeId, currentUser, messages, onCreateMessage,
|
|
|
112
112
|
const getHeaderAlignment = (userTypeId) => {
|
|
113
113
|
return userTypeId !== currentUser.userTypeId ? 'justify-start' : 'justify-end';
|
|
114
114
|
};
|
|
115
|
+
const displayMessageVisibility = (visibility) => {
|
|
116
|
+
switch (visibility) {
|
|
117
|
+
case 'ALL':
|
|
118
|
+
return 'All';
|
|
119
|
+
case 'EXPERT_INTERNAL_ONLY':
|
|
120
|
+
return 'Expert Only';
|
|
121
|
+
case 'CLIENT_INTERNAL_ONLY':
|
|
122
|
+
return 'Client Only';
|
|
123
|
+
case 'INTERNAL_ONLY':
|
|
124
|
+
return 'Internal Only';
|
|
125
|
+
default:
|
|
126
|
+
return 'All';
|
|
127
|
+
}
|
|
128
|
+
};
|
|
115
129
|
return (react_1.default.createElement("div", { className: "space-y-6" },
|
|
116
130
|
react_1.default.createElement("div", { className: "flex items-center justify-between" },
|
|
117
131
|
react_1.default.createElement("div", { className: "text-lg font-bold text-[#333333]" },
|
|
@@ -144,7 +158,11 @@ const DiscussionSection = ({ disputeId, currentUser, messages, onCreateMessage,
|
|
|
144
158
|
message.sender.firstName,
|
|
145
159
|
" ",
|
|
146
160
|
message.sender.lastName),
|
|
147
|
-
react_1.default.createElement("span", { className: "text-xs text-[#666666]" }, (0, dayjs_1.default)(message.createdAt).format('MMM D, YYYY • h:mm A'))
|
|
161
|
+
react_1.default.createElement("span", { className: "text-xs text-[#666666]" }, (0, dayjs_1.default)(message.createdAt).format('MMM D, YYYY • h:mm A')),
|
|
162
|
+
isInternal && (react_1.default.createElement("span", { className: "text-xs text-[#666666]" },
|
|
163
|
+
"(",
|
|
164
|
+
displayMessageVisibility(message.visibility),
|
|
165
|
+
")"))),
|
|
148
166
|
react_1.default.createElement("div", { style: { backgroundColor: getSenderBackgroundColor(message.sender.userTypeId) }, className: "mt-1 p-3 rounded-lg" },
|
|
149
167
|
react_1.default.createElement("p", { className: `text-sm ${getHeaderAlignment(message.sender.userTypeId)}`, style: { color: getSenderTextColor(message.sender.userTypeId) } }, message.messageText)))))))) : react_1.default.createElement(react_1.default.Fragment, null),
|
|
150
168
|
react_1.default.createElement("div", { ref: threadsEndRef }),
|
|
@@ -65,6 +65,6 @@ const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user, chatMessag
|
|
|
65
65
|
react_1.default.createElement(ClientDisputeProjectCard_1.ClientDisputeProjectCard, { clientInvoice: currentInvoice, updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation, documentUploadUrl: documentUploadUrl, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName }),
|
|
66
66
|
(currentInvoice === null || currentInvoice === void 0 ? void 0 : currentInvoice.chatEnabled) && disputeId && (react_1.default.createElement(DiscussionSection_1.DiscussionSection, { disputeId: disputeId, currentUser: user, messages: chatMessages, onCreateMessage: createDisputeChatMessage, isInternal: isInternal })),
|
|
67
67
|
isInternal &&
|
|
68
|
-
react_1.default.createElement(DecisionSection_1.DecisionSection, { dispute: currentInvoice, onUpdateDispute: updateClientInvoiceDisputeMutation }))))));
|
|
68
|
+
react_1.default.createElement(DecisionSection_1.DecisionSection, { dispute: currentInvoice, onUpdateDispute: updateClientInvoiceDisputeMutation, user: user }))))));
|
|
69
69
|
};
|
|
70
70
|
exports.InvoiceCard = InvoiceCard;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
interface OrgChartProps {
|
|
2
|
-
openModal: boolean;
|
|
3
|
-
setOpenModal: (openModal: boolean) => void;
|
|
4
|
-
expertFirms: any;
|
|
5
|
-
firstName: string;
|
|
6
|
-
lastName: string;
|
|
7
|
-
imageUrl?: string;
|
|
8
|
-
primaryServiceLine: string;
|
|
9
|
-
city: string;
|
|
10
|
-
stateAbbreviation: string;
|
|
11
|
-
paroTenure?: string;
|
|
12
|
-
isPublicProfile?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const OrganizationChart: ({ openModal, setOpenModal, expertFirms, firstName, lastName, imageUrl, primaryServiceLine, city, stateAbbreviation, paroTenure, isPublicProfile }: OrgChartProps) => JSX.Element;
|
|
15
|
-
export {};
|
|
1
|
+
interface OrgChartProps {
|
|
2
|
+
openModal: boolean;
|
|
3
|
+
setOpenModal: (openModal: boolean) => void;
|
|
4
|
+
expertFirms: any;
|
|
5
|
+
firstName: string;
|
|
6
|
+
lastName: string;
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
primaryServiceLine: string;
|
|
9
|
+
city: string;
|
|
10
|
+
stateAbbreviation: string;
|
|
11
|
+
paroTenure?: string;
|
|
12
|
+
isPublicProfile?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const OrganizationChart: ({ openModal, setOpenModal, expertFirms, firstName, lastName, imageUrl, primaryServiceLine, city, stateAbbreviation, paroTenure, isPublicProfile }: OrgChartProps) => JSX.Element;
|
|
15
|
+
export {};
|