@paro.io/expert-shared-components 1.14.14 → 1.14.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.
Files changed (75) 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/CustomTag.d.ts +3 -3
  44. package/lib/components/Escalations/CustomTag.js +25 -25
  45. package/lib/components/Escalations/ViewReponseModal.d.ts +8 -8
  46. package/lib/components/Escalations/ViewReponseModal.js +27 -27
  47. package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
  48. package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
  49. package/lib/components/ExpertProfileHeader/TeamsSection.js +1 -1
  50. package/lib/components/HeaderNavBar/index.d.ts +1 -1
  51. package/lib/components/HeaderNavBar/index.js +25 -18
  52. package/lib/components/Invoices/TestDecisionSection.d.ts +1 -1
  53. package/lib/components/Invoices/TestDecisionSection.js +126 -126
  54. package/lib/components/OrganizationChart/OrgChart.d.ts +15 -1
  55. package/lib/components/OrganizationChart/OrgChart.js +33 -30
  56. package/lib/components/OrganizationChart/OrganizationChart.d.ts +15 -15
  57. package/lib/components/OrganizationChart/OrganizationChart.js +312 -312
  58. package/lib/components/OrganizationChart/PersonCard.js +5 -5
  59. package/lib/components/OrganizationChart/utils.d.ts +1 -1
  60. package/lib/components/OrganizationChart/utils.js +80 -80
  61. package/lib/components/ProjectCard/ProgressBar.js +4 -4
  62. package/lib/components/ProjectCard/ReviewRequestModal.js +5 -5
  63. package/lib/components/ProjectIntelligence/MissingInformation/index.js +1 -1
  64. package/lib/components/Reviews/Pagination.js +6 -6
  65. package/lib/components/ReviewsTab/RatingHeader.js +6 -6
  66. package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
  67. package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
  68. package/lib/components/shared/Image.js +13 -13
  69. package/lib/components/shared/ProfileTextField.d.ts +18 -18
  70. package/lib/components/shared/ProfileTextField.js +16 -16
  71. package/lib/components/shared/StyledActionButtons.d.ts +7 -7
  72. package/lib/components/shared/StyledActionButtons.js +15 -15
  73. package/lib/components/shared/ToastNotification.d.ts +10 -10
  74. package/lib/components/shared/ToastNotification.js +63 -63
  75. package/package.json +67 -67
@@ -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 },
@@ -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;
@@ -77,6 +77,6 @@ const TeamsSection = ({ estimatedAvailability, nextMonthTrueAvailability, expert
77
77
  react_1.default.createElement(core_1.Divider, null)),
78
78
  react_1.default.createElement(TeamDetail, { label: "# of Services", value: (_e = uniqueServices === null || uniqueServices === void 0 ? void 0 : uniqueServices.length) !== null && _e !== void 0 ? _e : 0 }))),
79
79
  openModal && expertFirms &&
80
- react_1.default.createElement(OrganizationChart_1.OrganizationChart, { openModal: openModal, setOpenModal: setOpenModal, expertFirms: expertFirms, firstName: firstName, lastName: lastName, primaryServiceLine: primaryServiceLine, city: city, stateAbbreviation: stateAbbreviation, paroTenure: paroTenure, imageUrl: imageUrl, isPublicProfile: false })));
80
+ react_1.default.createElement(OrganizationChart_1.OrganizationChart, { openModal: openModal, setOpenModal: setOpenModal, expertFirms: expertFirms, firstName: firstName, lastName: lastName, primaryServiceLine: primaryServiceLine, city: city, stateAbbreviation: stateAbbreviation, paroTenure: paroTenure, isPublicProfile: false })));
81
81
  };
82
82
  exports.default = TeamsSection;
@@ -1,2 +1,2 @@
1
1
  import React from "react";
2
- export declare const HeaderNavBar: ({ setOpenDocumentModal, setOpenServiceLinesTemplate, setOpenExpertWallet, isWalletTester, isClientPortal }: any) => React.JSX.Element;
2
+ export declare const HeaderNavBar: ({ setOpenDocumentModal, setOpenServiceLinesTemplate, setOpenExpertWallet, isWalletTester, isClientPortal, setFaqModal, setOpenOrganizationModal }: any) => React.JSX.Element;
@@ -7,23 +7,30 @@ exports.HeaderNavBar = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const core_1 = require("@material-ui/core");
9
9
  const base_icons_1 = require("@paro.io/base-icons");
10
- const HeaderNavBar = ({ setOpenDocumentModal, setOpenServiceLinesTemplate, setOpenExpertWallet, isWalletTester, isClientPortal = false }) => {
11
- return (react_1.default.createElement("div", { className: "flex w-full bg-white p-1 shadow-sm justify-end" },
12
- react_1.default.createElement("div", { style: { display: 'flex', justifyContent: 'flex-end' } },
13
- !isClientPortal && isWalletTester && react_1.default.createElement(core_1.Tooltip, { arrow: true, placement: "top", interactive: true, className: "whitespace-nowrap", title: "Wallet" },
14
- react_1.default.createElement(core_1.IconButton, { id: "expert_wallet_button", onClick: () => setOpenExpertWallet(true) },
15
- " ",
16
- react_1.default.createElement(base_icons_1.IconCash, { size: "md" }),
17
- " ")),
18
- !isClientPortal && react_1.default.createElement(core_1.Tooltip, { arrow: true, placement: "top", interactive: true, className: "whitespace-nowrap", title: "Service Lines" },
19
- react_1.default.createElement(core_1.IconButton, { id: "service_lines_button", onClick: () => setOpenServiceLinesTemplate(true) },
20
- " ",
21
- react_1.default.createElement(base_icons_1.IconBriefcase, { size: "md" }),
22
- " ")),
23
- react_1.default.createElement(core_1.Tooltip, { arrow: true, placement: "top", interactive: true, className: "whitespace-nowrap", title: "Document Center" },
24
- react_1.default.createElement(core_1.IconButton, { id: "document_center_button", "data-tut": "document_center_button", onClick: () => setOpenDocumentModal(true) },
25
- " ",
26
- react_1.default.createElement(base_icons_1.IconDocumentText, { size: "md" }),
27
- " ")))));
10
+ const ForumOutlined_1 = __importDefault(require("@material-ui/icons/ForumOutlined"));
11
+ const GroupAdd_1 = __importDefault(require("@material-ui/icons/GroupAdd"));
12
+ const HeaderNavBar = ({ setOpenDocumentModal, setOpenServiceLinesTemplate, setOpenExpertWallet, isWalletTester, isClientPortal = false, setFaqModal, setOpenOrganizationModal }) => {
13
+ return (react_1.default.createElement("div", { className: "flex w-full bg-white p-2 shadow-sm justify-start" },
14
+ react_1.default.createElement("div", { style: { display: 'flex', justifyContent: 'flex-end', gap: '8px' } },
15
+ !isClientPortal && (react_1.default.createElement("div", { className: "flex flex-col items-center" },
16
+ react_1.default.createElement(core_1.IconButton, { id: "reactour__inviteToFirmButton", onClick: () => { setOpenOrganizationModal(true); }, "data-tut": "reactour__inviteToFirmButton", className: "mb-0.5" },
17
+ react_1.default.createElement(GroupAdd_1.default, { fontSize: "medium", className: "text-black" })),
18
+ react_1.default.createElement("span", { className: "text-xs text-gray-600" }, "Manage Firm"))),
19
+ !isClientPortal && isWalletTester && (react_1.default.createElement("div", { className: "flex flex-col items-center" },
20
+ react_1.default.createElement(core_1.IconButton, { id: "expert_wallet_button", onClick: () => setOpenExpertWallet(true), className: "mb-0.5" },
21
+ react_1.default.createElement(base_icons_1.IconCash, { size: "md" })),
22
+ react_1.default.createElement("span", { className: "text-xs text-gray-600" }, "Wallet"))),
23
+ !isClientPortal && (react_1.default.createElement("div", { className: "flex flex-col items-center" },
24
+ react_1.default.createElement(core_1.IconButton, { id: "service_lines_button", onClick: () => setOpenServiceLinesTemplate(true), className: "mb-0.5" },
25
+ react_1.default.createElement(base_icons_1.IconBriefcase, { size: "md" })),
26
+ react_1.default.createElement("span", { className: "text-xs text-gray-600" }, "Service Lines"))),
27
+ react_1.default.createElement("div", { className: "flex flex-col items-center" },
28
+ react_1.default.createElement(core_1.IconButton, { id: "document_center_button", "data-tut": "document_center_button", onClick: () => setOpenDocumentModal(true), className: "mb-0.5" },
29
+ react_1.default.createElement(base_icons_1.IconDocumentText, { size: "md" })),
30
+ react_1.default.createElement("span", { className: "text-xs text-gray-600" }, "Document Center")),
31
+ react_1.default.createElement("div", { className: "flex flex-col items-center" },
32
+ react_1.default.createElement(core_1.IconButton, { id: "reactour__faqbutton", onClick: () => { setFaqModal(true); }, "data-tut": "reactour__faqbutton", className: "mb-0.5" },
33
+ react_1.default.createElement(ForumOutlined_1.default, { fontSize: "medium", className: "text-black" })),
34
+ react_1.default.createElement("span", { className: "text-xs text-gray-600" }, "FAQ")))));
28
35
  };
29
36
  exports.HeaderNavBar = HeaderNavBar;
@@ -1 +1 @@
1
- export declare const TestDecisionSection: () => JSX.Element;
1
+ export declare const TestDecisionSection: () => JSX.Element;
@@ -1,126 +1,126 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.TestDecisionSection = void 0;
16
- const react_1 = __importDefault(require("react"));
17
- const DecisionSection_1 = require("./DecisionSection");
18
- // Test data from the provided JSON
19
- const testDispute = {
20
- "__typename": "ClientInvoiceDispute",
21
- "disputeId": 35,
22
- "approvedAmount": 450,
23
- "chatEnabled": true,
24
- "disputeDate": "2025-05-22",
25
- "disputeUpdatedDate": "2025-05-23",
26
- "freelancerId": 8081,
27
- "freelancer": {
28
- "__typename": "User",
29
- "id": 8081,
30
- "email": "andpande@gmail.com",
31
- "firstName": "William",
32
- "lastName": "Annon"
33
- },
34
- "status": "Resolved",
35
- "finalDecisionOwnerId": 29005,
36
- "invoice": {
37
- "__typename": "ClientInvoice",
38
- "amount": 450,
39
- "balanceDue": 450,
40
- "clientId": 4433,
41
- "dateGenerated": "2025-04-14",
42
- "id": 175325,
43
- "month": "2025-04-01"
44
- },
45
- "disputeProjects": [
46
- {
47
- "__typename": "ClientInvoiceDisputeProject",
48
- "id": 37,
49
- "projectId": 19158,
50
- "disputeAmount": 450,
51
- "disputeHours": 30,
52
- "disputeType": "Hourly",
53
- "disputeReasonCode": "Incorrect Hours Logged",
54
- "clientExplanation": "I have a dispute over this expert for the current invoice 175325",
55
- "clientDocumentLinks": "https://expert-client-dispute-files.s3.amazonaws.com/project-19158%2Ftesting.pdf,https://expert-client-dispute-files.s3.amazonaws.com/project-19158%2F_Carmelita_Resume-Graduation__1_.docx",
56
- "expertDocumentLinks": "https://expert-client-dispute-files.s3.amazonaws.com/project-19158%2F0eb4b31b-b6d8-4cd1-b6ac-39b807ea4577.pdf",
57
- "resolutionMode": null,
58
- "resolutionType": null,
59
- "project": {
60
- "__typename": "Project",
61
- "name": "Ongoing Ad-Hoc Support",
62
- "freelancerRate": null,
63
- "clientRate": null,
64
- "projectHours": [
65
- {
66
- "__typename": "ProjectHour",
67
- "id": 136605,
68
- "date": "2022-02-11",
69
- "description": "Ate Tacos",
70
- "hours": 8
71
- },
72
- {
73
- "__typename": "ProjectHour",
74
- "id": 136606,
75
- "date": "2022-02-12",
76
- "description": "Worked on project analysis",
77
- "hours": 6
78
- },
79
- {
80
- "__typename": "ProjectHour",
81
- "id": 136607,
82
- "date": "2022-02-13",
83
- "description": "Client meeting and documentation",
84
- "hours": 4
85
- },
86
- {
87
- "__typename": "ProjectHour",
88
- "id": 136608,
89
- "date": "2022-02-14",
90
- "description": "Code review and testing",
91
- "hours": 7
92
- },
93
- {
94
- "__typename": "ProjectHour",
95
- "id": 136609,
96
- "date": "2022-02-15",
97
- "description": "Final deliverable preparation",
98
- "hours": 5
99
- }
100
- ]
101
- }
102
- }
103
- ],
104
- "lastMessageAt": "2025-05-23T10:56:53.000Z",
105
- "messageCount": 5,
106
- "client": {
107
- "__typename": "Client",
108
- "name": "Vessel Advisors"
109
- }
110
- };
111
- const testUser = {
112
- userId: 29005,
113
- firstName: "Test",
114
- lastName: "User"
115
- };
116
- const TestDecisionSection = () => {
117
- const mockOnUpdateDispute = (variables) => __awaiter(void 0, void 0, void 0, function* () {
118
- console.log('Mock update dispute called with:', variables);
119
- return Promise.resolve({ success: true });
120
- });
121
- const mockUpdateInvoiceMutation = {};
122
- return (react_1.default.createElement("div", { className: "p-8 max-w-4xl mx-auto" },
123
- react_1.default.createElement("h1", { className: "text-2xl font-bold mb-6" }, "Test Decision Section with Hours Modal"),
124
- react_1.default.createElement(DecisionSection_1.DecisionSection, { dispute: testDispute, onUpdateDispute: mockOnUpdateDispute, updateInvoiceMutation: mockUpdateInvoiceMutation, user: testUser })));
125
- };
126
- exports.TestDecisionSection = TestDecisionSection;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.TestDecisionSection = void 0;
16
+ const react_1 = __importDefault(require("react"));
17
+ const DecisionSection_1 = require("./DecisionSection");
18
+ // Test data from the provided JSON
19
+ const testDispute = {
20
+ "__typename": "ClientInvoiceDispute",
21
+ "disputeId": 35,
22
+ "approvedAmount": 450,
23
+ "chatEnabled": true,
24
+ "disputeDate": "2025-05-22",
25
+ "disputeUpdatedDate": "2025-05-23",
26
+ "freelancerId": 8081,
27
+ "freelancer": {
28
+ "__typename": "User",
29
+ "id": 8081,
30
+ "email": "andpande@gmail.com",
31
+ "firstName": "William",
32
+ "lastName": "Annon"
33
+ },
34
+ "status": "Resolved",
35
+ "finalDecisionOwnerId": 29005,
36
+ "invoice": {
37
+ "__typename": "ClientInvoice",
38
+ "amount": 450,
39
+ "balanceDue": 450,
40
+ "clientId": 4433,
41
+ "dateGenerated": "2025-04-14",
42
+ "id": 175325,
43
+ "month": "2025-04-01"
44
+ },
45
+ "disputeProjects": [
46
+ {
47
+ "__typename": "ClientInvoiceDisputeProject",
48
+ "id": 37,
49
+ "projectId": 19158,
50
+ "disputeAmount": 450,
51
+ "disputeHours": 30,
52
+ "disputeType": "Hourly",
53
+ "disputeReasonCode": "Incorrect Hours Logged",
54
+ "clientExplanation": "I have a dispute over this expert for the current invoice 175325",
55
+ "clientDocumentLinks": "https://expert-client-dispute-files.s3.amazonaws.com/project-19158%2Ftesting.pdf,https://expert-client-dispute-files.s3.amazonaws.com/project-19158%2F_Carmelita_Resume-Graduation__1_.docx",
56
+ "expertDocumentLinks": "https://expert-client-dispute-files.s3.amazonaws.com/project-19158%2F0eb4b31b-b6d8-4cd1-b6ac-39b807ea4577.pdf",
57
+ "resolutionMode": null,
58
+ "resolutionType": null,
59
+ "project": {
60
+ "__typename": "Project",
61
+ "name": "Ongoing Ad-Hoc Support",
62
+ "freelancerRate": null,
63
+ "clientRate": null,
64
+ "projectHours": [
65
+ {
66
+ "__typename": "ProjectHour",
67
+ "id": 136605,
68
+ "date": "2022-02-11",
69
+ "description": "Ate Tacos",
70
+ "hours": 8
71
+ },
72
+ {
73
+ "__typename": "ProjectHour",
74
+ "id": 136606,
75
+ "date": "2022-02-12",
76
+ "description": "Worked on project analysis",
77
+ "hours": 6
78
+ },
79
+ {
80
+ "__typename": "ProjectHour",
81
+ "id": 136607,
82
+ "date": "2022-02-13",
83
+ "description": "Client meeting and documentation",
84
+ "hours": 4
85
+ },
86
+ {
87
+ "__typename": "ProjectHour",
88
+ "id": 136608,
89
+ "date": "2022-02-14",
90
+ "description": "Code review and testing",
91
+ "hours": 7
92
+ },
93
+ {
94
+ "__typename": "ProjectHour",
95
+ "id": 136609,
96
+ "date": "2022-02-15",
97
+ "description": "Final deliverable preparation",
98
+ "hours": 5
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ ],
104
+ "lastMessageAt": "2025-05-23T10:56:53.000Z",
105
+ "messageCount": 5,
106
+ "client": {
107
+ "__typename": "Client",
108
+ "name": "Vessel Advisors"
109
+ }
110
+ };
111
+ const testUser = {
112
+ userId: 29005,
113
+ firstName: "Test",
114
+ lastName: "User"
115
+ };
116
+ const TestDecisionSection = () => {
117
+ const mockOnUpdateDispute = (variables) => __awaiter(void 0, void 0, void 0, function* () {
118
+ console.log('Mock update dispute called with:', variables);
119
+ return Promise.resolve({ success: true });
120
+ });
121
+ const mockUpdateInvoiceMutation = {};
122
+ return (react_1.default.createElement("div", { className: "p-8 max-w-4xl mx-auto" },
123
+ react_1.default.createElement("h1", { className: "text-2xl font-bold mb-6" }, "Test Decision Section with Hours Modal"),
124
+ react_1.default.createElement(DecisionSection_1.DecisionSection, { dispute: testDispute, onUpdateDispute: mockOnUpdateDispute, updateInvoiceMutation: mockUpdateInvoiceMutation, user: testUser })));
125
+ };
126
+ exports.TestDecisionSection = TestDecisionSection;
@@ -1,2 +1,16 @@
1
1
  import React from 'react';
2
- export declare const OrganizationChart: ({ expertFirms, openModal, setOpenModal, firstName, lastName, primaryServiceLine, city, stateAbbreviation, paroTenure, isPublicProfile, }: any) => React.JSX.Element;
2
+ type OrganizationChartProps = {
3
+ expertFirms: any;
4
+ firstName: string;
5
+ lastName: string;
6
+ primaryServiceLine: string;
7
+ city: string;
8
+ stateAbbreviation: string;
9
+ paroTenure?: string;
10
+ isPublicProfile: boolean;
11
+ showAsComponent?: boolean;
12
+ openModal?: boolean;
13
+ setOpenModal?: (open: boolean) => void;
14
+ };
15
+ export declare const OrganizationChart: ({ expertFirms, openModal, setOpenModal, firstName, lastName, primaryServiceLine, city, stateAbbreviation, paroTenure, isPublicProfile, showAsComponent, }: OrganizationChartProps) => React.JSX.Element;
16
+ export {};
@@ -71,13 +71,16 @@ const RenderChildren = ({ children, zooming, isDragging }) => {
71
71
  child.children && child.children.length > 0 && (react_1.default.createElement(RenderChildren, { children: child.children, zooming: zooming, isDragging: isDragging })))));
72
72
  })))))));
73
73
  };
74
- const OrganizationChart = ({ expertFirms, openModal, setOpenModal, firstName, lastName, primaryServiceLine, city, stateAbbreviation, paroTenure, isPublicProfile, }) => {
74
+ const OrganizationChart = ({ expertFirms, openModal = false, setOpenModal, firstName, lastName, primaryServiceLine, city, stateAbbreviation, paroTenure = '', isPublicProfile, showAsComponent = false, }) => {
75
75
  var _a, _b, _c, _d;
76
76
  const services = (_a = expertFirms === null || expertFirms === void 0 ? void 0 : expertFirms.expertFirmClientReferences) === null || _a === void 0 ? void 0 : _a.flatMap((obj) => { var _a; return (_a = obj === null || obj === void 0 ? void 0 : obj.services) !== null && _a !== void 0 ? _a : []; });
77
77
  const uniqueServices = (0, utils_1.parseServices)(services);
78
78
  const employeeLocation = (0, utils_1.checkEmployeeLocation)(expertFirms === null || expertFirms === void 0 ? void 0 : expertFirms.expertFirmEmployees);
79
79
  const totalYears = (0, utils_1.getTotalYearsWithFirm)(expertFirms === null || expertFirms === void 0 ? void 0 : expertFirms.expertFirmEmployees);
80
- const treeData = (0, utils_1.transformEmployeeData)(expertFirms.expertFirmEmployees, firstName, lastName, primaryServiceLine, city, stateAbbreviation, paroTenure);
80
+ const allEmployeeData = expertFirms.expertFirmEmployees.map((e) => {
81
+ return Object.assign(Object.assign({}, e), { employeeName: e.employeeFirstName + " " + e.employeeLastName });
82
+ });
83
+ const treeData = (0, utils_1.transformEmployeeData)(allEmployeeData, firstName, lastName, primaryServiceLine, city, stateAbbreviation, paroTenure);
81
84
  const groupedEmployees = (_b = expertFirms === null || expertFirms === void 0 ? void 0 : expertFirms.expertFirmEmployees) === null || _b === void 0 ? void 0 : _b.reduce((acc, obj) => {
82
85
  if (!acc[obj.level]) {
83
86
  acc[obj.level] = [];
@@ -147,36 +150,36 @@ const OrganizationChart = ({ expertFirms, openModal, setOpenModal, firstName, la
147
150
  setScale(newScale);
148
151
  centerContent(newScale);
149
152
  };
150
- return (react_1.default.createElement(utils_1.CustomDialog, { open: openModal, onClose: () => setOpenModal(false), fullScreen: true, scroll: "paper" },
151
- react_1.default.createElement("div", { className: "w-full h-full bg-gray-50 relative" },
152
- react_1.default.createElement(core_1.Grid, { container: true, justifyContent: "space-between", alignItems: "center", style: { padding: '1rem' } },
153
- react_1.default.createElement(core_1.Box, null,
154
- react_1.default.createElement(core_1.Typography, { variant: "subtitle1" },
155
- react_1.default.createElement(core_1.Box, null, "Organizational Structure & Services")),
156
- react_1.default.createElement(core_1.Typography, { variant: "caption" },
157
- react_1.default.createElement(core_1.Box, null, "See what services the organization offers and where they're located"))),
158
- react_1.default.createElement(core_1.IconButton, { onClick: () => setOpenModal(false), style: { position: 'absolute', top: 0, right: 0 } },
159
- react_1.default.createElement(icons_1.Close, null))),
160
- isPublicProfile && (react_1.default.createElement(ServicesCard_1.default, { uniqueServices: uniqueServices, employeeCount: expertFirms.employeeCount, employeeLocation: employeeLocation, totalYears: totalYears })),
161
- react_1.default.createElement(core_1.DialogContent, { onWheel: handleWheel, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onDoubleClick: handleDoubleClick, style: {
162
- overflow: 'hidden',
153
+ const Content = (react_1.default.createElement("div", { className: "w-full h-full bg-gray-50 relative" },
154
+ !showAsComponent && react_1.default.createElement(core_1.Grid, { container: true, justifyContent: "space-between", alignItems: "center", style: { padding: '1rem' } },
155
+ react_1.default.createElement(core_1.Box, null,
156
+ react_1.default.createElement(core_1.Typography, { variant: "subtitle1" },
157
+ react_1.default.createElement(core_1.Box, null, "Organizational Structure & Services")),
158
+ react_1.default.createElement(core_1.Typography, { variant: "caption" },
159
+ react_1.default.createElement(core_1.Box, null, "See what services the organization offers and where they're located"))),
160
+ react_1.default.createElement(core_1.IconButton, { onClick: () => { setOpenModal && setOpenModal(false); }, style: { position: 'absolute', top: 0, right: 0 } },
161
+ react_1.default.createElement(icons_1.Close, null))),
162
+ isPublicProfile && (react_1.default.createElement(ServicesCard_1.default, { uniqueServices: uniqueServices, employeeCount: expertFirms.employeeCount, employeeLocation: employeeLocation, totalYears: totalYears })),
163
+ react_1.default.createElement(core_1.DialogContent, { onWheel: handleWheel, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onDoubleClick: handleDoubleClick, style: {
164
+ overflow: 'hidden',
165
+ width: '100%',
166
+ height: '100vh',
167
+ position: 'relative',
168
+ } },
169
+ react_1.default.createElement("div", { onMouseDown: handleMouseDown, style: {
170
+ transform: `translate(${position.x}px, ${position.y}px) scale(${scale})`,
171
+ transformOrigin: 'center',
172
+ transition: 'transform 0.1s',
163
173
  width: '100%',
164
- height: '100vh',
174
+ height: '100%',
165
175
  position: 'relative',
176
+ cursor: isDraggingRef.current ? 'grabbing' : 'grab',
177
+ userSelect: 'none',
166
178
  } },
167
- react_1.default.createElement("div", { onMouseDown: handleMouseDown, style: {
168
- transform: `translate(${position.x}px, ${position.y}px) scale(${scale})`,
169
- transformOrigin: 'center',
170
- transition: 'transform 0.1s',
171
- width: '100%',
172
- height: '100%',
173
- position: 'relative',
174
- cursor: isDraggingRef.current ? 'grabbing' : 'grab',
175
- userSelect: 'none',
176
- } },
177
- react_1.default.createElement("div", { className: "p-8" },
178
- react_1.default.createElement("div", { className: "flex flex-col items-center" },
179
- react_1.default.createElement(PersonCard_1.default, Object.assign({}, treeData, { noOfchildren: (_d = (_c = treeData === null || treeData === void 0 ? void 0 : treeData.children) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0 })),
180
- react_1.default.createElement(RenderChildren, { children: treeData.children || [], zooming: zoomingRef.current, isDragging: isDraggingRef.current }))))))));
179
+ react_1.default.createElement("div", { className: "p-8" },
180
+ react_1.default.createElement("div", { className: "flex flex-col items-center" },
181
+ react_1.default.createElement(PersonCard_1.default, Object.assign({}, treeData, { noOfchildren: (_d = (_c = treeData === null || treeData === void 0 ? void 0 : treeData.children) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0 })),
182
+ react_1.default.createElement(RenderChildren, { children: treeData.children || [], zooming: zoomingRef.current, isDragging: isDraggingRef.current })))))));
183
+ return showAsComponent ? (Content) : (react_1.default.createElement(utils_1.CustomDialog, { open: openModal, onClose: () => { setOpenModal && setOpenModal(false); }, fullScreen: true, scroll: "paper" }, Content));
181
184
  };
182
185
  exports.OrganizationChart = OrganizationChart;
@@ -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 {};