@rh-support/manage 2.1.44 → 2.1.46
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,mBAqMlC,CAAC"}
|
|
@@ -39,6 +39,13 @@ export const PartnershipsTermsModal = () => {
|
|
|
39
39
|
const onClose = () => {
|
|
40
40
|
if (isUpdating)
|
|
41
41
|
return;
|
|
42
|
+
if (ackChoice === 'accept' || ackChoice === 'decline') {
|
|
43
|
+
const navigationObj = {
|
|
44
|
+
pathname: '/manage/partnerships',
|
|
45
|
+
search: '',
|
|
46
|
+
};
|
|
47
|
+
history.replace(navigationObj);
|
|
48
|
+
}
|
|
42
49
|
ackChoice === 'decline' &&
|
|
43
50
|
ToastNotification.addDangerMessage(t('You have declined a partner collaboration request'));
|
|
44
51
|
setIsTermsModalOpen(false);
|
|
@@ -59,7 +66,7 @@ export const PartnershipsTermsModal = () => {
|
|
|
59
66
|
catch (error) {
|
|
60
67
|
const errorCode = parseInt((error === null || error === void 0 ? void 0 : error.code) || (error === null || error === void 0 ? void 0 : error.status)) || '';
|
|
61
68
|
const errorMessage = errorCode === 400 ? (React.createElement(Trans, null, "You are not authorized to accept or reject partner link.")) : errorCode === 404 ? (React.createElement(Trans, null, "Partner link is invalid. The link has been used or expired.")) : (React.createElement(Trans, null, "There was a problem and partner link cannot be verified at this moment. Please try again later."));
|
|
62
|
-
|
|
69
|
+
setIsVerifyingLink(false);
|
|
63
70
|
setVerificationFailMessage(errorMessage);
|
|
64
71
|
}
|
|
65
72
|
});
|
|
@@ -82,27 +89,33 @@ export const PartnershipsTermsModal = () => {
|
|
|
82
89
|
setIsUpdating(false);
|
|
83
90
|
setIsTermsVisited(false);
|
|
84
91
|
}
|
|
85
|
-
const navigationObj = {
|
|
86
|
-
pathname: '/manage/partnerships',
|
|
87
|
-
search: '',
|
|
88
|
-
};
|
|
89
|
-
history.replace(navigationObj);
|
|
90
92
|
});
|
|
91
|
-
verifyLink();
|
|
92
|
-
const decisionAccepted = /decision-\d+=accepted/gi.exec(location.search);
|
|
93
|
-
const decisionDeclined = /rejectedTnC=true/gi.exec(location.search);
|
|
94
|
-
const ackID = get(/ackID=(\d+)/gi.exec(location.search), [1]);
|
|
95
93
|
const showModal = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
+
const decisionAccepted = /decision-\d+=accepted/gi.exec(location.search);
|
|
95
|
+
const decisionDeclined = /rejectedTnC=true/gi.exec(location.search);
|
|
96
|
+
const ackID = get(/ackID=(\d+)/gi.exec(location.search), [1]);
|
|
96
97
|
if ((!!decisionAccepted && ackID) || !!decisionDeclined) {
|
|
98
|
+
// user visited terms and conditions page and declined/accepted the terms then redirected to pcm
|
|
97
99
|
const choice = !!decisionAccepted ? 'accept' : !!decisionDeclined ? 'decline' : undefined;
|
|
98
100
|
setAckChoice(choice);
|
|
99
101
|
yield termAck(choice);
|
|
100
102
|
}
|
|
103
|
+
else {
|
|
104
|
+
// verify if link before sending user to terms page to check if link is a valid link and not already used
|
|
105
|
+
verifyLink();
|
|
106
|
+
}
|
|
101
107
|
});
|
|
102
108
|
showModal();
|
|
103
109
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
104
110
|
}, [linkHash]);
|
|
105
|
-
|
|
111
|
+
const modalContentWhenTermIsVisited = () => isUpdating ? (React.createElement(LoadingIndicator, { show: true, size: "lg" })) : ackChoice === 'accept' ? (React.createElement(Trans, null, "Your partnership link is created successfully")) : ackChoice === 'decline' ? (React.createElement(Trans, null, "You have not accepted terms and conditions")) : (React.createElement(React.Fragment, null));
|
|
112
|
+
const modalContentBeforeTermVisited = () => isVerifyingLink ? (React.createElement("p", { className: "pf-v5-u-mt-xs" },
|
|
113
|
+
React.createElement(LoadingDots, { show: true, message: t('Verifying partner link') }))) : verificationFailMessage ? (React.createElement("p", { className: "pf-v5-u-mt-xs pf-v5-u-danger-color-100" }, verificationFailMessage)) : (React.createElement(React.Fragment, null,
|
|
114
|
+
React.createElement("p", null,
|
|
115
|
+
React.createElement(Trans, null, "A partner would like to collaborate with you for support when cases are shared. Please confirm the name below and continue to accept terms and conditions.")),
|
|
116
|
+
React.createElement(TextContent, { className: "pf-v5-u-mt-lg" },
|
|
117
|
+
React.createElement(Text, { component: TextVariants.h3 }, linkAccountName))));
|
|
118
|
+
return (React.createElement(Modal, { id: "partnership-terms-and-conditions-modal", className: "pf-modal-overflow-visible", title: t('Confirm partnership collaboration'), isOpen: isTermsModalOpen, onClose: onClose, showClose: true, onEscapePress: onClose, variant: ModalVariant.large, actions: !isTermVisited && !verificationFailMessage
|
|
106
119
|
? [
|
|
107
120
|
React.createElement(Button, { href: getTnCUrl(), component: "a", variant: ButtonVariant.primary, key: "go-to-agreement", "data-tracking-id": "go-to-agreement" },
|
|
108
121
|
React.createElement(ExternalLinkAltIcon, null),
|
|
@@ -116,9 +129,5 @@ export const PartnershipsTermsModal = () => {
|
|
|
116
129
|
React.createElement(Button, { key: "close-after-link-created", "data-tracking-id": "close-after-link-created", variant: ButtonVariant.primary, onClick: () => onClose(), isDisabled: isUpdating },
|
|
117
130
|
React.createElement(Trans, null, "Close")),
|
|
118
131
|
] },
|
|
119
|
-
React.createElement(React.Fragment, null,
|
|
120
|
-
React.createElement(LoadingDots, { show: true, message: t('Verifying partner link') }))))) : !isVerifyingLink && !isTermVisited ? (React.createElement(React.Fragment, null,
|
|
121
|
-
React.createElement("p", null, "A partner would like to collaborate with you for support when cases are shared. Please confirm the name below and continue to accept terms and conditions."),
|
|
122
|
-
React.createElement(TextContent, { className: "pf-v5-u-mt-lg" },
|
|
123
|
-
React.createElement(Text, { component: TextVariants.h3 }, linkAccountName)))) : isTermVisited && isUpdating ? (React.createElement(LoadingIndicator, { show: true, size: "lg" })) : isTermVisited && ackChoice === 'accept' ? (React.createElement("div", null, "Your partnership link is created successfully")) : (React.createElement("div", null, "You have not accepted terms and conditions")))));
|
|
132
|
+
React.createElement(React.Fragment, null, isTermVisited ? modalContentWhenTermIsVisited() : modalContentBeforeTermVisited())));
|
|
124
133
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/TopContentHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iCAAiC,EAEpC,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"TopContentHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/TopContentHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iCAAiC,EAEpC,MAAM,2DAA2D,CAAC;AAInE,OAAO,EAAE,oBAAoB,EAAwB,MAAM,qBAAqB,CAAC;AAEjF,eAAO,MAAM,gBAAgB,eAAgB,MAAM,WASlD,CAAC;AAEF,eAAO,MAAM,cAAc,6BAe1B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,eACb,oBAAoB,EAAE,iBACnB,iCAAiC,mBAC/B,MAAM,2BAqC1B,CAAC;AAEF,eAAO,MAAM,cAAc,oBAAqB,MAAM,KAAG,OAExD,CAAC;AAEF,eAAO,MAAM,qBAAqB,oBAAqB,MAAM,KAAG,OAE/D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.46",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/react-router-dom": "^5.1.2",
|
|
69
69
|
"i18next": "^19.0.1",
|
|
70
70
|
"identity-obj-proxy": "^3.0.0",
|
|
71
|
-
"react-test-renderer": "17.0.
|
|
71
|
+
"react-test-renderer": "17.0.2",
|
|
72
72
|
"tslib": "^1.10.0",
|
|
73
73
|
"typescript": "4.3.5"
|
|
74
74
|
},
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"@patternfly/patternfly": "5.1.0",
|
|
78
78
|
"@patternfly/react-core": "5.1.1",
|
|
79
79
|
"@patternfly/react-table": "5.1.1",
|
|
80
|
-
"@rh-support/components": "2.1.
|
|
81
|
-
"@rh-support/configs": "2.0.
|
|
82
|
-
"@rh-support/react-context": "2.1.
|
|
80
|
+
"@rh-support/components": "2.1.33",
|
|
81
|
+
"@rh-support/configs": "2.0.15",
|
|
82
|
+
"@rh-support/react-context": "2.1.36",
|
|
83
83
|
"@rh-support/types": "2.0.2",
|
|
84
|
-
"@rh-support/user-permissions": "2.1.
|
|
85
|
-
"@rh-support/utils": "2.1.
|
|
84
|
+
"@rh-support/user-permissions": "2.1.23",
|
|
85
|
+
"@rh-support/utils": "2.1.16",
|
|
86
86
|
"@types/react-beautiful-dnd": "^13.0.0",
|
|
87
87
|
"i18next": ">=17.0.1",
|
|
88
88
|
"lodash": ">=4.17.15",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"defaults and supports es6-module",
|
|
97
97
|
"maintained node versions"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "031565d4fcd752c2962e59c9e7fbf593e78acae9"
|
|
100
100
|
}
|