@paro.io/expert-shared-components 1.14.11 → 1.14.12

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.
@@ -13,9 +13,10 @@ interface InvoiceCardProps {
13
13
  isClient?: boolean;
14
14
  bucketName?: string;
15
15
  reactAppUrl?: string;
16
+ internalPortalBaseUrl?: string;
16
17
  addClientCredit?: any;
17
18
  isLateDisputeAllowed?: boolean;
18
19
  uploadExpertClientFiles?: any;
19
20
  }
20
- export declare const InvoiceCard: ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, uploadExpertClientFiles, updateInvoiceMutation, getClientInvoiceSummaryByMonth, invoiceSummary, documentUploadUrl, downloadDocumentUrl, isInternal, isClient, bucketName, reactAppUrl, addClientCredit, isLateDisputeAllowed }: InvoiceCardProps) => JSX.Element;
21
+ export declare const InvoiceCard: ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, uploadExpertClientFiles, updateInvoiceMutation, getClientInvoiceSummaryByMonth, invoiceSummary, documentUploadUrl, downloadDocumentUrl, isInternal, isClient, bucketName, reactAppUrl, internalPortalBaseUrl, addClientCredit, isLateDisputeAllowed }: InvoiceCardProps) => JSX.Element;
21
22
  export {};
@@ -34,7 +34,7 @@ const DisputeSection_1 = require("./DisputeSection");
34
34
  const DiscussionSection_1 = require("./DiscussionSection");
35
35
  const DecisionSection_1 = require("./DecisionSection");
36
36
  const ClientDisputeProjectCard_1 = require("./ClientDisputeProjectCard");
37
- const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, uploadExpertClientFiles, updateInvoiceMutation, getClientInvoiceSummaryByMonth, invoiceSummary, documentUploadUrl, downloadDocumentUrl, isInternal = false, isClient = false, bucketName, reactAppUrl, addClientCredit, isLateDisputeAllowed = false }) => {
37
+ const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user, chatMessages, updateClientInvoiceDisputeMutation, uploadExpertClientFiles, updateInvoiceMutation, getClientInvoiceSummaryByMonth, invoiceSummary, documentUploadUrl, downloadDocumentUrl, isInternal = false, isClient = false, bucketName, reactAppUrl, internalPortalBaseUrl, addClientCredit, isLateDisputeAllowed = false }) => {
38
38
  var _a;
39
39
  const rolesUrl = `${reactAppUrl}/roles`;
40
40
  const [currentInvoice, setCurrentInvoice] = (0, react_1.useState)(clientInvoice);
@@ -49,7 +49,7 @@ const InvoiceCard = ({ clientInvoice, createDisputeChatMessage, user, chatMessag
49
49
  react_1.default.createElement(InvoiceHeader_1.InvoiceHeader, { invoice: currentInvoice, isInternal: isInternal, isClient: isClient })),
50
50
  react_1.default.createElement(core_1.AccordionDetails, null,
51
51
  react_1.default.createElement("div", { className: "p-6 space-y-6 w-full" },
52
- react_1.default.createElement(InvoiceDetails_1.InvoiceDetails, { invoice: currentInvoice, isInternal: isInternal, isClient: isClient, reactAppUrl: reactAppUrl, isLateDisputeAllowed: isLateDisputeAllowed }),
52
+ react_1.default.createElement(InvoiceDetails_1.InvoiceDetails, { invoice: currentInvoice, isInternal: isInternal, isClient: isClient, internalPortalBaseUrl: internalPortalBaseUrl, isLateDisputeAllowed: isLateDisputeAllowed }),
53
53
  isInternal ?
54
54
  react_1.default.createElement(DisputeSection_1.DisputeSection, { dispute: currentInvoice, documentUploadUrl: documentUploadUrl, uploadExpertClientFiles: uploadExpertClientFiles, updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation, downloadDocumentUrl: downloadDocumentUrl, bucketName: bucketName, isInternal: isInternal, hasDisputeAdminRole: hasDisputeAdminRole })
55
55
  :
@@ -2,10 +2,10 @@ interface InvoiceDetailsProps {
2
2
  invoice: any;
3
3
  isInternal: boolean;
4
4
  isClient: boolean;
5
- reactAppUrl?: string;
5
+ internalPortalBaseUrl?: string;
6
6
  isLateDisputeAllowed?: boolean;
7
7
  }
8
8
  export declare const getStatusColor: (status: string) => "success" | "primary" | "info" | "warning";
9
9
  export declare const getStatusText: (status: string) => "" | "Resolved" | "In Progress" | "Under Review";
10
- export declare const InvoiceDetails: ({ invoice, isInternal, isClient, reactAppUrl, isLateDisputeAllowed }: InvoiceDetailsProps) => JSX.Element;
10
+ export declare const InvoiceDetails: ({ invoice, isInternal, isClient, internalPortalBaseUrl, isLateDisputeAllowed }: InvoiceDetailsProps) => JSX.Element;
11
11
  export {};
@@ -34,10 +34,10 @@ const getStatusText = (status) => {
34
34
  }
35
35
  };
36
36
  exports.getStatusText = getStatusText;
37
- const InvoiceDetails = ({ invoice, isInternal = false, isClient = false, reactAppUrl = 'https://internal.parodev.io', isLateDisputeAllowed = false }) => {
37
+ const InvoiceDetails = ({ invoice, isInternal = false, isClient = false, internalPortalBaseUrl = 'https://internal.parodev.io', isLateDisputeAllowed = false }) => {
38
38
  var _a, _b, _c, _d, _e, _f, _g;
39
- 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}`;
40
- 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}`;
39
+ const clientInvoiceUrl = `${internalPortalBaseUrl}/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}`;
40
+ const internalInvoiceUrl = `${internalPortalBaseUrl}/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}`;
41
41
  const today = (0, dayjs_1.default)();
42
42
  const firstDayOfMonth = (0, dayjs_1.default)().startOf('month');
43
43
  const disputeDaysLeft = 14 - today.diff(firstDayOfMonth, 'day');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.14.11",
3
+ "version": "1.14.12",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {