@paro.io/expert-shared-components 1.12.12 → 1.12.14
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.js +4 -2
- package/lib/components/Invoices/InvoiceCard.d.ts +3 -1
- package/lib/components/Invoices/InvoiceCard.js +29 -11
- package/lib/components/Invoices/InvoiceDetails.d.ts +3 -1
- package/lib/components/Invoices/InvoiceDetails.js +7 -4
- package/lib/components/Invoices/InvoiceHeader.d.ts +3 -1
- package/lib/components/Invoices/InvoiceHeader.js +29 -12
- 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
|
@@ -26,28 +26,46 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.InvoiceCard = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const base_ui_1 = require("@paro.io/base-ui");
|
|
29
|
+
const core_1 = require("@material-ui/core");
|
|
30
|
+
const base_icons_1 = require("@paro.io/base-icons");
|
|
29
31
|
const InvoiceHeader_1 = require("./InvoiceHeader");
|
|
30
32
|
const InvoiceDetails_1 = require("./InvoiceDetails");
|
|
31
33
|
const DisputeSection_1 = require("./DisputeSection");
|
|
32
34
|
const DiscussionSection_1 = require("./DiscussionSection");
|
|
33
35
|
const DecisionSection_1 = require("./DecisionSection");
|
|
34
36
|
const ClientDisputeProjectCard_1 = require("./ClientDisputeProjectCard");
|
|
35
|
-
const
|
|
37
|
+
const useStyles = (0, core_1.makeStyles)((theme) => ({
|
|
38
|
+
accordionSummary: {
|
|
39
|
+
backgroundColor: '#0F172A',
|
|
40
|
+
'& .MuiAccordionSummary-expandIcon': {
|
|
41
|
+
color: 'white',
|
|
42
|
+
},
|
|
43
|
+
'&:hover': {
|
|
44
|
+
backgroundColor: '#1E293B',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
}));
|
|
48
|
+
const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, documentUploadUrl, downloadDocumentUrl, isInternal = false, isClient = false, bucketName, reactAppUrl }) => {
|
|
36
49
|
var _a, _b;
|
|
37
50
|
const [currentInvoice, setCurrentInvoice] = (0, react_1.useState)(clientInvoice);
|
|
51
|
+
const classes = useStyles();
|
|
38
52
|
(0, react_1.useEffect)(() => {
|
|
39
53
|
setCurrentInvoice(clientInvoice);
|
|
40
54
|
}, [clientInvoice]);
|
|
55
|
+
const disputeId = (_b = (_a = currentInvoice === null || currentInvoice === void 0 ? void 0 : currentInvoice.disputeProjects) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.disputeId;
|
|
41
56
|
return (react_1.default.createElement(base_ui_1.Card, { className: "w-full bg-white rounded-lg shadow-sm overflow-hidden mb-4" },
|
|
42
|
-
react_1.default.createElement(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
react_1.default.createElement(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
react_1.default.createElement(core_1.Accordion, null,
|
|
58
|
+
react_1.default.createElement(core_1.AccordionSummary, { expandIcon: react_1.default.createElement(base_icons_1.IconChevronDown, null), "aria-controls": "invoice-content", id: "invoice-header", className: classes.accordionSummary },
|
|
59
|
+
react_1.default.createElement(InvoiceHeader_1.InvoiceHeader, { invoice: currentInvoice, isInternal: isInternal, isClient: isClient })),
|
|
60
|
+
react_1.default.createElement(core_1.AccordionDetails, null,
|
|
61
|
+
react_1.default.createElement("div", { className: "p-6 space-y-6 w-full" },
|
|
62
|
+
react_1.default.createElement(InvoiceDetails_1.InvoiceDetails, { invoice: currentInvoice, isInternal: isInternal, isClient: isClient, reactAppUrl: reactAppUrl }),
|
|
63
|
+
isInternal ?
|
|
64
|
+
react_1.default.createElement(DisputeSection_1.DisputeSection, { dispute: currentInvoice, documentUploadUrl: documentUploadUrl, updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName })
|
|
65
|
+
:
|
|
66
|
+
react_1.default.createElement(ClientDisputeProjectCard_1.ClientDisputeProjectCard, { clientInvoice: currentInvoice, updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation, documentUploadUrl: documentUploadUrl, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName }),
|
|
67
|
+
(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 })),
|
|
68
|
+
isInternal &&
|
|
69
|
+
react_1.default.createElement(DecisionSection_1.DecisionSection, { dispute: currentInvoice, onUpdateDispute: updateClientInvoiceDisputeMutation }))))));
|
|
52
70
|
};
|
|
53
71
|
exports.InvoiceCard = InvoiceCard;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
interface InvoiceDetailsProps {
|
|
2
2
|
invoice: any;
|
|
3
3
|
isInternal: boolean;
|
|
4
|
+
isClient: boolean;
|
|
5
|
+
reactAppUrl?: string;
|
|
4
6
|
}
|
|
5
|
-
export declare const InvoiceDetails: ({ invoice, isInternal }: InvoiceDetailsProps) => JSX.Element;
|
|
7
|
+
export declare const InvoiceDetails: ({ invoice, isInternal, isClient, reactAppUrl }: InvoiceDetailsProps) => JSX.Element;
|
|
6
8
|
export {};
|
|
@@ -8,8 +8,8 @@ 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, isInternal = false }) => {
|
|
12
|
-
var _a;
|
|
11
|
+
const InvoiceDetails = ({ invoice, isInternal = false, isClient = false, reactAppUrl = 'https://internal.parodev.io' }) => {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
13
13
|
const getStatusColor = (status) => {
|
|
14
14
|
switch (status) {
|
|
15
15
|
case 'InProgress':
|
|
@@ -22,6 +22,8 @@ const InvoiceDetails = ({ invoice, isInternal = false }) => {
|
|
|
22
22
|
return 'primary';
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
+
const clientInvoiceUrl = `${reactAppUrl}/invoices/${(_a = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _a === void 0 ? void 0 : _a.id}?month=${(_b = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _b === void 0 ? void 0 : _b.month}&companyId=${(_c = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _c === void 0 ? void 0 : _c.clientId}`;
|
|
26
|
+
const internalInvoiceUrl = `${reactAppUrl}/client/${(_d = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _d === void 0 ? void 0 : _d.clientId}/invoices/${(_e = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _e === void 0 ? void 0 : _e.id}?month=${(_f = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _f === void 0 ? void 0 : _f.month}`;
|
|
25
27
|
return (react_1.default.createElement("div", { className: "space-y-6" },
|
|
26
28
|
react_1.default.createElement("div", { className: "flex items-center space-x-4" },
|
|
27
29
|
react_1.default.createElement(core_1.Chip, { label: invoice === null || invoice === void 0 ? void 0 : invoice.status, size: "small", variant: "outlined",
|
|
@@ -29,8 +31,9 @@ const InvoiceDetails = ({ invoice, isInternal = false }) => {
|
|
|
29
31
|
color: getStatusColor(invoice === null || invoice === void 0 ? void 0 : invoice.status) }),
|
|
30
32
|
react_1.default.createElement("span", { className: "text-xs text-[#666666]" },
|
|
31
33
|
"Last updated: ",
|
|
32
|
-
(0, dayjs_1.default)(invoice === null || invoice === void 0 ? void 0 : invoice.disputeUpdatedDate).format('MMM D, YYYY'))
|
|
33
|
-
|
|
34
|
+
(0, dayjs_1.default)(invoice === null || invoice === void 0 ? void 0 : invoice.disputeUpdatedDate).format('MMM D, YYYY')),
|
|
35
|
+
(isInternal || isClient) && (react_1.default.createElement("a", { href: isInternal ? internalInvoiceUrl : clientInvoiceUrl, target: "_blank", rel: "noopener noreferrer", className: "text-sm text-[#248384] hover:text-[#195C5C]" }, "View Invoice"))),
|
|
36
|
+
isInternal && ((_g = invoice === null || invoice === void 0 ? void 0 : invoice.disputeProjects) === null || _g === void 0 ? void 0 : _g.length) > 0 && (react_1.default.createElement("div", { className: "space-y-4" },
|
|
34
37
|
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
38
|
};
|
|
36
39
|
exports.InvoiceDetails = InvoiceDetails;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
interface InvoiceHeaderProps {
|
|
2
2
|
invoice: any;
|
|
3
|
+
isInternal: boolean;
|
|
4
|
+
isClient: boolean;
|
|
3
5
|
}
|
|
4
|
-
export declare const InvoiceHeader: ({ invoice }: InvoiceHeaderProps) => JSX.Element;
|
|
6
|
+
export declare const InvoiceHeader: ({ invoice, isInternal, isClient }: InvoiceHeaderProps) => JSX.Element;
|
|
5
7
|
export {};
|
|
@@ -6,24 +6,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.InvoiceHeader = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
9
|
-
const InvoiceHeader = ({ invoice }) => {
|
|
10
|
-
var _a, _b, _c, _d;
|
|
11
|
-
|
|
9
|
+
const InvoiceHeader = ({ invoice, isInternal = false, isClient = false }) => {
|
|
10
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11
|
+
const disputeAmount = (_a = invoice === null || invoice === void 0 ? void 0 : invoice.disputeProjects) === null || _a === void 0 ? void 0 : _a.reduce((acc, project) => acc + (project === null || project === void 0 ? void 0 : project.disputeAmount), 0);
|
|
12
|
+
return (react_1.default.createElement("div", { className: "bg-[#0F172A] w-full text-white px-6 py-4 rounded-t-lg flex items-center justify-between font-arial" },
|
|
12
13
|
react_1.default.createElement("div", { className: "flex items-center space-x-8" },
|
|
13
14
|
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" }, (
|
|
15
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Dispute Invoice #: "),
|
|
16
|
+
react_1.default.createElement("span", { className: "ml-2" }, (_b = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _b === void 0 ? void 0 : _b.id)),
|
|
17
|
+
!isClient && (react_1.default.createElement("div", null,
|
|
18
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Client: "),
|
|
19
|
+
react_1.default.createElement("span", { className: "ml-2" }, (_c = invoice === null || invoice === void 0 ? void 0 : invoice.client) === null || _c === void 0 ? void 0 : _c.name))),
|
|
20
|
+
react_1.default.createElement("div", null,
|
|
21
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Amount: "),
|
|
22
|
+
react_1.default.createElement("span", { className: "ml-2" },
|
|
23
|
+
"$",
|
|
24
|
+
disputeAmount)),
|
|
16
25
|
react_1.default.createElement("div", null,
|
|
17
26
|
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Dispute Date: "),
|
|
18
27
|
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
28
|
react_1.default.createElement("div", null,
|
|
20
29
|
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)((
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
30
|
+
react_1.default.createElement("span", { className: "ml-2" }, (0, dayjs_1.default)((_d = invoice === null || invoice === void 0 ? void 0 : invoice.invoice) === null || _d === void 0 ? void 0 : _d.dateGenerated).format('MMM D, YYYY'))),
|
|
31
|
+
react_1.default.createElement("div", null,
|
|
32
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Dispute Status: "),
|
|
33
|
+
react_1.default.createElement("span", { className: "ml-2" }, (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "InProgress" ? "In Progress" : invoice === null || invoice === void 0 ? void 0 : invoice.status)),
|
|
34
|
+
(invoice === null || invoice === void 0 ? void 0 : invoice.approvedAmount) && (react_1.default.createElement("div", null,
|
|
35
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Approved Amount: "),
|
|
36
|
+
react_1.default.createElement("span", { className: "ml-2" },
|
|
37
|
+
"$", invoice === null || invoice === void 0 ? void 0 :
|
|
38
|
+
invoice.approvedAmount))),
|
|
39
|
+
!isInternal && (react_1.default.createElement("div", null,
|
|
40
|
+
react_1.default.createElement("span", { className: "text-sm font-bold" }, "Expert Name: "),
|
|
41
|
+
react_1.default.createElement("span", { className: "ml-2" }, (_e = invoice === null || invoice === void 0 ? void 0 : invoice.freelancer) === null || _e === void 0 ? void 0 :
|
|
42
|
+
_e.firstName,
|
|
43
|
+
" ", (_f = invoice === null || invoice === void 0 ? void 0 : invoice.freelancer) === null || _f === void 0 ? void 0 :
|
|
44
|
+
_f.lastName))))));
|
|
28
45
|
};
|
|
29
46
|
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 {};
|