@rh-support/troubleshoot 2.7.34 → 2.7.35

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":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB,+EA2H3B,CAAC"}
1
+ {"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB,+EAkI3B,CAAC"}
@@ -11,9 +11,14 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
11
11
  const { t } = useTranslation();
12
12
  const canEditCase = useCanEditCase();
13
13
  const { caseNumber, caseStatus, readOnly, waitingOnCallback } = props;
14
- const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
14
+ const { globalMetadataState: { loggedInUserJwtToken, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
15
15
  const isExternal = loggedInUserRights.data.isExternal();
16
16
  const isInternal = loggedInUserRights.data.isInternal();
17
+ const jwtSsoUsername = (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.preferred_username) ||
18
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.username) ||
19
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.RHAT_LOGIN) ||
20
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.REDHAT_LOGIN) ||
21
+ '';
17
22
  const [openNewESSRemoteSessionModal, setOpenNewESSRemoteSessionModal] = useState(false);
18
23
  // To toggle New ESS RS Modal
19
24
  const toggleNewESSRemoteSessionModal = () => {
@@ -52,5 +57,5 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
52
57
  React.createElement(Button, { "aria-label": waitingOnCallback ? t('Remote session requested') : t('Request remote session'), variant: waitingOnCallback ? 'primary' : 'secondary', onClick: toggleNewESSRemoteSessionModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isDisabled: canEditCase.isCaseNotEditable, isAriaDisabled: waitingOnCallback, ref: tooltipRef, className: "remote-session-button" }, waitingOnCallback ? t('Remote session requested') : t('Request remote session')))))));
53
58
  return (React.createElement(React.Fragment, null,
54
59
  ESSRemoteSessionSectionBody,
55
- React.createElement(NewEssTermsModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openNewESSRemoteSessionModal, onClose: toggleNewESSRemoteSessionModal, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
60
+ React.createElement(NewEssTermsModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openNewESSRemoteSessionModal, onClose: toggleNewESSRemoteSessionModal, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: jwtSsoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
56
61
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,+EA0HjC,CAAC"}
1
+ {"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,+EAiIjC,CAAC"}
@@ -11,9 +11,14 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
11
11
  const { t } = useTranslation();
12
12
  const canEditCase = useCanEditCase();
13
13
  const { caseNumber, caseStatus, acceptedRemoteSessionTerms, readOnly, waitingOnCallback } = props;
14
- const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
14
+ const { globalMetadataState: { loggedInUserJwtToken, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
15
15
  const isExternal = loggedInUserRights.data.isExternal();
16
16
  const isInternal = loggedInUserRights.data.isInternal();
17
+ const jwtSsoUsername = (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.preferred_username) ||
18
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.username) ||
19
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.RHAT_LOGIN) ||
20
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.REDHAT_LOGIN) ||
21
+ '';
17
22
  const [openRequestRemoteSessionModal, setOpenRequestRemoteSessionModal] = useState(false);
18
23
  // To toggle RSA Modal
19
24
  const toggleRemoteSessionAgreementModal = () => {
@@ -52,5 +57,5 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
52
57
  React.createElement(Button, { "aria-label": waitingOnCallback ? t('Remote session requested') : t('Request remote session'), variant: waitingOnCallback ? 'primary' : 'secondary', onClick: toggleRemoteSessionAgreementModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isDisabled: canEditCase.isCaseNotEditable, isAriaDisabled: waitingOnCallback, ref: tooltipRef, className: "remote-session-button" }, waitingOnCallback ? t('Remote session requested') : t('Request remote session')))))));
53
58
  return (React.createElement(React.Fragment, null,
54
59
  RemoteSessionAgreementSectionBody,
55
- React.createElement(RemoteSessionAgreementModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openRequestRemoteSessionModal, onClose: toggleRemoteSessionAgreementModal, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
60
+ React.createElement(RemoteSessionAgreementModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openRequestRemoteSessionModal, onClose: toggleRemoteSessionAgreementModal, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: jwtSsoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
56
61
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteRiderAcceptanceModal.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderAcceptanceModal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAK,EAAE,MAAM,qBAoF/D"}
1
+ {"version":3,"file":"RemoteRiderAcceptanceModal.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderAcceptanceModal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAK,EAAE,MAAM,qBAwF/D"}
@@ -19,7 +19,12 @@ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
19
19
  import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../hooks/useCaseComments';
20
20
  import { updateCaseDetailsGraphQL } from '../../reducers/CaseReducer';
21
21
  export default function RemoteRiderAcceptanceModal(props) {
22
- const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
22
+ const { globalMetadataState: { loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
23
+ const jwtSsoUsername = (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.preferred_username) ||
24
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.username) ||
25
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.RHAT_LOGIN) ||
26
+ (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.REDHAT_LOGIN) ||
27
+ '';
23
28
  const { t } = useTranslation();
24
29
  const apolloClient = useApolloClient();
25
30
  const caseDispatch = useCaseDispatch();
@@ -31,8 +36,8 @@ export default function RemoteRiderAcceptanceModal(props) {
31
36
  const onConfirm = (pdfId) => __awaiter(this, void 0, void 0, function* () {
32
37
  setIsSubmitting(true);
33
38
  try {
34
- yield request(TncConstants.REMOTE_RIDER_SITE_CODE, loggedInUser.data.ssoUsername, pdfId, 'accepted');
35
- const ackedByUserId = yield resolveSalesforceUserIdByFederationId(apolloClient, loggedInUser.data.ssoUsername);
39
+ yield request(TncConstants.REMOTE_RIDER_SITE_CODE, jwtSsoUsername, pdfId, 'accepted');
40
+ const ackedByUserId = yield resolveSalesforceUserIdByFederationId(apolloClient, jwtSsoUsername);
36
41
  if (!ackedByUserId) {
37
42
  throw new Error('Salesforce user id is required to acknowledge remote rider terms');
38
43
  }
@@ -63,5 +68,5 @@ export default function RemoteRiderAcceptanceModal(props) {
63
68
  setIsSubmitting(false);
64
69
  }
65
70
  });
66
- return (React.createElement(AcceptTermsModal, { isSubmitting: isSubmitting, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername, isModalOpen: props.isModalOpen, onModalClose: props.onModalClose, dataTrackingId: props.isCaseDetailsPage ? 'rar-case-details' : 'rar-case-submit', onConfirm: onConfirm }));
71
+ return (React.createElement(AcceptTermsModal, { isSubmitting: isSubmitting, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: jwtSsoUsername, isModalOpen: props.isModalOpen, onModalClose: props.onModalClose, dataTrackingId: props.isCaseDetailsPage ? 'rar-case-details' : 'rar-case-submit', onConfirm: onConfirm }));
67
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.7.34",
3
+ "version": "2.7.35",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -52,11 +52,11 @@
52
52
  "@progress/kendo-licensing": "1.3.5",
53
53
  "@progress/kendo-react-pdf": "^5.16.0",
54
54
  "@redux-devtools/extension": "^3.3.0",
55
- "@rh-support/components": "2.6.30",
56
- "@rh-support/react-context": "2.6.32",
55
+ "@rh-support/components": "2.6.31",
56
+ "@rh-support/react-context": "2.6.33",
57
57
  "@rh-support/types": "2.0.31",
58
- "@rh-support/user-permissions": "2.6.28",
59
- "@rh-support/utils": "2.6.27",
58
+ "@rh-support/user-permissions": "2.6.29",
59
+ "@rh-support/utils": "2.6.28",
60
60
  "@types/react-redux": "^7.1.33",
61
61
  "@types/redux": "^3.6.0",
62
62
  "date-fns": "3.6.0",
@@ -129,5 +129,5 @@
129
129
  "defaults and supports es6-module",
130
130
  "maintained node versions"
131
131
  ],
132
- "gitHead": "d2cd25f1bebe257d74cd823d8f7f8e5f724e0025"
132
+ "gitHead": "502b4ddee254af10ba0f905309e059d28cb59ff8"
133
133
  }