@paro.io/expert-shared-components 1.14.19 → 1.14.21

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.
@@ -46,6 +46,7 @@ const DecisionSection = ({ dispute, onUpdateDispute, updateInvoiceMutation, upda
46
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
+ const [resolutionNotes, setResolutionNotes] = (0, react_1.useState)((dispute === null || dispute === void 0 ? void 0 : dispute.internalResolution) || '');
49
50
  const [approvedHours, setApprovedHours] = (0, react_1.useState)(totalDisputeHours);
50
51
  const [projectApprovedHours, setProjectApprovedHours] = (0, react_1.useState)({});
51
52
  const [isSubmitting, setIsSubmitting] = (0, react_1.useState)(false);
@@ -165,6 +166,7 @@ const DecisionSection = ({ dispute, onUpdateDispute, updateInvoiceMutation, upda
165
166
  const updateData = {
166
167
  disputeId: dispute.disputeId,
167
168
  status: "Resolved",
169
+ internalResolution: resolutionNotes,
168
170
  approvedAmount: calculatedApprovedAmount,
169
171
  finalDecisionOwnerId: (user === null || user === void 0 ? void 0 : user.userId) || null,
170
172
  projectDisputes: disputeProjectUpdates
@@ -254,8 +256,11 @@ const DecisionSection = ({ dispute, onUpdateDispute, updateInvoiceMutation, upda
254
256
  `Total Approved Hours: ${getTotalApprovedHours().toFixed(2)} / ${totalDisputeHours} hours`) : (
255
257
  // All non-hourly disputes
256
258
  `Total Approved Amount: $${getTotalApprovedHours().toFixed(2)} / $${dispute.disputeProjects.reduce((sum, p) => sum + p.disputeAmount, 0).toFixed(2)}`)))),
259
+ react_1.default.createElement("div", { className: "flex flex-col" },
260
+ react_1.default.createElement(base_ui_1.Input, { value: resolutionNotes, onChange: (e) => setResolutionNotes(e.target.value), placeholder: "Provide details...", label: "Resolution Notes", isRequired: true }),
261
+ react_1.default.createElement("p", { className: 'text-xs' }, "The notes you provide here will be communicated to the Client and Expert")),
257
262
  react_1.default.createElement("div", { className: "flex justify-end space-x-4" },
258
- react_1.default.createElement(base_ui_1.Button, { label: "Approve & Resolve", color: "primary", onClick: handleApproveClick, isLoading: isSubmitting, disabled: !resolution || (resolution === 'PARTIAL' && !isValidPartialApproval()), size: "md" }))),
263
+ react_1.default.createElement(base_ui_1.Button, { label: "Approve & Resolve", color: "primary", onClick: handleApproveClick, isLoading: isSubmitting, disabled: !resolution || (resolution === 'PARTIAL' && !isValidPartialApproval()) || resolutionNotes === '', size: "md" }))),
259
264
  react_1.default.createElement(ProjectHoursAdjustmentModal_1.ProjectHoursAdjustmentModal, { isOpen: showHoursModal, onClose: () => setShowHoursModal(false), disputeProjects: (dispute === null || dispute === void 0 ? void 0 : dispute.disputeProjects) || [], dispute: dispute, onSubmit: handleHoursSubmit, isSubmitting: isSubmitting, getClientInvoiceSummaryByMonth: getClientInvoiceSummaryByMonth, getClientPendingPayouts: getClientPendingPayouts, invoiceSummary: invoiceSummary, approvedHours: resolution === 'PARTIAL' ? getTotalApprovedHours() : totalDisputeHours, projectApprovedHours: isPartialWithMultipleProjects ? projectApprovedHours : {}, user: user })));
260
265
  };
261
266
  exports.DecisionSection = DecisionSection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.14.19",
3
+ "version": "1.14.21",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {