@paro.io/expert-shared-components 1.12.30 → 1.12.32
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.
|
@@ -43,14 +43,14 @@ const RESOLUTION_OPTIONS = [
|
|
|
43
43
|
{ value: 'PARTIAL', label: 'Partial Approval' },
|
|
44
44
|
];
|
|
45
45
|
const DecisionSection = ({ dispute, onUpdateDispute, updateInvoiceMutation, updateClientInvoiceDisputeMutation, invoiceSummary, user, getClientInvoiceSummaryByMonth, addClientCredit }) => {
|
|
46
|
-
var _a, _b, _c;
|
|
46
|
+
var _a, _b, _c, _d;
|
|
47
47
|
const totalDisputeHours = (_a = dispute === null || dispute === void 0 ? void 0 : dispute.disputeProjects) === null || _a === void 0 ? void 0 : _a.reduce((acc, project) => acc + (project === null || project === void 0 ? void 0 : project.disputeHours), 0);
|
|
48
48
|
const [resolution, setResolution] = (0, react_1.useState)('');
|
|
49
49
|
const [approvedHours, setApprovedHours] = (0, react_1.useState)(totalDisputeHours);
|
|
50
50
|
const [projectApprovedHours, setProjectApprovedHours] = (0, react_1.useState)({});
|
|
51
51
|
const [isSubmitting, setIsSubmitting] = (0, react_1.useState)(false);
|
|
52
52
|
const [showHoursModal, setShowHoursModal] = (0, react_1.useState)(false);
|
|
53
|
-
const isDisputePaid = ((_b = dispute === null || dispute === void 0 ? void 0 : dispute.invoice) === null || _b === void 0 ? void 0 : _b.clientInvoiceStatusId) === 4;
|
|
53
|
+
const isDisputePaid = ((_b = dispute === null || dispute === void 0 ? void 0 : dispute.invoice) === null || _b === void 0 ? void 0 : _b.clientInvoiceStatusId) === 4 || ((_c = dispute === null || dispute === void 0 ? void 0 : dispute.invoice) === null || _c === void 0 ? void 0 : _c.clientInvoiceStatusId) === 8;
|
|
54
54
|
// Initialize project approved hours when resolution changes to PARTIAL
|
|
55
55
|
const handleResolutionChange = (newResolution) => {
|
|
56
56
|
var _a;
|
|
@@ -189,7 +189,7 @@ const DecisionSection = ({ dispute, onUpdateDispute, updateInvoiceMutation, upda
|
|
|
189
189
|
setIsSubmitting(false);
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
|
-
const isPartialWithMultipleProjects = resolution === 'PARTIAL' && ((
|
|
192
|
+
const isPartialWithMultipleProjects = resolution === 'PARTIAL' && ((_d = dispute === null || dispute === void 0 ? void 0 : dispute.disputeProjects) === null || _d === void 0 ? void 0 : _d.length) > 0;
|
|
193
193
|
const isValidPartialApproval = () => {
|
|
194
194
|
if (resolution !== 'PARTIAL')
|
|
195
195
|
return true;
|
|
@@ -3,7 +3,6 @@ interface InvoiceDetailsProps {
|
|
|
3
3
|
isInternal: boolean;
|
|
4
4
|
isClient: boolean;
|
|
5
5
|
reactAppUrl?: string;
|
|
6
|
-
isLateDisputeAllowed?: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare const getStatusColor: (status: string) => "success" | "primary" | "info" | "warning";
|
|
9
8
|
export declare const getStatusText: (status: string) => "" | "Resolved" | "In Progress" | "Under Review";
|