@paro.io/expert-shared-components 1.11.2 → 1.11.4
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/DiscussionThread.d.ts +2 -2
- package/lib/components/DiscussionThread/DiscussionThread.js +64 -41
- 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 +7 -0
- package/lib/components/Invoices/DecisionSection.js +95 -0
- package/lib/components/Invoices/DiscussionSection.d.ts +19 -0
- package/lib/components/Invoices/DiscussionSection.js +163 -0
- package/lib/components/Invoices/DisputeProjectCard.d.ts +20 -0
- package/lib/components/Invoices/DisputeProjectCard.js +79 -0
- package/lib/components/Invoices/DisputeSection.d.ts +7 -0
- package/lib/components/Invoices/DisputeSection.js +94 -0
- package/lib/components/Invoices/InvoiceCard.d.ts +8 -3
- package/lib/components/Invoices/InvoiceCard.js +18 -204
- package/lib/components/Invoices/InvoiceDetails.d.ts +5 -0
- package/lib/components/Invoices/InvoiceDetails.js +34 -0
- package/lib/components/Invoices/InvoiceHeader.d.ts +5 -0
- package/lib/components/Invoices/InvoiceHeader.js +29 -0
- 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
|
@@ -1,211 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
6
|
exports.InvoiceCard = void 0;
|
|
27
|
-
const react_1 =
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
28
8
|
const base_ui_1 = require("@paro.io/base-ui");
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
visuallyHidden: {
|
|
46
|
-
border: 0,
|
|
47
|
-
clip: "rect(0 0 0 0)",
|
|
48
|
-
height: 1,
|
|
49
|
-
margin: -1,
|
|
50
|
-
overflow: "hidden",
|
|
51
|
-
padding: 0,
|
|
52
|
-
position: "absolute",
|
|
53
|
-
top: 20,
|
|
54
|
-
width: 1,
|
|
55
|
-
},
|
|
56
|
-
tableCell: {
|
|
57
|
-
width: "auto",
|
|
58
|
-
},
|
|
59
|
-
collapse: {
|
|
60
|
-
backgroundColor: "#FFFFFF",
|
|
61
|
-
width: "100%",
|
|
62
|
-
borderRadius: 6,
|
|
63
|
-
marginLeft: 12,
|
|
64
|
-
marginTop: 12,
|
|
65
|
-
},
|
|
66
|
-
tableHead: {
|
|
67
|
-
backgroundColor: "#F1F5F9",
|
|
68
|
-
borderRadius: 6,
|
|
69
|
-
width: "100%",
|
|
70
|
-
},
|
|
71
|
-
}));
|
|
72
|
-
const headCells = [
|
|
73
|
-
{ id: 'project', label: 'Project' },
|
|
74
|
-
{ id: 'projectType', label: 'Project Type' },
|
|
75
|
-
{ id: 'hours', label: 'Hours' },
|
|
76
|
-
{ id: 'amount', label: 'Amount' },
|
|
77
|
-
{ id: 'reason', label: 'Reason' },
|
|
78
|
-
];
|
|
79
|
-
const ACCEPTED_FILE_TYPES = [
|
|
80
|
-
'application/pdf',
|
|
81
|
-
'application/msword',
|
|
82
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
83
|
-
];
|
|
84
|
-
const validateFileUpload = (file) => {
|
|
85
|
-
if (!file) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
if (!ACCEPTED_FILE_TYPES.includes(file.type)) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
if (file.size > 5242880) { //5MB size
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
return true;
|
|
95
|
-
};
|
|
96
|
-
const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user }) => {
|
|
97
|
-
const [expandRow, setExpandRow] = (0, react_1.useState)(null);
|
|
98
|
-
const classes = useStyles();
|
|
99
|
-
const [projects, setProjects] = (0, react_1.useState)(clientInvoice.disputeProjects);
|
|
100
|
-
const [editingRowId, setEditingRowId] = (0, react_1.useState)(null);
|
|
101
|
-
const [editedExplanation, setEditedExplanation] = (0, react_1.useState)('');
|
|
102
|
-
const [discussion, setDiscussion] = (0, react_1.useState)('');
|
|
103
|
-
const fileInputRef = (0, react_1.useRef)(null);
|
|
104
|
-
const handleChange = (e, field) => {
|
|
105
|
-
const updatedProject = field === "clientDocumentLinks" ? projects.map((project) => {
|
|
106
|
-
if (project.projectId === expandRow) {
|
|
107
|
-
return Object.assign(Object.assign({}, project), { clientDocumentLinks: [...project.clientDocumentLinks, ...e.filter((name) => !project.clientDocumentLinks.includes(name))] });
|
|
108
|
-
}
|
|
109
|
-
return project;
|
|
110
|
-
}) : projects.map((project) => {
|
|
111
|
-
return Object.assign(Object.assign({}, project), { [field]: e.target.value });
|
|
112
|
-
});
|
|
113
|
-
//upload files mutation
|
|
114
|
-
setProjects(updatedProject);
|
|
115
|
-
};
|
|
116
|
-
const handleUpload = (event) => {
|
|
117
|
-
const selectedFiles = event.target.files;
|
|
118
|
-
if (!selectedFiles)
|
|
119
|
-
return;
|
|
120
|
-
const validFiles = Array.from(selectedFiles)
|
|
121
|
-
.filter(file => validateFileUpload(file))
|
|
122
|
-
.map(file => file.name);
|
|
123
|
-
if (validFiles.length === 0)
|
|
124
|
-
return;
|
|
125
|
-
handleChange(validFiles, "clientDocumentLinks");
|
|
126
|
-
if (fileInputRef.current) {
|
|
127
|
-
fileInputRef.current.value = '';
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
return (react_1.default.createElement(base_ui_1.Card, { className: `mx-2 my-4 md:mx-8 flex md:flex items-center justify-between rounded flex-col` },
|
|
131
|
-
react_1.default.createElement("div", { key: clientInvoice.invoice.id, className: "bg-[#0F172A] text-white mb-1 p-4 relative top-0 left-0 w-full rounded flex flex-row justify-evenly" },
|
|
132
|
-
react_1.default.createElement("b", null,
|
|
133
|
-
"Dispute Invoice #",
|
|
134
|
-
clientInvoice.invoice.id),
|
|
135
|
-
react_1.default.createElement("p", null,
|
|
136
|
-
"Disputed: ",
|
|
137
|
-
clientInvoice.disputeDate),
|
|
138
|
-
react_1.default.createElement("p", null,
|
|
139
|
-
"Invoice Date: ",
|
|
140
|
-
clientInvoice.invoice.dateGenerated)),
|
|
141
|
-
react_1.default.createElement("div", { className: "flex flex-row justify-start items-center gap-2" },
|
|
142
|
-
clientInvoice && // for in progress
|
|
143
|
-
react_1.default.createElement(base_ui_1.Tag, { color: "warning", label: "In Progress", variant: "subtle" }),
|
|
144
|
-
clientInvoice && // for resolved
|
|
145
|
-
react_1.default.createElement(base_ui_1.Tag, { color: "success", label: "Resolved", variant: "subtle" }),
|
|
146
|
-
clientInvoice && // for submitted
|
|
147
|
-
react_1.default.createElement(base_ui_1.Tag, { color: "danger", label: "Submitted", variant: "subtle" }),
|
|
148
|
-
clientInvoice && // for acion taken
|
|
149
|
-
react_1.default.createElement(base_ui_1.Tag, { color: "success", label: "Invoice reduced", variant: "subtle" }),
|
|
150
|
-
clientInvoice && // for editable upto
|
|
151
|
-
react_1.default.createElement(base_ui_1.Tag, { color: "warning", label: "Editable until May 30", variant: "subtle" }),
|
|
152
|
-
clientInvoice && // for under review
|
|
153
|
-
react_1.default.createElement(base_ui_1.Tag, { color: "info", label: "Under Review", variant: "subtle" }),
|
|
154
|
-
react_1.default.createElement("div", { className: "flex ml-2 items-center" }, "Last updated: date")),
|
|
155
|
-
react_1.default.createElement("div", { className: "w-[95%] m-2" },
|
|
156
|
-
react_1.default.createElement(core_1.Table, { className: classes.table, "aria-labelledby": "tableTitle", size: 'medium', "aria-label": "enhanced table" },
|
|
157
|
-
react_1.default.createElement(core_1.TableHead, { className: classes.tableHead },
|
|
158
|
-
react_1.default.createElement(core_1.TableRow, null,
|
|
159
|
-
headCells.map((headcell) => {
|
|
160
|
-
return react_1.default.createElement(core_1.TableCell, { key: headcell.id, className: classes.tableCell }, headcell.label);
|
|
161
|
-
}),
|
|
162
|
-
react_1.default.createElement(core_1.TableCell, { className: classes.tableCell }))), projects === null || projects === void 0 ? void 0 :
|
|
163
|
-
projects.map((row) => {
|
|
164
|
-
var _a, _b;
|
|
165
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
166
|
-
react_1.default.createElement(core_1.TableRow, { key: row.projectId },
|
|
167
|
-
react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, (_a = row.project) === null || _a === void 0 ? void 0 : _a.name),
|
|
168
|
-
react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, row.disputeType),
|
|
169
|
-
react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, row.hours),
|
|
170
|
-
react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, row.disputeAmount),
|
|
171
|
-
react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell }, row.disputeReasonCode),
|
|
172
|
-
react_1.default.createElement(core_1.TableCell, { align: "left", className: classes.tableCell },
|
|
173
|
-
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)))),
|
|
174
|
-
expandRow &&
|
|
175
|
-
react_1.default.createElement(core_1.TableRow, null,
|
|
176
|
-
react_1.default.createElement(core_1.TableCell, { colSpan: headCells.length + 1, style: { paddingBottom: 0, paddingTop: 0 } },
|
|
177
|
-
react_1.default.createElement(core_1.Collapse, { in: expandRow === row.projectId, timeout: "auto", unmountOnExit: true },
|
|
178
|
-
react_1.default.createElement(react_1.default.Fragment, null,
|
|
179
|
-
react_1.default.createElement(base_ui_1.Card, { className: `bg-[#F8F9FA] m-2 md:mx-8 flex md:flex items-start justify-between rounded flex-col w-[95%] p-6` },
|
|
180
|
-
react_1.default.createElement("b", { className: "mb-2 flex flex-row justify-start items-center" },
|
|
181
|
-
"Explanation:",
|
|
182
|
-
editingRowId === row.projectId ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
183
|
-
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" }),
|
|
184
|
-
react_1.default.createElement(base_ui_2.Button, { label: "Save", size: "md", color: "success", className: "ml-2 mt-1", onClick: () => {
|
|
185
|
-
setProjects((prev) => prev.map((p) => p.projectId === row.projectId
|
|
186
|
-
? Object.assign(Object.assign({}, p), { clientExplanation: editedExplanation }) : p));
|
|
187
|
-
setEditingRowId(null);
|
|
188
|
-
} }))) : (react_1.default.createElement(base_ui_2.Button, { label: "Edit", iconLeft: react_1.default.createElement(base_icons_1.IconPencil, { size: 'sm' }), onClick: () => {
|
|
189
|
-
setEditedExplanation(row.clientExplanation);
|
|
190
|
-
setEditingRowId(row.projectId);
|
|
191
|
-
}, size: "sm", color: "info", className: "ml-6" }))),
|
|
192
|
-
react_1.default.createElement("p", null, row.clientExplanation),
|
|
193
|
-
react_1.default.createElement("b", { className: "flex flex-row flex-wrap justify-start items-center mt-2" },
|
|
194
|
-
"Supporting Documents:",
|
|
195
|
-
react_1.default.createElement("input", { id: "upload-file", type: "file", multiple: true, accept: ".pdf,.doc,.docx", style: { display: 'none' }, ref: fileInputRef, onChange: handleUpload }),
|
|
196
|
-
react_1.default.createElement(base_ui_2.Button, { label: "Add File", iconLeft: react_1.default.createElement(base_icons_1.IconPlus, { size: 'sm' }), onClick: () => { fileInputRef.current && fileInputRef.current.click(); }, size: 'sm', color: "info", className: "mx-2" }),
|
|
197
|
-
row.clientDocumentLinks && ((_b = row.clientDocumentLinks) === null || _b === void 0 ? void 0 : _b.map((f) => {
|
|
198
|
-
return react_1.default.createElement("div", { className: "mx-2" },
|
|
199
|
-
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: () => {
|
|
200
|
-
const updatedFiles = projects.map((p) => {
|
|
201
|
-
const updatedFiles = p.files.filter((file) => file !== f);
|
|
202
|
-
return Object.assign(Object.assign({}, p), { files: updatedFiles });
|
|
203
|
-
});
|
|
204
|
-
setProjects(updatedFiles);
|
|
205
|
-
} }));
|
|
206
|
-
})))),
|
|
207
|
-
react_1.default.createElement("div", { className: "flex flex-row w-[95%] m-2 ml-4 justify-start" },
|
|
208
|
-
react_1.default.createElement(DiscussionThread_1.DiscussionThread, { key: row.projectId, currentUser: user, initialThreads: clientInvoice.chatMessages, createDisputeChatMessage: createDisputeChatMessage }))))))));
|
|
209
|
-
})))));
|
|
9
|
+
const InvoiceHeader_1 = require("./InvoiceHeader");
|
|
10
|
+
const InvoiceDetails_1 = require("./InvoiceDetails");
|
|
11
|
+
const DisputeSection_1 = require("./DisputeSection");
|
|
12
|
+
const DiscussionSection_1 = require("./DiscussionSection");
|
|
13
|
+
const DecisionSection_1 = require("./DecisionSection");
|
|
14
|
+
const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceMutation, refetchInvoiceDisputes, }) => {
|
|
15
|
+
var _a, _b, _c;
|
|
16
|
+
return (react_1.default.createElement(base_ui_1.Card, { className: "w-full bg-white rounded-lg shadow-sm overflow-hidden" },
|
|
17
|
+
react_1.default.createElement(InvoiceHeader_1.InvoiceHeader, { invoice: clientInvoice }),
|
|
18
|
+
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, onUpdateDispute: updateClientInvoiceMutation, onRefetch: refetchInvoiceDisputes }),
|
|
21
|
+
(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 })),
|
|
22
|
+
((_c = user === null || user === void 0 ? void 0 : user.app_metadata) === null || _c === void 0 ? void 0 : _c.userTypeId) === 2 &&
|
|
23
|
+
react_1.default.createElement(DecisionSection_1.DecisionSection, { dispute: clientInvoice, onUpdateDispute: updateClientInvoiceMutation, onRefetch: refetchInvoiceDisputes }))));
|
|
210
24
|
};
|
|
211
25
|
exports.InvoiceCard = InvoiceCard;
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
exports.InvoiceDetails = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const base_ui_1 = require("@paro.io/base-ui");
|
|
9
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
10
|
+
const DisputeProjectCard_1 = require("./DisputeProjectCard");
|
|
11
|
+
const InvoiceDetails = ({ invoice }) => {
|
|
12
|
+
var _a;
|
|
13
|
+
const getStatusColor = (status) => {
|
|
14
|
+
switch (status) {
|
|
15
|
+
case 'InProgress':
|
|
16
|
+
return 'warning';
|
|
17
|
+
case 'UnderReview':
|
|
18
|
+
return 'info';
|
|
19
|
+
case 'Resolved':
|
|
20
|
+
return 'success';
|
|
21
|
+
default:
|
|
22
|
+
return 'default';
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return (react_1.default.createElement("div", { className: "space-y-6" },
|
|
26
|
+
react_1.default.createElement("div", { className: "flex items-center space-x-4" },
|
|
27
|
+
react_1.default.createElement(base_ui_1.Tag, { label: invoice === null || invoice === void 0 ? void 0 : invoice.status, variant: "subtle", color: getStatusColor(invoice === null || invoice === void 0 ? void 0 : invoice.status) }),
|
|
28
|
+
react_1.default.createElement("span", { className: "text-xs text-[#666666]" },
|
|
29
|
+
"Last updated: ",
|
|
30
|
+
(0, dayjs_1.default)(invoice === null || invoice === void 0 ? void 0 : invoice.disputeUpdatedDate).format('YYYY-MM-DD'))),
|
|
31
|
+
((_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" },
|
|
32
|
+
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 }))))))));
|
|
33
|
+
};
|
|
34
|
+
exports.InvoiceDetails = InvoiceDetails;
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
exports.InvoiceHeader = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
9
|
+
const InvoiceHeader = ({ invoice }) => {
|
|
10
|
+
var _a, _b, _c, _d;
|
|
11
|
+
return (react_1.default.createElement("div", { className: "bg-[#0F172A] text-white px-6 py-4 rounded-t-lg flex items-center justify-between font-arial" },
|
|
12
|
+
react_1.default.createElement("div", { className: "flex items-center space-x-8" },
|
|
13
|
+
react_1.default.createElement("div", null,
|
|
14
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Dispute Invoice #"),
|
|
15
|
+
react_1.default.createElement("span", { className: "ml-2" }, (_a = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _a === void 0 ? void 0 : _a.id)),
|
|
16
|
+
react_1.default.createElement("div", null,
|
|
17
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Dispute Date: "),
|
|
18
|
+
react_1.default.createElement("span", { className: "ml-2" }, (0, dayjs_1.default)(invoice === null || invoice === void 0 ? void 0 : invoice.disputeDate).format('MMM D, YYYY'))),
|
|
19
|
+
react_1.default.createElement("div", null,
|
|
20
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Invoice Date: "),
|
|
21
|
+
react_1.default.createElement("span", { className: "ml-2" }, (0, dayjs_1.default)((_b = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _b === void 0 ? void 0 : _b.dateGenerated).format('MMM D, YYYY')))),
|
|
22
|
+
react_1.default.createElement("div", null,
|
|
23
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Expert Name: "),
|
|
24
|
+
react_1.default.createElement("span", { className: "ml-2" }, (_c = invoice === null || invoice === void 0 ? void 0 : invoice.freelancer) === null || _c === void 0 ? void 0 :
|
|
25
|
+
_c.firstName,
|
|
26
|
+
" ", (_d = invoice === null || invoice === void 0 ? void 0 : invoice.freelancer) === null || _d === void 0 ? void 0 :
|
|
27
|
+
_d.lastName))));
|
|
28
|
+
};
|
|
29
|
+
exports.InvoiceHeader = InvoiceHeader;
|
|
@@ -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 {};
|