@rh-support/manage 2.1.43 → 2.1.44
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartnershipsTermsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsTermsModal.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,SAAS,WAMxB;AAID,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"PartnershipsTermsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsTermsModal.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,SAAS,WAMxB;AAID,eAAO,MAAM,sBAAsB,mBA0LlC,CAAC"}
|
|
@@ -66,30 +66,40 @@ export const PartnershipsTermsModal = () => {
|
|
|
66
66
|
const termAck = (ackResponse) => __awaiter(void 0, void 0, void 0, function* () {
|
|
67
67
|
setIsUpdating(true);
|
|
68
68
|
setAckChoice(ackResponse);
|
|
69
|
+
setIsTermsModalOpen(false);
|
|
69
70
|
try {
|
|
70
71
|
yield pcm.partnerships.partnerLinkAckResponse(linkHash, ackResponse);
|
|
71
72
|
setIsUpdating(false);
|
|
72
73
|
setIsUpdatingAccounts(dispatch, true);
|
|
74
|
+
setIsTermsVisited(true);
|
|
75
|
+
setIsTermsModalOpen(true);
|
|
73
76
|
}
|
|
74
77
|
catch (e) {
|
|
75
|
-
|
|
78
|
+
const errorDetail = e.detailMessage || '';
|
|
79
|
+
const errorBody = errorDetail ? (errorDetail) : (React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => setIsTermsModalOpen(true) },
|
|
76
80
|
React.createElement(Trans, null, "Try again")));
|
|
81
|
+
ToastNotification.addDangerMessage(ackResponse === 'accept' ? t('Failed to add partnership.') : t('Failed to decline partnership.'), errorBody);
|
|
77
82
|
setIsUpdating(false);
|
|
83
|
+
setIsTermsVisited(false);
|
|
78
84
|
}
|
|
79
|
-
|
|
85
|
+
const navigationObj = {
|
|
86
|
+
pathname: '/manage/partnerships',
|
|
80
87
|
search: '',
|
|
81
|
-
}
|
|
88
|
+
};
|
|
89
|
+
history.replace(navigationObj);
|
|
82
90
|
});
|
|
83
91
|
verifyLink();
|
|
84
92
|
const decisionAccepted = /decision-\d+=accepted/gi.exec(location.search);
|
|
85
93
|
const decisionDeclined = /rejectedTnC=true/gi.exec(location.search);
|
|
86
94
|
const ackID = get(/ackID=(\d+)/gi.exec(location.search), [1]);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
const showModal = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
96
|
+
if ((!!decisionAccepted && ackID) || !!decisionDeclined) {
|
|
97
|
+
const choice = !!decisionAccepted ? 'accept' : !!decisionDeclined ? 'decline' : undefined;
|
|
98
|
+
setAckChoice(choice);
|
|
99
|
+
yield termAck(choice);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
showModal();
|
|
93
103
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
104
|
}, [linkHash]);
|
|
95
105
|
return (React.createElement(Modal, { id: "partnership-terms-and-conditions-modal", className: "pf-modal-overflow-visible", title: 'Confirm partnership collaboration', isOpen: isTermsModalOpen, onClose: onClose, showClose: true, onEscapePress: onClose, variant: ModalVariant.large, actions: !isTermVisited
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.44",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"defaults and supports es6-module",
|
|
97
97
|
"maintained node versions"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "d52b9ccf062855933cbb1da3dac7f4c6a2694671"
|
|
100
100
|
}
|