@paro.io/expert-shared-components 1.14.21 → 1.14.23
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,7 +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 [
|
|
49
|
+
const [internalNote, setInternalNote] = (0, react_1.useState)((dispute === null || dispute === void 0 ? void 0 : dispute.internalNote) || '');
|
|
50
50
|
const [approvedHours, setApprovedHours] = (0, react_1.useState)(totalDisputeHours);
|
|
51
51
|
const [projectApprovedHours, setProjectApprovedHours] = (0, react_1.useState)({});
|
|
52
52
|
const [isSubmitting, setIsSubmitting] = (0, react_1.useState)(false);
|
|
@@ -166,7 +166,7 @@ const DecisionSection = ({ dispute, onUpdateDispute, updateInvoiceMutation, upda
|
|
|
166
166
|
const updateData = {
|
|
167
167
|
disputeId: dispute.disputeId,
|
|
168
168
|
status: "Resolved",
|
|
169
|
-
|
|
169
|
+
internalNote: internalNote,
|
|
170
170
|
approvedAmount: calculatedApprovedAmount,
|
|
171
171
|
finalDecisionOwnerId: (user === null || user === void 0 ? void 0 : user.userId) || null,
|
|
172
172
|
projectDisputes: disputeProjectUpdates
|
|
@@ -256,11 +256,10 @@ const DecisionSection = ({ dispute, onUpdateDispute, updateInvoiceMutation, upda
|
|
|
256
256
|
`Total Approved Hours: ${getTotalApprovedHours().toFixed(2)} / ${totalDisputeHours} hours`) : (
|
|
257
257
|
// All non-hourly disputes
|
|
258
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: "
|
|
260
|
-
react_1.default.createElement(base_ui_1.Input, { value:
|
|
261
|
-
react_1.default.createElement("p", { className: 'text-xs' }, "The notes you provide here will be communicated to the Client and Expert")),
|
|
259
|
+
react_1.default.createElement("div", { className: "w-full" },
|
|
260
|
+
react_1.default.createElement(base_ui_1.Input, { value: internalNote, onChange: (e) => setInternalNote(e.target.value), placeholder: "Provide details...", label: "Internal Note", isRequired: true })),
|
|
262
261
|
react_1.default.createElement("div", { className: "flex justify-end space-x-4" },
|
|
263
|
-
react_1.default.createElement(base_ui_1.Button, { label: "Approve & Resolve", color: "primary", onClick: handleApproveClick, isLoading: isSubmitting, disabled: !resolution || (resolution === 'PARTIAL' && !isValidPartialApproval()) ||
|
|
262
|
+
react_1.default.createElement(base_ui_1.Button, { label: "Approve & Resolve", color: "primary", onClick: handleApproveClick, isLoading: isSubmitting, disabled: !resolution || (resolution === 'PARTIAL' && !isValidPartialApproval()) || internalNote === '', size: "md" }))),
|
|
264
263
|
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 })));
|
|
265
264
|
};
|
|
266
265
|
exports.DecisionSection = DecisionSection;
|
package/package.json
CHANGED
|
@@ -1,67 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@paro.io/expert-shared-components",
|
|
3
|
-
"version": "1.14.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "tsc",
|
|
8
|
-
"prepare": "yarn build",
|
|
9
|
-
"test": "yarn test:build",
|
|
10
|
-
"test:build": "yarn build",
|
|
11
|
-
"clean": "yarn -rf lib",
|
|
12
|
-
"predeploy": "tsc && cp package.json README.md ./lib",
|
|
13
|
-
"link-local": "yarn link && cd node_modules/react && yarn link && cd ../react-dom && yarn link",
|
|
14
|
-
"unlink-local": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink"
|
|
15
|
-
},
|
|
16
|
-
"repository": "https://github.com/paroadmin/expert-shared-components.git",
|
|
17
|
-
"keywords": [
|
|
18
|
-
"react",
|
|
19
|
-
"components",
|
|
20
|
-
"shared"
|
|
21
|
-
],
|
|
22
|
-
"author": "apande@paro.io",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"@date-io/dayjs": "1.x",
|
|
26
|
-
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
27
|
-
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
28
|
-
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
29
|
-
"@hookform/resolvers": "3.3.4",
|
|
30
|
-
"@material-ui/core": "^4.11.0",
|
|
31
|
-
"@material-ui/icons": "^4.11.3",
|
|
32
|
-
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
33
|
-
"@material-ui/pickers": "^3.3.11",
|
|
34
|
-
"@paro.io/base-icons": "^1.0.4",
|
|
35
|
-
"@paro.io/base-ui": "^1.8.3",
|
|
36
|
-
"@types/react-input-mask": "^3.0.5",
|
|
37
|
-
"dayjs": "^1.10.7",
|
|
38
|
-
"lodash": "^4.17.21",
|
|
39
|
-
"react": "^18.2.0",
|
|
40
|
-
"react-copy-to-clipboard": "^5.0.4",
|
|
41
|
-
"react-datepicker": "^4.6.0",
|
|
42
|
-
"react-dom": "^17.0.2",
|
|
43
|
-
"react-hook-form": "7.51.1",
|
|
44
|
-
"react-hot-toast": "^2.4.1",
|
|
45
|
-
"react-input-mask": "^3.0.0-alpha.2",
|
|
46
|
-
"styled-components": "^5.3.3",
|
|
47
|
-
"uuid": "8.3.2",
|
|
48
|
-
"yup": "^0.32.11"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@types/lodash": "^4.14.170",
|
|
52
|
-
"@types/react": "18.3.12",
|
|
53
|
-
"@types/react-copy-to-clipboard": "^5.0.2",
|
|
54
|
-
"@types/react-datepicker": "^4.19.6",
|
|
55
|
-
"@types/react-dom": "^18.2.22",
|
|
56
|
-
"@types/styled-components": "^5.1.22",
|
|
57
|
-
"@types/uuid": "^10.0.0",
|
|
58
|
-
"@types/yup": "^0.29.13",
|
|
59
|
-
"typescript": "^5.3.3"
|
|
60
|
-
},
|
|
61
|
-
"files": [
|
|
62
|
-
"lib/**/*"
|
|
63
|
-
],
|
|
64
|
-
"directories": {
|
|
65
|
-
"lib": "lib"
|
|
66
|
-
}
|
|
67
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@paro.io/expert-shared-components",
|
|
3
|
+
"version": "1.14.23",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc",
|
|
8
|
+
"prepare": "yarn build",
|
|
9
|
+
"test": "yarn test:build",
|
|
10
|
+
"test:build": "yarn build",
|
|
11
|
+
"clean": "yarn -rf lib",
|
|
12
|
+
"predeploy": "tsc && cp package.json README.md ./lib",
|
|
13
|
+
"link-local": "yarn link && cd node_modules/react && yarn link && cd ../react-dom && yarn link",
|
|
14
|
+
"unlink-local": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink"
|
|
15
|
+
},
|
|
16
|
+
"repository": "https://github.com/paroadmin/expert-shared-components.git",
|
|
17
|
+
"keywords": [
|
|
18
|
+
"react",
|
|
19
|
+
"components",
|
|
20
|
+
"shared"
|
|
21
|
+
],
|
|
22
|
+
"author": "apande@paro.io",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@date-io/dayjs": "1.x",
|
|
26
|
+
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
27
|
+
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
28
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
29
|
+
"@hookform/resolvers": "3.3.4",
|
|
30
|
+
"@material-ui/core": "^4.11.0",
|
|
31
|
+
"@material-ui/icons": "^4.11.3",
|
|
32
|
+
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
33
|
+
"@material-ui/pickers": "^3.3.11",
|
|
34
|
+
"@paro.io/base-icons": "^1.0.4",
|
|
35
|
+
"@paro.io/base-ui": "^1.8.3",
|
|
36
|
+
"@types/react-input-mask": "^3.0.5",
|
|
37
|
+
"dayjs": "^1.10.7",
|
|
38
|
+
"lodash": "^4.17.21",
|
|
39
|
+
"react": "^18.2.0",
|
|
40
|
+
"react-copy-to-clipboard": "^5.0.4",
|
|
41
|
+
"react-datepicker": "^4.6.0",
|
|
42
|
+
"react-dom": "^17.0.2",
|
|
43
|
+
"react-hook-form": "7.51.1",
|
|
44
|
+
"react-hot-toast": "^2.4.1",
|
|
45
|
+
"react-input-mask": "^3.0.0-alpha.2",
|
|
46
|
+
"styled-components": "^5.3.3",
|
|
47
|
+
"uuid": "8.3.2",
|
|
48
|
+
"yup": "^0.32.11"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/lodash": "^4.14.170",
|
|
52
|
+
"@types/react": "18.3.12",
|
|
53
|
+
"@types/react-copy-to-clipboard": "^5.0.2",
|
|
54
|
+
"@types/react-datepicker": "^4.19.6",
|
|
55
|
+
"@types/react-dom": "^18.2.22",
|
|
56
|
+
"@types/styled-components": "^5.1.22",
|
|
57
|
+
"@types/uuid": "^10.0.0",
|
|
58
|
+
"@types/yup": "^0.29.13",
|
|
59
|
+
"typescript": "^5.3.3"
|
|
60
|
+
},
|
|
61
|
+
"files": [
|
|
62
|
+
"lib/**/*"
|
|
63
|
+
],
|
|
64
|
+
"directories": {
|
|
65
|
+
"lib": "lib"
|
|
66
|
+
},
|
|
67
|
+
"volta": {
|
|
68
|
+
"node": "16.17.1",
|
|
69
|
+
"yarn": "1.22.22"
|
|
70
|
+
}
|
|
71
|
+
}
|