@rh-support/troubleshoot 2.6.355 → 2.6.358

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 (349) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
  9. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
  10. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
  11. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
  12. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Case.js +60 -33
  14. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
  16. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  17. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
  18. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  23. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
  24. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
  26. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  27. package/lib/esm/components/CaseEditView/CaseOverview/index.js +79 -47
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
  30. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
  31. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  33. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
  34. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  35. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
  40. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  41. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
  42. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
  43. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
  44. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +63 -17
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +130 -55
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
  81. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
  82. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  83. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  84. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
  85. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
  86. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  87. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
  88. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
  90. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
  92. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  93. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
  94. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  95. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
  96. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
  97. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  98. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
  99. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  100. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
  101. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  102. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
  103. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  104. package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
  105. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  106. package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
  107. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
  108. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
  109. package/lib/esm/components/CaseInformation/CaseLabels.js +106 -0
  110. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  111. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
  112. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
  113. package/lib/esm/components/CaseInformation/Description.js +1 -1
  114. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  115. package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
  116. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  117. package/lib/esm/components/CaseInformation/Fts.js +31 -17
  118. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  119. package/lib/esm/components/CaseInformation/Severity.js +33 -24
  120. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  121. package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
  122. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
  123. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
  124. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +141 -0
  125. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  126. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
  127. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  128. package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
  129. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  130. package/lib/esm/components/CaseManagement/Cep.js +11 -9
  131. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
  132. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  133. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +20 -3
  134. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  135. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  136. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -1
  137. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  138. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +19 -32
  139. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  140. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
  141. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  142. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
  143. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  144. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  145. package/lib/esm/components/IdeaInformation/IdeaInformation.js +23 -17
  146. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  147. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
  148. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
  149. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  150. package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
  151. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  152. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
  153. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  154. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
  155. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
  156. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
  157. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
  158. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  159. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
  160. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  161. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
  162. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  163. package/lib/esm/components/Recommendations/AsideResults.js +4 -3
  164. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  165. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
  166. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  167. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
  168. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  169. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  170. package/lib/esm/components/Recommendations/Recommendations.js +3 -9
  171. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  172. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
  173. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  174. package/lib/esm/components/Review/Review.js +25 -19
  175. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  176. package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
  177. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  178. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  179. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  180. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  181. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +139 -91
  182. package/lib/esm/components/shared/Constants.d.ts +5 -0
  183. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  184. package/lib/esm/components/shared/Constants.js +5 -0
  185. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  186. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  187. package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
  188. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  189. package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
  190. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
  191. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  192. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
  193. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  194. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  195. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +22 -5
  196. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  197. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +307 -59
  198. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
  199. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  200. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
  201. package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
  202. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  203. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  204. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  205. package/lib/esm/components/shared/fileUpload/useFileUploader.js +119 -47
  206. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  207. package/lib/esm/components/shared/useIsSectionValid.js +22 -57
  208. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  209. package/lib/esm/components/shared/usePostComment.js +16 -28
  210. package/lib/esm/components/shared/utils.d.ts +1 -0
  211. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  212. package/lib/esm/components/shared/utils.js +9 -3
  213. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  214. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
  215. package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
  216. package/lib/esm/components/wizardLayout/MainSection.js +2 -1
  217. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  218. package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
  219. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  220. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
  221. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  222. package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
  223. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  224. package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
  225. package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
  226. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  227. package/lib/esm/constants/caseDetailsConstants.js +5 -0
  228. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  229. package/lib/esm/css/app.css +28 -0
  230. package/lib/esm/css/case.css +60 -209
  231. package/lib/esm/graphql/index.d.ts +4 -0
  232. package/lib/esm/graphql/index.d.ts.map +1 -0
  233. package/lib/esm/graphql/index.js +3 -0
  234. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
  235. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
  236. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
  237. package/lib/esm/graphql/mutations/index.d.ts +2 -0
  238. package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
  239. package/lib/esm/graphql/mutations/index.js +1 -0
  240. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
  241. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
  242. package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
  243. package/lib/esm/graphql/queries/index.d.ts +2 -0
  244. package/lib/esm/graphql/queries/index.d.ts.map +1 -0
  245. package/lib/esm/graphql/queries/index.js +1 -0
  246. package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
  247. package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
  248. package/lib/esm/graphql/schemas/escalation.js +1 -0
  249. package/lib/esm/graphql/schemas/index.d.ts +2 -0
  250. package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
  251. package/lib/esm/graphql/schemas/index.js +1 -0
  252. package/lib/esm/hooks/useAB.d.ts.map +1 -1
  253. package/lib/esm/hooks/useAB.js +45 -23
  254. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
  255. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
  256. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
  257. package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
  258. package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
  259. package/lib/esm/hooks/useCaseComments/index.js +5 -0
  260. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
  261. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
  262. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
  263. package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
  264. package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
  265. package/lib/esm/hooks/useCaseComments/types.js +1 -0
  266. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
  267. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
  268. package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
  269. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
  270. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
  271. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
  272. package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
  273. package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
  274. package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
  275. package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
  276. package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
  277. package/lib/esm/hooks/useCaseHistory.js +98 -0
  278. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +23 -0
  279. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
  280. package/lib/esm/hooks/useCaseLabelLinkMutations.js +84 -0
  281. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  282. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  283. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
  284. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  285. package/lib/esm/hooks/useResetCaseCreate.js +18 -11
  286. package/lib/esm/hooks/useS3Upload.d.ts +5 -4
  287. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  288. package/lib/esm/hooks/useS3Upload.js +28 -30
  289. package/lib/esm/i18n/template-de.d.ts +2 -2
  290. package/lib/esm/i18n/template-de.js +2 -2
  291. package/lib/esm/i18n/template-es.d.ts +2 -2
  292. package/lib/esm/i18n/template-es.js +2 -2
  293. package/lib/esm/i18n/template-fr.d.ts +2 -2
  294. package/lib/esm/i18n/template-fr.js +2 -2
  295. package/lib/esm/i18n/template-it.d.ts +2 -2
  296. package/lib/esm/i18n/template-it.js +2 -2
  297. package/lib/esm/i18n/template-jp.d.ts +2 -2
  298. package/lib/esm/i18n/template-jp.js +2 -2
  299. package/lib/esm/i18n/template-ko.d.ts +2 -2
  300. package/lib/esm/i18n/template-ko.js +2 -2
  301. package/lib/esm/i18n/template-pt.d.ts +2 -2
  302. package/lib/esm/i18n/template-pt.js +2 -2
  303. package/lib/esm/i18n/template-ru.d.ts +2 -2
  304. package/lib/esm/i18n/template-ru.js +2 -2
  305. package/lib/esm/i18n/template-zh.d.ts +2 -2
  306. package/lib/esm/i18n/template-zh.js +2 -2
  307. package/lib/esm/index.js +1 -0
  308. package/lib/esm/models/cache.d.ts +0 -2
  309. package/lib/esm/models/cache.d.ts.map +1 -1
  310. package/lib/esm/models/caseHistory.d.ts +80 -0
  311. package/lib/esm/models/caseHistory.d.ts.map +1 -0
  312. package/lib/esm/models/caseHistory.js +1 -0
  313. package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
  314. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  315. package/lib/esm/reducers/CaseConstNTypes.js +31 -7
  316. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
  317. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  318. package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
  319. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
  320. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  321. package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
  322. package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
  323. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  324. package/lib/esm/reducers/CaseHelpers.js +119 -17
  325. package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
  326. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  327. package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
  328. package/lib/esm/reducers/CaseReducer.d.ts +56 -11
  329. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  330. package/lib/esm/reducers/CaseReducer.js +284 -100
  331. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  332. package/lib/esm/reducers/RecommendationsReducer.js +15 -18
  333. package/lib/esm/scss/_main.scss +9 -0
  334. package/lib/esm/utils/TimelineUtils.d.ts +41 -0
  335. package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
  336. package/lib/esm/utils/TimelineUtils.js +135 -0
  337. package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
  338. package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
  339. package/lib/esm/utils/caseHistoryUtils.js +165 -0
  340. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
  341. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  342. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  343. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
  344. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
  345. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
  346. package/package.json +9 -8
  347. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
  348. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
  349. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
@@ -22,12 +22,14 @@ import { search } from '@cee-eng/hydrajs';
22
22
  import { Button, Card, CardBody, CardExpandableContent, CardHeader, Label, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
23
23
  import { PaginatedList, ToastNotification } from '@rh-support/components';
24
24
  import { useGlobalStateContext } from '@rh-support/react-context';
25
- import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
25
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
26
+ // import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
26
27
  import { getSolrParams } from '@rh-support/utils';
27
28
  import { isEmpty } from 'lodash';
28
29
  import find from 'lodash/find';
29
30
  import isEqual from 'lodash/isEqual';
30
- import some from 'lodash/some';
31
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
32
+ // import some from 'lodash/some';
31
33
  import React, { forwardRef, useContext, useEffect, useState } from 'react';
32
34
  import { Trans, useTranslation } from 'react-i18next';
33
35
  import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
@@ -42,7 +44,6 @@ import { fetchRecommendations, fetchWatsonXRecommendations } from '../../../redu
42
44
  import { extractKTQuestion1FromDescription } from '../../../utils/caseUtils';
43
45
  import { usePostComment } from '../../shared/usePostComment';
44
46
  import { CaseSolutionsItem } from './CaseSolutionsItem';
45
- import { HandpickedItem } from './HandpicketItem';
46
47
  // some of the pinned and hadpicked titles are set to 'Red Hat Knowledge Base'
47
48
  // this workaround is added till backend fix
48
49
  const titleFix = (recommendations, allDocs) => __awaiter(void 0, void 0, void 0, function* () {
@@ -118,27 +119,32 @@ export const CaseSolutions = forwardRef((props, ref) => {
118
119
  }), isEqual);
119
120
  const caseDispatch = useCaseDispatch();
120
121
  const caseOverviewDispatch = useContext(CaseOverviewDispatchContext);
121
- const [isExpanded, setIsExpanded] = useState(false);
122
- const onExpand = () => {
123
- setIsExpanded(!isExpanded);
124
- };
122
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
123
+ // const [isExpanded, setIsExpanded] = useState<boolean>(false);
124
+ // const onExpand = () => {
125
+ // setIsExpanded(!isExpanded);
126
+ // };
125
127
  const { recommendationState: { isLoadingRecommendations, allDocs }, } = useRecommendationStateContext();
126
128
  const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
127
129
  const recommendationsDispatch = useRecommendationDispatchContext();
128
130
  const { postComment } = usePostComment({ caseNumber: props.caseNumber });
129
131
  const { caseNumber, isSecureSupportAccount } = props;
130
- const [isPinLoading, setIsPinLoading] = useState({});
132
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
133
+ // const [isPinLoading, setIsPinLoading] = useState({});
131
134
  const [isCaseCloseLoading, setIsCaseCloseLoading] = useState(false);
132
135
  const [pinnedOpen, setPinnedOpen] = useState(true);
133
136
  const [recommendations, setRecommendations] = useState([]);
134
137
  const [topRecommendations, setTopRecommendations] = useState([]);
135
138
  const [isCloseCaseModalOpen, setIsCloseCaseModalOpen] = useState(false);
136
- const ability = useContext(AbilityContext);
139
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
140
+ // const ability = useContext(AbilityContext);
137
141
  const { t } = useTranslation();
138
- const hasPin = some(recommendations, (p) => p.isPinned);
139
- const hasLink = some(recommendations, (p) => p.isLinked);
142
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
143
+ // const hasPin = some(recommendations, (p) => p.isPinned);
144
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
145
+ // const hasLink = some(recommendations, (p) => p.isLinked);
140
146
  const getCommentBody = () => {
141
- return `**Reason for closing case:** \nOther. Found a pinned article that perfectly resolved the issue. Closing this case now.`;
147
+ return `<p><strong>Reason for closing case:</strong></p><p>Other. Found a pinned article that perfectly resolved the issue. Closing this case now.</p>`;
142
148
  };
143
149
  const handleCaseClose = () => __awaiter(void 0, void 0, void 0, function* () {
144
150
  setStatusUpdating(caseOverviewDispatch, true);
@@ -151,88 +157,134 @@ export const CaseSolutions = forwardRef((props, ref) => {
151
157
  updateDiscussionState: true,
152
158
  doNotChangeStatus: true,
153
159
  });
154
- ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
155
160
  setIsCloseCaseModalOpen(false);
161
+ ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
156
162
  }
157
163
  catch (err) {
158
- caseUpdateError.showError(err, t('Status failed to update'));
164
+ caseUpdateError.showError(err, t('Status failed to update, try refreshing the page. Please contact us if the problem persists.'));
159
165
  }
160
166
  finally {
161
167
  setIsCaseCloseLoading(false);
162
168
  setStatusUpdating(caseOverviewDispatch, false);
163
169
  }
164
170
  });
165
- const updateRecommendation = (recommendationToUpdate, linked) => __awaiter(void 0, void 0, void 0, function* () {
166
- const recommendation = {
167
- resourceId: recommendationToUpdate.resourceId,
168
- resourceType: recommendationToUpdate.resourceType,
169
- linked,
170
- };
171
- if (recommendationToUpdate.resourceViewURI)
172
- recommendation.resourceViewURI = recommendationToUpdate.resourceViewURI;
173
- // for some doc types like Errata we don't have resourceURI. If resourceURI was not available,
174
- // we constructe a 'fake' one to be used when linking in SFDC
175
- recommendation.resourceURI = recommendationToUpdate.resourceURI
176
- ? recommendationToUpdate.resourceURI
177
- : recommendationToUpdate.resourceViewURI
178
- ? recommendationToUpdate.resourceViewURI
179
- : recommendationToUpdate.resourceId;
180
- yield updateCaseDetails(caseDispatch, caseNumber, {
181
- caseResourceLinks: [recommendation],
182
- }, true);
183
- });
184
- 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);
171
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
172
+ // const updateRecommendation = async (recommendationToUpdate: ICaseDetailAsideRecommendation, linked: boolean) => {
173
+ // const recommendation: any = {
174
+ // resourceId: recommendationToUpdate.resourceId,
175
+ // resourceType: recommendationToUpdate.resourceType,
176
+ // linked,
177
+ // };
178
+ //
179
+ // if (recommendationToUpdate.resourceViewURI)
180
+ // recommendation.resourceViewURI = recommendationToUpdate.resourceViewURI;
181
+ //
182
+ // // for some doc types like Errata we don't have resourceURI. If resourceURI was not available,
183
+ // // we constructe a 'fake' one to be used when linking in SFDC
184
+ // recommendation.resourceURI = recommendationToUpdate.resourceURI
185
+ // ? recommendationToUpdate.resourceURI
186
+ // : recommendationToUpdate.resourceViewURI
187
+ // ? recommendationToUpdate.resourceViewURI
188
+ // : recommendationToUpdate.resourceId;
189
+ //
190
+ // await updateCaseDetails(
191
+ // caseDispatch,
192
+ // caseNumber,
193
+ // {
194
+ // caseResourceLinks: [recommendation],
195
+ // },
196
+ // true
197
+ // );
198
+ // };
199
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
200
+ // const canPinUnpin = ability.can(
201
+ // resourceActions.PATCH,
202
+ // resources.CASE_DETAILS,
203
+ // CaseDetailsFields.CASE_DETAILS_PIN_UNPIN_RESOURCES
204
+ // );
205
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
206
+ // const canLinkUnlink = ability.can(
207
+ // resourceActions.PATCH,
208
+ // resources.CASE_DETAILS,
209
+ // CaseDetailsFields.CASE_DETAILS_LINK_UNLINK_RESOURCES
210
+ // );
186
211
  const addDtmEvent = (stepName) => {
187
212
  // reserve for when fixing dtm
188
213
  };
189
- const updateRecommendations = (recommendationToUpdate, isPinned, isLinked) => () => __awaiter(void 0, void 0, void 0, function* () {
190
- try {
191
- setIsPinLoading((prevPiningMap) => (Object.assign(Object.assign({}, prevPiningMap), { [recommendationToUpdate.resourceId]: true })));
192
- yield updateRecommendation(recommendationToUpdate, isLinked !== undefined ? !isLinked : !isPinned);
193
- setTopRecommendations((prevTopRecs) => prevTopRecs.map((rec) => rec.resourceId === recommendationToUpdate.resourceId
194
- ? Object.assign(Object.assign({}, rec), { isLinked: isLinked !== undefined ? !isLinked : !!rec.isLinked, isPinned: isPinned !== undefined ? !isPinned : !!rec.isPinned }) : rec));
195
- setRecommendations((prevRecs) => {
196
- const toBeAdded = !prevRecs.some((r) => r.resourceId === recommendationToUpdate.resourceId);
197
- if (toBeAdded) {
198
- return [
199
- ...prevRecs,
200
- Object.assign(Object.assign({}, recommendationToUpdate), { isLinked: isLinked !== undefined ? !isLinked : recommendationToUpdate.isLinked, isPinned: isPinned !== undefined ? !isPinned : recommendationToUpdate.isPinned, isPinnedAndLinked: (isPinned !== undefined ? !isPinned : recommendationToUpdate.isPinned) &&
201
- (isLinked !== undefined ? !isLinked : recommendationToUpdate.isLinked) }),
202
- ];
203
- }
204
- else {
205
- return prevRecs
206
- .map((rec) => rec.resourceId === recommendationToUpdate.resourceId
207
- ? Object.assign(Object.assign({}, rec), { isLinked: isLinked !== undefined ? !isLinked : !!rec.isLinked, isPinned: isPinned !== undefined ? !isPinned : !!rec.isPinned, isPinnedAndLinked: (isPinned !== undefined ? !isPinned : rec.isPinned) &&
208
- (isLinked !== undefined ? !isLinked : rec.isLinked) }) : rec)
209
- .filter((rec) => rec.isLinked || rec.isPinned);
210
- }
211
- });
212
- setIsPinLoading((prevPiningMap) => (Object.assign(Object.assign({}, prevPiningMap), { [recommendationToUpdate.resourceId]: false })));
213
- }
214
- catch (error) {
215
- if (error.status === 403) {
216
- ToastNotification.addDangerMessage(t('You do not have the proper entitlements to pin a recommendation.'), React.createElement(React.Fragment, null,
217
- t('Please'),
218
- React.createElement("a", { href: "/support/contact/customerService" },
219
- " ",
220
- t('contact Customer Service'),
221
- " "),
222
- t('if you think this is an error.')));
223
- }
224
- else {
225
- isPinned !== undefined || isLinked !== undefined
226
- ? caseUpdateError.showError(error, t('Could not unpin the solution'))
227
- : caseUpdateError.showError(error, t('Could not pin the solution'));
228
- }
229
- setIsPinLoading((prevPiningMap) => {
230
- const newMap = Object.assign({}, prevPiningMap);
231
- delete newMap[recommendationToUpdate.resourceId];
232
- return newMap;
233
- });
234
- }
235
- });
214
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
215
+ // const updateRecommendations =
216
+ // (recommendationToUpdate: ICaseDetailAsideRecommendation, isPinned: boolean, isLinked: boolean) => async () => {
217
+ // try {
218
+ // setIsPinLoading((prevPiningMap) => ({ ...prevPiningMap, [recommendationToUpdate.resourceId]: true }));
219
+ // await updateRecommendation(recommendationToUpdate, isLinked !== undefined ? !isLinked : !isPinned);
220
+ //
221
+ // setTopRecommendations((prevTopRecs) =>
222
+ // prevTopRecs.map((rec) =>
223
+ // rec.resourceId === recommendationToUpdate.resourceId
224
+ // ? {
225
+ // ...rec,
226
+ // isLinked: isLinked !== undefined ? !isLinked : !!rec.isLinked,
227
+ // isPinned: isPinned !== undefined ? !isPinned : !!rec.isPinned,
228
+ // }
229
+ // : rec
230
+ // )
231
+ // );
232
+ //
233
+ // setRecommendations((prevRecs) => {
234
+ // const toBeAdded = !prevRecs.some((r) => r.resourceId === recommendationToUpdate.resourceId);
235
+ //
236
+ // if (toBeAdded) {
237
+ // return [
238
+ // ...prevRecs,
239
+ // {
240
+ // ...recommendationToUpdate,
241
+ // isLinked: isLinked !== undefined ? !isLinked : recommendationToUpdate.isLinked,
242
+ // isPinned: isPinned !== undefined ? !isPinned : recommendationToUpdate.isPinned,
243
+ // isPinnedAndLinked:
244
+ // (isPinned !== undefined ? !isPinned : recommendationToUpdate.isPinned) &&
245
+ // (isLinked !== undefined ? !isLinked : recommendationToUpdate.isLinked),
246
+ // },
247
+ // ];
248
+ // } else {
249
+ // return prevRecs
250
+ // .map((rec) =>
251
+ // rec.resourceId === recommendationToUpdate.resourceId
252
+ // ? {
253
+ // ...rec,
254
+ // isLinked: isLinked !== undefined ? !isLinked : !!rec.isLinked,
255
+ // isPinned: isPinned !== undefined ? !isPinned : !!rec.isPinned,
256
+ // isPinnedAndLinked:
257
+ // (isPinned !== undefined ? !isPinned : rec.isPinned) &&
258
+ // (isLinked !== undefined ? !isLinked : rec.isLinked),
259
+ // }
260
+ // : rec
261
+ // )
262
+ // .filter((rec) => rec.isLinked || rec.isPinned);
263
+ // }
264
+ // });
265
+ // setIsPinLoading((prevPiningMap) => ({ ...prevPiningMap, [recommendationToUpdate.resourceId]: false }));
266
+ // } catch (error) {
267
+ // if (error.status === 403) {
268
+ // ToastNotification.addDangerMessage(
269
+ // t('You do not have the proper entitlements to pin a recommendation.'),
270
+ // <>
271
+ // {t('Please')}
272
+ // <a href="/support/contact/customerService"> {t('contact Customer Service')} </a>
273
+ // {t('if you think this is an error.')}
274
+ // </>
275
+ // );
276
+ // } else {
277
+ // isPinned !== undefined || isLinked !== undefined
278
+ // ? caseUpdateError.showError(error, t('Could not unpin the solution'))
279
+ // : caseUpdateError.showError(error, t('Could not pin the solution'));
280
+ // }
281
+ // setIsPinLoading((prevPiningMap) => {
282
+ // const newMap = { ...prevPiningMap };
283
+ // delete newMap[recommendationToUpdate.resourceId];
284
+ // return newMap;
285
+ // });
286
+ // }
287
+ // };
236
288
  // fetch top recommendations
237
289
  useEffect(() => {
238
290
  function fetchRecs() {
@@ -292,18 +344,71 @@ export const CaseSolutions = forwardRef((props, ref) => {
292
344
  }
293
345
  }, [allDocs, isFetchingCaseDetails, isLoadingRecommendations, recomendationsObj]);
294
346
  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) }))));
297
- // customer logged in: we show pins and perform pin/unpin
298
- 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) }));
347
+ React.createElement(CaseSolutionsItem
348
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore showPin when pin/unpin is re-enabled
349
+ , {
350
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore showPin when pin/unpin is re-enabled
351
+ showPin: false, type: type, pinTitle: '', isPinLoading: {}, index: index, recommendation: recommendation, onPinClicked: () => { }, onLinkClick: (name) => addDtmEvent(name) })));
352
+ // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore showPin when pin/unpin is re-enabled
353
+ const renderPinsByCustomer = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: false, type: type, pinTitle: '', isPinLoading: {}, index: index, recommendation: recommendation, onPinClicked: () => { }, onLinkClick: (name) => addDtmEvent(name) }));
354
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
299
355
  // 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) }));
356
+ // const renderHandpickedCustomerView = (
357
+ // recommendation: ICaseDetailAsideRecommendation,
358
+ // index: number,
359
+ // type: string
360
+ // ) => (
361
+ // <HandpickedItem
362
+ // type={type}
363
+ // caseNumber={props.caseNumber}
364
+ // pinTitle={recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin')}
365
+ // isPinLoading={isPinLoading}
366
+ // index={index}
367
+ // recommendation={recommendation}
368
+ // onRecommendationLike={() => setIsCloseCaseModalOpen(true)}
369
+ // onLinkClick={(name) => addDtmEvent(name)}
370
+ // />
371
+ // );
372
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
301
373
  // 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) }));
374
+ // const renderPinnedByCustomerRedhatterView = (
375
+ // recommendation: ICaseDetailAsideRecommendation,
376
+ // index: number,
377
+ // type: string
378
+ // ) => (
379
+ // <CaseSolutionsItem
380
+ // showLink={true}
381
+ // type={type}
382
+ // pinTitle={recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin')}
383
+ // isPinLoading={isPinLoading}
384
+ // index={index}
385
+ // recommendation={recommendation}
386
+ // onPinClicked={updateRecommendations(recommendation, undefined, recommendation.isLinked)}
387
+ // onLinkClick={(name) => addDtmEvent(name)}
388
+ // />
389
+ // );
390
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
303
391
  // 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);
392
+ // const renderHandPickedByRedHatter = (
393
+ // recommendation: ICaseDetailAsideRecommendation,
394
+ // index: number,
395
+ // type: string
396
+ // ) => (
397
+ // <div className="pf-v6-u-ml-lg">
398
+ // <CaseSolutionsItem
399
+ // showLink={true}
400
+ // type={type}
401
+ // pinTitle={recommendation.isLinked ? t('Unlink') : t('Link')}
402
+ // isPinLoading={isPinLoading}
403
+ // index={index}
404
+ // recommendation={recommendation}
405
+ // onPinClicked={updateRecommendations(recommendation, undefined, recommendation.isLinked)}
406
+ // onLinkClick={(name) => addDtmEvent(name)}
407
+ // />
408
+ // </div>
409
+ // );
410
+ // TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
411
+ // const linkedRecommendations = recommendations.filter((r) => r.isLinked);
307
412
  const pinnedRecommendations = recommendations.filter((r) => r.isPinned);
308
413
  const closeCaseModal = (React.createElement(Modal, { variant: ModalVariant.small, isOpen: isCloseCaseModalOpen && caseStatus !== CaseStatusEnum.CLOSED, onClose: () => setIsCloseCaseModalOpen(false) },
309
414
  React.createElement(ModalHeader, { title: t('Did this solve your case?') }),
@@ -316,30 +421,19 @@ export const CaseSolutions = forwardRef((props, ref) => {
316
421
  React.createElement(Trans, null, "Close case")))));
317
422
  return (React.createElement(React.Fragment, null,
318
423
  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
424
  pinnedRecommendations.length > 0 && (React.createElement(Card, { isExpanded: pinnedOpen },
331
425
  React.createElement(CardHeader, { className: "pf-v6-u-display-flex", onExpand: () => setPinnedOpen((pre) => !pre) },
332
426
  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"))),
427
+ React.createElement("span", null,
428
+ React.createElement(Trans, null, "My pinned recommendations")),
334
429
  React.createElement("span", { className: "badge-item pf-v6-u-font-size-sm pf-v6-u-mx-sm", style: { lineHeight: '18px' } },
335
430
  React.createElement(Label, null, pinnedRecommendations.length)))),
336
431
  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: [
340
- { title: '5', value: 5 },
341
- { title: '10', value: 10 },
342
- ] })))))),
432
+ React.createElement(CardBody, null,
433
+ React.createElement(PaginatedList, { id: "case-details-pinned-recommendations", listItems: pinnedRecommendations.map((rec, index) => renderPinsByCustomer(rec, index, 'pinned-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
434
+ { title: '5', value: 5 },
435
+ { title: '10', value: 10 },
436
+ ] }))))),
343
437
  topRecommendations.length > 0 && (React.createElement(Card, { className: "card-support recommendations", ref: ref },
344
438
  React.createElement(CardHeader, null,
345
439
  React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" },
@@ -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,qBA+D9C"}
@@ -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';
@@ -12,11 +13,10 @@ export function CaseSolutionsItem(props) {
12
13
  const isLoading = !!props.isPinLoading[props.recommendation.resourceId];
13
14
  return (React.createElement("div", null,
14
15
  React.createElement("div", { className: "recommendation-header" },
15
- React.createElement(Button, { icon: React.createElement(React.Fragment, null,
16
+ props.showPin && (React.createElement(Button, { icon: React.createElement(React.Fragment, null,
16
17
  isLoading && React.createElement(LoadingIndicator, { show: isLoading, size: "xs" }),
17
- !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" }),
18
+ !isLoading && (React.createElement(React.Fragment, null,
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,qBAmN5C"}
@@ -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];
@@ -43,18 +42,15 @@ export function ReopenCaseModal(props) {
43
42
  return isValid;
44
43
  };
45
44
  const getCommentBody = () => {
46
- return `**Reason for reopening case:** \n${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
45
+ return `<p><strong>Reason for reopening case:</strong></p><p>${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
47
46
  ? `${props.isInternal ? '' : '. '}${reopenDescription}`
48
- : ''}
49
- \n **Reopened date:** \n${formatDateTime(Date())}
50
- \n**Reopened by:** \n${props.whoIsUpdating}
51
- \n**Reopened reason other description:**\n${reopenDescription}`;
47
+ : ''}</p><p><strong>Reopened date:</strong></p><p>${formatDateTime(Date())}</p><p><strong>Reopened by:</strong></p><p>${props.whoIsUpdating}</p><p><strong>Reopened reason other description:</strong></p><p>${reopenDescription}</p>`;
52
48
  };
53
49
  const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
54
50
  if (!checkForRequiredFields())
55
51
  return;
56
52
  let submissionDate = new Date();
57
- props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || CaseStatusEnum.WAITING_ON_REDHAT, submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
53
+ props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || 'In Progress', submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
58
54
  });
59
55
  const onReasonChange = (option) => {
60
56
  setSelectedReason(option.value);
@@ -70,7 +66,7 @@ export function ReopenCaseModal(props) {
70
66
  label: option,
71
67
  value: option,
72
68
  }));
73
- const getStatusDropdownOptions = map(props.allStatuses.filter((status) => status !== CaseStatusEnum.CLOSED), (option) => ({
69
+ const getStatusDropdownOptions = map(PORTAL_OPEN_DISPLAY_STATUSES, (option) => ({
74
70
  label: option,
75
71
  value: option,
76
72
  }));
@@ -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,qBA+JlD"}
@@ -7,27 +7,24 @@ 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);
27
+ const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
31
28
  // To handle modal cancel and close
32
29
  const onCancel = () => {
33
30
  props.onClose && props.onClose();
@@ -41,13 +38,17 @@ export function ESSRemoteSessionModal(props) {
41
38
  screenSessionRequested: true,
42
39
  });
43
40
  try {
44
- yield postCommentRequest({
41
+ yield createComment({
42
+ caseId: caseSalesforceId,
43
+ body: requestComment,
44
+ isPublic: true,
45
+ });
46
+ client.refetchQueries({ include: [GET_CASE_COMMENTS] });
47
+ yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
48
+ apolloClient: client,
45
49
  caseNumber: props.caseNumber,
46
- commentBody: requestComment,
47
- contentType: 'markdown',
50
+ existingCaseDetails,
48
51
  });
49
- updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
50
- checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
51
52
  onCancel();
52
53
  setAgreeLoading(false);
53
54
  ToastNotification.addSuccessMessage(t('Remote session has been requested successfully'), t('Red Hat will add a comment to your case to schedule your remote session.'));
@@ -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":"AAsBA,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,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAwb7C"}