@rh-support/troubleshoot 2.6.340 → 2.6.349

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 (331) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +29 -19
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +16 -91
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +1 -1
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +32 -61
  9. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/Case.js +33 -60
  11. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -39
  13. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +4 -15
  15. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +55 -82
  17. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +0 -2
  18. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
  23. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/CaseOverview/index.js +45 -76
  25. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +109 -203
  27. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  30. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
  31. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +9 -5
  33. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +17 -18
  35. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +47 -51
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +44 -49
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +45 -51
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +10 -21
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +2 -0
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -3
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +57 -132
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +4 -9
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +58 -93
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +91 -0
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +33 -78
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +153 -122
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +137 -74
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +7 -18
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +263 -211
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
  81. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  82. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
  83. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  84. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
  85. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  86. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
  87. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
  88. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -18
  90. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
  92. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  93. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
  94. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  95. package/lib/esm/components/CaseInformation/CaseGroup.js +57 -123
  96. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  97. package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
  98. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  99. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +30 -107
  100. package/lib/esm/components/CaseInformation/Description.js +1 -1
  101. package/lib/esm/components/CaseInformation/FileDiag.js +7 -10
  102. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  103. package/lib/esm/components/CaseInformation/Fts.js +1 -2
  104. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  105. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
  106. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  107. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  108. package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
  109. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  110. package/lib/esm/components/CaseManagement/Cep.js +9 -11
  111. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
  112. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  113. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
  114. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  115. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +7 -9
  116. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  117. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +18 -13
  118. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  119. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
  120. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  121. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
  122. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  123. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  124. package/lib/esm/components/IdeaInformation/IdeaInformation.js +18 -16
  125. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  126. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  127. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  128. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  129. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  130. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  131. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  132. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  133. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
  134. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  135. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  136. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  137. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
  138. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  139. package/lib/esm/components/Recommendations/AsideResults.js +3 -4
  140. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  141. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
  142. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  143. package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
  144. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  145. package/lib/esm/components/Recommendations/Recommendations.js +2 -2
  146. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  147. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
  148. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  149. package/lib/esm/components/Review/Review.js +16 -20
  150. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  151. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  152. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  153. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  154. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  155. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  156. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +62 -135
  157. package/lib/esm/components/shared/Constants.d.ts +0 -5
  158. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  159. package/lib/esm/components/shared/Constants.js +0 -5
  160. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  161. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  162. package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
  163. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  164. package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
  165. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  166. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
  167. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  168. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  169. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -21
  170. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  171. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
  172. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
  173. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  174. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
  175. package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
  176. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  177. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  178. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  179. package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -116
  180. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  181. package/lib/esm/components/shared/useIsSectionValid.js +57 -22
  182. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  183. package/lib/esm/components/shared/usePostComment.js +28 -16
  184. package/lib/esm/components/shared/utils.d.ts +0 -1
  185. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  186. package/lib/esm/components/shared/utils.js +3 -9
  187. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  188. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -160
  189. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  190. package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
  191. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  192. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
  193. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  194. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
  195. package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
  196. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  197. package/lib/esm/constants/caseDetailsConstants.js +0 -5
  198. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  199. package/lib/esm/css/case.css +202 -60
  200. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  201. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  202. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
  203. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  204. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  205. package/lib/esm/hooks/useS3Upload.d.ts +4 -5
  206. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  207. package/lib/esm/hooks/useS3Upload.js +30 -28
  208. package/lib/esm/i18n/template-de.d.ts +2 -2
  209. package/lib/esm/i18n/template-de.js +2 -2
  210. package/lib/esm/i18n/template-es.d.ts +2 -2
  211. package/lib/esm/i18n/template-es.js +2 -2
  212. package/lib/esm/i18n/template-fr.d.ts +2 -2
  213. package/lib/esm/i18n/template-fr.js +2 -2
  214. package/lib/esm/i18n/template-it.d.ts +2 -2
  215. package/lib/esm/i18n/template-it.js +2 -2
  216. package/lib/esm/i18n/template-jp.d.ts +2 -2
  217. package/lib/esm/i18n/template-jp.js +2 -2
  218. package/lib/esm/i18n/template-ko.d.ts +2 -2
  219. package/lib/esm/i18n/template-ko.js +2 -2
  220. package/lib/esm/i18n/template-pt.d.ts +2 -2
  221. package/lib/esm/i18n/template-pt.js +2 -2
  222. package/lib/esm/i18n/template-ru.d.ts +2 -2
  223. package/lib/esm/i18n/template-ru.js +2 -2
  224. package/lib/esm/i18n/template-zh.d.ts +2 -2
  225. package/lib/esm/i18n/template-zh.js +2 -2
  226. package/lib/esm/index.js +0 -1
  227. package/lib/esm/models/cache.d.ts +2 -0
  228. package/lib/esm/models/cache.d.ts.map +1 -1
  229. package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -121
  230. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  231. package/lib/esm/reducers/CaseConstNTypes.js +7 -30
  232. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
  233. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  234. package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
  235. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
  236. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  237. package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
  238. package/lib/esm/reducers/CaseHelpers.d.ts +2 -3
  239. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  240. package/lib/esm/reducers/CaseHelpers.js +15 -98
  241. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  242. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  243. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  244. package/lib/esm/reducers/CaseReducer.d.ts +11 -50
  245. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  246. package/lib/esm/reducers/CaseReducer.js +99 -270
  247. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  248. package/lib/esm/reducers/RecommendationsReducer.js +18 -15
  249. package/lib/esm/scss/_main.scss +0 -9
  250. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
  251. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  252. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  253. package/package.json +8 -9
  254. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
  255. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
  256. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
  257. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
  258. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
  259. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
  260. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
  261. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
  262. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
  263. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
  264. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
  265. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
  266. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
  267. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
  268. package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
  269. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
  270. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
  271. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
  272. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
  273. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
  274. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
  275. package/lib/esm/graphql/index.d.ts +0 -4
  276. package/lib/esm/graphql/index.d.ts.map +0 -1
  277. package/lib/esm/graphql/index.js +0 -3
  278. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  279. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  280. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  281. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  282. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  283. package/lib/esm/graphql/mutations/index.js +0 -1
  284. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  285. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  286. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
  287. package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
  288. package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
  289. package/lib/esm/graphql/queries/getParentId.js +0 -16
  290. package/lib/esm/graphql/queries/index.d.ts +0 -3
  291. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  292. package/lib/esm/graphql/queries/index.js +0 -2
  293. package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
  294. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  295. package/lib/esm/graphql/schemas/escalation.js +0 -1
  296. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  297. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  298. package/lib/esm/graphql/schemas/index.js +0 -1
  299. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
  300. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
  301. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
  302. package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
  303. package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
  304. package/lib/esm/hooks/useCaseComments/index.js +0 -5
  305. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
  306. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
  307. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
  308. package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
  309. package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
  310. package/lib/esm/hooks/useCaseComments/types.js +0 -1
  311. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
  312. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
  313. package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
  314. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
  315. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
  316. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
  317. package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
  318. package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
  319. package/lib/esm/hooks/useCaseHistory.js +0 -98
  320. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
  321. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
  322. package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
  323. package/lib/esm/models/caseHistory.d.ts +0 -80
  324. package/lib/esm/models/caseHistory.d.ts.map +0 -1
  325. package/lib/esm/models/caseHistory.js +0 -1
  326. package/lib/esm/utils/TimelineUtils.d.ts +0 -41
  327. package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
  328. package/lib/esm/utils/TimelineUtils.js +0 -135
  329. package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
  330. package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
  331. package/lib/esm/utils/caseHistoryUtils.js +0 -165
@@ -22,14 +22,12 @@ 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
- // 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';
25
+ import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
27
26
  import { getSolrParams } from '@rh-support/utils';
28
27
  import { isEmpty } from 'lodash';
29
28
  import find from 'lodash/find';
30
29
  import isEqual from 'lodash/isEqual';
31
- // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
32
- // import some from 'lodash/some';
30
+ import some from 'lodash/some';
33
31
  import React, { forwardRef, useContext, useEffect, useState } from 'react';
34
32
  import { Trans, useTranslation } from 'react-i18next';
35
33
  import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
@@ -44,6 +42,7 @@ import { fetchRecommendations, fetchWatsonXRecommendations } from '../../../redu
44
42
  import { extractKTQuestion1FromDescription } from '../../../utils/caseUtils';
45
43
  import { usePostComment } from '../../shared/usePostComment';
46
44
  import { CaseSolutionsItem } from './CaseSolutionsItem';
45
+ import { HandpickedItem } from './HandpicketItem';
47
46
  // some of the pinned and hadpicked titles are set to 'Red Hat Knowledge Base'
48
47
  // this workaround is added till backend fix
49
48
  const titleFix = (recommendations, allDocs) => __awaiter(void 0, void 0, void 0, function* () {
@@ -119,32 +118,27 @@ export const CaseSolutions = forwardRef((props, ref) => {
119
118
  }), isEqual);
120
119
  const caseDispatch = useCaseDispatch();
121
120
  const caseOverviewDispatch = useContext(CaseOverviewDispatchContext);
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
- // };
121
+ const [isExpanded, setIsExpanded] = useState(false);
122
+ const onExpand = () => {
123
+ setIsExpanded(!isExpanded);
124
+ };
127
125
  const { recommendationState: { isLoadingRecommendations, allDocs }, } = useRecommendationStateContext();
128
126
  const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
129
127
  const recommendationsDispatch = useRecommendationDispatchContext();
130
128
  const { postComment } = usePostComment({ caseNumber: props.caseNumber });
131
129
  const { caseNumber, isSecureSupportAccount } = props;
132
- // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
133
- // const [isPinLoading, setIsPinLoading] = useState({});
130
+ const [isPinLoading, setIsPinLoading] = useState({});
134
131
  const [isCaseCloseLoading, setIsCaseCloseLoading] = useState(false);
135
132
  const [pinnedOpen, setPinnedOpen] = useState(true);
136
133
  const [recommendations, setRecommendations] = useState([]);
137
134
  const [topRecommendations, setTopRecommendations] = useState([]);
138
135
  const [isCloseCaseModalOpen, setIsCloseCaseModalOpen] = useState(false);
139
- // TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
140
- // const ability = useContext(AbilityContext);
136
+ const ability = useContext(AbilityContext);
141
137
  const { t } = useTranslation();
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);
138
+ const hasPin = some(recommendations, (p) => p.isPinned);
139
+ const hasLink = some(recommendations, (p) => p.isLinked);
146
140
  const getCommentBody = () => {
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>`;
141
+ return `**Reason for closing case:** \nOther. Found a pinned article that perfectly resolved the issue. Closing this case now.`;
148
142
  };
149
143
  const handleCaseClose = () => __awaiter(void 0, void 0, void 0, function* () {
150
144
  setStatusUpdating(caseOverviewDispatch, true);
@@ -157,134 +151,88 @@ export const CaseSolutions = forwardRef((props, ref) => {
157
151
  updateDiscussionState: true,
158
152
  doNotChangeStatus: true,
159
153
  });
160
- setIsCloseCaseModalOpen(false);
161
154
  ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
155
+ setIsCloseCaseModalOpen(false);
162
156
  }
163
157
  catch (err) {
164
- caseUpdateError.showError(err, t('Status failed to update, try refreshing the page. Please contact us if the problem persists.'));
158
+ caseUpdateError.showError(err, t('Status failed to update'));
165
159
  }
166
160
  finally {
167
161
  setIsCaseCloseLoading(false);
168
162
  setStatusUpdating(caseOverviewDispatch, false);
169
163
  }
170
164
  });
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
- // );
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);
211
186
  const addDtmEvent = (stepName) => {
212
187
  // reserve for when fixing dtm
213
188
  };
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
- // };
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
+ });
288
236
  // fetch top recommendations
289
237
  useEffect(() => {
290
238
  function fetchRecs() {
@@ -344,71 +292,18 @@ export const CaseSolutions = forwardRef((props, ref) => {
344
292
  }
345
293
  }, [allDocs, isFetchingCaseDetails, isLoadingRecommendations, recomendationsObj]);
346
294
  const renderTopRecommendations = (recommendation, index, type) => (React.createElement(React.Fragment, null,
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
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) }));
355
299
  // customer logged in: we show links but perform pin/unpin
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
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) }));
373
301
  // redhatter logged in: we show pins but perform link/unlink
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
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) }));
391
303
  // redhatter logged in: we show links and perform link/unlink
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);
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);
412
307
  const pinnedRecommendations = recommendations.filter((r) => r.isPinned);
413
308
  const closeCaseModal = (React.createElement(Modal, { variant: ModalVariant.small, isOpen: isCloseCaseModalOpen && caseStatus !== CaseStatusEnum.CLOSED, onClose: () => setIsCloseCaseModalOpen(false) },
414
309
  React.createElement(ModalHeader, { title: t('Did this solve your case?') }),
@@ -421,19 +316,30 @@ export const CaseSolutions = forwardRef((props, ref) => {
421
316
  React.createElement(Trans, null, "Close case")))));
422
317
  return (React.createElement(React.Fragment, null,
423
318
  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
+ ] })))))),
424
330
  pinnedRecommendations.length > 0 && (React.createElement(Card, { isExpanded: pinnedOpen },
425
331
  React.createElement(CardHeader, { className: "pf-v6-u-display-flex", onExpand: () => setPinnedOpen((pre) => !pre) },
426
332
  React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" },
427
- React.createElement("span", null,
428
- React.createElement(Trans, null, "My pinned recommendations")),
333
+ React.createElement("span", null, canLinkUnlink ? (React.createElement(Trans, null, "Pinned by customer")) : (React.createElement(Trans, null, "My pinned recommendations"))),
429
334
  React.createElement("span", { className: "badge-item pf-v6-u-font-size-sm pf-v6-u-mx-sm", style: { lineHeight: '18px' } },
430
335
  React.createElement(Label, null, pinnedRecommendations.length)))),
431
336
  React.createElement(CardExpandableContent, null,
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
- ] }))))),
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
+ ] })))))),
437
343
  topRecommendations.length > 0 && (React.createElement(Card, { className: "card-support recommendations", ref: ref },
438
344
  React.createElement(CardHeader, null,
439
345
  React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" },
@@ -4,6 +4,7 @@ import { CaseRecommendationEvalEnum } from '../../../constants/caseDetailsConsta
4
4
  interface IProps {
5
5
  showPin?: boolean;
6
6
  isPinned?: boolean;
7
+ showLink?: boolean;
7
8
  pinTitle: string;
8
9
  index: number;
9
10
  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;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
+ {"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,6 +1,5 @@
1
1
  import { Button, Icon } from '@patternfly/react-core';
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';
2
+ import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
4
3
  import OutlinedStarIcon from '@patternfly/react-icons/dist/js/icons/outlined-star-icon';
5
4
  import StarIcon from '@patternfly/react-icons/dist/js/icons/star-icon';
6
5
  import { LoadingIndicator } from '@rh-support/components';
@@ -13,10 +12,11 @@ export function CaseSolutionsItem(props) {
13
12
  const isLoading = !!props.isPinLoading[props.recommendation.resourceId];
14
13
  return (React.createElement("div", null,
15
14
  React.createElement("div", { className: "recommendation-header" },
16
- props.showPin && (React.createElement(Button, { icon: React.createElement(React.Fragment, null,
15
+ React.createElement(Button, { icon: React.createElement(React.Fragment, null,
17
16
  isLoading && React.createElement(LoadingIndicator, { show: isLoading, size: "xs" }),
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" })),
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" }),
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,11 +1,13 @@
1
1
  import React from 'react';
2
+ import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
2
3
  interface IProps {
3
4
  onConfirm: (commentBody: any, newStatus: any, reopenedAt?: any, reopenedBySSOName?: any, reopenedReason?: any, reopenedReasonOther?: any) => void;
4
5
  onClose: () => void;
5
6
  caseNumber: string;
6
7
  isInternal: boolean;
8
+ allStatuses: string[];
7
9
  isUpdating: boolean;
8
- reopenStatus: string;
10
+ reopenStatus: CaseStatusEnum;
9
11
  whoIsUpdating: string;
10
12
  }
11
13
  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,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"}
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"}
@@ -9,11 +9,12 @@ 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, PORTAL_OPEN_DISPLAY_STATUSES } from '@rh-support/utils';
12
+ import { formatDateTime } 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';
17
18
  const reasonWithDescription = ['Other'];
18
19
  const reasonWithoutDescription = ['I am experiencing the same issue', 'My case has been closed prematurely'];
19
20
  const reasonsList = [...reasonWithoutDescription, ...reasonWithDescription];
@@ -42,15 +43,18 @@ export function ReopenCaseModal(props) {
42
43
  return isValid;
43
44
  };
44
45
  const getCommentBody = () => {
45
- return `<p><strong>Reason for reopening case:</strong></p><p>${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
46
+ return `**Reason for reopening case:** \n${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
46
47
  ? `${props.isInternal ? '' : '. '}${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>`;
48
+ : ''}
49
+ \n **Reopened date:** \n${formatDateTime(Date())}
50
+ \n**Reopened by:** \n${props.whoIsUpdating}
51
+ \n**Reopened reason other description:**\n${reopenDescription}`;
48
52
  };
49
53
  const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
50
54
  if (!checkForRequiredFields())
51
55
  return;
52
56
  let submissionDate = new Date();
53
- props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || 'In Progress', submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
57
+ props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || CaseStatusEnum.WAITING_ON_REDHAT, submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
54
58
  });
55
59
  const onReasonChange = (option) => {
56
60
  setSelectedReason(option.value);
@@ -66,7 +70,7 @@ export function ReopenCaseModal(props) {
66
70
  label: option,
67
71
  value: option,
68
72
  }));
69
- const getStatusDropdownOptions = map(PORTAL_OPEN_DISPLAY_STATUSES, (option) => ({
73
+ const getStatusDropdownOptions = map(props.allStatuses.filter((status) => status !== CaseStatusEnum.CLOSED), (option) => ({
70
74
  label: option,
71
75
  value: option,
72
76
  }));
@@ -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;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"}
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"}
@@ -7,24 +7,27 @@ 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
+ import { publicApi } from '@cee-eng/hydrajs';
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 } from '@rh-support/components';
14
- import isEqual from 'lodash/isEqual';
13
+ import { ToastNotification, useFetch } from '@rh-support/components';
15
14
  import React, { useState } from 'react';
16
15
  import { Trans, useTranslation } from 'react-i18next';
17
- import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
18
- import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
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';
19
20
  import { checkForCaseStatusToggleOnAttachOrComment, setCaseDetails, updateCaseDetails, } from '../../../reducers/CaseReducer';
20
21
  export function ESSRemoteSessionModal(props) {
21
22
  const { t } = useTranslation();
22
23
  const caseDispatch = useCaseDispatch();
23
24
  const [agreeLoading, setAgreeLoading] = useState(false);
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);
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();
28
31
  // To handle modal cancel and close
29
32
  const onCancel = () => {
30
33
  props.onClose && props.onClose();
@@ -38,17 +41,13 @@ export function ESSRemoteSessionModal(props) {
38
41
  screenSessionRequested: true,
39
42
  });
40
43
  try {
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,
44
+ yield postCommentRequest({
49
45
  caseNumber: props.caseNumber,
50
- existingCaseDetails,
46
+ commentBody: requestComment,
47
+ contentType: 'markdown',
51
48
  });
49
+ updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
50
+ checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
52
51
  onCancel();
53
52
  setAgreeLoading(false);
54
53
  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":"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"}
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"}