@rh-support/manage 2.1.36 → 2.1.37

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,mBAsKlC,CAAC"}
1
+ {"version":3,"file":"PartnershipsTermsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsTermsModal.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,SAAS,WAMxB;AAID,eAAO,MAAM,sBAAsB,mBA0KlC,CAAC"}
@@ -39,6 +39,8 @@ export const PartnershipsTermsModal = () => {
39
39
  const onClose = () => {
40
40
  if (isUpdating)
41
41
  return;
42
+ ackChoice === 'decline' &&
43
+ ToastNotification.addDangerMessage(t('You have declined a partner collaboration request'));
42
44
  setIsTermsModalOpen(false);
43
45
  setIsTermsVisited(false);
44
46
  setAckChoice(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"Requests.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/Requests.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,WAAW,SAAU,MAAM,WAMvC,CAAC;AACF,wBAAgB,QAAQ,gBAiPvB"}
1
+ {"version":3,"file":"Requests.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/Requests.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,WAAW,SAAU,MAAM,WAMvC,CAAC;AACF,wBAAgB,QAAQ,gBAgRvB"}
@@ -160,6 +160,23 @@ export function Requests() {
160
160
  // silently fails
161
161
  }
162
162
  };
163
+ // when a customer rejects a link, as soon as partner visits
164
+ // the partnership page, a pop-up should show up and inform
165
+ // partner that customer has rejected the link
166
+ // to achieve this, we always save the last rejected link
167
+ // friendly name that is unique in user preferences data
168
+ const displayLinkIsRejectedPopUp = (currentLatestRejectedFriendlyName) => {
169
+ const lastSavedAcceptedFriendlyName = JSON.parse(getPreferenceByKey(UserPreferencesKeys.partnershipLastestRejectedLink));
170
+ if (lastSavedAcceptedFriendlyName === currentLatestRejectedFriendlyName)
171
+ return;
172
+ try {
173
+ updatePreferences(UserPreferencesKeys.partnershipLastestRejectedLink, JSON.stringify(currentLatestRejectedFriendlyName));
174
+ ToastNotification.addDangerMessage(t('Request rejected'), t('A customer has rejected your collaboration. Find them in the table below.'));
175
+ }
176
+ catch (e) {
177
+ // silently fails
178
+ }
179
+ };
163
180
  const getStatuses = () => __awaiter(this, void 0, void 0, function* () {
164
181
  setIsFetchingStatuses(true);
165
182
  try {
@@ -172,6 +189,9 @@ export function Requests() {
172
189
  const lastStatusesAccepted = yield pcm.partnerships.getPartnerLinksStatuses(1, 1, ['accepted']);
173
190
  if (lastStatusesAccepted && lastStatusesAccepted[0])
174
191
  displayLinkIsVerifiedPopUp(lastStatusesAccepted[0].friendlyName);
192
+ const lastStatusesRejected = yield pcm.partnerships.getPartnerLinksStatuses(1, 1, ['declined']);
193
+ if (lastStatusesRejected && lastStatusesRejected[0])
194
+ displayLinkIsRejectedPopUp(lastStatusesRejected[0].friendlyName);
175
195
  setIsFetchingStatuses(false);
176
196
  }
177
197
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "2.1.36",
3
+ "version": "2.1.37",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -46,7 +46,7 @@
46
46
  "prepublishOnly": "npm run build"
47
47
  },
48
48
  "peerDependencies": {
49
- "@cee-eng/hydrajs": "4.16.33",
49
+ "@cee-eng/hydrajs": "4.16.39",
50
50
  "@patternfly/patternfly": "5.1.0",
51
51
  "@patternfly/pfe-accordion": "1.12.3",
52
52
  "@patternfly/pfe-collapse": "1.12.3",
@@ -77,19 +77,19 @@
77
77
  "typescript": "4.3.5"
78
78
  },
79
79
  "dependencies": {
80
- "@cee-eng/hydrajs": "4.16.33",
80
+ "@cee-eng/hydrajs": "4.16.39",
81
81
  "@patternfly/patternfly": "5.1.0",
82
82
  "@patternfly/pfe-accordion": "1.12.3",
83
83
  "@patternfly/pfe-collapse": "1.12.3",
84
84
  "@patternfly/pfe-tabs": "1.12.3",
85
85
  "@patternfly/react-core": "5.1.1",
86
86
  "@patternfly/react-table": "5.1.1",
87
- "@rh-support/components": "2.1.27",
87
+ "@rh-support/components": "2.1.28",
88
88
  "@rh-support/configs": "2.0.12",
89
- "@rh-support/react-context": "2.1.30",
89
+ "@rh-support/react-context": "2.1.31",
90
90
  "@rh-support/types": "2.0.2",
91
- "@rh-support/user-permissions": "2.1.19",
92
- "@rh-support/utils": "2.1.12",
91
+ "@rh-support/user-permissions": "2.1.20",
92
+ "@rh-support/utils": "2.1.13",
93
93
  "@types/react-beautiful-dnd": "^13.0.0",
94
94
  "i18next": ">=17.0.1",
95
95
  "lodash": ">=4.17.15",
@@ -103,5 +103,5 @@
103
103
  "defaults and supports es6-module",
104
104
  "maintained node versions"
105
105
  ],
106
- "gitHead": "8e4f76b9f341bc33c3cc44b081efb0ffe45f270a"
106
+ "gitHead": "d17dacfd35aa08c446f37c8f0f92760346b8eb7a"
107
107
  }