@paro.io/expert-shared-components 1.12.31 → 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' && ((_c = dispute === null || dispute === void 0 ? void 0 : dispute.disputeProjects) === null || _c === void 0 ? void 0 : _c.length) > 0;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.12.31",
3
+ "version": "1.12.32",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {