@rh-support/troubleshoot 2.6.361 → 2.6.363

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 (364) 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 +17 -92
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +2 -6
  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 +9 -19
  13. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +7 -28
  15. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +57 -88
  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 -3
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +11 -24
  23. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/CaseOverview/index.js +57 -92
  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 +49 -55
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +46 -53
  39. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
  40. package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +3 -6
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +46 -52
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +17 -63
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -2
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +2 -0
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -4
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +56 -131
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +6 -11
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.d.ts.map +1 -1
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.js +1 -3
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +71 -111
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +10 -17
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts.map +1 -1
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +2 -4
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +102 -0
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +26 -42
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +148 -152
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -10
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +146 -252
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  81. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  82. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +7 -18
  83. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
  84. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  85. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +271 -215
  86. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  87. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
  88. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +2 -7
  90. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  91. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -36
  92. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  93. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +230 -62
  94. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
  95. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  96. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +8 -24
  97. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  98. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -8
  99. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  100. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
  101. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  102. package/lib/esm/components/CaseInformation/CaseGroup.js +62 -173
  103. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  104. package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
  105. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  106. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +31 -108
  107. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
  108. package/lib/esm/components/CaseInformation/Description.js +1 -1
  109. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  110. package/lib/esm/components/CaseInformation/FileDiag.js +5 -2
  111. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  112. package/lib/esm/components/CaseInformation/Fts.js +19 -33
  113. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  114. package/lib/esm/components/CaseInformation/Severity.js +24 -33
  115. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  116. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
  117. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  118. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +8 -2
  119. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  120. package/lib/esm/components/CaseManagement/CaseManagement.js +10 -13
  121. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  122. package/lib/esm/components/CaseManagement/Cep.js +10 -12
  123. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
  124. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  125. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -20
  126. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  127. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  128. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +1 -0
  129. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  130. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +32 -19
  131. package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
  132. package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +2 -4
  133. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
  134. package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +2 -4
  135. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  136. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
  137. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  138. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +4 -8
  139. package/lib/esm/components/EditDescription/EditDescription.d.ts.map +1 -1
  140. package/lib/esm/components/EditDescription/EditDescription.js +2 -4
  141. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  142. package/lib/esm/components/IdeaInformation/IdeaInformation.js +17 -23
  143. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  144. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  145. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  146. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  147. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  148. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  149. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  150. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  151. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
  152. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  153. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  154. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  155. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
  156. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  157. package/lib/esm/components/Recommendations/AsideResults.js +3 -4
  158. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  159. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
  160. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  161. package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
  162. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  163. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  164. package/lib/esm/components/Recommendations/Recommendations.js +9 -3
  165. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  166. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
  167. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  168. package/lib/esm/components/Review/Review.js +19 -25
  169. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  170. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  171. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  172. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  173. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  174. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  175. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +93 -141
  176. package/lib/esm/components/shared/Constants.d.ts +0 -5
  177. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  178. package/lib/esm/components/shared/Constants.js +0 -5
  179. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  180. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  181. package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
  182. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  183. package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
  184. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +0 -1
  185. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  186. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -4
  187. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  188. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  189. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -22
  190. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  191. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +59 -307
  192. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
  193. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  194. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
  195. package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -5
  196. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  197. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  198. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  199. package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -119
  200. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  201. package/lib/esm/components/shared/useIsSectionValid.js +57 -22
  202. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  203. package/lib/esm/components/shared/usePostComment.js +28 -16
  204. package/lib/esm/components/shared/utils.d.ts +0 -1
  205. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  206. package/lib/esm/components/shared/utils.js +3 -9
  207. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  208. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -178
  209. package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
  210. package/lib/esm/components/wizardLayout/MainSection.js +1 -2
  211. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  212. package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
  213. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  214. package/lib/esm/components/wizardLayout/WizardLayout.js +13 -12
  215. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  216. package/lib/esm/components/wizardLayout/WizardMain.js +0 -7
  217. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  218. package/lib/esm/components/wizardLayout/WizardNavigation.js +11 -14
  219. package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
  220. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  221. package/lib/esm/constants/caseDetailsConstants.js +0 -5
  222. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  223. package/lib/esm/css/app.css +0 -28
  224. package/lib/esm/css/case.css +212 -209
  225. package/lib/esm/hooks/useAB.d.ts.map +1 -1
  226. package/lib/esm/hooks/useAB.js +23 -45
  227. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -9
  228. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  229. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -108
  230. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  231. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  232. package/lib/esm/hooks/useS3Upload.d.ts +4 -5
  233. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  234. package/lib/esm/hooks/useS3Upload.js +30 -28
  235. package/lib/esm/i18n/template-de.d.ts +2 -2
  236. package/lib/esm/i18n/template-de.js +2 -2
  237. package/lib/esm/i18n/template-es.d.ts +2 -2
  238. package/lib/esm/i18n/template-es.js +2 -2
  239. package/lib/esm/i18n/template-fr.d.ts +2 -2
  240. package/lib/esm/i18n/template-fr.js +2 -2
  241. package/lib/esm/i18n/template-it.d.ts +2 -2
  242. package/lib/esm/i18n/template-it.js +2 -2
  243. package/lib/esm/i18n/template-jp.d.ts +2 -2
  244. package/lib/esm/i18n/template-jp.js +2 -2
  245. package/lib/esm/i18n/template-ko.d.ts +2 -2
  246. package/lib/esm/i18n/template-ko.js +2 -2
  247. package/lib/esm/i18n/template-pt.d.ts +2 -2
  248. package/lib/esm/i18n/template-pt.js +2 -2
  249. package/lib/esm/i18n/template-ru.d.ts +2 -2
  250. package/lib/esm/i18n/template-ru.js +2 -2
  251. package/lib/esm/i18n/template-zh.d.ts +2 -2
  252. package/lib/esm/i18n/template-zh.js +2 -2
  253. package/lib/esm/index.js +0 -1
  254. package/lib/esm/models/cache.d.ts +2 -0
  255. package/lib/esm/models/cache.d.ts.map +1 -1
  256. package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -123
  257. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  258. package/lib/esm/reducers/CaseConstNTypes.js +7 -31
  259. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
  260. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  261. package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
  262. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -12
  263. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  264. package/lib/esm/reducers/CaseDiscussionTabReducer.js +73 -88
  265. package/lib/esm/reducers/CaseHelpers.d.ts +1 -11
  266. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  267. package/lib/esm/reducers/CaseHelpers.js +17 -119
  268. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  269. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  270. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  271. package/lib/esm/reducers/CaseReducer.d.ts +11 -56
  272. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  273. package/lib/esm/reducers/CaseReducer.js +100 -284
  274. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  275. package/lib/esm/reducers/RecommendationsReducer.js +18 -15
  276. package/lib/esm/scss/_main.scss +0 -9
  277. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
  278. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  279. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  280. package/package.json +8 -10
  281. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -8
  282. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
  283. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -18
  284. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -10
  285. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
  286. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -31
  287. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
  288. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
  289. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
  290. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
  291. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
  292. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -62
  293. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
  294. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
  295. package/lib/esm/components/CaseInformation/CaseLabels.js +0 -108
  296. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
  297. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
  298. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -141
  299. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
  300. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
  301. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
  302. package/lib/esm/graphql/index.d.ts +0 -4
  303. package/lib/esm/graphql/index.d.ts.map +0 -1
  304. package/lib/esm/graphql/index.js +0 -3
  305. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  306. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  307. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  308. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  309. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  310. package/lib/esm/graphql/mutations/index.js +0 -1
  311. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  312. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  313. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -36
  314. package/lib/esm/graphql/queries/index.d.ts +0 -2
  315. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  316. package/lib/esm/graphql/queries/index.js +0 -1
  317. package/lib/esm/graphql/schemas/escalation.d.ts +0 -66
  318. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  319. package/lib/esm/graphql/schemas/escalation.js +0 -1
  320. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  321. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  322. package/lib/esm/graphql/schemas/index.js +0 -1
  323. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
  324. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
  325. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -57
  326. package/lib/esm/hooks/useCaseComments/index.d.ts +0 -8
  327. package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
  328. package/lib/esm/hooks/useCaseComments/index.js +0 -5
  329. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
  330. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
  331. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
  332. package/lib/esm/hooks/useCaseComments/types.d.ts +0 -93
  333. package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
  334. package/lib/esm/hooks/useCaseComments/types.js +0 -1
  335. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -26
  336. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
  337. package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -113
  338. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
  339. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
  340. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
  341. package/lib/esm/hooks/useCaseGroupUiState.d.ts +0 -3
  342. package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +0 -1
  343. package/lib/esm/hooks/useCaseGroupUiState.js +0 -10
  344. package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
  345. package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
  346. package/lib/esm/hooks/useCaseHistory.js +0 -107
  347. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -23
  348. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
  349. package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
  350. package/lib/esm/models/caseHistory.d.ts +0 -86
  351. package/lib/esm/models/caseHistory.d.ts.map +0 -1
  352. package/lib/esm/models/caseHistory.js +0 -1
  353. package/lib/esm/utils/TimelineUtils.d.ts +0 -41
  354. package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
  355. package/lib/esm/utils/TimelineUtils.js +0 -135
  356. package/lib/esm/utils/caseHistoryUtils.d.ts +0 -85
  357. package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
  358. package/lib/esm/utils/caseHistoryUtils.js +0 -196
  359. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +0 -6
  360. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +0 -1
  361. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +0 -26
  362. package/lib/esm/utils/linkifyHtmlTextNodes.d.ts +0 -8
  363. package/lib/esm/utils/linkifyHtmlTextNodes.d.ts.map +0 -1
  364. package/lib/esm/utils/linkifyHtmlTextNodes.js +0 -37
@@ -1,98 +1,52 @@
1
- import { useApolloClient } from '@apollo/client/react';
2
1
  import { Flex, FlexItem } from '@patternfly/react-core';
3
- import { AlertMessage, AlertType } from '@rh-support/components';
4
2
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
5
- import isEmpty from 'lodash/isEmpty';
6
3
  import isEqual from 'lodash/isEqual';
7
- import React, { useContext, useEffect, useState } from 'react';
8
- import { useTranslation } from 'react-i18next';
9
- import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
10
- import { useShowCaseGroupField } from '../../../../hooks/useCaseGroupUiState';
11
- import { fetchCaseGroupsForContactGraphQL } from '../../../../reducers/CaseReducer';
4
+ import React, { useContext, useState } from 'react';
5
+ import { useCaseSelector } from '../../../../context/CaseContext';
12
6
  import { OwnerSelector } from '../../../AccountInfo/OwnerSelector';
13
7
  import CaseGroup from '../../../CaseInformation/CaseGroup';
14
- import CaseLabels from '../../../CaseInformation/CaseLabels';
15
8
  import Fts from '../../../CaseInformation/Fts';
16
- // import { Cep } from '../../../CaseManagement/Cep';
17
- // import { RHAssociatesSelector } from '../../../CaseManagement/RHAssociatesSelector';
18
- // import CaseContactSelector from '../../../CaseManagement/SendNotifications/CaseContactSelector';
9
+ import { Cep } from '../../../CaseManagement/Cep';
10
+ import { RHAssociatesSelector } from '../../../CaseManagement/RHAssociatesSelector';
11
+ import CaseContactSelector from '../../../CaseManagement/SendNotifications/CaseContactSelector';
19
12
  import { PartnerCaseHelper } from '../../ShareCase/PartnerCaseHelper';
20
13
  import { ShareWithPartner } from '../../ShareCase/PartnerShare';
21
14
  import { CaseContactPhoneNumber } from './CaseContactPhoneNumber';
22
15
  import CaseInternalStatus from './CaseInternalStatus';
23
- // TODO: Re-enable once phone number verification flow is fully supported with GraphQL
24
- // import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
16
+ import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
25
17
  import CaseReferenceNumber from './CaseReferenceNumber';
26
18
  import CaseSbrGroups from './CaseSbrGroups';
27
19
  import SFDCUrl from './SFDCUrl';
28
20
  export default function CaseDetailsManagement(props) {
29
- const { t } = useTranslation();
30
21
  const [isUpdatingPartner, setIsUpdatingPartner] = useState(false);
31
- const caseDispatch = useCaseDispatch();
32
- const apolloClient = useApolloClient();
33
- const caseState = useCaseSelector((state) => {
34
- var _a, _b, _c, _d, _e;
35
- return ({
36
- caseDetails: {
37
- accountNumber: state.caseDetails.accountNumberRef,
38
- groupNumber: state.caseDetails.groupNumber,
39
- },
40
- showMandatoryCaseGroupValidationError: state.showMandatoryCaseGroupValidationError,
41
- selectedOwnerContactId: (_b = (_a = state.selectedOwner) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.id,
42
- selectedOwnerIsOrgAdmin: (_e = (_d = (_c = state.selectedOwner) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.isOrgAdmin) !== null && _e !== void 0 ? _e : false,
43
- ownersCaseGroupsData: state.ownersCaseGroups.data,
44
- ownersCaseGroupsFetching: state.ownersCaseGroups.isFetching,
45
- });
46
- }, isEqual);
22
+ const caseState = useCaseSelector((state) => ({
23
+ caseDetails: {
24
+ accountNumber: state.caseDetails.accountNumberRef,
25
+ },
26
+ }), isEqual);
47
27
  const accountNumber = caseState.caseDetails.accountNumber;
48
- const groupNumber = caseState.caseDetails.groupNumber;
49
- const showCaseGroupField = useShowCaseGroupField();
50
28
  const ability = useContext(AbilityContext);
51
- useEffect(() => {
52
- const { selectedOwnerContactId, ownersCaseGroupsData, ownersCaseGroupsFetching } = caseState;
53
- if (!props.caseNumber || isEmpty(accountNumber) || isEmpty(selectedOwnerContactId)) {
54
- return;
55
- }
56
- if (ownersCaseGroupsFetching || ownersCaseGroupsData !== undefined) {
57
- return;
58
- }
59
- fetchCaseGroupsForContactGraphQL(caseDispatch, apolloClient, selectedOwnerContactId, accountNumber, groupNumber || null, caseState.selectedOwnerIsOrgAdmin, groupNumber !== null && groupNumber !== void 0 ? groupNumber : '');
60
- // eslint-disable-next-line react-hooks/exhaustive-deps
61
- }, [
62
- props.caseNumber,
63
- accountNumber,
64
- caseState.selectedOwnerContactId,
65
- caseState.selectedOwnerIsOrgAdmin,
66
- groupNumber,
67
- caseState.ownersCaseGroupsData,
68
- caseState.ownersCaseGroupsFetching,
69
- ]);
70
- // const canSeeEmailNotifications = ability.can(
71
- // resourceActions.PATCH,
72
- // resources.CASE_DETAILS,
73
- // CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS
74
- // );
29
+ const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
75
30
  const canSeeInternalStatus = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_INTERNAL_STATUS);
76
31
  const canSeeSBRGroups = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SBR_GROUP);
77
32
  return (React.createElement(React.Fragment, null,
78
33
  React.createElement(PartnerCaseHelper, { setIsUpdatingPartners: setIsUpdatingPartner, caseNumber: props.caseNumber, routeProps: props.routeProps }),
79
34
  React.createElement("section", { className: "card card-white" },
80
- React.createElement(AlertMessage, { show: !!caseState.showMandatoryCaseGroupValidationError, variant: AlertType.DANGER, isInline: true, title: t('Please address the errors to proceed'), className: "pf-v6-u-mb-lg", "data-tracking-id": "proceed-address-errors" }),
81
35
  React.createElement("form", null,
82
36
  React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
83
37
  React.createElement(FlexItem, { flex: { default: 'flex_1' } },
84
38
  React.createElement(OwnerSelector, null)),
85
39
  React.createElement(FlexItem, { flex: { default: 'flex_1' } },
86
40
  React.createElement(CaseContactPhoneNumber, null))),
41
+ React.createElement(CaseContactPhoneNumberAlert, { isConfirm: true }),
87
42
  canSeeInternalStatus && React.createElement(CaseInternalStatus, null),
88
43
  canSeeSBRGroups && React.createElement(CaseSbrGroups, null),
89
- React.createElement(Flex, { direction: { default: 'column', lg: 'row' } },
90
- showCaseGroupField && (React.createElement(FlexItem, { flex: { default: 'flex_1' } },
91
- React.createElement(CaseGroup, null))),
92
- React.createElement(FlexItem, { flex: { default: 'flex_1' } },
93
- React.createElement(CaseLabels, null))),
44
+ React.createElement(CaseGroup, null),
94
45
  React.createElement(CaseReferenceNumber, null),
46
+ canSeeEmailNotifications && React.createElement(CaseContactSelector, null),
47
+ React.createElement(RHAssociatesSelector, null),
95
48
  React.createElement(Fts, { inlineEditable: true }),
49
+ React.createElement(Cep, null),
96
50
  React.createElement(SFDCUrl, null),
97
51
  React.createElement(ShareWithPartner, { routeProps: props.routeProps, isUpdatingPartner: isUpdatingPartner, accountNumber: accountNumber })))));
98
52
  }
@@ -64,7 +64,7 @@ function CaseHostname(props) {
64
64
  }
65
65
  catch (e) {
66
66
  setIsHostnameUpdating(false);
67
- caseUpdateError.showFieldError(e, t('Hostname'), () => onHostnameUpdate(caseDetails));
67
+ caseUpdateError.showError(e, t('Hostname failed to updated'));
68
68
  throw e;
69
69
  }
70
70
  });
@@ -111,7 +111,7 @@ function CaseHostname(props) {
111
111
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-hostname' }, formClassName: props.className || '', labelContent: React.createElement(React.Fragment, null,
112
112
  React.createElement(Trans, { className: "pf-v6-u-mr-xs" }, "Hostname"),
113
113
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: !isExportingPDF ? (React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
114
- React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size cursor-pointer", "aria-label": "Hostname Info", color: "#5e40be" }))) : undefined, allowInlineEdit: props.inlineEditable && !canEditCase.isCaseNotEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
114
+ React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size cursor-pointer", "aria-label": "Hostname Info", color: "#5e40be" }))) : undefined, allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
115
115
  React.createElement(TextInput, { type: "text", id: "case-details-hostname", className: `${lengthError ? ' form-invalid' : ''}`, name: "case-details-hostname", value: hostnameState, onChange: (e, phone) => onHostnameChange(phone), isDisabled: isHostnameUpdating, "data-tracking-id": "case-details-hostname", "aria-invalid": lengthError })),
116
116
  lengthError && (React.createElement("div", { className: "pull-top" },
117
117
  React.createElement("p", { className: "form-instructions form-invalid" },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInformation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAwD5C"}
1
+ {"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInformation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAwD5C"}
@@ -8,6 +8,7 @@ import React from 'react';
8
8
  import { Trans } from 'react-i18next';
9
9
  import { useCaseSelector } from '../../../../context/CaseContext';
10
10
  import { KtQuestionConstant } from '../../../../reducers/CaseConstNTypes';
11
+ import { CaseHostname } from './CaseHostname';
11
12
  import { CaseOpenshiftClusterId } from './CaseOpenshiftClusterId/CaseOpenshiftClusterId';
12
13
  import ProductVersion from './ProductVersion';
13
14
  export function CaseInformation(props) {
@@ -39,6 +40,7 @@ export function CaseInformation(props) {
39
40
  React.createElement("form", null,
40
41
  React.createElement(ProductVersion, null),
41
42
  React.createElement(CaseOpenshiftClusterId, null),
43
+ caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && React.createElement(CaseHostname, { inlineEditable: true }),
42
44
  React.createElement("div", { className: "form-group" },
43
45
  React.createElement("label", { htmlFor: "case-description" },
44
46
  React.createElement(Trans, null, "Description")),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseInternalStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAQpE,MAAM,CAAC,OAAO,UAAU,kBAAkB,sBA0FzC"}
1
+ {"version":3,"file":"CaseInternalStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAQpE,MAAM,CAAC,OAAO,UAAU,kBAAkB,sBAyFzC"}
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { Flex, FlexItem, MenuToggle, Select, SelectList, SelectOption, Spinner, } from '@patternfly/react-core';
11
11
  import { ToastNotification } from '@rh-support/components';
12
- import { fetchInternalStatusMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
12
+ import { fetchInternalStatusMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
13
13
  import { haventLoadedMetadata } from '@rh-support/utils';
14
14
  import React, { useContext, useEffect, useState } from 'react';
15
15
  import { Trans, useTranslation } from 'react-i18next';
@@ -20,7 +20,6 @@ import { updateCaseDetails } from '../../../../reducers/CaseReducer';
20
20
  export default function CaseInternalStatus() {
21
21
  const { t } = useTranslation();
22
22
  const caseUpdateError = useCaseUpdateErrorMessage();
23
- const canEditCase = useCanEditCase();
24
23
  const { internalStatus, caseNumber } = useCaseSelector((state) => ({
25
24
  internalStatus: state.caseDetails.internalStatus,
26
25
  caseNumber: state.caseDetails.caseNumber,
@@ -35,7 +34,7 @@ export default function CaseInternalStatus() {
35
34
  e.stopPropagation();
36
35
  setIsOpen(!isOpen);
37
36
  };
38
- const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isDisabled: isIStatusUpdating || canEditCase.isCaseNotEditable, isFullWidth: true, className: "case-internal-status-selector-text" },
37
+ const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isDisabled: isIStatusUpdating, isFullWidth: true, className: "case-internal-status-selector-text" },
39
38
  React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
40
39
  React.createElement(FlexItem, null,
41
40
  " ",
@@ -53,7 +52,7 @@ export default function CaseInternalStatus() {
53
52
  }
54
53
  catch (e) {
55
54
  setIsIStatusUpdating(false);
56
- caseUpdateError.showFieldError(e, t('Internal status'), () => onCaseInternalStatusChange(event, selection));
55
+ caseUpdateError.showError(e, t('Case Internal Status failed to update'));
57
56
  }
58
57
  });
59
58
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAqBxE,wBAAgB,sBAAsB,sBAmZrC"}
1
+ {"version":3,"file":"CaseOpenshiftClusterId.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAqB/D,wBAAgB,sBAAsB,sBA2SrC"}
@@ -7,17 +7,17 @@ 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';
11
10
  import { LoadingIndicator, ToastNotification, usePrevious } from '@rh-support/components';
12
- import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
13
- import { extractNoClusterIdFieldsFromAdditionalCaseInformation, getVersion, hasNoClusterIdFieldsInAdditionalCaseInformation, } from '@rh-support/utils';
11
+ import { GlobalMetadataStateContext } from '@rh-support/react-context';
12
+ import { getVersion } from '@rh-support/utils';
13
+ import debounce from 'lodash/debounce';
14
14
  import isEmpty from 'lodash/isEmpty';
15
15
  import isEqual from 'lodash/isEqual';
16
- import React, { useContext, useEffect, useMemo, useState } from 'react';
16
+ import React, { useContext, useEffect, useState } from 'react';
17
17
  import { useTranslation } from 'react-i18next';
18
18
  import { useCaseDispatch, useCaseSelector } from '../../../../../context/CaseContext';
19
19
  import { useCaseUpdateErrorMessage } from '../../../../../hooks/useCaseUpdateErrorMessage';
20
- import { setCaseDetails, updateCaseDetailsGraphQL } from '../../../../../reducers/CaseReducer';
20
+ import { setCaseDetails, updateCaseDetails } from '../../../../../reducers/CaseReducer';
21
21
  import { getIsClusterIdInvalid, isClusterIdEnabledForProduct, } from '../../../../../utils/caseOpenshiftClusterIdUtils';
22
22
  import { NoClusterIDReasonSelector } from '../../../../CaseManagement/NoClusterIDReasonSelector';
23
23
  import { discoverV4ClusterIdLink, discoverV4ClusterIdLinkError, isInvalidErrorMessage, v3Tov4TransitionLink, } from '../../../../CaseManagement/OpenShiftClusterId';
@@ -25,25 +25,20 @@ import { OpenshiftDropdownV4 } from '../../../../CaseManagement/OpenshiftDropdow
25
25
  import { PDFContext } from '../../../PDFContainer';
26
26
  export function CaseOpenshiftClusterId() {
27
27
  const caseUpdateError = useCaseUpdateErrorMessage();
28
- const apolloClient = useApolloClient();
29
- const { openshiftClusterID, product, version, caseNumber, caseId, openshiftClusterVersion, noClusterIdReason, noClusterIdReasonExplanation, selectedAccountDetails, description, additionalCaseInformation, isFetchingCaseDetails, } = useCaseSelector((state) => ({
28
+ const { openshiftClusterID, product, version, caseNumber, openshiftClusterVersion, noClusterIdReason, noClusterIdReasonExplanation, selectedAccountDetails, description, isFetchingCaseDetails, } = useCaseSelector((state) => ({
30
29
  openshiftClusterID: state.caseDetails.openshiftClusterID,
31
30
  product: state.caseDetails.product,
32
31
  version: state.caseDetails.version,
33
32
  caseNumber: state.caseDetails.caseNumber,
34
- caseId: state.caseDetails.id,
35
33
  openshiftClusterVersion: state.caseDetails.openshiftClusterVersion,
36
34
  noClusterIdReason: state.caseDetails.noClusterIdReason,
37
35
  noClusterIdReasonExplanation: state.caseDetails.noClusterIdReasonExplanation,
38
36
  selectedAccountDetails: state.selectedAccountDetails,
39
37
  description: state.caseDetails.description,
40
- additionalCaseInformation: state.caseDetails.additionalCaseInformation,
41
38
  isFetchingCaseDetails: state.isFetchingCaseDetails,
42
39
  }), isEqual);
43
40
  const caseDispatch = useCaseDispatch();
44
- const canEditCase = useCanEditCase();
45
- const isCaseReadOnly = canEditCase.isCaseNotEditable;
46
- const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
41
+ const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
47
42
  const majorVersion = (version && getVersion(version).major) || '';
48
43
  const isOpenShiftV3 = product === 'OpenShift Container Platform' && majorVersion === '3';
49
44
  const isCustomer = loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber);
@@ -55,56 +50,11 @@ export function CaseOpenshiftClusterId() {
55
50
  const [isClusterIdUpdating, setIsClusterIdUpdating] = useState(false);
56
51
  const [isReasonUpdating, setIsReasonUpdating] = useState(false);
57
52
  const [displayName, setDisplayName] = useState('');
58
- const [localReasonExplanation, setLocalReasonExplanation] = useState('');
59
53
  const previousLocalOpenshiftClusterIDState = usePrevious(localOpenshiftClusterIDState);
60
54
  const previousSelectedReason = usePrevious(selectedReason);
61
55
  const previousProduct = usePrevious(product);
62
56
  const { t } = useTranslation();
63
57
  const { isExportingPDF } = useContext(PDFContext);
64
- const additionalCaseNoClusterFields = useMemo(() => extractNoClusterIdFieldsFromAdditionalCaseInformation(additionalCaseInformation), [additionalCaseInformation]);
65
- const resolvedNoClusterFields = useMemo(() => ({
66
- reason: noClusterIdReason || additionalCaseNoClusterFields.noClusterIdReason,
67
- explanation: noClusterIdReasonExplanation || additionalCaseNoClusterFields.noClusterIdReasonExplanation,
68
- }), [noClusterIdReason, noClusterIdReasonExplanation, additionalCaseNoClusterFields]);
69
- const hasNoClusterIdSelection = useMemo(() => {
70
- const { reason, explanation } = resolvedNoClusterFields;
71
- if (reason) {
72
- return true;
73
- }
74
- return explanation !== '' && explanation !== 'v3-cluster';
75
- }, [resolvedNoClusterFields]);
76
- const clusterDropdownId = useMemo(() => {
77
- if (!isEmpty(localOpenshiftClusterIDState)) {
78
- return localOpenshiftClusterIDState;
79
- }
80
- if (!isEmpty(selectedReason)) {
81
- return selectedReason;
82
- }
83
- if (!isEmpty(openshiftClusterID)) {
84
- return openshiftClusterID;
85
- }
86
- const { reason, explanation } = resolvedNoClusterFields;
87
- if (reason === 'Other' && explanation === 'v3-cluster') {
88
- return 'v3-cluster';
89
- }
90
- if (hasNoClusterIdSelection) {
91
- return 'dont-have-id';
92
- }
93
- return '';
94
- }, [
95
- localOpenshiftClusterIDState,
96
- selectedReason,
97
- openshiftClusterID,
98
- resolvedNoClusterFields,
99
- hasNoClusterIdSelection,
100
- ]);
101
- const resolvedNoClusterIdReason = resolvedNoClusterFields.reason;
102
- const resolvedNoClusterIdReasonExplanation = resolvedNoClusterFields.explanation;
103
- useEffect(() => {
104
- setLocalReasonExplanation(resolvedNoClusterIdReasonExplanation || '');
105
- }, [resolvedNoClusterIdReasonExplanation]);
106
- const shouldShowNoClusterReasonSelector = resolvedNoClusterIdReasonExplanation !== 'v3-cluster' &&
107
- (clusterDropdownId === 'dont-have-id' || dontKnowSelected);
108
58
  const clusterStateReset = () => {
109
59
  setSelectedReason('');
110
60
  setDontKnowSelected(false);
@@ -117,84 +67,58 @@ export function CaseOpenshiftClusterId() {
117
67
  openshiftClusterVersion: '',
118
68
  noClusterIdReasonExplanation: '',
119
69
  noClusterIdReason: '',
120
- additionalCaseInformation: null,
121
70
  });
122
71
  };
123
- const clearedClusterProductFields = {
124
- openshiftClusterID: '',
125
- openshiftClusterVersion: '',
126
- noClusterIdReasonExplanation: '',
127
- noClusterIdReason: '',
128
- };
129
72
  const onDisplayNameChange = (val) => {
130
73
  setDisplayName(val);
131
74
  };
132
75
  useEffect(() => {
76
+ var _a;
133
77
  const isClusterVisible = () => __awaiter(this, void 0, void 0, function* () {
134
- const hasCluster = yield isClusterIdEnabledForProduct(product);
78
+ var _a;
79
+ const hasCluster = yield isClusterIdEnabledForProduct(product, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
135
80
  setShowClusterId(hasCluster);
81
+ // when product changes from a product with cluster to a product without cluster, reset the clusterId
136
82
  const hasPreviousProduct = previousProduct !== undefined;
137
83
  const hasCurrentProduct = product !== undefined;
138
84
  //need to check if they are undefined as the data loads in and can cause eval against product version === undefined causing edge case to reset our cluster with logic as if product changed.
139
85
  const IsProductHasChanged = hasPreviousProduct && hasCurrentProduct && previousProduct !== product;
140
- const currentIsClusterEnabled = hasCluster && !isOpenShiftV3;
141
- const previousIsClusterEnabled = !isEmpty(previousProduct) && isClusterIdEnabledForProduct(previousProduct);
142
- const shouldResetOnClusterProductBoundaryChange = IsProductHasChanged && previousIsClusterEnabled !== currentIsClusterEnabled;
143
- if (shouldResetOnClusterProductBoundaryChange) {
144
- setCaseDetails(caseDispatch, Object.assign(Object.assign({}, clearedClusterProductFields), { additionalCaseInformation: null }));
86
+ const isResetClusterID = (!hasCluster || isOpenShiftV3) && IsProductHasChanged;
87
+ if (isResetClusterID) {
88
+ const caseDetails = {
89
+ openshiftClusterID: '',
90
+ noClusterIdReasonExplanation: '',
91
+ noClusterIdReason: '',
92
+ };
93
+ yield clusterIdUpdate(caseDetails, false);
94
+ setCaseDetails(caseDispatch, caseDetails);
145
95
  setLocalOpenshiftClusterIDState('');
146
96
  clusterStateReset();
147
- const hasClusterRelatedData = !isEmpty(openshiftClusterID) ||
148
- !isEmpty(openshiftClusterVersion) ||
149
- !isEmpty(noClusterIdReason) ||
150
- !isEmpty(noClusterIdReasonExplanation) ||
151
- hasNoClusterIdFieldsInAdditionalCaseInformation(additionalCaseInformation);
152
- if (hasClusterRelatedData) {
153
- yield clusterIdUpdate(clearedClusterProductFields, false);
154
- }
155
97
  }
156
98
  });
157
- isClusterVisible();
99
+ if ((((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) || []).length) {
100
+ isClusterVisible();
101
+ }
158
102
  // eslint-disable-next-line react-hooks/exhaustive-deps
159
- }, [product]);
103
+ }, [product, allProducts.data]);
160
104
  /**
161
- * Keep local invalid state in sync when a real cluster ID is present on the case.
105
+ * Hook to make sure that if cluster id comes from session or someother source
106
+ * we also fetch the details for the cluster id so that we can have fields like cluster version while creating the case
162
107
  */
163
108
  useEffect(() => {
164
- setIsClusterIdInValid(getIsClusterIdInvalid(openshiftClusterID));
165
- if (!isEmpty(openshiftClusterID)) {
166
- setLocalOpenshiftClusterIDState(openshiftClusterID);
167
- setSelectedReason('');
168
- setDontKnowSelected(false);
109
+ const isClusterIdInvalid = getIsClusterIdInvalid(openshiftClusterID);
110
+ setIsClusterIdInValid(isClusterIdInvalid);
111
+ if (!isEmpty(noClusterIdReason)) {
112
+ setDontKnowSelected(true);
113
+ setSelectedReason('dont-have-id');
169
114
  }
170
- }, [openshiftClusterID, openshiftClusterVersion]);
115
+ // eslint-disable-next-line react-hooks/exhaustive-deps
116
+ }, [noClusterIdReason, openshiftClusterID, openshiftClusterVersion]);
171
117
  const clusterIdUpdate = (caseDetails_1, ...args_1) => __awaiter(this, [caseDetails_1, ...args_1], void 0, function* (caseDetails, showToast = true) {
172
118
  if (showToast)
173
119
  setIsClusterIdUpdating(true);
174
120
  try {
175
- const caseUpdate = {};
176
- if (caseDetails.openshiftClusterID !== undefined) {
177
- caseUpdate.openshiftClusterID = caseDetails.openshiftClusterID;
178
- }
179
- if (caseDetails.openshiftClusterVersion !== undefined) {
180
- caseUpdate.openshiftClusterVersion = caseDetails.openshiftClusterVersion;
181
- }
182
- if (caseDetails.noClusterIdReason !== undefined) {
183
- caseUpdate.noClusterIdReason = caseDetails.noClusterIdReason;
184
- }
185
- if (caseDetails.noClusterIdReasonExplanation !== undefined) {
186
- caseUpdate.noClusterIdReasonExplanation = caseDetails.noClusterIdReasonExplanation;
187
- }
188
- yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, caseUpdate, false, {
189
- salesforceCaseId: caseId,
190
- existingCaseDetails: {
191
- product,
192
- version,
193
- noClusterIdReason,
194
- noClusterIdReasonExplanation,
195
- additionalCaseInformation,
196
- },
197
- });
121
+ yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
198
122
  if (showToast) {
199
123
  setIsClusterIdUpdating(false);
200
124
  ToastNotification.addSuccessMessage(t(`OpenShift Cluster ID has been successfully updated`));
@@ -210,7 +134,7 @@ export function CaseOpenshiftClusterId() {
210
134
  setLocalOpenshiftClusterIDState(previousLocalOpenshiftClusterIDState);
211
135
  if (showToast) {
212
136
  setIsClusterIdUpdating(false);
213
- caseUpdateError.showFieldError(e, t('OpenShift Cluster ID'), () => clusterIdUpdate(caseDetails, showToast));
137
+ caseUpdateError.showError(e, t(`OpenShift Cluster ID failed to updated`));
214
138
  }
215
139
  }
216
140
  });
@@ -261,14 +185,14 @@ export function CaseOpenshiftClusterId() {
261
185
  yield clusterIdUpdate(caseDetails);
262
186
  }
263
187
  });
264
- const isDedicatedV3 = () => resolvedNoClusterIdReason === 'Other' && resolvedNoClusterIdReasonExplanation === 'v3-cluster';
188
+ const isDedicatedV3 = () => noClusterIdReason === 'Other' && noClusterIdReasonExplanation === 'v3-cluster';
265
189
  const v3Message = () => description.match(/Cluster Name: /g) ? (React.createElement(React.Fragment, null,
266
190
  "Your Cluster Name has been added to the description below. ",
267
191
  v3Tov4TransitionLink())) : (React.createElement(React.Fragment, null, v3Tov4TransitionLink()));
268
192
  const clusterIdDropdownFormInstructions = () => {
269
193
  const errorMessage = isClusterIdInvalid
270
194
  ? isInvalidErrorMessage()
271
- : isEmpty(clusterDropdownId)
195
+ : isEmpty(openshiftClusterID) && isEmpty(selectedReason)
272
196
  ? discoverV4ClusterIdLinkError()
273
197
  : null;
274
198
  const infoMessage = isDedicatedV3() ? v3Message() : discoverV4ClusterIdLink();
@@ -276,22 +200,23 @@ export function CaseOpenshiftClusterId() {
276
200
  };
277
201
  const onReasonExplanationInputBoxChanged = (explanationInput) => __awaiter(this, void 0, void 0, function* () {
278
202
  explanationInput = (explanationInput || '').trim();
279
- if (!explanationInput || explanationInput === (noClusterIdReasonExplanation || '').trim()) {
280
- return;
281
- }
282
- const caseDetails = {
283
- noClusterIdReason: 'Other',
284
- openshiftClusterID: '',
285
- noClusterIdReasonExplanation: explanationInput,
286
- };
287
- try {
288
- setCaseDetails(caseDispatch, { noClusterIdReasonExplanation: explanationInput });
289
- yield clusterIdUpdate(caseDetails);
290
- }
291
- catch (e) {
292
- setCaseDetails(caseDispatch, { noClusterIdReasonExplanation });
203
+ if (explanationInput) {
204
+ const caseDetails = {
205
+ noClusterIdReason: 'Other',
206
+ openshiftClusterID: '',
207
+ noClusterIdReasonExplanation: explanationInput,
208
+ };
209
+ try {
210
+ setCaseDetails(caseDispatch, { noClusterIdReasonExplanation: explanationInput });
211
+ yield clusterIdUpdate(caseDetails);
212
+ }
213
+ catch (e) {
214
+ setCaseDetails(caseDispatch, { noClusterIdReasonExplanation });
215
+ }
293
216
  }
294
217
  });
218
+ // eslint-disable-next-line react-hooks/exhaustive-deps
219
+ const debounceFn = debounce(onReasonExplanationInputBoxChanged, 1000);
295
220
  const onReasonChange = (reason) => __awaiter(this, void 0, void 0, function* () {
296
221
  if (!reason || reason === noClusterIdReason)
297
222
  return;
@@ -311,8 +236,7 @@ export function CaseOpenshiftClusterId() {
311
236
  }
312
237
  setIsReasonUpdating(false);
313
238
  });
314
- const isInVaidNoClusterIdReason = isEmpty(resolvedNoClusterIdReason) ||
315
- (resolvedNoClusterIdReason === 'Other' && isEmpty((localReasonExplanation || '').trim()));
239
+ const isInVaidNoClusterIdReason = isEmpty(noClusterIdReason) || (noClusterIdReason === 'Other' && isEmpty(noClusterIdReasonExplanation.trim()));
316
240
  if (!showClusterId || isFetchingCaseDetails) {
317
241
  return null;
318
242
  }
@@ -321,8 +245,9 @@ export function CaseOpenshiftClusterId() {
321
245
  }
322
246
  else {
323
247
  return (React.createElement(React.Fragment, null,
324
- React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName, setOpenshiftDisplayName: onDisplayNameChange, openshiftClusterIDState: clusterDropdownId || '', onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: isClusterIdInvalid || isEmpty(clusterDropdownId), clusterIdDropdownFormInstructions: !isExportingPDF ? clusterIdDropdownFormInstructions() : undefined, onClusterClear: resetClusterData, isDisabled: isClusterIdUpdating || isCaseReadOnly, noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '' }),
325
- shouldShowNoClusterReasonSelector && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: resolvedNoClusterIdReasonExplanation || '', noClusterIdReason: resolvedNoClusterIdReason || '', onReasonInputBoxChanged: setLocalReasonExplanation, onReasonInputBoxBlur: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating || isCaseReadOnly })),
248
+ React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName, setOpenshiftDisplayName: onDisplayNameChange, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: !isExportingPDF ? clusterIdDropdownFormInstructions() : undefined, onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
249
+ noClusterIdReasonExplanation !== 'v3-cluster' &&
250
+ (dontKnowSelected || noClusterIdReasonExplanation || noClusterIdReason) && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: debounceFn, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating })),
326
251
  React.createElement(LoadingIndicator, { show: isClusterIdUpdating, size: "xs" })));
327
252
  }
328
253
  }
@@ -44,7 +44,7 @@ export function CaseContactPhoneNumberAlert(props) {
44
44
  }
45
45
  catch (e) {
46
46
  setCasUpdating(false);
47
- caseUpdateError.showFieldError(e, t('Phone number'), () => onCaseDetailsChange(caseDetails));
47
+ caseUpdateError.showError(e, t(`Phone number failed to be confirmed`));
48
48
  }
49
49
  });
50
50
  const goToPhoneField = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"CaseReferenceNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAqMxD"}
1
+ {"version":3,"file":"CaseReferenceNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAgMxD"}
@@ -7,7 +7,6 @@ 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';
11
10
  import { InputGroupText, Spinner, TextInput, TextInputGroup, Tooltip, TooltipPosition, ValidatedOptions, } from '@patternfly/react-core';
12
11
  import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
13
12
  import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
@@ -20,7 +19,7 @@ import { Trans, useTranslation } from 'react-i18next';
20
19
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
21
20
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
22
21
  import { CASE_REFERENCE_NUMBER_LIMIT } from '../../../../reducers/CaseConstNTypes';
23
- import { setCaseDetails, updateCaseDetailsGraphQL } from '../../../../reducers/CaseReducer';
22
+ import { setCaseDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
24
23
  import { CaseValuesToWatch } from '../../../shared/Constants';
25
24
  import { getChangedValueTooltip } from '../../../shared/utils';
26
25
  import { PDFContext } from '../../PDFContainer';
@@ -28,13 +27,11 @@ export default function CaseReferenceNumber(props) {
28
27
  const { hideSaveCancel = true, inlineEditable = true } = props;
29
28
  const { t } = useTranslation();
30
29
  const caseUpdateError = useCaseUpdateErrorMessage();
31
- const { referenceNumber, caseNumber, existingCaseDetails } = useCaseSelector((state) => ({
30
+ const { referenceNumber, caseNumber } = useCaseSelector((state) => ({
32
31
  referenceNumber: state.caseDetails.alternateId,
33
32
  caseNumber: state.caseDetails.caseNumber,
34
- existingCaseDetails: state.caseDetails,
35
33
  }), isEqual);
36
34
  const caseDispatch = useCaseDispatch();
37
- const apolloClient = useApolloClient();
38
35
  const [isUpdating, setIsUpdating] = useState(false);
39
36
  const [referenceNumberState, setReferenceNumberState] = useState(referenceNumber);
40
37
  const { isExportingPDF } = useContext(PDFContext);
@@ -63,14 +60,12 @@ export default function CaseReferenceNumber(props) {
63
60
  try {
64
61
  setIsUpdating(true);
65
62
  const caseDetails = { alternateId: referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.trim() };
66
- yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, caseDetails, false, {
67
- existingCaseDetails,
68
- });
63
+ yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
69
64
  ToastNotification.addSuccessMessage(t(`Personal reference number has been successfully updated`));
70
65
  setIsUpdating(false);
71
66
  }
72
67
  catch (e) {
73
- caseUpdateError.showFieldError(e, t('Personal reference number'), updateReferenceNumber);
68
+ caseUpdateError.showError(e, t('Personal reference number failed to update'));
74
69
  setIsUpdating(false);
75
70
  throw e;
76
71
  }
@@ -111,9 +106,9 @@ export default function CaseReferenceNumber(props) {
111
106
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localRefNumberChange, value: referenceNumber, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.altID) }),
112
107
  ' ',
113
108
  !isExportingPDF ? (React.createElement(Tooltip, { trigger: 'mouseenter focus', position: TooltipPosition.top, content: React.createElement(Trans, null, "Add your internal tracking ID to better identify and organize support issues.") },
114
- React.createElement(InfoIcon, { className: "pf-v6-u-ml-sm cursor-pointer", "aria-label": "Case Alternate ID", color: "#5e40be" }))) : ('')), allowInlineEdit: inlineEditable && !canEditCase.isCaseNotEditable, showAlwaysEditableInput: false, content: referenceNumber || t('No personal reference number to display.'), hideSaveCancel: hideSaveCancel, saveDisabled: saveDisabled, charCount: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) || 0, charTotal: CASE_REFERENCE_NUMBER_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
109
+ React.createElement(InfoIcon, { className: "pf-v6-u-ml-sm cursor-pointer", "aria-label": "Case Alternate ID", color: "#5e40be" }))) : ('')), allowInlineEdit: inlineEditable, content: referenceNumber || t('No personal reference number to display.'), hideSaveCancel: hideSaveCancel, saveDisabled: saveDisabled, charCount: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) || 0, charTotal: CASE_REFERENCE_NUMBER_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
115
110
  React.createElement(TextInputGroup, null,
116
- React.createElement(TextInput, { value: referenceNumberState, type: "text", id: "case-details-reference-number", placeholder: t(`Enter the reference number used personally or within your company`), onChange: (_event, value) => onReferenceNumberChange(value), "data-tracking-id": "case-details-reference-number", isDisabled: isUpdating || canEditCase.isCaseNotEditable, onKeyDown: handleKeyDown, validated: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) > CASE_REFERENCE_NUMBER_LIMIT
111
+ React.createElement(TextInput, { value: referenceNumberState, type: "text", id: "case-details-reference-number", placeholder: t(`Enter the reference number used personally or within your company`), onChange: (_event, value) => onReferenceNumberChange(value), "data-tracking-id": "case-details-reference-number", isDisabled: isUpdating, onKeyDown: handleKeyDown, validated: (referenceNumberState === null || referenceNumberState === void 0 ? void 0 : referenceNumberState.length) > CASE_REFERENCE_NUMBER_LIMIT
117
112
  ? ValidatedOptions.error
118
113
  : ValidatedOptions.default }),
119
114
  !isUpdating ? (React.createElement(InputGroupText, null,
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSbrGroups.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,MAAM,CAAC,OAAO,UAAU,aAAa,sBAqEpC"}
1
+ {"version":3,"file":"CaseSbrGroups.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,MAAM,CAAC,OAAO,UAAU,aAAa,sBAoEpC"}
@@ -18,11 +18,9 @@ import React, { useContext, useEffect, useState } from 'react';
18
18
  import { Typeahead } from 'react-bootstrap-typeahead';
19
19
  import { Trans, useTranslation } from 'react-i18next';
20
20
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
21
- import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
22
21
  import { setCaseDetails } from '../../../../reducers/CaseReducer';
23
22
  export default function CaseSbrGroups() {
24
23
  const { t } = useTranslation();
25
- const caseUpdateError = useCaseUpdateErrorMessage();
26
24
  const { caseDetails } = useCaseSelector((state) => ({
27
25
  caseDetails: {
28
26
  sbrGroups: state.caseDetails.sbrGroups,
@@ -62,7 +60,7 @@ export default function CaseSbrGroups() {
62
60
  }
63
61
  catch (e) {
64
62
  setIsSbrGroupsUpdating(false);
65
- caseUpdateError.showFieldError(e, t('SBR Groups'), () => onCaseSbrGroupsChange(selection));
63
+ ToastNotification.addDangerMessage(t(`Case SBR group failed to update`));
66
64
  }
67
65
  });
68
66
  return (React.createElement("div", { className: "form-group" },