@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
@@ -8,9 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { SingleSelectDropdown, ValueChangedIcon } from '@rh-support/components';
11
+ import { mapSfdcStatusToPortalStatus, PORTAL_USER_SELECTABLE_STATUSES } from '@rh-support/utils';
11
12
  import isEmpty from 'lodash/isEmpty';
12
13
  import map from 'lodash/map';
13
- import React, { useContext, useState } from 'react';
14
+ import React, { useContext, useMemo, useState } from 'react';
14
15
  import { Trans, useTranslation } from 'react-i18next';
15
16
  import { CaseValuesToWatch } from '../../shared/Constants';
16
17
  import { getChangedValueTooltip } from '../../shared/utils';
@@ -26,29 +27,30 @@ function CaseStatus(props) {
26
27
  setIsCaseStatusInValid(isEmpty(selectedItem));
27
28
  };
28
29
  const { isExportingPDF } = useContext(PDFContext);
30
+ const selectedPortalStatus = useMemo(() => mapSfdcStatusToPortalStatus(props.selectedStatus), [props.selectedStatus]);
29
31
  // value changed logic to show a non local status change
30
32
  const [localStatusChange, setLocalStatusChange] = useState(false);
31
33
  const afterLocalChange = () => setLocalStatusChange(false);
32
34
  const onCaseStatusChange = (option) => __awaiter(this, void 0, void 0, function* () {
33
- if (option.value === props.selectedStatus) {
35
+ if (option.value === selectedPortalStatus) {
34
36
  return;
35
37
  }
36
38
  yield props.onStatusChange(option.value);
37
39
  setLocalStatusChange(true);
38
40
  validateCaseStatus(option);
39
41
  });
40
- const getDropdownOptions = map(props.allStatuses || [], (option) => ({
42
+ const getDropdownOptions = map(PORTAL_USER_SELECTABLE_STATUSES, (option) => ({
41
43
  label: option,
42
44
  value: option,
43
45
  }));
44
46
  const getSelectedDropdownOption = {
45
- label: props.selectedStatus,
46
- value: props.selectedStatus,
47
+ label: selectedPortalStatus,
48
+ value: selectedPortalStatus,
47
49
  };
48
50
  return (React.createElement("div", { className: `form-group ${props.className}`, id: `${props.id}` },
49
51
  React.createElement("h3", { className: "subheading subheading-sm" },
50
52
  React.createElement(Trans, null, "Status"),
51
- React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localStatusChange, value: props.selectedStatus, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.status) }),
53
+ React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localStatusChange, value: selectedPortalStatus, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.status) }),
52
54
  React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
53
55
  React.createElement(SingleSelectDropdown, { placeholder: t(`Select a status`), dataTrackingId: "case-details-status-selector", options: getDropdownOptions, selected: getSelectedDropdownOption, isDisabled: props.hasError || props.isDisabled || props.isFetching, isLoading: props.isFetching, isInvalid: isCaseStatusInValid, onSelect: onCaseStatusChange })));
54
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBA0fjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBAwjBjD"}
@@ -7,13 +7,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { useApolloClient } from '@apollo/client/react';
10
11
  import { Alert, AlertVariant, Button, ButtonVariant, ExpandableSection, Label, ModalVariant, } from '@patternfly/react-core';
11
12
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
12
13
  import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
13
14
  import { ToastNotification, useConfirmation } from '@rh-support/components';
14
- import { CloseCaseModal, fetchCaseSeverities, fetchCaseTypes, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
15
+ import { CloseCaseModal, fetchAllStatuses, fetchCaseSeverities, fetchCaseTypes, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
15
16
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
16
- import { dtmTrackEventCaseStepEncountered, haventLoadedMetadata, isOpenShiftOnlineProduct, PreviousCaseTypes, toNewCaseTypeMapper, toNewCaseTypeSwitcher, } from '@rh-support/utils';
17
+ import { dtmTrackEventCaseStepEncountered, haventLoadedMetadata, isOpenShiftOnlineProduct, mapSfdcStatusToPortalStatus, PreviousCaseTypes, resolvePortalStatusToApiValue, toNewCaseTypeMapper, toNewCaseTypeSwitcher, } from '@rh-support/utils';
17
18
  import isEqual from 'lodash/isEqual';
18
19
  import React, { useContext, useEffect, useRef, useState } from 'react';
19
20
  import { Trans, useTranslation } from 'react-i18next';
@@ -22,14 +23,15 @@ import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
22
23
  import { CaseOverviewDispatchContext, CaseOverviewStateContext } from '../../../context/CaseOverviewContext';
23
24
  import { useCaseUpdateErrorMessage } from '../../../hooks/useCaseUpdateErrorMessage';
24
25
  import { SupportLevelDisplay } from '../../../reducers/CaseConstNTypes';
25
- import { fetchAllStatuses, fetchCaseHydra, setSeverityUpdating, setStatusUpdating, setTypeUpdating, } from '../../../reducers/CaseOverviewReducer';
26
- import { updateCaseDetails } from '../../../reducers/CaseReducer';
26
+ import { fetchCaseHydra, setSeverityUpdating, setStatusUpdating, setTypeUpdating, } from '../../../reducers/CaseOverviewReducer';
27
+ import { updateCaseDetailsGraphQL } from '../../../reducers/CaseReducer';
27
28
  import Severity from '../../CaseInformation/Severity';
28
29
  import { usePostComment } from '../../shared/usePostComment';
29
30
  import { ReopenCaseModal } from '../ConfirmationModals/ReopenCaseModal';
30
31
  import { PDFContext } from '../PDFContainer';
31
32
  import { CaseInformation } from '../Tabs/CaseDetails/CaseInformation';
32
- import { CaseContactPhoneNumberAlert } from '../Tabs/CaseDetails/CasePhoneNumberConfirmAlert';
33
+ // TODO: Re-enable once phone number verification flow is fully supported with GraphQL
34
+ // import { CaseContactPhoneNumberAlert } from '../Tabs/CaseDetails/CasePhoneNumberConfirmAlert';
33
35
  import Summary from '../Tabs/CaseDetails/Summary';
34
36
  import CaseOwnerInfo from './CaseOwnerInfo';
35
37
  import CaseStatus from './CaseStatus';
@@ -49,15 +51,17 @@ export default function CaseOverview(props) {
49
51
  const { isExportingPDF, exportPDFButton } = useContext(PDFContext);
50
52
  const reopenStatusRef = useRef(null);
51
53
  const { postComment, isPostingComment } = usePostComment({ caseNumber: props.caseNumber });
52
- const { product, version, status, caseType, createdDate, createdById, ownerId, caseNumber, entitlementSla, cep, accountNumber, isPrivate, isCaseUpdating, contactIsPartner, hotfixRequested, hotfixDelivered, selectedAccountDetails, firstCaseInactivityWarningSentAt, secondCaseInactivityWarningSentAt, } = useCaseSelector((state) => ({
54
+ const { product, version, status, caseType, createdDate, createdByName, ownerName, isFetchingCaseDetails, isFetchingCaseDetailsError, caseNumber, entitlementSla, cep, accountNumber, isPrivate, isCaseUpdating, contactIsPartner, hotfixRequested, hotfixDelivered, selectedAccountDetails, firstCaseInactivityWarningSentAt, secondCaseInactivityWarningSentAt, } = useCaseSelector((state) => ({
53
55
  product: state.caseDetails.product,
54
56
  version: state.caseDetails.version,
55
57
  status: state.caseDetails.status,
56
58
  caseType: state.caseDetails.caseType,
57
59
  caseSeverity: state.caseDetails.severity,
58
60
  createdDate: state.caseDetails.createdDate,
59
- createdById: state.caseDetails.createdById,
60
- ownerId: state.caseDetails.ownerId,
61
+ createdByName: state.caseDetails.createdByName,
62
+ ownerName: state.caseDetails.ownerName,
63
+ isFetchingCaseDetails: state.isFetchingCaseDetails,
64
+ isFetchingCaseDetailsError: state.isFetchingCaseDetailsError,
61
65
  caseNumber: state.caseDetails.caseNumber,
62
66
  entitlementSla: state.caseDetails.entitlementSla,
63
67
  cep: state.caseDetails.cep,
@@ -74,7 +78,12 @@ export default function CaseOverview(props) {
74
78
  const canEditCase = useCanEditCase();
75
79
  const caseDispatch = useCaseDispatch();
76
80
  const globalMetadataDispatchContext = useContext(GlobalMetadataDispatchContext);
77
- const { globalMetadataState: { allCaseTypes, allCaseSeverities, viewAsCustomer, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
81
+ const apolloClient = useApolloClient();
82
+ const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
83
+ const updateOverviewCaseDetails = (payload) => updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, payload, false, {
84
+ existingCaseDetails,
85
+ });
86
+ const { globalMetadataState: { allCaseTypes, allCaseSeverities, allCaseStatuses, viewAsCustomer, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
78
87
  const canManageCase = loggedInUserRights.data.canManageCases();
79
88
  const switchedCaseType = toNewCaseTypeSwitcher(caseType);
80
89
  const updatingUser = loggedInUsersAccount.data.name;
@@ -89,24 +98,24 @@ export default function CaseOverview(props) {
89
98
  }
90
99
  }
91
100
  if (haventLoadedMetadata(allCaseSeverities)) {
92
- fetchCaseSeverities(globalMetadataDispatchContext, loggedInUsersAccount.data.secureSupport);
101
+ fetchCaseSeverities(globalMetadataDispatchContext, apolloClient);
93
102
  }
94
103
  if (haventLoadedMetadata(allCaseTypes)) {
95
- fetchCaseTypes(globalMetadataDispatchContext, loggedInUsersAccount.data.secureSupport);
104
+ fetchCaseTypes(globalMetadataDispatchContext, apolloClient);
96
105
  }
97
- if (haventLoadedMetadata(caseOverviewState.allCaseStatuses)) {
98
- fetchAllStatuses(caseOverviewDispatch, loggedInUsersAccount.data.secureSupport);
106
+ if (haventLoadedMetadata(allCaseStatuses)) {
107
+ fetchAllStatuses(globalMetadataDispatchContext, apolloClient);
99
108
  }
100
109
  // eslint-disable-next-line react-hooks/exhaustive-deps
101
110
  }, [
102
111
  globalMetadataDispatchContext,
112
+ apolloClient,
103
113
  allCaseSeverities,
104
114
  allCaseTypes,
105
- caseOverviewState.allCaseStatuses,
115
+ allCaseStatuses,
106
116
  caseOverviewState.caseDetailsHydra,
107
117
  canSeeCaseOwnerInfo,
108
118
  caseNumber,
109
- loggedInUsersAccount.data.secureSupport,
110
119
  ]);
111
120
  const onTypeChange = (type) => __awaiter(this, void 0, void 0, function* () {
112
121
  if (canEditCase.alert())
@@ -117,7 +126,7 @@ export default function CaseOverview(props) {
117
126
  if (type === PreviousCaseTypes.FEATURE_ENHANCEMENT) {
118
127
  newCaseDetails = Object.assign(Object.assign({}, newCaseDetails), { fts: false });
119
128
  }
120
- yield updateCaseDetails(caseDispatch, props.caseNumber, newCaseDetails);
129
+ yield updateOverviewCaseDetails(newCaseDetails);
121
130
  setTypeUpdating(caseOverviewDispatch, false);
122
131
  ToastNotification.addSuccessMessage(t('Support type has been successfully updated'));
123
132
  }
@@ -138,7 +147,7 @@ export default function CaseOverview(props) {
138
147
  });
139
148
  setSeverityUpdating(caseOverviewDispatch, true);
140
149
  try {
141
- yield updateCaseDetails(caseDispatch, props.caseNumber, payLoad);
150
+ yield updateOverviewCaseDetails(payLoad);
142
151
  setSeverityUpdating(caseOverviewDispatch, false);
143
152
  ToastNotification.addSuccessMessage(t('Severity has been successfully updated'));
144
153
  }
@@ -147,7 +156,10 @@ export default function CaseOverview(props) {
147
156
  caseUpdateError.showError(e, t('Severity failed to update'));
148
157
  }
149
158
  });
150
- const updateStatusState = (statusVal_1, reopenedAt_1, reopenedBySSOName_1, reopenedReason_1, reopenedReasonOther_1, ...args_1) => __awaiter(this, [statusVal_1, reopenedAt_1, reopenedBySSOName_1, reopenedReason_1, reopenedReasonOther_1, ...args_1], void 0, function* (statusVal, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther, onStatusUpdate = null) {
159
+ const showStatusUpdateSuccessToast = () => {
160
+ ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
161
+ };
162
+ const updateStatusState = (statusVal, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther, onStatusUpdate, options) => __awaiter(this, void 0, void 0, function* () {
151
163
  setStatusUpdating(caseOverviewDispatch, true);
152
164
  let updateStatusObj = {
153
165
  status: statusVal,
@@ -157,34 +169,42 @@ export default function CaseOverview(props) {
157
169
  reopenedReasonOther: reopenedReasonOther,
158
170
  };
159
171
  try {
160
- yield updateCaseDetails(caseDispatch, props.caseNumber, updateStatusObj);
172
+ yield updateOverviewCaseDetails(updateStatusObj);
161
173
  setStatusUpdating(caseOverviewDispatch, false);
162
174
  onStatusUpdate && (yield onStatusUpdate());
163
- ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
175
+ if ((options === null || options === void 0 ? void 0 : options.showSuccessToast) !== false) {
176
+ showStatusUpdateSuccessToast();
177
+ }
178
+ return true;
164
179
  }
165
180
  catch (e) {
166
181
  setStatusUpdating(caseOverviewDispatch, false);
167
- caseUpdateError.showError(e, t('Status failed to update'));
182
+ caseUpdateError.showError(e, t('Status failed to update, try refreshing the page. Please contact us if the problem persists.'));
183
+ return false;
168
184
  }
169
185
  });
170
- const onStatusChange = (newStatus) => __awaiter(this, void 0, void 0, function* () {
186
+ const onStatusChange = (newPortalStatus) => __awaiter(this, void 0, void 0, function* () {
171
187
  if (canEditCase.alert())
172
188
  return;
173
- if (status === CaseStatusEnum.CLOSED && newStatus !== CaseStatusEnum.CLOSED) {
174
- onCaseReopen(newStatus);
189
+ const currentPortalStatus = mapSfdcStatusToPortalStatus(status);
190
+ const newApiStatus = resolvePortalStatusToApiValue(newPortalStatus, status);
191
+ if (currentPortalStatus === 'Closed' && newPortalStatus !== 'Closed') {
192
+ onCaseReopen(newPortalStatus);
175
193
  }
176
- else if (newStatus === CaseStatusEnum.CLOSED) {
194
+ else if (newPortalStatus === 'Closed') {
177
195
  onCaseClose();
178
196
  }
179
197
  else {
180
198
  yield confirm({
181
199
  title: t(`Update the status of the case?`),
182
- description: t('Are you sure you want to change the case status to {{newStatus}}?', { newStatus }),
200
+ description: t('Are you sure you want to change the case status to {{newStatus}}?', {
201
+ newStatus: newPortalStatus,
202
+ }),
183
203
  confirmText: t('Yes, confirm'),
184
204
  cancelText: t('No, cancel'),
185
205
  modalVariant: ModalVariant.small,
186
206
  });
187
- updateStatusState(newStatus);
207
+ updateStatusState(newApiStatus);
188
208
  }
189
209
  });
190
210
  const onCaseClose = () => __awaiter(this, void 0, void 0, function* () {
@@ -223,7 +243,9 @@ export default function CaseOverview(props) {
223
243
  React.createElement("span", { className: "pf-v6-u-ml-sm" },
224
244
  React.createElement(ExternalLinkAltIcon, null))));
225
245
  };
226
- const isCaseInOpenState = status !== CaseStatusEnum.CLOSED;
246
+ const portalStatus = mapSfdcStatusToPortalStatus(status);
247
+ const isCaseClosed = portalStatus === 'Closed';
248
+ const isCaseInOpenState = portalStatus !== 'Closed' && portalStatus !== 'Archived';
227
249
  // To switch from old case type to new support type
228
250
  const newCaseTypesArray = toNewCaseTypeMapper(allCaseTypes.data).sort();
229
251
  return (React.createElement(React.Fragment, null,
@@ -241,7 +263,6 @@ export default function CaseOverview(props) {
241
263
  React.createElement(Trans, null, "Case inactivity warning")),
242
264
  React.createElement("p", { className: "pf-v6-u-mb-sm" },
243
265
  React.createElement(Trans, null, "The customer has received two warnings regarding inactivity. This case will be closed soon if we don't receive any input."))) })))),
244
- React.createElement(CaseContactPhoneNumberAlert, { isReview: true, tabRef: props.tabsRef }),
245
266
  React.createElement("header", { className: "pf-v6-u-mb-sm pf-v6-u-mt-lg" },
246
267
  React.createElement("h2", { className: "case-ID" },
247
268
  React.createElement(Trans, null, "Case"),
@@ -249,13 +270,13 @@ export default function CaseOverview(props) {
249
270
  props.caseNumber),
250
271
  React.createElement("div", null,
251
272
  exportPDFButton(props.caseNumber),
252
- React.createElement(Button, Object.assign({ className: `pf-v6-u-ml-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, isDisabled: !canManageCase }, ((showCloseCaseModal || showReOpenCaseModal) &&
273
+ (isCaseInOpenState || isCaseClosed) && (React.createElement(Button, Object.assign({ className: `pf-v6-u-ml-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, isDisabled: !canManageCase }, ((showCloseCaseModal || showReOpenCaseModal) &&
253
274
  isCaseUpdating && {
254
275
  isLoading: true,
255
276
  }), { onClick: () => (isCaseInOpenState ? onCaseClose() : onCaseReopen()), variant: isCaseInOpenState ? ButtonVariant.secondary : ButtonVariant.tertiary, "data-tracking-id": isCaseInOpenState
256
277
  ? 'case-close-btn-case-details-overview'
257
278
  : 'case-reopen-btn-case-details-overview' }),
258
- React.createElement(Trans, null, isCaseInOpenState ? 'Close case' : 'Reopen case')))),
279
+ React.createElement(Trans, null, isCaseInOpenState ? 'Close case' : 'Reopen case'))))),
259
280
  React.createElement("div", { className: `case-details-header-secondary push-bottom-narrow pf-v6-u-mb-sm ${isExportingPDF && !viewAsCustomer ? 'hide-in-pdf' : ''}` },
260
281
  React.createElement("span", { className: `case-support-level ${isExportingPDF ? 'hide-in-pdf' : ''}` }, computeSupportLink())),
261
282
  React.createElement("div", { className: "case-details-summary push-bottom-narrow" },
@@ -289,34 +310,45 @@ export default function CaseOverview(props) {
289
310
  React.createElement("div", { className: "created-by" },
290
311
  React.createElement("h3", { className: "subheading subheading-sm" },
291
312
  React.createElement(Trans, null, "Created by")),
292
- React.createElement("div", null, createdById),
313
+ React.createElement("div", null, createdByName),
293
314
  React.createElement("div", null, createdDate ? React.createElement(DateTime, { dateTimeString: createdDate }) : null)),
294
- canSeeCaseOwnerInfo && (React.createElement(CaseOwnerInfo, { owner: ownerId, caseDetailsHydra: caseOverviewState.caseDetailsHydra }))),
315
+ canSeeCaseOwnerInfo && (React.createElement(CaseOwnerInfo, { owner: ownerName !== null && ownerName !== void 0 ? ownerName : '', isLoading: isFetchingCaseDetails, isError: isFetchingCaseDetailsError, caseDetailsHydra: caseOverviewState.caseDetailsHydra }))),
295
316
  React.createElement("div", { className: "case-overview-secondary card card-md card-light push-bottom" },
296
317
  React.createElement("div", { className: "pf-v6-l-grid pf-m-gutter pf-m-all-4-col-on-lg" },
297
318
  React.createElement("div", { className: "form-wrapper" },
298
- React.createElement(CaseStatus, { selectedStatus: status, onStatusChange: onStatusChange, isDisabled: !canManageCase || caseOverviewState.allCaseStatuses.isFetching, allStatuses: caseOverviewState.allCaseStatuses.data, isFetching: caseOverviewState.caseStatusUpdating && isCaseUpdating, hasError: caseOverviewState.allCaseStatuses.isError })),
319
+ React.createElement(CaseStatus, { selectedStatus: status, onStatusChange: onStatusChange, isDisabled: !canManageCase || allCaseStatuses.isFetching || canEditCase.isCaseNotEditable, isFetching: caseOverviewState.caseStatusUpdating && isCaseUpdating, hasError: allCaseStatuses.isError })),
299
320
  React.createElement("div", { className: "form-wrapper" },
300
- React.createElement(CaseType, { selectedType: switchedCaseType, onTypeChange: onTypeChange, isDisabled: !canManageCase || allCaseTypes.isFetching || isCaseUpdating, allTypes: newCaseTypesArray, isFetching: caseOverviewState.caseTypeUpdating && isCaseUpdating, hasError: allCaseTypes.isError })),
321
+ React.createElement(CaseType, { selectedType: switchedCaseType, onTypeChange: onTypeChange, isDisabled: !canManageCase ||
322
+ allCaseTypes.isFetching ||
323
+ isCaseUpdating ||
324
+ canEditCase.isCaseNotEditable, allTypes: newCaseTypesArray, isFetching: caseOverviewState.caseTypeUpdating && isCaseUpdating, hasError: allCaseTypes.isError })),
301
325
  React.createElement("div", { className: "form-wrapper" },
302
- React.createElement(Severity, { onSeverityChange: onSeverityChange, isDisabled: !canManageCase, isFetching: caseOverviewState.caseSeverityUpdating && isCaseUpdating })))),
326
+ React.createElement(Severity, { onSeverityChange: onSeverityChange, isDisabled: !canManageCase || canEditCase.isCaseNotEditable, isFetching: caseOverviewState.caseSeverityUpdating && isCaseUpdating })))),
303
327
  React.createElement(ExpandableSection, { className: "case-details-main", toggleText: t('Case information'), isExpanded: isDetailsExpanded, onToggle: onToggleDetails },
304
328
  React.createElement(CaseInformation, null))),
305
329
  showCloseCaseModal && (React.createElement(CloseCaseModal, { onConfirm: (commentBody) => __awaiter(this, void 0, void 0, function* () {
306
- yield updateStatusState(CaseStatusEnum.CLOSED);
307
- yield postCommentAfterStatusUpdate(commentBody);
308
- setShowCaseCloseModal(false);
309
- dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
330
+ const success = yield updateStatusState(CaseStatusEnum.CLOSED, undefined, undefined, undefined, undefined, null, { showSuccessToast: false });
331
+ if (success) {
332
+ setShowCaseCloseModal(false);
333
+ showStatusUpdateSuccessToast();
334
+ void postCommentAfterStatusUpdate(commentBody).then(() => {
335
+ dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
336
+ });
337
+ }
310
338
  }), isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, onClose: () => {
311
339
  setShowCaseCloseModal(false);
312
340
  }, caseNumber: caseNumber })),
313
- showReOpenCaseModal && (React.createElement(ReopenCaseModal, { isInternal: loggedInUserRights.data.isInternal(), onConfirm: (commentBody, newStatus, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther) => __awaiter(this, void 0, void 0, function* () {
314
- yield updateStatusState(newStatus, reopenedAt || null, reopenedBySSOName || null, reopenedReason || null, reopenedReasonOther || null, () => __awaiter(this, void 0, void 0, function* () {
315
- yield postCommentAfterStatusUpdate(commentBody);
316
- dtmTrackEventCaseStepEncountered('reopen', caseNumber, product, version);
317
- }));
318
- setShowReopenCaseModal(false);
341
+ showReOpenCaseModal && (React.createElement(ReopenCaseModal, { isInternal: loggedInUserRights.data.isInternal(), onConfirm: (commentBody, newPortalStatus, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther) => __awaiter(this, void 0, void 0, function* () {
342
+ const newApiStatus = resolvePortalStatusToApiValue(newPortalStatus, status);
343
+ const success = yield updateStatusState(newApiStatus, reopenedAt || null, reopenedBySSOName || null, reopenedReason || null, reopenedReasonOther || null, null, { showSuccessToast: false });
344
+ if (success) {
345
+ setShowReopenCaseModal(false);
346
+ showStatusUpdateSuccessToast();
347
+ void postCommentAfterStatusUpdate(commentBody).then(() => {
348
+ dtmTrackEventCaseStepEncountered('reopen', caseNumber, product, version);
349
+ });
350
+ }
319
351
  }), onClose: () => {
320
352
  setShowReopenCaseModal(false);
321
- }, caseNumber: caseNumber, reopenStatus: reopenStatusRef.current, allStatuses: caseOverviewState.allCaseStatuses.data, isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, whoIsUpdating: updatingUser }))));
353
+ }, caseNumber: caseNumber, reopenStatus: reopenStatusRef.current, isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, whoIsUpdating: updatingUser }))));
322
354
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAuF3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAuhBxB,CAAC"}
1
+ {"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAwF3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAshBxB,CAAC"}