@rh-support/troubleshoot 2.6.300 → 2.6.302

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.
Files changed (221) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +28 -40
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +52 -14
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +51 -31
  7. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/Case.js +50 -18
  9. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +25 -8
  11. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +57 -34
  13. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
  14. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  16. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
  17. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
  19. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/CaseOverview/index.js +43 -30
  21. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +76 -30
  23. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
  24. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +3 -3
  26. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
  27. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  28. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +3 -4
  29. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  30. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +13 -17
  31. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +19 -43
  33. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +17 -40
  35. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +3 -0
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +22 -0
  38. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +44 -41
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +8 -7
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +38 -18
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +19 -59
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +110 -148
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +5 -5
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +15 -0
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +19 -0
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +49 -0
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +6 -2
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +147 -241
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +5 -3
  68. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  69. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
  70. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  71. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
  72. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  73. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
  74. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
  75. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  76. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
  77. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  78. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
  79. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  80. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +30 -52
  81. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  82. package/lib/esm/components/CaseInformation/CaseGroup.js +68 -46
  83. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  84. package/lib/esm/components/CaseInformation/CaseInformation.js +7 -5
  85. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  86. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +37 -24
  87. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  88. package/lib/esm/components/CaseInformation/SupportLevel.js +32 -55
  89. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  90. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  91. package/lib/esm/components/CaseManagement/CaseManagement.js +4 -7
  92. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  93. package/lib/esm/components/CaseManagement/Cep.js +4 -7
  94. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  95. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +19 -9
  96. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  97. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +60 -34
  98. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  99. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
  100. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  101. package/lib/esm/components/IdeaInformation/IdeaInformation.js +13 -14
  102. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  103. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
  104. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
  105. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  106. package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
  107. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  108. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
  109. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  110. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +30 -50
  111. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  112. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
  113. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  114. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
  115. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  116. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
  117. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  118. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +9 -7
  119. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  120. package/lib/esm/components/Review/Review.js +16 -16
  121. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  122. package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
  123. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  124. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +5 -8
  125. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  126. package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
  127. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +3 -1
  128. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  129. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +76 -4
  130. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  131. package/lib/esm/components/shared/useIsSectionValid.js +50 -64
  132. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  133. package/lib/esm/components/shared/usePostComment.js +16 -28
  134. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  135. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +120 -24
  136. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  137. package/lib/esm/components/wizardLayout/WizardLayout.js +6 -7
  138. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  139. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -9
  140. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  141. package/lib/esm/graphql/index.d.ts +4 -0
  142. package/lib/esm/graphql/index.d.ts.map +1 -0
  143. package/lib/esm/graphql/index.js +3 -0
  144. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
  145. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
  146. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
  147. package/lib/esm/graphql/mutations/index.d.ts +2 -0
  148. package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
  149. package/lib/esm/graphql/mutations/index.js +1 -0
  150. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
  151. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
  152. package/lib/esm/graphql/queries/getEscalationDetails.js +24 -0
  153. package/lib/esm/graphql/queries/getParentId.d.ts +2 -0
  154. package/lib/esm/graphql/queries/getParentId.d.ts.map +1 -0
  155. package/lib/esm/graphql/queries/getParentId.js +16 -0
  156. package/lib/esm/graphql/queries/index.d.ts +3 -0
  157. package/lib/esm/graphql/queries/index.d.ts.map +1 -0
  158. package/lib/esm/graphql/queries/index.js +2 -0
  159. package/lib/esm/graphql/schemas/escalation.d.ts +84 -0
  160. package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
  161. package/lib/esm/graphql/schemas/escalation.js +1 -0
  162. package/lib/esm/graphql/schemas/index.d.ts +2 -0
  163. package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
  164. package/lib/esm/graphql/schemas/index.js +1 -0
  165. package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts +4 -0
  166. package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts.map +1 -0
  167. package/lib/esm/hooks/useCaseComments/caseCommentMutation.js +12 -0
  168. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
  169. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
  170. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +55 -0
  171. package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
  172. package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
  173. package/lib/esm/hooks/useCaseComments/index.js +5 -0
  174. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
  175. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
  176. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +66 -0
  177. package/lib/esm/hooks/useCaseComments/types.d.ts +80 -0
  178. package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
  179. package/lib/esm/hooks/useCaseComments/types.js +1 -0
  180. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +16 -0
  181. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
  182. package/lib/esm/hooks/useCaseComments/useCaseComments.js +25 -0
  183. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
  184. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
  185. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
  186. package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
  187. package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
  188. package/lib/esm/hooks/useCaseHistory.js +98 -0
  189. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  190. package/lib/esm/hooks/useResetCaseCreate.js +18 -11
  191. package/lib/esm/models/caseHistory.d.ts +80 -0
  192. package/lib/esm/models/caseHistory.d.ts.map +1 -0
  193. package/lib/esm/models/caseHistory.js +1 -0
  194. package/lib/esm/reducers/CaseConstNTypes.d.ts +91 -3
  195. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  196. package/lib/esm/reducers/CaseConstNTypes.js +20 -2
  197. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -4
  198. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  199. package/lib/esm/reducers/CaseDetailsPageReducer.js +39 -23
  200. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +3 -5
  201. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  202. package/lib/esm/reducers/CaseDiscussionTabReducer.js +33 -46
  203. package/lib/esm/reducers/CaseHelpers.d.ts +3 -2
  204. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  205. package/lib/esm/reducers/CaseHelpers.js +108 -41
  206. package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
  207. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  208. package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
  209. package/lib/esm/reducers/CaseReducer.d.ts +30 -8
  210. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  211. package/lib/esm/reducers/CaseReducer.js +192 -55
  212. package/lib/esm/utils/TimelineUtils.d.ts +41 -0
  213. package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
  214. package/lib/esm/utils/TimelineUtils.js +134 -0
  215. package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
  216. package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
  217. package/lib/esm/utils/caseHistoryUtils.js +165 -0
  218. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
  219. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  220. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  221. package/package.json +7 -8
@@ -42,7 +42,6 @@ import { fetchRecommendations, fetchWatsonXRecommendations } from '../../../redu
42
42
  import { extractKTQuestion1FromDescription } from '../../../utils/caseUtils';
43
43
  import { usePostComment } from '../../shared/usePostComment';
44
44
  import { CaseSolutionsItem } from './CaseSolutionsItem';
45
- import { HandpickedItem } from './HandpicketItem';
46
45
  // some of the pinned and hadpicked titles are set to 'Red Hat Knowledge Base'
47
46
  // this workaround is added till backend fix
48
47
  const titleFix = (recommendations, allDocs) => __awaiter(void 0, void 0, void 0, function* () {
@@ -118,10 +117,11 @@ export const CaseSolutions = forwardRef((props, ref) => {
118
117
  }), isEqual);
119
118
  const caseDispatch = useCaseDispatch();
120
119
  const caseOverviewDispatch = useContext(CaseOverviewDispatchContext);
121
- const [isExpanded, setIsExpanded] = useState(false);
122
- const onExpand = () => {
123
- setIsExpanded(!isExpanded);
124
- };
120
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
121
+ // const [isExpanded, setIsExpanded] = useState<boolean>(false);
122
+ // const onExpand = () => {
123
+ // setIsExpanded(!isExpanded);
124
+ // };
125
125
  const { recommendationState: { isLoadingRecommendations, allDocs }, } = useRecommendationStateContext();
126
126
  const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
127
127
  const recommendationsDispatch = useRecommendationDispatchContext();
@@ -136,7 +136,8 @@ export const CaseSolutions = forwardRef((props, ref) => {
136
136
  const ability = useContext(AbilityContext);
137
137
  const { t } = useTranslation();
138
138
  const hasPin = some(recommendations, (p) => p.isPinned);
139
- const hasLink = some(recommendations, (p) => p.isLinked);
139
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
140
+ // const hasLink = some(recommendations, (p) => p.isLinked);
140
141
  const getCommentBody = () => {
141
142
  return `**Reason for closing case:** \nOther. Found a pinned article that perfectly resolved the issue. Closing this case now.`;
142
143
  };
@@ -182,7 +183,12 @@ export const CaseSolutions = forwardRef((props, ref) => {
182
183
  }, true);
183
184
  });
184
185
  const canPinUnpin = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_PIN_UNPIN_RESOURCES);
185
- const canLinkUnlink = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_LINK_UNLINK_RESOURCES);
186
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
187
+ // const canLinkUnlink = ability.can(
188
+ // resourceActions.PATCH,
189
+ // resources.CASE_DETAILS,
190
+ // CaseDetailsFields.CASE_DETAILS_LINK_UNLINK_RESOURCES
191
+ // );
186
192
  const addDtmEvent = (stepName) => {
187
193
  // reserve for when fixing dtm
188
194
  };
@@ -291,19 +297,67 @@ export const CaseSolutions = forwardRef((props, ref) => {
291
297
  populatePinSections();
292
298
  }
293
299
  }, [allDocs, isFetchingCaseDetails, isLoadingRecommendations, recomendationsObj]);
294
- const renderTopRecommendations = (recommendation, index, type) => (React.createElement(React.Fragment, null,
295
- canPinUnpin && (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined), onLinkClick: (name) => addDtmEvent(name) })),
296
- canLinkUnlink && (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? t('Unlink') : t('Link'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) }))));
300
+ const renderTopRecommendations = (recommendation, index, type) => (React.createElement(React.Fragment, null, canPinUnpin && (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined), onLinkClick: (name) => addDtmEvent(name) }))));
297
301
  // customer logged in: we show pins and perform pin/unpin
298
302
  const renderPinsByCustomer = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: true, isPinned: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined), onLinkClick: (name) => addDtmEvent(name) }));
303
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
299
304
  // customer logged in: we show links but perform pin/unpin
300
- const renderHandpickedCustomerView = (recommendation, index, type) => (React.createElement(HandpickedItem, { type: type, caseNumber: props.caseNumber, pinTitle: recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onRecommendationLike: () => setIsCloseCaseModalOpen(true), onLinkClick: (name) => addDtmEvent(name) }));
305
+ // const renderHandpickedCustomerView = (
306
+ // recommendation: ICaseDetailAsideRecommendation,
307
+ // index: number,
308
+ // type: string
309
+ // ) => (
310
+ // <HandpickedItem
311
+ // type={type}
312
+ // caseNumber={props.caseNumber}
313
+ // pinTitle={recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin')}
314
+ // isPinLoading={isPinLoading}
315
+ // index={index}
316
+ // recommendation={recommendation}
317
+ // onRecommendationLike={() => setIsCloseCaseModalOpen(true)}
318
+ // onLinkClick={(name) => addDtmEvent(name)}
319
+ // />
320
+ // );
321
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
301
322
  // redhatter logged in: we show pins but perform link/unlink
302
- const renderPinnedByCustomerRedhatterView = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) }));
323
+ // const renderPinnedByCustomerRedhatterView = (
324
+ // recommendation: ICaseDetailAsideRecommendation,
325
+ // index: number,
326
+ // type: string
327
+ // ) => (
328
+ // <CaseSolutionsItem
329
+ // showLink={true}
330
+ // type={type}
331
+ // pinTitle={recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin')}
332
+ // isPinLoading={isPinLoading}
333
+ // index={index}
334
+ // recommendation={recommendation}
335
+ // onPinClicked={updateRecommendations(recommendation, undefined, recommendation.isLinked)}
336
+ // onLinkClick={(name) => addDtmEvent(name)}
337
+ // />
338
+ // );
339
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
303
340
  // redhatter logged in: we show links and perform link/unlink
304
- const renderHandPickedByRedHatter = (recommendation, index, type) => (React.createElement("div", { className: "pf-v6-u-ml-lg" },
305
- React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? t('Unlink') : t('Link'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) })));
306
- const linkedRecommendations = recommendations.filter((r) => r.isLinked);
341
+ // const renderHandPickedByRedHatter = (
342
+ // recommendation: ICaseDetailAsideRecommendation,
343
+ // index: number,
344
+ // type: string
345
+ // ) => (
346
+ // <div className="pf-v6-u-ml-lg">
347
+ // <CaseSolutionsItem
348
+ // showLink={true}
349
+ // type={type}
350
+ // pinTitle={recommendation.isLinked ? t('Unlink') : t('Link')}
351
+ // isPinLoading={isPinLoading}
352
+ // index={index}
353
+ // recommendation={recommendation}
354
+ // onPinClicked={updateRecommendations(recommendation, undefined, recommendation.isLinked)}
355
+ // onLinkClick={(name) => addDtmEvent(name)}
356
+ // />
357
+ // </div>
358
+ // );
359
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
360
+ // const linkedRecommendations = recommendations.filter((r) => r.isLinked);
307
361
  const pinnedRecommendations = recommendations.filter((r) => r.isPinned);
308
362
  const closeCaseModal = (React.createElement(Modal, { variant: ModalVariant.small, isOpen: isCloseCaseModalOpen && caseStatus !== CaseStatusEnum.CLOSED, onClose: () => setIsCloseCaseModalOpen(false) },
309
363
  React.createElement(ModalHeader, { title: t('Did this solve your case?') }),
@@ -316,27 +370,19 @@ export const CaseSolutions = forwardRef((props, ref) => {
316
370
  React.createElement(Trans, null, "Close case")))));
317
371
  return (React.createElement(React.Fragment, null,
318
372
  closeCaseModal,
319
- linkedRecommendations.length > 0 && (React.createElement(Card, { isExpanded: isExpanded },
320
- React.createElement(CardHeader, { className: "pf-v6-u-display-flex", onExpand: onExpand },
321
- React.createElement("span", null, canLinkUnlink ? React.createElement(Trans, null, "Handpicked by you") : React.createElement(Trans, null, "Handpicked for this case")),
322
- React.createElement("span", { className: "badge-item pf-v6-u-font-size-sm pf-v6-u-mx-sm" }, linkedRecommendations.length)),
323
- React.createElement(CardExpandableContent, null,
324
- React.createElement(CardBody, null, !hasLink ? (!canLinkUnlink ? (React.createElement(Trans, null, "If a Red Hat engineer finds an article or solution that can help with your case, they'll pin it here.")) : (React.createElement(React.Fragment, null))) : (React.createElement(PaginatedList, { id: "case-details-handpicked-recommendations", listItems: linkedRecommendations.map((rec, index) => canLinkUnlink
325
- ? renderHandPickedByRedHatter(rec, index, 'handpicked-recommendations')
326
- : renderHandpickedCustomerView(rec, index, 'handpicked-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
327
- { title: '5', value: 5 },
328
- { title: '10', value: 10 },
329
- ] })))))),
330
373
  pinnedRecommendations.length > 0 && (React.createElement(Card, { isExpanded: pinnedOpen },
331
374
  React.createElement(CardHeader, { className: "pf-v6-u-display-flex", onExpand: () => setPinnedOpen((pre) => !pre) },
332
375
  React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" },
333
- React.createElement("span", null, canLinkUnlink ? (React.createElement(Trans, null, "Pinned by customer")) : (React.createElement(Trans, null, "My pinned recommendations"))),
376
+ React.createElement("span", null,
377
+ React.createElement(Trans, null, "My pinned recommendations")),
334
378
  React.createElement("span", { className: "badge-item pf-v6-u-font-size-sm pf-v6-u-mx-sm", style: { lineHeight: '18px' } },
335
379
  React.createElement(Label, null, pinnedRecommendations.length)))),
336
380
  React.createElement(CardExpandableContent, null,
337
- React.createElement(CardBody, null, !hasPin ? (!canLinkUnlink ? (React.createElement(Trans, null, "When you save a recommended article or solution, you'll see it here. Saved items display only in this case and are not saved for later.")) : (React.createElement(React.Fragment, null))) : (React.createElement(PaginatedList, { id: "case-details-pinned-recommendations", listItems: pinnedRecommendations.map((rec, index) => canLinkUnlink
338
- ? renderPinnedByCustomerRedhatterView(rec, index, 'pinned-recommendations')
339
- : renderPinsByCustomer(rec, index, 'pinned-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
381
+ React.createElement(CardBody, null, !hasPin ? (
382
+ /* TODO: KCS linking disabled -- PCM-15276 -- restore canLinkUnlink ternary when linking is re-enabled */
383
+ React.createElement(Trans, null, "When you save a recommended article or solution, you'll see it here. Saved items display only in this case and are not saved for later.")) : (React.createElement(PaginatedList, { id: "case-details-pinned-recommendations", listItems: pinnedRecommendations.map((rec, index) =>
384
+ /* TODO: KCS linking disabled -- PCM-15276 -- restore canLinkUnlink ternary when linking is re-enabled */
385
+ renderPinsByCustomer(rec, index, 'pinned-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
340
386
  { title: '5', value: 5 },
341
387
  { title: '10', value: 10 },
342
388
  ] })))))),
@@ -4,7 +4,6 @@ import { CaseRecommendationEvalEnum } from '../../../constants/caseDetailsConsta
4
4
  interface IProps {
5
5
  showPin?: boolean;
6
6
  isPinned?: boolean;
7
- showLink?: boolean;
8
7
  pinTitle: string;
9
8
  index: number;
10
9
  recommendation: ICaseDetailAsideRecommendation;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSolutionsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAQ5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,UAAU,MAAM;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,8BAA+B,SAAQ,OAAO,CAAC,iBAAiB,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,qBA2D9C"}
1
+ {"version":3,"file":"CaseSolutionsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAS5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,UAAU,MAAM;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,8BAA+B,SAAQ,OAAO,CAAC,iBAAiB,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,qBA4D9C"}
@@ -1,5 +1,6 @@
1
1
  import { Button, Icon } from '@patternfly/react-core';
2
- import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
2
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
3
+ // import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
3
4
  import OutlinedStarIcon from '@patternfly/react-icons/dist/js/icons/outlined-star-icon';
4
5
  import StarIcon from '@patternfly/react-icons/dist/js/icons/star-icon';
5
6
  import { LoadingIndicator } from '@rh-support/components';
@@ -15,8 +16,7 @@ export function CaseSolutionsItem(props) {
15
16
  React.createElement(Button, { icon: React.createElement(React.Fragment, null,
16
17
  isLoading && React.createElement(LoadingIndicator, { show: isLoading, size: "xs" }),
17
18
  !isLoading && props.showPin && (React.createElement(React.Fragment, null,
18
- React.createElement(Icon, { size: "md", color: "0066cc" }, props.isPinned ? (React.createElement(StarIcon, { className: "pinned-resource" })) : (React.createElement(OutlinedStarIcon, { className: "pinned-resource" }))))),
19
- !isLoading && props.showLink && React.createElement(LinkIcon, null)), title: props.pinTitle, onClick: props.onPinClicked, "data-tracking-id": `case-resource-${props.pinTitle}`, variant: "plain", className: "list-icon" }),
19
+ React.createElement(Icon, { size: "md", color: "0066cc" }, props.isPinned ? (React.createElement(StarIcon, { className: "pinned-resource" })) : (React.createElement(OutlinedStarIcon, { className: "pinned-resource" })))))), title: props.pinTitle, onClick: props.onPinClicked, "data-tracking-id": `case-resource-${props.pinTitle}`, variant: "plain", className: "list-icon" }),
20
20
  React.createElement("a", { href: props.recommendation.resourceViewURI, "data-tracking-id": `case-resource-${props.type}-link-${props.index}`, target: "_blank", rel: "noopener noreferrer", className: "case-resource-recommendation-link", dangerouslySetInnerHTML: {
21
21
  __html: DOMPurify.sanitize(truncate(decodeMarkTag(props.recommendation.title || ''), maxTitleLength)),
22
22
  }, onClick: () => props.onLinkClick('case solution click') })),
@@ -1,13 +1,11 @@
1
1
  import React from 'react';
2
- import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
3
2
  interface IProps {
4
3
  onConfirm: (commentBody: any, newStatus: any, reopenedAt?: any, reopenedBySSOName?: any, reopenedReason?: any, reopenedReasonOther?: any) => void;
5
4
  onClose: () => void;
6
5
  caseNumber: string;
7
6
  isInternal: boolean;
8
- allStatuses: string[];
9
7
  isUpdating: boolean;
10
- reopenStatus: CaseStatusEnum;
8
+ reopenStatus: string;
11
9
  whoIsUpdating: string;
12
10
  }
13
11
  export declare function ReopenCaseModal(props: IProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkN5C"}
1
+ {"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkN5C"}
@@ -9,12 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, TextArea, } from '@patternfly/react-core';
11
11
  import { SingleSelectDropdown } from '@rh-support/components';
12
- import { formatDateTime } from '@rh-support/utils';
12
+ import { formatDateTime, PORTAL_OPEN_DISPLAY_STATUSES } from '@rh-support/utils';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import map from 'lodash/map';
15
15
  import React, { useState } from 'react';
16
16
  import { Trans, useTranslation } from 'react-i18next';
17
- import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
18
17
  const reasonWithDescription = ['Other'];
19
18
  const reasonWithoutDescription = ['I am experiencing the same issue', 'My case has been closed prematurely'];
20
19
  const reasonsList = [...reasonWithoutDescription, ...reasonWithDescription];
@@ -54,7 +53,7 @@ export function ReopenCaseModal(props) {
54
53
  if (!checkForRequiredFields())
55
54
  return;
56
55
  let submissionDate = new Date();
57
- props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || CaseStatusEnum.WAITING_ON_REDHAT, submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
56
+ props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || 'In Progress', submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
58
57
  });
59
58
  const onReasonChange = (option) => {
60
59
  setSelectedReason(option.value);
@@ -70,7 +69,7 @@ export function ReopenCaseModal(props) {
70
69
  label: option,
71
70
  value: option,
72
71
  }));
73
- const getStatusDropdownOptions = map(props.allStatuses.filter((status) => status !== CaseStatusEnum.CLOSED), (option) => ({
72
+ const getStatusDropdownOptions = map(PORTAL_OPEN_DISPLAY_STATUSES, (option) => ({
74
73
  label: option,
75
74
  value: option,
76
75
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"ESSRemoteSessionModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgBxC,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAsKlD"}
1
+ {"version":3,"file":"ESSRemoteSessionModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAyJlD"}
@@ -7,27 +7,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { publicApi } from '@cee-eng/hydrajs';
10
+ import { useApolloClient } from '@apollo/client/react';
11
11
  import { Button, ButtonVariant, Icon, Modal, ModalFooter, ModalHeader, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
12
12
  import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
13
- import { ToastNotification, useFetch } from '@rh-support/components';
13
+ import { ToastNotification } from '@rh-support/components';
14
+ import isEqual from 'lodash/isEqual';
14
15
  import React, { useState } from 'react';
15
16
  import { Trans, useTranslation } from 'react-i18next';
16
- import { useCaseDispatch } from '../../../context/CaseContext';
17
- import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
18
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
19
- import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
17
+ import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
18
+ import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
20
19
  import { checkForCaseStatusToggleOnAttachOrComment, setCaseDetails, updateCaseDetails, } from '../../../reducers/CaseReducer';
21
20
  export function ESSRemoteSessionModal(props) {
22
21
  const { t } = useTranslation();
23
22
  const caseDispatch = useCaseDispatch();
24
23
  const [agreeLoading, setAgreeLoading] = useState(false);
25
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
26
- propgateErrors: true,
27
- });
28
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
29
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
30
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
24
+ const client = useApolloClient();
25
+ const { createComment, loading: isPostingComment } = useCreateCaseComment();
26
+ const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
31
27
  // To handle modal cancel and close
32
28
  const onCancel = () => {
33
29
  props.onClose && props.onClose();
@@ -41,12 +37,12 @@ export function ESSRemoteSessionModal(props) {
41
37
  screenSessionRequested: true,
42
38
  });
43
39
  try {
44
- yield postCommentRequest({
45
- caseNumber: props.caseNumber,
46
- commentBody: requestComment,
47
- contentType: 'markdown',
40
+ yield createComment({
41
+ caseId: caseSalesforceId,
42
+ body: requestComment,
43
+ isPublic: true,
48
44
  });
49
- updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
45
+ client.refetchQueries({ include: [GET_CASE_COMMENTS] });
50
46
  checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
51
47
  onCancel();
52
48
  setAgreeLoading(false);
@@ -1 +1 @@
1
- {"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AA4BD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAmY7C"}
1
+ {"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA+X7C"}
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { useApolloClient } from '@apollo/client/react';
10
11
  import { publicApi } from '@cee-eng/hydrajs';
11
12
  import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
12
13
  import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
@@ -16,41 +17,19 @@ import isEqual from 'lodash/isEqual';
16
17
  import React, { useEffect, useState } from 'react';
17
18
  import { Trans, useTranslation } from 'react-i18next';
18
19
  import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
19
- import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
20
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
21
- import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
22
- import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetails } from '../../../reducers/CaseReducer';
23
- const getLocaleNameFromLocalCode = (localeCode) => {
24
- if ('Intl' in window && 'DisplayNames' in Intl) {
25
- try {
26
- const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
27
- // https://github.com/microsoft/TypeScript/issues/41338
28
- const langName = new Intl.DisplayNames([lang], { type: 'language' });
29
- const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
30
- return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
31
- }
32
- catch (e) {
33
- return localeCode;
34
- }
35
- }
36
- return localeCode;
37
- };
38
- const formatSessionLinks = (sessionLink) => {
39
- const links = sessionLink
40
- .split(/[;,| \n\r\t]+/)
41
- .map((link) => link.trim())
42
- .filter(Boolean);
43
- const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
44
- return formattedLinks;
45
- };
20
+ import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
21
+ import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetailsGraphQL } from '../../../reducers/CaseReducer';
22
+ import { formatSessionLinks, getLocaleNameFromLocalCode } from './remoteSessionUtils';
46
23
  export function NewEssTermsModal(props) {
47
24
  const { t } = useTranslation();
48
25
  const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
49
26
  remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
50
27
  }), isEqual);
51
28
  const [isTermsChecked, setIsTermsChecked] = useState(false);
29
+ const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
52
30
  const { request } = useFetch(publicApi.terms.getRequiredTerms);
53
31
  const caseDispatch = useCaseDispatch();
32
+ const apolloClient = useApolloClient();
54
33
  const [selectedTranslation, setSelectedTranslation] = useState({
55
34
  id: '5001',
56
35
  isDefault: false,
@@ -93,12 +72,9 @@ export function NewEssTermsModal(props) {
93
72
  fetchTerms();
94
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
95
74
  }, []);
96
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
97
- propgateErrors: true,
98
- });
99
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
100
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
101
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
75
+ const client = useApolloClient();
76
+ const { createComment, loading: isPostingComment } = useCreateCaseComment();
77
+ const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
102
78
  const updateSessionExpectation = (event, value) => setSessionExpectations(value);
103
79
  const updateImpact = (event, value) => setImpact(value);
104
80
  const updateSessionLink = (event, value) => setSessionLink(value);
@@ -129,18 +105,17 @@ export function NewEssTermsModal(props) {
129
105
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
130
106
  const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
131
107
  try {
132
- yield updateCaseDetails(caseDispatch, props.caseNumber, {
108
+ yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
133
109
  remoteSessionTermsAcked: true,
134
- screenSessionRequested: true,
135
110
  waitingOnCallback: true,
136
- });
111
+ }, false, { existingCaseDetails });
137
112
  try {
138
- yield postCommentRequest({
139
- caseNumber: props.caseNumber,
140
- commentBody: requestComment,
141
- contentType: 'markdown',
113
+ yield createComment({
114
+ caseId: caseSalesforceId,
115
+ body: requestComment,
116
+ isPublic: true,
142
117
  });
143
- updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
118
+ client.refetchQueries({ include: [GET_CASE_COMMENTS] });
144
119
  checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
145
120
  setAgreeLoading(false);
146
121
  setHasSubmitted(true);
@@ -170,8 +145,9 @@ export function NewEssTermsModal(props) {
170
145
  onCancel();
171
146
  setAgreeLoading(false);
172
147
  setIsTermsChecked(false);
173
- yield updateCaseDetails(caseDispatch, props.caseNumber, {
174
- screenSessionRequested: false,
148
+ yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
149
+ remoteSessionTermsAcked: false,
150
+ waitingOnCallback: false,
175
151
  });
176
152
  // ToastNotification.addDangerMessage(
177
153
  // t('Could not submit a request for remote session'),
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AA4BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0XxD"}
1
+ {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAwXxD"}
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { useApolloClient } from '@apollo/client/react';
10
11
  import { publicApi } from '@cee-eng/hydrajs';
11
12
  import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
12
13
  import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
@@ -16,41 +17,19 @@ import isEqual from 'lodash/isEqual';
16
17
  import React, { useEffect, useState } from 'react';
17
18
  import { Trans, useTranslation } from 'react-i18next';
18
19
  import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
19
- import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
20
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
21
- import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
22
- import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetails, } from '../../../reducers/CaseReducer';
23
- const getLocaleNameFromLocalCode = (localeCode) => {
24
- if ('Intl' in window && 'DisplayNames' in Intl) {
25
- try {
26
- const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
27
- // https://github.com/microsoft/TypeScript/issues/41338
28
- const langName = new Intl.DisplayNames([lang], { type: 'language' });
29
- const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
30
- return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
31
- }
32
- catch (e) {
33
- return localeCode;
34
- }
35
- }
36
- return localeCode;
37
- };
38
- const formatSessionLinks = (sessionLink) => {
39
- const links = sessionLink
40
- .split(/[;,| \n\r\t]+/)
41
- .map((link) => link.trim())
42
- .filter(Boolean);
43
- const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
44
- return formattedLinks;
45
- };
20
+ import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
21
+ import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetailsGraphQL, } from '../../../reducers/CaseReducer';
22
+ import { formatSessionLinks, getLocaleNameFromLocalCode } from './remoteSessionUtils';
46
23
  export function RemoteSessionAgreementModal(props) {
47
24
  const { t } = useTranslation();
48
25
  const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
49
26
  remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
27
+ caseDetails: state.caseDetails,
50
28
  }), isEqual);
51
29
  const [isTermsChecked, setIsTermsChecked] = useState(false);
52
30
  const { request } = useFetch(publicApi.terms.getRequiredTerms);
53
31
  const caseDispatch = useCaseDispatch();
32
+ const apolloClient = useApolloClient();
54
33
  const [selectedTranslation, setSelectedTranslation] = useState({
55
34
  id: '5001',
56
35
  isDefault: false,
@@ -93,12 +72,9 @@ export function RemoteSessionAgreementModal(props) {
93
72
  fetchTerms();
94
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
95
74
  }, []);
96
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
97
- propgateErrors: true,
98
- });
99
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
100
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
101
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
75
+ const client = useApolloClient();
76
+ const { createComment, loading: isPostingComment } = useCreateCaseComment();
77
+ const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
102
78
  const updateSessionExpectation = (event, value) => setSessionExpectations(value);
103
79
  const updateImpact = (event, value) => setImpact(value);
104
80
  const updateSessionLink = (event, value) => setSessionLink(value);
@@ -115,22 +91,23 @@ export function RemoteSessionAgreementModal(props) {
115
91
  props.onClose && props.onClose();
116
92
  };
117
93
  const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
94
+ const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
118
95
  // Function to ack remote session terms and post comment
119
96
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
120
97
  const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
121
98
  try {
122
- yield updateCaseDetails(caseDispatch, props.caseNumber, {
99
+ yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
123
100
  remoteSessionTermsAcked: true,
124
101
  waitingOnCallback: true,
125
- });
102
+ }, false, { existingCaseDetails });
126
103
  setRemoteRiderFlag(caseDispatch, true);
127
104
  try {
128
- yield postCommentRequest({
129
- caseNumber: props.caseNumber,
130
- commentBody: requestComment,
131
- contentType: 'markdown',
105
+ yield createComment({
106
+ caseId: caseSalesforceId,
107
+ body: requestComment,
108
+ isPublic: true,
132
109
  });
133
- updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
110
+ client.refetchQueries({ include: [GET_CASE_COMMENTS] });
134
111
  checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
135
112
  setAgreeLoading(false);
136
113
  setHasSubmitted(true);
@@ -0,0 +1,3 @@
1
+ export declare const getLocaleNameFromLocalCode: (localeCode: string) => string;
2
+ export declare const formatSessionLinks: (sessionLink: string) => string;
3
+ //# sourceMappingURL=remoteSessionUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remoteSessionUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,GAAI,YAAY,MAAM,KAAG,MAa/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MAOxD,CAAC"}
@@ -0,0 +1,22 @@
1
+ export const getLocaleNameFromLocalCode = (localeCode) => {
2
+ if ('Intl' in window && 'DisplayNames' in Intl) {
3
+ try {
4
+ const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
5
+ // https://github.com/microsoft/TypeScript/issues/41338
6
+ const langName = new Intl.DisplayNames([lang], { type: 'language' });
7
+ const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
8
+ return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
9
+ }
10
+ catch (e) {
11
+ return localeCode;
12
+ }
13
+ }
14
+ return localeCode;
15
+ };
16
+ export const formatSessionLinks = (sessionLink) => {
17
+ const links = sessionLink
18
+ .split(/[;,| \n\r\t]+/)
19
+ .map((link) => link.trim())
20
+ .filter(Boolean);
21
+ return links.map((link) => `[${link}](${link})`).join('\n');
22
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,sBAAsB,sBAoYrC"}
1
+ {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAwC/D,wBAAgB,sBAAsB,sBA0XrC"}