@paro.io/expert-shared-components 1.11.8 → 1.11.9

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 (69) 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/ExpertProfileHeader/ActionButtonSection.js +6 -6
  44. package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
  45. package/lib/components/Invoices/ClientDisputeProjectCard.d.ts +7 -0
  46. package/lib/components/Invoices/ClientDisputeProjectCard.js +241 -0
  47. package/lib/components/Invoices/DiscussionSection.js +2 -2
  48. package/lib/components/Invoices/InvoiceCard.d.ts +1 -1
  49. package/lib/components/Invoices/InvoiceCard.js +8 -4
  50. package/lib/components/Invoices/InvoiceDetails.d.ts +2 -1
  51. package/lib/components/Invoices/InvoiceDetails.js +2 -2
  52. package/lib/components/OrganizationChart/OrganizationChart.d.ts +15 -15
  53. package/lib/components/OrganizationChart/OrganizationChart.js +312 -312
  54. package/lib/components/OrganizationChart/PersonCard.js +5 -5
  55. package/lib/components/OrganizationChart/utils.js +79 -79
  56. package/lib/components/ProjectCard/ProgressBar.js +4 -4
  57. package/lib/components/ProjectCard/ReviewRequestModal.js +5 -5
  58. package/lib/components/Reviews/Pagination.js +6 -6
  59. package/lib/components/ReviewsTab/RatingHeader.js +6 -6
  60. package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
  61. package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
  62. package/lib/components/shared/Image.js +13 -13
  63. package/lib/components/shared/ProfileTextField.d.ts +18 -18
  64. package/lib/components/shared/ProfileTextField.js +16 -16
  65. package/lib/components/shared/StyledActionButtons.d.ts +7 -7
  66. package/lib/components/shared/StyledActionButtons.js +15 -15
  67. package/lib/components/shared/ToastNotification.d.ts +10 -10
  68. package/lib/components/shared/ToastNotification.js +63 -63
  69. package/package.json +61 -61
@@ -0,0 +1,241 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.ClientDisputeProjectCard = void 0;
36
+ const react_1 = __importStar(require("react"));
37
+ const base_ui_1 = require("@paro.io/base-ui");
38
+ const base_ui_2 = require("@paro.io/base-ui");
39
+ const core_1 = require("@material-ui/core");
40
+ const base_icons_1 = require("@paro.io/base-icons");
41
+ const FileUploader_1 = require("../FileUploader");
42
+ const useStyles = (0, core_1.makeStyles)((theme) => ({
43
+ root: {
44
+ width: "100%",
45
+ },
46
+ paper: {
47
+ width: "100%",
48
+ },
49
+ table: {
50
+ minWidth: '95%',
51
+ border: "1px solid",
52
+ borderColor: "#E2E8F0",
53
+ },
54
+ visuallyHidden: {
55
+ border: 0,
56
+ clip: "rect(0 0 0 0)",
57
+ height: 1,
58
+ margin: -1,
59
+ overflow: "hidden",
60
+ padding: 0,
61
+ position: "absolute",
62
+ top: 20,
63
+ width: 1,
64
+ },
65
+ tableCell: {
66
+ width: "auto",
67
+ },
68
+ collapse: {
69
+ backgroundColor: "#FFFFFF",
70
+ width: "100%",
71
+ borderRadius: 6,
72
+ marginLeft: 12,
73
+ marginTop: 12,
74
+ },
75
+ tableHead: {
76
+ backgroundColor: "#F1F5F9",
77
+ borderRadius: 6,
78
+ width: "100%",
79
+ },
80
+ }));
81
+ const headCells = [
82
+ { id: 'project', label: 'Project' },
83
+ { id: 'projectType', label: 'Project Type' },
84
+ { id: 'hours', label: 'Hours' },
85
+ { id: 'amount', label: 'Amount' },
86
+ { id: 'reason', label: 'Reason' },
87
+ ];
88
+ const ACCEPTED_FILE_TYPES = [
89
+ 'application/pdf',
90
+ 'application/msword',
91
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
92
+ 'image/jpeg',
93
+ 'image/png',
94
+ 'text/csv',
95
+ ];
96
+ const ClientDisputeProjectCard = ({ clientInvoice, updateClientInvoiceDisputeMutation, documentUploadUrl, }) => {
97
+ var _a, _b;
98
+ const [expandRow, setExpandRow] = (0, react_1.useState)(null);
99
+ const classes = useStyles();
100
+ const [projects, setProjects] = (0, react_1.useState)(clientInvoice === null || clientInvoice === void 0 ? void 0 : clientInvoice.disputeProjects);
101
+ const [editingRowId, setEditingRowId] = (0, react_1.useState)(null);
102
+ const [editedExplanation, setEditedExplanation] = (0, react_1.useState)('');
103
+ const [updatedDispute, setUpdateDispute] = (0, react_1.useState)(false);
104
+ const [updatingDispute, setUpdatingDispute] = (0, react_1.useState)(false);
105
+ const disputeProject = (_a = clientInvoice === null || clientInvoice === void 0 ? void 0 : clientInvoice.disputeProjects) === null || _a === void 0 ? void 0 : _a[0];
106
+ const clientDocumentLinks = (_b = disputeProject === null || disputeProject === void 0 ? void 0 : disputeProject.clientDocumentLinks) === null || _b === void 0 ? void 0 : _b.split(',');
107
+ const fileInputRef = (0, react_1.useRef)(null);
108
+ (0, react_1.useEffect)(() => {
109
+ if (JSON.stringify(clientInvoice === null || clientInvoice === void 0 ? void 0 : clientInvoice.disputeProjects) !== JSON.stringify(projects)) {
110
+ setUpdateDispute(true);
111
+ }
112
+ }, [projects]);
113
+ const validateFileUpload = (file) => {
114
+ return ACCEPTED_FILE_TYPES.includes(file.type);
115
+ };
116
+ const handleEditExplanation = (projectId) => __awaiter(void 0, void 0, void 0, function* () {
117
+ setProjects((prev) => prev.map((p) => p.projectId === projectId
118
+ ? Object.assign(Object.assign({}, p), { clientExplanation: editedExplanation }) : p));
119
+ setEditingRowId(null);
120
+ });
121
+ const handleChange = (e, field) => {
122
+ const updatedProject = field === "clientDocumentLinks" ? projects.map((project) => {
123
+ if (project.projectId === expandRow) {
124
+ return Object.assign(Object.assign({}, project), { clientDocumentLinks: [...project.clientDocumentLinks, ...e.filter((name) => !project.clientDocumentLinks.includes(name))] });
125
+ }
126
+ return project;
127
+ }) : projects.map((project) => {
128
+ return Object.assign(Object.assign({}, project), { [field]: e.target.value });
129
+ });
130
+ setProjects(updatedProject);
131
+ };
132
+ const handleUpload = (event) => {
133
+ const selectedFiles = event.target.files;
134
+ if (!selectedFiles)
135
+ return;
136
+ const validFiles = Array.from(selectedFiles)
137
+ .filter(file => validateFileUpload(file))
138
+ .map(file => file.name);
139
+ if (validFiles.length === 0)
140
+ return;
141
+ if (validFiles && validFiles.length > 0) {
142
+ Array.from(selectedFiles).forEach((selectedFile) => {
143
+ const reader = new FileReader();
144
+ reader.onloadend = () => __awaiter(void 0, void 0, void 0, function* () {
145
+ var _a, _b;
146
+ yield (0, FileUploader_1.fileUploader)({
147
+ file: selectedFile,
148
+ documentName: selectedFile.name,
149
+ projectId: Number((_b = (_a = clientInvoice === null || clientInvoice === void 0 ? void 0 : clientInvoice.disputeProjects) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.projectId),
150
+ documentUploadUrl: documentUploadUrl,
151
+ updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation,
152
+ previousFiles: clientDocumentLinks,
153
+ isExpert: false,
154
+ });
155
+ });
156
+ reader.readAsDataURL(selectedFile);
157
+ });
158
+ }
159
+ handleChange(validFiles, "clientDocumentLinks");
160
+ if (fileInputRef.current) {
161
+ fileInputRef.current.value = '';
162
+ }
163
+ };
164
+ const handleSubmitDispute = () => __awaiter(void 0, void 0, void 0, function* () {
165
+ setUpdatingDispute(true);
166
+ try {
167
+ yield updateClientInvoiceDisputeMutation({
168
+ variables: {
169
+ input: {
170
+ disputeId: projects[0].id,
171
+ projectDisputes: projects.map((project) => ({
172
+ projectId: project.projectId,
173
+ disputeReasonCode: project.disputeReasonCode,
174
+ disputeType: project.disputeType,
175
+ disputeHours: project.disputeHours,
176
+ disputeAmount: project.disputeAmount,
177
+ clientExplanation: project.clientExplanation,
178
+ clientDocumentLinks: project.clientDocumentLinks,
179
+ })),
180
+ }
181
+ }
182
+ });
183
+ }
184
+ catch (error) {
185
+ console.error("Failed to update dispute", error);
186
+ }
187
+ finally {
188
+ setUpdatingDispute(false);
189
+ setUpdateDispute(false);
190
+ }
191
+ });
192
+ return (react_1.default.createElement("div", null,
193
+ react_1.default.createElement(core_1.Table, { className: classes.table, "aria-labelledby": "tableTitle", size: 'medium', "aria-label": "enhanced table" },
194
+ react_1.default.createElement(core_1.TableHead, { className: classes.tableHead },
195
+ react_1.default.createElement(core_1.TableRow, null,
196
+ headCells.map((headcell) => {
197
+ return react_1.default.createElement(core_1.TableCell, { key: headcell.id, className: classes.tableCell }, headcell.label);
198
+ }),
199
+ react_1.default.createElement(core_1.TableCell, { className: classes.tableCell }))), projects === null || projects === void 0 ? void 0 :
200
+ projects.map((row) => {
201
+ var _a;
202
+ return (react_1.default.createElement(react_1.default.Fragment, { key: row.projectId },
203
+ react_1.default.createElement(core_1.TableRow, null,
204
+ react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, ((_a = row.project) === null || _a === void 0 ? void 0 : _a.name) || "N/A"),
205
+ react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, row.disputeType),
206
+ react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, row.disputeHours),
207
+ react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, row.disputeAmount),
208
+ react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, row.disputeReasonCode),
209
+ react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell },
210
+ react_1.default.createElement(core_1.IconButton, { onClick: () => setExpandRow(expandRow === row.projectId ? null : row.projectId) }, expandRow === row.projectId ? react_1.default.createElement(base_icons_1.IconChevronUp, null) : react_1.default.createElement(base_icons_1.IconChevronDown, null)))),
211
+ expandRow === row.projectId && (react_1.default.createElement(core_1.TableRow, { key: `expanded-${row.projectId}` },
212
+ react_1.default.createElement(core_1.TableCell, { colSpan: headCells.length + 1, style: { paddingBottom: 0, paddingTop: 0 } },
213
+ react_1.default.createElement(core_1.Collapse, { in: true, timeout: "auto", unmountOnExit: true },
214
+ react_1.default.createElement(react_1.default.Fragment, null,
215
+ react_1.default.createElement(base_ui_1.Card, { className: "bg-[#F8F9FA] m-2 flex items-start justify-between rounded flex-col w-full p-6" },
216
+ react_1.default.createElement("b", { className: "mb-2 flex flex-row justify-start items-center" },
217
+ "Explanation:",
218
+ editingRowId === row.projectId ? (react_1.default.createElement(react_1.default.Fragment, null,
219
+ react_1.default.createElement(base_ui_2.Input, { label: "", type: "text", className: "w-96 mx-4 overflow-ellipsis", value: editedExplanation, onChange: (e) => setEditedExplanation(e.target.value), placeholder: "Please provide an explanation", isInvalid: !editedExplanation, isInvalidText: "Please provide an explanation" }),
220
+ react_1.default.createElement(base_ui_2.Button, { label: "Save", size: "md", color: "success", className: "ml-2 mt-1", onClick: () => { handleEditExplanation(row.projectId); } }))) : (react_1.default.createElement(base_ui_2.Button, { label: "Edit", iconLeft: react_1.default.createElement(base_icons_1.IconPencil, { size: "sm" }), onClick: () => {
221
+ setEditedExplanation(row.clientExplanation);
222
+ setEditingRowId(row.projectId);
223
+ }, size: "sm", color: "info", className: "ml-6" }))),
224
+ react_1.default.createElement("p", null, row.clientExplanation),
225
+ react_1.default.createElement("b", { className: "flex flex-row flex-wrap justify-start items-center mt-2" },
226
+ "Supporting Documents:",
227
+ react_1.default.createElement("input", { id: "upload-file", type: "file", multiple: true, accept: ".pdf,.doc,.docx,.jpeg,.png,.gif,.csv", style: { display: 'none' }, ref: fileInputRef, onChange: handleUpload }),
228
+ react_1.default.createElement(base_ui_2.Button, { label: "Add File", iconLeft: react_1.default.createElement(base_icons_1.IconPlus, { size: "sm" }), onClick: () => { var _a; return (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, size: "sm", color: "info", className: "mx-2" }),
229
+ (Array.isArray(row.clientDocumentLinks)
230
+ ? row.clientDocumentLinks
231
+ : []).map((f, index) => (react_1.default.createElement("div", { key: index, className: "mx-2" },
232
+ react_1.default.createElement(base_ui_1.Tag, { variant: "subtle", color: "success", label: f, iconRight: react_1.default.createElement(base_icons_1.IconXCircle, null), onClick: () => {
233
+ const updatedProjects = projects.map((p) => p.projectId === row.projectId
234
+ ? Object.assign(Object.assign({}, p), { clientDocumentLinks: p.clientDocumentLinks.filter((file) => file !== f) }) : p);
235
+ setProjects(updatedProjects);
236
+ } })))))))))))));
237
+ })),
238
+ updatedDispute && react_1.default.createElement("div", { className: "flex justify-end ml-auto mt-2" },
239
+ react_1.default.createElement(base_ui_2.Button, { label: "Update Dispute", color: "primary", isLoading: updatingDispute, onClick: () => handleSubmitDispute() }))));
240
+ };
241
+ exports.ClientDisputeProjectCard = ClientDisputeProjectCard;
@@ -122,7 +122,7 @@ const DiscussionSection = ({ disputeId, currentUser, messages, onCreateMessage,
122
122
  react_1.default.createElement("div", { className: "flex items-center justify-between" },
123
123
  react_1.default.createElement("div", { className: "text-lg font-bold text-[#333333]" }, "Discussion Thread")),
124
124
  react_1.default.createElement("div", { className: "rounded" },
125
- react_1.default.createElement("div", { className: "space-y-6" }, messages.map((message) => (react_1.default.createElement("div", { key: message.id, className: `flex ${getMessageAlignment(message.sender.userTypeId)}` },
125
+ messages.length ? react_1.default.createElement("div", { className: "flex-1 max-h-[40vh] overflow-y-auto border rounded-md p-2 space-y-6" }, messages.map((message) => (react_1.default.createElement("div", { key: message.id, className: `flex ${getMessageAlignment(message.sender.userTypeId)}` },
126
126
  react_1.default.createElement("div", { className: `flex space-x-4 ${getMessageOrder(message.sender.userTypeId)} ${getMessageAlignment(message.sender.userTypeId)}` },
127
127
  react_1.default.createElement("div", { style: {
128
128
  backgroundColor: getSenderBackgroundColor(message.sender.userTypeId),
@@ -137,7 +137,7 @@ const DiscussionSection = ({ disputeId, currentUser, messages, onCreateMessage,
137
137
  message.sender.lastName),
138
138
  react_1.default.createElement("span", { className: "text-xs text-[#666666]" }, (0, dayjs_1.default)(message.createdAt).format('MMM D, YYYY • h:mm A'))),
139
139
  react_1.default.createElement("div", { style: { backgroundColor: getSenderBackgroundColor(message.sender.userTypeId) }, className: "mt-1 p-3 rounded-lg" },
140
- react_1.default.createElement("p", { className: `text-sm ${getHeaderAlignment(message.sender.userTypeId)}`, style: { color: getSenderTextColor(message.sender.userTypeId) } }, message.messageText)))))))),
140
+ 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),
141
141
  react_1.default.createElement("div", { ref: threadsEndRef }),
142
142
  react_1.default.createElement("div", { className: "space-y-4 p-6 space-y-6 rounded mt-4", style: { backgroundColor: '#F5F7F9' } },
143
143
  react_1.default.createElement("div", null,
@@ -7,5 +7,5 @@ interface InvoiceCardProps {
7
7
  documentUploadUrl: string;
8
8
  isInternal?: boolean;
9
9
  }
10
- export declare const InvoiceCard: ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, documentUploadUrl, isInternal }: InvoiceCardProps) => JSX.Element;
10
+ export declare const InvoiceCard: ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, documentUploadUrl, isInternal, }: InvoiceCardProps) => JSX.Element;
11
11
  export {};
@@ -11,13 +11,17 @@ const InvoiceDetails_1 = require("./InvoiceDetails");
11
11
  const DisputeSection_1 = require("./DisputeSection");
12
12
  const DiscussionSection_1 = require("./DiscussionSection");
13
13
  const DecisionSection_1 = require("./DecisionSection");
14
- const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, documentUploadUrl, isInternal }) => {
14
+ const ClientDisputeProjectCard_1 = require("./ClientDisputeProjectCard");
15
+ const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, documentUploadUrl, isInternal = false, }) => {
15
16
  var _a, _b;
16
- return (react_1.default.createElement(base_ui_1.Card, { className: "w-full bg-white rounded-lg shadow-sm overflow-hidden" },
17
+ return (react_1.default.createElement(base_ui_1.Card, { className: "w-full bg-white rounded-lg shadow-sm overflow-hidden mb-4" },
17
18
  react_1.default.createElement(InvoiceHeader_1.InvoiceHeader, { invoice: clientInvoice }),
18
19
  react_1.default.createElement("div", { className: "p-6 space-y-6" },
19
- react_1.default.createElement(InvoiceDetails_1.InvoiceDetails, { invoice: clientInvoice }),
20
- react_1.default.createElement(DisputeSection_1.DisputeSection, { dispute: clientInvoice, documentUploadUrl: documentUploadUrl, updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation }),
20
+ react_1.default.createElement(InvoiceDetails_1.InvoiceDetails, { invoice: clientInvoice, isInternal: isInternal }),
21
+ isInternal ?
22
+ react_1.default.createElement(DisputeSection_1.DisputeSection, { dispute: clientInvoice, documentUploadUrl: documentUploadUrl, updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation })
23
+ :
24
+ react_1.default.createElement(ClientDisputeProjectCard_1.ClientDisputeProjectCard, { clientInvoice: clientInvoice, updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation, documentUploadUrl: documentUploadUrl }),
21
25
  (clientInvoice === null || clientInvoice === void 0 ? void 0 : clientInvoice.chatEnabled) && (react_1.default.createElement(DiscussionSection_1.DiscussionSection, { disputeId: (_b = (_a = clientInvoice === null || clientInvoice === void 0 ? void 0 : clientInvoice.disputeProjects) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id, currentUser: user, messages: chatMessages, onCreateMessage: createDisputeChatMessage, isInternal: isInternal })),
22
26
  isInternal &&
23
27
  react_1.default.createElement(DecisionSection_1.DecisionSection, { dispute: clientInvoice, onUpdateDispute: updateClientInvoiceDisputeMutation }))));
@@ -1,5 +1,6 @@
1
1
  interface InvoiceDetailsProps {
2
2
  invoice: any;
3
+ isInternal: boolean;
3
4
  }
4
- export declare const InvoiceDetails: ({ invoice }: InvoiceDetailsProps) => JSX.Element;
5
+ export declare const InvoiceDetails: ({ invoice, isInternal }: InvoiceDetailsProps) => JSX.Element;
5
6
  export {};
@@ -8,7 +8,7 @@ const react_1 = __importDefault(require("react"));
8
8
  const dayjs_1 = __importDefault(require("dayjs"));
9
9
  const DisputeProjectCard_1 = require("./DisputeProjectCard");
10
10
  const core_1 = require("@material-ui/core");
11
- const InvoiceDetails = ({ invoice }) => {
11
+ const InvoiceDetails = ({ invoice, isInternal = false }) => {
12
12
  var _a;
13
13
  const getStatusColor = (status) => {
14
14
  switch (status) {
@@ -30,7 +30,7 @@ const InvoiceDetails = ({ invoice }) => {
30
30
  react_1.default.createElement("span", { className: "text-xs text-[#666666]" },
31
31
  "Last updated: ",
32
32
  (0, dayjs_1.default)(invoice === null || invoice === void 0 ? void 0 : invoice.disputeUpdatedDate).format('MMM D, YYYY'))),
33
- ((_a = invoice === null || invoice === void 0 ? void 0 : invoice.disputeProjects) === null || _a === void 0 ? void 0 : _a.length) > 0 && (react_1.default.createElement("div", { className: "space-y-4" },
33
+ isInternal && ((_a = invoice === null || invoice === void 0 ? void 0 : invoice.disputeProjects) === null || _a === void 0 ? void 0 : _a.length) > 0 && (react_1.default.createElement("div", { className: "space-y-4" },
34
34
  react_1.default.createElement("div", { className: "grid grid-cols-1 gap-4" }, invoice.disputeProjects.map((project) => (react_1.default.createElement(DisputeProjectCard_1.DisputeProjectCard, { key: project.id, project: project, client: invoice === null || invoice === void 0 ? void 0 : invoice.client, disputeDate: invoice === null || invoice === void 0 ? void 0 : invoice.disputeDate, disputeUpdatedDate: invoice === null || invoice === void 0 ? void 0 : invoice.disputeUpdatedDate }))))))));
35
35
  };
36
36
  exports.InvoiceDetails = InvoiceDetails;
@@ -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 {};