@rh-support/troubleshoot 2.6.340 → 2.6.349

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +29 -19
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +16 -91
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +1 -1
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +32 -61
  9. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/Case.js +33 -60
  11. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -39
  13. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +4 -15
  15. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +55 -82
  17. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +0 -2
  18. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
  23. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/CaseOverview/index.js +45 -76
  25. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +109 -203
  27. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  30. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
  31. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +9 -5
  33. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  34. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +17 -18
  35. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +47 -51
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +44 -49
  39. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  40. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +45 -51
  41. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  42. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +10 -21
  43. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  44. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +2 -0
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -3
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +57 -132
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +4 -9
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +58 -93
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +91 -0
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +33 -78
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +153 -122
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +137 -74
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +7 -18
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +263 -211
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
  81. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  82. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
  83. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  84. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
  85. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  86. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
  87. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
  88. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -18
  90. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
  92. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  93. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
  94. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  95. package/lib/esm/components/CaseInformation/CaseGroup.js +57 -123
  96. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  97. package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
  98. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  99. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +30 -107
  100. package/lib/esm/components/CaseInformation/Description.js +1 -1
  101. package/lib/esm/components/CaseInformation/FileDiag.js +7 -10
  102. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  103. package/lib/esm/components/CaseInformation/Fts.js +1 -2
  104. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  105. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
  106. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  107. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  108. package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
  109. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  110. package/lib/esm/components/CaseManagement/Cep.js +9 -11
  111. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
  112. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  113. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
  114. package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
  115. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +7 -9
  116. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  117. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +18 -13
  118. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  119. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
  120. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  121. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
  122. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  123. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  124. package/lib/esm/components/IdeaInformation/IdeaInformation.js +18 -16
  125. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  126. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  127. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  128. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  129. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  130. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  131. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  132. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  133. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
  134. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  135. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  136. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  137. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
  138. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  139. package/lib/esm/components/Recommendations/AsideResults.js +3 -4
  140. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  141. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
  142. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  143. package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
  144. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  145. package/lib/esm/components/Recommendations/Recommendations.js +2 -2
  146. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  147. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
  148. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  149. package/lib/esm/components/Review/Review.js +16 -20
  150. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  151. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  152. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  153. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  154. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  155. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  156. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +62 -135
  157. package/lib/esm/components/shared/Constants.d.ts +0 -5
  158. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  159. package/lib/esm/components/shared/Constants.js +0 -5
  160. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  161. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  162. package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
  163. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  164. package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
  165. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  166. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
  167. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  168. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  169. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -21
  170. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  171. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
  172. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
  173. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  174. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
  175. package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
  176. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  177. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  178. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  179. package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -116
  180. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  181. package/lib/esm/components/shared/useIsSectionValid.js +57 -22
  182. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  183. package/lib/esm/components/shared/usePostComment.js +28 -16
  184. package/lib/esm/components/shared/utils.d.ts +0 -1
  185. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  186. package/lib/esm/components/shared/utils.js +3 -9
  187. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  188. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -160
  189. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  190. package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
  191. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  192. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
  193. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  194. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
  195. package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
  196. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  197. package/lib/esm/constants/caseDetailsConstants.js +0 -5
  198. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  199. package/lib/esm/css/case.css +202 -60
  200. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  201. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  202. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
  203. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  204. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  205. package/lib/esm/hooks/useS3Upload.d.ts +4 -5
  206. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  207. package/lib/esm/hooks/useS3Upload.js +30 -28
  208. package/lib/esm/i18n/template-de.d.ts +2 -2
  209. package/lib/esm/i18n/template-de.js +2 -2
  210. package/lib/esm/i18n/template-es.d.ts +2 -2
  211. package/lib/esm/i18n/template-es.js +2 -2
  212. package/lib/esm/i18n/template-fr.d.ts +2 -2
  213. package/lib/esm/i18n/template-fr.js +2 -2
  214. package/lib/esm/i18n/template-it.d.ts +2 -2
  215. package/lib/esm/i18n/template-it.js +2 -2
  216. package/lib/esm/i18n/template-jp.d.ts +2 -2
  217. package/lib/esm/i18n/template-jp.js +2 -2
  218. package/lib/esm/i18n/template-ko.d.ts +2 -2
  219. package/lib/esm/i18n/template-ko.js +2 -2
  220. package/lib/esm/i18n/template-pt.d.ts +2 -2
  221. package/lib/esm/i18n/template-pt.js +2 -2
  222. package/lib/esm/i18n/template-ru.d.ts +2 -2
  223. package/lib/esm/i18n/template-ru.js +2 -2
  224. package/lib/esm/i18n/template-zh.d.ts +2 -2
  225. package/lib/esm/i18n/template-zh.js +2 -2
  226. package/lib/esm/index.js +0 -1
  227. package/lib/esm/models/cache.d.ts +2 -0
  228. package/lib/esm/models/cache.d.ts.map +1 -1
  229. package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -121
  230. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  231. package/lib/esm/reducers/CaseConstNTypes.js +7 -30
  232. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
  233. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  234. package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
  235. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
  236. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  237. package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
  238. package/lib/esm/reducers/CaseHelpers.d.ts +2 -3
  239. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  240. package/lib/esm/reducers/CaseHelpers.js +15 -98
  241. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  242. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  243. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  244. package/lib/esm/reducers/CaseReducer.d.ts +11 -50
  245. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  246. package/lib/esm/reducers/CaseReducer.js +99 -270
  247. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  248. package/lib/esm/reducers/RecommendationsReducer.js +18 -15
  249. package/lib/esm/scss/_main.scss +0 -9
  250. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
  251. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  252. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  253. package/package.json +8 -9
  254. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
  255. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
  256. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
  257. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
  258. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
  259. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
  260. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
  261. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
  262. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
  263. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
  264. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
  265. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
  266. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
  267. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
  268. package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
  269. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
  270. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
  271. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
  272. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
  273. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
  274. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
  275. package/lib/esm/graphql/index.d.ts +0 -4
  276. package/lib/esm/graphql/index.d.ts.map +0 -1
  277. package/lib/esm/graphql/index.js +0 -3
  278. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  279. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  280. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  281. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  282. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  283. package/lib/esm/graphql/mutations/index.js +0 -1
  284. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  285. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  286. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
  287. package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
  288. package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
  289. package/lib/esm/graphql/queries/getParentId.js +0 -16
  290. package/lib/esm/graphql/queries/index.d.ts +0 -3
  291. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  292. package/lib/esm/graphql/queries/index.js +0 -2
  293. package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
  294. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  295. package/lib/esm/graphql/schemas/escalation.js +0 -1
  296. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  297. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  298. package/lib/esm/graphql/schemas/index.js +0 -1
  299. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
  300. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
  301. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
  302. package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
  303. package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
  304. package/lib/esm/hooks/useCaseComments/index.js +0 -5
  305. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
  306. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
  307. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
  308. package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
  309. package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
  310. package/lib/esm/hooks/useCaseComments/types.js +0 -1
  311. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
  312. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
  313. package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
  314. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
  315. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
  316. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
  317. package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
  318. package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
  319. package/lib/esm/hooks/useCaseHistory.js +0 -98
  320. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
  321. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
  322. package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
  323. package/lib/esm/models/caseHistory.d.ts +0 -80
  324. package/lib/esm/models/caseHistory.d.ts.map +0 -1
  325. package/lib/esm/models/caseHistory.js +0 -1
  326. package/lib/esm/utils/TimelineUtils.d.ts +0 -41
  327. package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
  328. package/lib/esm/utils/TimelineUtils.js +0 -135
  329. package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
  330. package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
  331. package/lib/esm/utils/caseHistoryUtils.js +0 -165
@@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { publicApi } from '@cee-eng/hydrajs';
11
- import { buildAccessRestrictionExclusionFilter, fetchCaseAttachmentsViaGraphQL, fetchCaseDetailsByCaseNumber, getApiResourceObject, } from '@rh-support/utils';
12
- import { GET_ESCALATION_DETAILS } from '../graphql';
10
+ import { escalations, kase, publicApi } from '@cee-eng/hydrajs';
11
+ import { getApiResourceObject } from '@rh-support/utils';
12
+ import without from 'lodash/without';
13
13
  export var CaseDetailsConstants;
14
14
  (function (CaseDetailsConstants) {
15
15
  CaseDetailsConstants["updateState"] = "updateState";
@@ -17,8 +17,6 @@ export var CaseDetailsConstants;
17
17
  export const initialCaseDetailsPageState = {
18
18
  caseFeedbacksHydra: getApiResourceObject([]),
19
19
  caseAttachmentHydra: getApiResourceObject([]),
20
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
21
- // caseExternalTrackersUpdate: getApiResourceObject([]),
22
20
  caseExternalTrackersUpdate: getApiResourceObject([]),
23
21
  caseEscalations: getApiResourceObject([]),
24
22
  };
@@ -32,21 +30,13 @@ export const caseDetailsPageReducer = (state, action) => {
32
30
  }
33
31
  }
34
32
  };
35
- export const fetchAttachments = (dispatch_1, caseNumber_1, apolloClient_1, caseSalesforceId_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, apolloClient_1, caseSalesforceId_1, ...args_1], void 0, function* (dispatch, caseNumber, apolloClient, caseSalesforceId, includeSecureSupport = false) {
33
+ export const fetchAttachments = (dispatch, caseNumber, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
36
34
  try {
37
35
  dispatch({
38
36
  type: CaseDetailsConstants.updateState,
39
37
  payload: { caseAttachmentHydra: getApiResourceObject([], true) },
40
38
  });
41
- let resolvedCaseSalesforceId = caseSalesforceId;
42
- if (!resolvedCaseSalesforceId) {
43
- const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, includeSecureSupport);
44
- resolvedCaseSalesforceId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
45
- }
46
- if (!resolvedCaseSalesforceId) {
47
- throw new Error('Missing Salesforce case id');
48
- }
49
- const allAttachments = yield fetchCaseAttachmentsViaGraphQL(apolloClient, caseNumber, resolvedCaseSalesforceId);
39
+ const allAttachments = yield kase.getAttachments(caseNumber, false, isSecureSupport);
50
40
  dispatch({
51
41
  type: CaseDetailsConstants.updateState,
52
42
  payload: { caseAttachmentHydra: getApiResourceObject(allAttachments) },
@@ -79,56 +69,34 @@ export const fetchFeedbacks = (dispatch, caseNumber) => __awaiter(void 0, void 0
79
69
  });
80
70
  }
81
71
  });
82
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
83
- // export const fetchExternalTrackers = async (dispatch: CaseDetailsReducerDispatchType, caseNumber: string) => {
84
- // try {
85
- // dispatch({
86
- // type: CaseDetailsConstants.updateState,
87
- // payload: { caseExternalTrackersUpdate: getApiResourceObject([], true) },
88
- // });
89
- // const caseExtUpdates = await publicApi.kase.getExternalUpdates(caseNumber);
90
- //
91
- // dispatch({
92
- // type: CaseDetailsConstants.updateState,
93
- // payload: { caseExternalTrackersUpdate: getApiResourceObject(caseExtUpdates) },
94
- // });
95
- // } catch (e) {
96
- // dispatch({
97
- // type: CaseDetailsConstants.updateState,
98
- // payload: { caseExternalTrackersUpdate: getApiResourceObject([], false, true, e.message) },
99
- // });
100
- // }
101
- // };
102
- export const fetchExternalTrackers = (_dispatch, _caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
103
- // no-op stub until External Trackers has a functioning GraphQL endpoint
72
+ export const fetchExternalTrackers = (dispatch, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
73
+ try {
74
+ dispatch({
75
+ type: CaseDetailsConstants.updateState,
76
+ payload: { caseExternalTrackersUpdate: getApiResourceObject([], true) },
77
+ });
78
+ const caseExtUpdates = yield publicApi.kase.getExternalUpdates(caseNumber);
79
+ dispatch({
80
+ type: CaseDetailsConstants.updateState,
81
+ payload: { caseExternalTrackersUpdate: getApiResourceObject(caseExtUpdates) },
82
+ });
83
+ }
84
+ catch (e) {
85
+ dispatch({
86
+ type: CaseDetailsConstants.updateState,
87
+ payload: { caseExternalTrackersUpdate: getApiResourceObject([], false, true, e.message) },
88
+ });
89
+ }
104
90
  });
105
- export const fetchCaseEscalations = (dispatch_1, parentId_1, apolloClient_1, ...args_1) => __awaiter(void 0, [dispatch_1, parentId_1, apolloClient_1, ...args_1], void 0, function* (dispatch, parentId, apolloClient, setLoading = true, includeSecureSupport = false) {
106
- var _a, _b, _c, _d;
91
+ export const fetchCaseEscalations = (dispatch_1, caseNumber_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, accountNumber_1, ...args_1], void 0, function* (dispatch, caseNumber, accountNumber, setLoading = true) {
107
92
  try {
108
93
  setLoading &&
109
94
  dispatch({
110
95
  type: CaseDetailsConstants.updateState,
111
96
  payload: { caseEscalations: getApiResourceObject([], setLoading) },
112
97
  });
113
- const { data } = yield apolloClient.query({
114
- query: GET_ESCALATION_DETAILS,
115
- variables: {
116
- where: {
117
- and: [{ ParentId: { eq: parentId } }, buildAccessRestrictionExclusionFilter(includeSecureSupport)],
118
- },
119
- },
120
- });
121
- const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportCase) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
122
- const caseEscalations = edges.map(({ node }) => {
123
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
124
- return ({
125
- name: (_b = (_a = node.CaseNumber) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '',
126
- subject: (_d = (_c = node.Subject) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : '',
127
- status: (_f = (_e = node.Status) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : '',
128
- owner: (_j = (_h = (_g = node.Owner) === null || _g === void 0 ? void 0 : _g.Name) === null || _h === void 0 ? void 0 : _h.value) !== null && _j !== void 0 ? _j : '',
129
- escalationSource: 'RME Escalation',
130
- });
131
- });
98
+ const res = yield escalations.getEscalations({ caseNumber, accountNumber });
99
+ const caseEscalations = without((res || []).filter((item) => item.escalationSource === 'RME Escalation'), null, undefined);
132
100
  dispatch({
133
101
  type: CaseDetailsConstants.updateState,
134
102
  payload: { caseEscalations: getApiResourceObject(caseEscalations, false) },
@@ -1,15 +1,16 @@
1
- import { ICaseChat, ICaseComment } from '@cee-eng/hydrajs/@types/api/public/case';
1
+ import { ICaseChat, ICaseComment, IExternalTrackerUpdate } from '@cee-eng/hydrajs/@types/api/public/case';
2
2
  import { ICommentFeedback } from '@cee-eng/hydrajs/@types/api/public/commentFeedback';
3
3
  import { IAttachment } from '@cee-eng/hydrajs/@types/models/attachment';
4
4
  import { IAction } from '@rh-support/types/shared';
5
- import { ApolloQueryClient } from '@rh-support/utils';
5
+ import { CaseReducerDispatchType } from './CaseConstNTypes';
6
6
  type IActionType = IAction<DiscussionsConstants, IDiscussionState>;
7
7
  export type DiscussionsReducerDispatchType = (value: IActionType) => void;
8
8
  export interface IDiscussion {
9
- item: Partial<ICaseComment | IAttachment | ICaseChat>;
9
+ item: Partial<ICaseComment | IAttachment | ICaseChat | IExternalTrackerUpdate>;
10
10
  last_modified_date: string;
11
11
  discussionType: string;
12
12
  feedback?: number;
13
+ feedbackReason?: string;
13
14
  }
14
15
  export declare enum DiscussionType {
15
16
  COMMENT = "comment",
@@ -34,10 +35,9 @@ export declare const initDiscussionFiltersListState: IFilter[];
34
35
  export interface IDiscussionState {
35
36
  sort: ISort;
36
37
  allDiscussions: IDiscussion[];
38
+ replyCommentText: string;
39
+ replyCommentCreator: string;
37
40
  discussionFiltersListState: IFilter[];
38
- replyingToAuthor: string | null;
39
- replyingToCommentId: string | null;
40
- replyingToTimestamp: string | null;
41
41
  }
42
42
  export declare const initialDiscussionState: IDiscussionState;
43
43
  export declare enum DiscussionsConstants {
@@ -45,13 +45,14 @@ export declare enum DiscussionsConstants {
45
45
  }
46
46
  export declare const discussionReducer: (state: IDiscussionState, action: IActionType) => IDiscussionState;
47
47
  export declare const setSort: (dispatch: DiscussionsReducerDispatchType, sort: ISort, allDiscussions: IDiscussion[]) => void;
48
- export declare const setReplyingTo: (dispatch: DiscussionsReducerDispatchType, author: string, commentId: string, timestamp: string) => void;
49
- export declare const clearReplyingTo: (dispatch: DiscussionsReducerDispatchType) => void;
50
48
  export declare const setFilter: (dispatch: DiscussionsReducerDispatchType, selected: string[], discussionFiltersListState: IFilter[]) => void;
51
- export declare const setDiscussions: (dispatch: DiscussionsReducerDispatchType, comments: ICaseComment[], chats: ICaseChat[], attachments: IAttachment[], feedbacks: ICommentFeedback[], trackerUpdates: Partial<unknown[]>, discussionFiltersListState: IFilter[], canSeeExternalTracker: boolean, canSeeChat: boolean, canSeeAttachments: boolean) => void;
49
+ export declare const setDiscussions: (dispatch: DiscussionsReducerDispatchType, comments: ICaseComment[], chats: ICaseChat[], attachments: IAttachment[], feedbacks: ICommentFeedback[], trackerUpdates: Partial<IExternalTrackerUpdate[]>, discussionFiltersListState: IFilter[], canSeeExternalTracker: boolean, canSeeChat: boolean, canSeeAttachments: boolean) => void;
52
50
  export declare const updateAttacmentsAfterRemoval: (dispatch: DiscussionsReducerDispatchType, uuid_removed: string, allDiscussions: IDiscussion[], discussionFiltersListState: IFilter[]) => void;
53
- export declare const updateCommentStateFeedback: (dispatch: DiscussionsReducerDispatchType, comment_id: string, newFeedback: any, allDiscussions: IDiscussion[]) => Promise<void>;
51
+ export declare const updateCommentStateFeedback: (dispatch: DiscussionsReducerDispatchType, comment_id: string, newFeedback: any, allDiscussions: IDiscussion[], feedbackReason?: string) => Promise<void>;
54
52
  export declare const updateAttachment: (dispatch: DiscussionsReducerDispatchType, uuid: string, newAttachment: any, allDiscussions: IDiscussion[]) => void;
55
- export declare const updateDiscussionStateAttachments: (dispatch: DiscussionsReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, discussionFiltersListState: IFilter[], dispatchCaseDetailsHydraAttachments: any, apolloClient: ApolloQueryClient, caseSalesforceId?: string, includeSecureSupport?: boolean) => Promise<void>;
53
+ export declare const updateDiscussionStateComments: (dispatch: DiscussionsReducerDispatchType, caseDispatch: CaseReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, feedbacks: ICommentFeedback[], discussionFiltersListState: IFilter[]) => Promise<void>;
54
+ export declare const updateDiscussionStateAttachments: (dispatch: DiscussionsReducerDispatchType, caseNumber: string, allDiscussions: IDiscussion[], sort: ISort, isSecureSupport: boolean, discussionFiltersListState: IFilter[], dispatchCaseDetailsHydraAttachments: any) => Promise<void>;
55
+ export declare const setCommentText: (dispatch: DiscussionsReducerDispatchType, replyCommentText: string, replyCommentCreator: string) => void;
56
+ export declare const clearReplyComment: (dispatch: DiscussionsReducerDispatchType) => void;
56
57
  export {};
57
58
  //# sourceMappingURL=CaseDiscussionTabReducer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDiscussionTabReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseDiscussionTabReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM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4BAA4B,OAAO,EAAE,SAsBxC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACnC,UAAU,8BAA8B,EACxC,YAAY,MAAM,EAClB,gBAAW,EACX,gBAAgB,WAAW,EAAE,EAC7B,iBAAiB,MAAM,kBAa1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,UAAU,8BAA8B,EACxC,MAAM,MAAM,EACZ,kBAAa,EACb,gBAAgB,WAAW,EAAE,SAUhC,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACtC,UAAU,8BAA8B,EACxC,cAAc,uBAAuB,EACrC,YAAY,MAAM,EAClB,gBAAgB,WAAW,EAAE,EAC7B,MAAM,KAAK,EACX,WAAW,gBAAgB,EAAE,EAC7B,4BAA4B,OAAO,EAAE,kBAoCxC,CAAC;AAEF,eAAO,MAAM,gCAAgC,GACzC,UAAU,8BAA8B,EACxC,YAAY,MAAM,EAClB,gBAAgB,WAAW,EAAE,EAC7B,MAAM,KAAK,EACX,iBAAiB,OAAO,EACxB,4BAA4B,OAAO,EAAE,EACrC,wCAAmC,kBA+BtC,CAAC;AAEF,eAAO,MAAM,cAAc,GACvB,UAAU,8BAA8B,EACxC,kBAAkB,MAAM,EACxB,qBAAqB,MAAM,SAG9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,8BAA8B,SAKzE,CAAC"}
@@ -7,11 +7,13 @@ 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 { fetchCaseAttachmentsViaGraphQLWithRetry, fetchCaseDetailsByCaseNumber, getApiResourceObject, mergeAttachmentsByUuid, } from '@rh-support/utils';
10
+ import { kase, publicApi } from '@cee-eng/hydrajs';
11
+ import { getApiResourceObject } from '@rh-support/utils';
11
12
  import filter from 'lodash/filter';
12
13
  import findIndex from 'lodash/findIndex';
13
14
  import isEqual from 'lodash/isEqual';
14
15
  import orderBy from 'lodash/orderBy';
16
+ import { CaseReducerConstants } from './CaseConstNTypes';
15
17
  import { CaseDetailsConstants } from './CaseDetailsPageReducer';
16
18
  export var DiscussionType;
17
19
  (function (DiscussionType) {
@@ -60,22 +62,20 @@ export const initDiscussionFiltersListState = [
60
62
  isSelected: true,
61
63
  canSee: false,
62
64
  },
63
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
64
- // {
65
- // filterLabel: 'External Tracker',
66
- // value: DiscussionType.EXTERNAL_TRACKER,
67
- // isDisabled: false,
68
- // isSelected: true,
69
- // canSee: false,
70
- // },
65
+ {
66
+ filterLabel: 'External Tracker',
67
+ value: DiscussionType.EXTERNAL_TRACKER,
68
+ isDisabled: false,
69
+ isSelected: true,
70
+ canSee: false,
71
+ },
71
72
  ];
72
73
  export const initialDiscussionState = {
73
74
  sort: discussionSortOrderConst[0],
74
75
  allDiscussions: [],
76
+ replyCommentText: '',
77
+ replyCommentCreator: '',
75
78
  discussionFiltersListState: initDiscussionFiltersListState,
76
- replyingToAuthor: null,
77
- replyingToCommentId: null,
78
- replyingToTimestamp: null,
79
79
  };
80
80
  export var DiscussionsConstants;
81
81
  (function (DiscussionsConstants) {
@@ -98,18 +98,6 @@ export const setSort = (dispatch, sort, allDiscussions) => {
98
98
  payload: { sort, allDiscussions: sortedDiscussions },
99
99
  });
100
100
  };
101
- export const setReplyingTo = (dispatch, author, commentId, timestamp) => {
102
- dispatch({
103
- type: DiscussionsConstants.updateDiscussionState,
104
- payload: { replyingToAuthor: author, replyingToCommentId: commentId, replyingToTimestamp: timestamp },
105
- });
106
- };
107
- export const clearReplyingTo = (dispatch) => {
108
- dispatch({
109
- type: DiscussionsConstants.updateDiscussionState,
110
- payload: { replyingToAuthor: null, replyingToCommentId: null, replyingToTimestamp: null },
111
- });
112
- };
113
101
  export const setFilter = (dispatch, selected, discussionFiltersListState) => {
114
102
  const prevSelectedListLength = discussionFiltersListState.filter((filter) => filter.isSelected).length;
115
103
  if (selected.length > prevSelectedListLength &&
@@ -129,13 +117,11 @@ const commputeFeedback = (commentId, feedbacks) => {
129
117
  const feedback = feedbacks.filter((feedback) => feedback.commentId === commentId);
130
118
  return feedback.length === 0 ? undefined : parseInt(feedback[0].feedback);
131
119
  };
132
- export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks,
133
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
134
- // trackerUpdates: Partial<IExternalTrackerUpdate[]>,
135
- trackerUpdates, discussionFiltersListState,
136
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
137
- // canSeeExternalTracker: boolean,
138
- canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
120
+ const computeFeedbackReason = (commentId, feedbacks) => {
121
+ const feedback = (feedbacks || []).find((item) => item.commentId === commentId);
122
+ return feedback === null || feedback === void 0 ? void 0 : feedback.feedbackReason;
123
+ };
124
+ export const setDiscussions = (dispatch, comments, chats, attachments, feedbacks, trackerUpdates, discussionFiltersListState, canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
139
125
  // set all discussions state
140
126
  // we need to transform discussions item because:
141
127
  // - last_modified_date is needed for sort and field name is different in different discussion types
@@ -152,25 +138,19 @@ canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
152
138
  discussionType: DiscussionType.COMMENT,
153
139
  last_modified_date: comment.lastModifiedDate || comment.createdDate,
154
140
  feedback: commputeFeedback(comment.id, feedbacks),
141
+ feedbackReason: computeFeedbackReason(comment.id, feedbacks),
142
+ }));
143
+ const allExternalTrackers = (trackerUpdates || []).map((externalUpdate) => ({
144
+ item: Object.assign(Object.assign({}, externalUpdate), { originating_system_last_updated_at: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate }),
145
+ last_modified_date: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
146
+ discussionType: DiscussionType.EXTERNAL_TRACKER,
155
147
  }));
156
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
157
- // const allExternalTrackers: IDiscussion[] = (trackerUpdates || []).map((externalUpdate) => ({
158
- // item: {
159
- // ...externalUpdate,
160
- // originating_system_last_updated_at:
161
- // externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
162
- // },
163
- // last_modified_date: externalUpdate.originatingSystemLastUpdatedAt || externalUpdate.createdDate,
164
- // discussionType: DiscussionType.EXTERNAL_TRACKER,
165
- // }));
166
148
  const allAttachments = attachments.map((attachment) => ({
167
149
  item: Object.assign(Object.assign({}, attachment), { lastModifiedDate: attachment.lastModifiedDate || attachment.createdDate }),
168
150
  last_modified_date: attachment.lastModifiedDate || attachment.createdDate,
169
151
  discussionType: DiscussionType.ATTACHMENT,
170
152
  }));
171
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
172
- // const allDiscussions: IDiscussion[] = [...allComments, ...allChats, ...allAttachments, ...allExternalTrackers];
173
- const allDiscussions = [...allComments, ...allChats, ...allAttachments];
153
+ const allDiscussions = [...allComments, ...allChats, ...allAttachments, ...allExternalTrackers];
174
154
  const sortedAllDiscussions = orderBy(allDiscussions, 'last_modified_date', 'desc');
175
155
  //set filter dropdown state
176
156
  // when we don't have any result for a discussion type, in filter options dropdown list, we make that type disable
@@ -182,10 +162,10 @@ canSeeExternalTracker, canSeeChat, canSeeAttachments) => {
182
162
  else if (filter.value === DiscussionType.CHAT) {
183
163
  filter.isDisabled = allChats.length === 0 ? true : false;
184
164
  filter.canSee = canSeeChat;
185
- // TODO: Uncomment when External Trackers has a functioning GraphQL endpoint
186
- // } else if (filter.value === DiscussionType.EXTERNAL_TRACKER) {
187
- // filter.isDisabled = allExternalTrackers.length === 0 ? true : false;
188
- // filter.canSee = canSeeExternalTracker;
165
+ }
166
+ else if (filter.value === DiscussionType.EXTERNAL_TRACKER) {
167
+ filter.isDisabled = allExternalTrackers.length === 0 ? true : false;
168
+ filter.canSee = canSeeExternalTracker;
189
169
  }
190
170
  else if (filter.value === DiscussionType.COMMENT) {
191
171
  filter.isDisabled = allComments.length === 0 ? true : false;
@@ -218,10 +198,13 @@ export const updateAttacmentsAfterRemoval = (dispatch, uuid_removed, allDiscussi
218
198
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { discussionFiltersListState } });
219
199
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions } });
220
200
  };
221
- export const updateCommentStateFeedback = (dispatch, comment_id, newFeedback, allDiscussions) => __awaiter(void 0, void 0, void 0, function* () {
201
+ export const updateCommentStateFeedback = (dispatch, comment_id, newFeedback, allDiscussions, feedbackReason) => __awaiter(void 0, void 0, void 0, function* () {
222
202
  const updateDiscussions = allDiscussions.map((discussion) => {
223
203
  if (discussion.discussionType === DiscussionType.COMMENT && discussion.item.id === comment_id) {
224
204
  discussion.feedback = newFeedback;
205
+ if (feedbackReason !== undefined) {
206
+ discussion.feedbackReason = feedbackReason;
207
+ }
225
208
  }
226
209
  return discussion;
227
210
  });
@@ -236,21 +219,36 @@ export const updateAttachment = (dispatch, uuid, newAttachment, allDiscussions)
236
219
  });
237
220
  dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions: updatedDiscussions } });
238
221
  };
239
- export const updateDiscussionStateAttachments = (dispatch_1, caseNumber_1, allDiscussions_1, sort_1, discussionFiltersListState_1, dispatchCaseDetailsHydraAttachments_1, apolloClient_1, caseSalesforceId_1, ...args_1) => __awaiter(void 0, [dispatch_1, caseNumber_1, allDiscussions_1, sort_1, discussionFiltersListState_1, dispatchCaseDetailsHydraAttachments_1, apolloClient_1, caseSalesforceId_1, ...args_1], void 0, function* (dispatch, caseNumber, allDiscussions, sort, discussionFiltersListState, dispatchCaseDetailsHydraAttachments, apolloClient, caseSalesforceId, includeSecureSupport = false) {
222
+ export const updateDiscussionStateComments = (dispatch, caseDispatch, caseNumber, allDiscussions, sort, feedbacks, discussionFiltersListState) => __awaiter(void 0, void 0, void 0, function* () {
240
223
  try {
241
- let resolvedCaseSalesforceId = caseSalesforceId;
242
- if (!resolvedCaseSalesforceId) {
243
- const caseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, includeSecureSupport);
244
- resolvedCaseSalesforceId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.id;
245
- }
246
- if (!resolvedCaseSalesforceId) {
247
- throw new Error('Missing Salesforce case id');
248
- }
249
- const existingAttachments = filter(allDiscussions, (o) => o.discussionType === DiscussionType.ATTACHMENT).map((discussion) => discussion.item);
250
- const fetchedAttachments = yield fetchCaseAttachmentsViaGraphQLWithRetry(apolloClient, caseNumber, resolvedCaseSalesforceId,
251
- // After a successful upload batch we expect at least one new attachment beyond what discussion already shows
252
- { minExpectedCount: existingAttachments.length + 1 });
253
- const attachments = mergeAttachmentsByUuid(existingAttachments, fetchedAttachments);
224
+ const comments = yield publicApi.kase.getComments(caseNumber);
225
+ const allComments = (comments || [])
226
+ .filter((comment) => comment.isDraft === false)
227
+ .map((comment) => ({
228
+ item: Object.assign(Object.assign({}, comment), { isPublic: comment.isPublic === undefined ? true : comment.isPublic, last_modified_date: comment.lastModifiedDate || comment.createdDate }),
229
+ discussionType: DiscussionType.COMMENT,
230
+ last_modified_date: comment.lastModifiedDate || comment.createdDate,
231
+ feedback: commputeFeedback(comment.id, feedbacks),
232
+ feedbackReason: computeFeedbackReason(comment.id, feedbacks),
233
+ }));
234
+ const filteredDiscussion = filter([...allDiscussions], (o) => o.discussionType !== DiscussionType.COMMENT);
235
+ const updatedDiscussions = orderBy([...filteredDiscussion, ...allComments], 'last_modified_date', sort.sortOrder);
236
+ discussionFiltersListState.forEach((filter) => {
237
+ if (filter.value === DiscussionType.COMMENT) {
238
+ filter.isDisabled = false;
239
+ }
240
+ });
241
+ dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { discussionFiltersListState } });
242
+ dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { allDiscussions: updatedDiscussions } });
243
+ caseDispatch({ type: CaseReducerConstants.updateComments, payload: { caseDetails: { comments } } });
244
+ }
245
+ catch (e) {
246
+ console.log(e);
247
+ }
248
+ });
249
+ export const updateDiscussionStateAttachments = (dispatch, caseNumber, allDiscussions, sort, isSecureSupport, discussionFiltersListState, dispatchCaseDetailsHydraAttachments) => __awaiter(void 0, void 0, void 0, function* () {
250
+ try {
251
+ const attachments = yield kase.getAttachments(caseNumber, false, isSecureSupport);
254
252
  const allAttachments = attachments.map((attachment) => ({
255
253
  item: Object.assign(Object.assign({}, attachment), { lastModifiedDate: attachment.lastModifiedDate || attachment.createdDate }),
256
254
  last_modified_date: attachment.lastModifiedDate || attachment.createdDate,
@@ -274,3 +272,12 @@ export const updateDiscussionStateAttachments = (dispatch_1, caseNumber_1, allDi
274
272
  console.log(e);
275
273
  }
276
274
  });
275
+ export const setCommentText = (dispatch, replyCommentText, replyCommentCreator) => {
276
+ dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { replyCommentText, replyCommentCreator } });
277
+ };
278
+ export const clearReplyComment = (dispatch) => {
279
+ dispatch({
280
+ type: DiscussionsConstants.updateDiscussionState,
281
+ payload: { replyCommentText: '', replyCommentCreator: '' },
282
+ });
283
+ };
@@ -6,11 +6,11 @@ import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
6
6
  import { IApiResponseDetails } from '@rh-support/types/shared';
7
7
  import { UserAuth } from '@rh-support/user-permissions';
8
8
  import React from 'react';
9
- import { ICaseState, IGraphQLCasePayload } from './CaseConstNTypes';
9
+ import { ICaseState } from './CaseConstNTypes';
10
10
  export declare const getCaseRecommendations: (docs: ISolrRecommendation[], oldDocs: any) => any[];
11
11
  export declare const getCepCommentFromCepDetails: (cepDetails: ICepDetails) => string;
12
12
  export declare const getRecommendationObject: (doc: ISolrRecommendation, index: number) => ICaseResourceLink;
13
- export declare const getUpdatedDescription: (issue: string, environment?: string, periodicityOfIssue?: string, timeFramesAndUrgency?: string, v3ClusterName?: string, product?: string, version?: string, noClusterIdReason?: string, noClusterIdReasonExplanation?: string) => string;
13
+ export declare const getUpdatedDescription: (issue: string, environment?: string, periodicityOfIssue?: string, timeFramesAndUrgency?: string, v3ClusterName?: string, product?: string, version?: string) => string;
14
14
  export declare const getDescriptionWOQues: (issue: string, environment?: string, periodicityOfIssue?: string, timeFramesAndUrgency?: string) => string;
15
15
  export declare const getIrtForSLAAndSeverity: (slaProcessId: string, severity: string) => string;
16
16
  export declare const getNewSeverityStringDef: (severity: string) => string | React.JSX.Element;
@@ -21,7 +21,6 @@ export declare const isCaseStateValid: (caseState: ICaseState, loggedInUserRight
21
21
  export declare const isIdeaCaseStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
22
22
  export declare const isCaseManagementStateValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
23
23
  export declare const isCaseInformationSectionValid: (caseState: ICaseState, loggedInUserRights: IApiResponseDetails<UserAuth>) => boolean;
24
- export declare const createCasePayloadGraphQL: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => IGraphQLCasePayload;
25
24
  export declare const createCasePayload: (caseState: ICaseState, sessionItem?: ISessionItem, isCaseCreate?: boolean) => Partial<ICasePayload>;
26
25
  export declare const getProcessedEntitlements: (caseEntitlements: IEntitlement[]) => IEntitlement[];
27
26
  export declare const getHasInvalidEntitlements: (caseEntitlements: IEntitlement[]) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAA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U,EAAE,oBAAoB,mBAAmB,CAAC,QAAQ,CAAC,KAAG,OA6B3G,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC7B,WAAW,UAAU,EACrB,oBAAoB,mBAAmB,CAAC,QAAQ,CAAC,KAClD,OA0BF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACnC,WAAW,UAAU,EACrB,oBAAoB,mBAAmB,CAAC,QAAQ,CAAC,KAClD,OAYF,CAAC;AAIF,eAAO,MAAM,6BAA6B,GACtC,WAAW,UAAU,EACrB,oBAAoB,mBAAmB,CAAC,QAAQ,CAAC,KAClD,OAkBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC1B,WAAW,UAAU,EACrB,cAAc,YAAY,EAC1B,eAAc,OAAe,KAC9B,OAAO,CAAC,YAAY,CA6EtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,kBAAkB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,GAAI,kBAAkB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAClC,aAAa,YAAY,EACzB,2BAA2B,MAAM,EACjC,iBAAiB,MAAM,KACxB,OAAO,CAAC,YAAY,CAiCtB,CAAC;AACF,eAAO,MAAM,yBAAyB,GAClC,aAAa,OAAO,CAAC,YAAY,CAAC,EAClC,8BAA8B,QAAQ,EAAE,KACzC,eAiDF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { getAppVersion, getTechnicalSupportRecordTypeId, getUserAgentForCaseMode, getVersion, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
1
+ import { getAppVersion, getUserAgentForCaseMode, getVersion, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
2
2
  import filter from 'lodash/filter';
3
3
  import forEach from 'lodash/forEach';
4
4
  import isEmpty from 'lodash/isEmpty';
@@ -9,7 +9,7 @@ import uniqBy from 'lodash/uniqBy';
9
9
  import React from 'react';
10
10
  import { isPhoneValid, trimAndReplacePlus } from '../components/shared/utils';
11
11
  import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../utils/caseOpenshiftClusterIdUtils';
12
- import { CASE_DETAILS_ISSUE_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, IDEA_SECOND_KTQUESTION_MAX_LIMIT, ITRForSLASeverity, KTQUESTION_MAX_LIMIT, KtQuestionConstant, LANGUAGE_MAP, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SeverityDescriptionDetails, TITLE_SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
12
+ import { CASE_DETAILS_ISSUE_LIMIT, CASE_REFERENCE_NUMBER_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, IDEA_SECOND_KTQUESTION_MAX_LIMIT, ITRForSLASeverity, KTQUESTION_MAX_LIMIT, KtQuestionConstant, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SeverityDescriptionDetails, TITLE_SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
13
13
  export const getCaseRecommendations = (docs, oldDocs) => {
14
14
  const recs = [];
15
15
  docs.forEach((doc, i) => {
@@ -47,7 +47,7 @@ export const getRecommendationObject = (doc, index) => {
47
47
  return rec;
48
48
  };
49
49
  // Responsible for the order of the questions in which they appear on case details
50
- export const getUpdatedDescription = (issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName, product, version, noClusterIdReason, noClusterIdReasonExplanation) => {
50
+ export const getUpdatedDescription = (issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName, product, version) => {
51
51
  let description = issue;
52
52
  const v3ClusterNameFinal = product === 'OpenShift Container Platform' && version !== '3.11' ? '' : v3ClusterName;
53
53
  if (!isEmpty(environment) ||
@@ -66,12 +66,6 @@ export const getUpdatedDescription = (issue, environment, periodicityOfIssue, ti
66
66
  ? `\n\n${KtQuestionConstant.periodicityOfIssue}\n${periodicityOfIssue}`
67
67
  : '';
68
68
  }
69
- if (!isEmpty(noClusterIdReason)) {
70
- description += `\n\nOpenShift Cluster ID\n${noClusterIdReason}`;
71
- }
72
- if (!isEmpty(noClusterIdReasonExplanation) && noClusterIdReasonExplanation !== 'v3-cluster') {
73
- description += `\n\nI don't have my Cluster ID, because\n${noClusterIdReasonExplanation}`;
74
- }
75
69
  return description;
76
70
  };
77
71
  // Gets the descriptions without questions
@@ -125,7 +119,8 @@ export const getSeverityDescription = (severity) => {
125
119
  };
126
120
  export const isClusterIDValid = (caseState, allProducts) => {
127
121
  const case_details = caseState.caseDetails;
128
- const productHasClusterID = isClusterIdEnabledForProduct(case_details.product);
122
+ const productHasClusterID = isClusterIdEnabledForProduct(case_details.product, allProducts);
123
+ //if product doesn't have clusterId we don't need to validate value
129
124
  if (!productHasClusterID)
130
125
  return true;
131
126
  const majorVersion = (case_details.version && getVersion(case_details.version).major) || '';
@@ -174,7 +169,9 @@ export const isCaseStateValid = (caseState, loggedInUserRights) => {
174
169
  !isEmpty(case_details.accountNumberRef) &&
175
170
  !isEmpty(case_details.contactSSOName) &&
176
171
  isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
177
- (caseState.selectedAccountDetails.data.requireCGroupOnCreate ? !!case_details.groupNumber : true) &&
172
+ (caseState.selectedAccountDetails.data.requireCGroupOnCreate
173
+ ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
174
+ : true) &&
178
175
  loggedInUserRights.data.canManageCases());
179
176
  };
180
177
  export const isIdeaCaseStateValid = (caseState, loggedInUserRights) => {
@@ -196,14 +193,18 @@ export const isIdeaCaseStateValid = (caseState, loggedInUserRights) => {
196
193
  !isEmpty(case_details.accountNumberRef) &&
197
194
  !isEmpty(case_details.contactSSOName) &&
198
195
  isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
199
- (caseState.selectedAccountDetails.data.requireCGroupOnCreate ? !!case_details.groupNumber : true) &&
196
+ (caseState.selectedAccountDetails.data.requireCGroupOnCreate
197
+ ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
198
+ : true) &&
200
199
  loggedInUserRights.data.canManageCases());
201
200
  };
202
201
  export const isCaseManagementStateValid = (caseState, loggedInUserRights) => {
203
202
  const case_details = caseState.caseDetails;
204
203
  return (isEmpty(case_details.caseNumber) &&
205
204
  !isEmpty(case_details.severity) &&
206
- (caseState.selectedAccountDetails.data.requireCGroupOnCreate ? !!case_details.groupNumber : true) &&
205
+ (caseState.selectedAccountDetails.data.requireCGroupOnCreate
206
+ ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
207
+ : true) &&
207
208
  isPhoneValid(case_details.phoneCountryCode, case_details.phoneAreaCodePrefixLineNumber) &&
208
209
  loggedInUserRights.data.canManageCases());
209
210
  };
@@ -224,90 +225,6 @@ export const isCaseInformationSectionValid = (caseState, loggedInUserRights) =>
224
225
  !isEmpty(case_details.accountNumberRef) &&
225
226
  loggedInUserRights.data.canManageCases());
226
227
  };
227
- const assignDescriptionFields = (casePayload, case_details, v3ClusterName) => {
228
- if (!isEmpty(case_details.description)) {
229
- let description = case_details.description;
230
- if (!isEmpty(case_details.noClusterIdReason) && !description.includes('\n\nNo Cluster ID Reason\n')) {
231
- description += `\n\nNo Cluster ID Reason\n${case_details.noClusterIdReason}`;
232
- }
233
- if (!isEmpty(case_details.noClusterIdReasonExplanation) &&
234
- case_details.noClusterIdReasonExplanation !== 'v3-cluster' &&
235
- !description.includes('\n\nNo Cluster ID Reason Explanation\n')) {
236
- description += `\n\nNo Cluster ID Reason Explanation\n${case_details.noClusterIdReasonExplanation}`;
237
- }
238
- casePayload.Description = description;
239
- }
240
- if (!isEmpty(case_details.environment) || !isEmpty(v3ClusterName)) {
241
- const clusterPrefix = v3ClusterName ? `OpenShift Cluster Name: ${v3ClusterName}\n` : '';
242
- casePayload.EnvironmentInWhichItOccurs__c = `${clusterPrefix} ${case_details.environment}`;
243
- }
244
- if (!isEmpty(case_details.periodicityOfIssue)) {
245
- casePayload.FrequencyOfIssueOccurrence__c = case_details.periodicityOfIssue;
246
- }
247
- if (!isEmpty(case_details.timeFramesAndUrgency)) {
248
- casePayload.ImpactOnUserOrBusiness__c = case_details.timeFramesAndUrgency;
249
- }
250
- };
251
- const assignOptionalIdentifiers = (casePayload, caseState) => {
252
- var _a, _b, _c, _d;
253
- const case_details = caseState.caseDetails;
254
- const contactId = (_b = (_a = caseState.selectedOwner) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.id;
255
- const countryCode = (_c = case_details === null || case_details === void 0 ? void 0 : case_details.phoneCountryCode) === null || _c === void 0 ? void 0 : _c.trim();
256
- const phoneLine = (_d = case_details.phoneAreaCodePrefixLineNumber) === null || _d === void 0 ? void 0 : _d.trim();
257
- if (!isEmpty(contactId))
258
- casePayload.ContactId = contactId;
259
- if (!isEmpty(caseState.selectedEntitlementId))
260
- casePayload.EntitlementId = caseState.selectedEntitlementId;
261
- if (!isEmpty(caseState.selectedVersionId))
262
- casePayload.ProductId = caseState.selectedVersionId;
263
- if (caseState.hasUserUpdatedSuppliedPhone && !isEmpty(countryCode) && !isEmpty(phoneLine)) {
264
- casePayload.SuppliedPhone = `${countryCode} ${phoneLine}`;
265
- }
266
- if (!isEmpty(case_details.alternateId))
267
- casePayload.AlternateCaseId__c = case_details.alternateId;
268
- if (!isEmpty(case_details.openshiftClusterID))
269
- casePayload.OpenshiftClusterID__c = case_details.openshiftClusterID;
270
- if (!isEmpty(case_details.openshiftClusterVersion)) {
271
- casePayload.OpenshiftClusterVersion__c = case_details.openshiftClusterVersion;
272
- }
273
- if (case_details.groupNumber)
274
- casePayload.Group__c = case_details.groupNumber;
275
- };
276
- const assignAccountAccessRestriction = (casePayload, caseState) => {
277
- var _a, _b, _c;
278
- const selectedAccount = (_a = caseState.selectedAccountDetails) === null || _a === void 0 ? void 0 : _a.data;
279
- const rawAccessRestriction = (_b = selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accessRestriction) !== null && _b !== void 0 ? _b : (typeof (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.AccessRestrictions__c) === 'string'
280
- ? selectedAccount.AccessRestrictions__c
281
- : (_c = selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.AccessRestrictions__c) === null || _c === void 0 ? void 0 : _c.value);
282
- const accessRestriction = typeof rawAccessRestriction === 'string' ? rawAccessRestriction.trim() : '';
283
- if (accessRestriction != null && !isEmpty(accessRestriction)) {
284
- casePayload.AccessRestrictions__c = accessRestriction;
285
- }
286
- };
287
- export const createCasePayloadGraphQL = (caseState, sessionItem, isCaseCreate = false) => {
288
- var _a;
289
- const casePayload = {};
290
- const case_details = caseState.caseDetails;
291
- if (!isEmpty(case_details.summary))
292
- casePayload.Subject = case_details.summary;
293
- if (!isEmpty(case_details.caseType))
294
- casePayload.Type = case_details.caseType;
295
- if (!isEmpty(case_details.severity))
296
- casePayload.Priority = case_details.severity;
297
- if (!isEmpty(case_details.caseLanguage)) {
298
- casePayload.Language = (_a = LANGUAGE_MAP[case_details.caseLanguage]) !== null && _a !== void 0 ? _a : case_details.caseLanguage;
299
- }
300
- assignDescriptionFields(casePayload, case_details, caseState.v3ClusterName);
301
- casePayload.Origin = 'Web';
302
- casePayload.RecordTypeId = getTechnicalSupportRecordTypeId();
303
- assignOptionalIdentifiers(casePayload, caseState);
304
- assignAccountAccessRestriction(casePayload, caseState);
305
- casePayload.X24x7__c = !!case_details.fts;
306
- if (case_details.fts && !isEmpty(case_details.contactInfo24x7)) {
307
- casePayload.X24x7ContactInformation__c = case_details.contactInfo24x7;
308
- }
309
- return casePayload;
310
- };
311
228
  export const createCasePayload = (caseState, sessionItem, isCaseCreate = false) => {
312
229
  var _a, _b, _c, _d, _e, _f, _g;
313
230
  const casePayload = {};
@@ -399,7 +316,7 @@ export const getCaseFromSessionDetails = (sessionItem, loggedInUserAccountNumber
399
316
  severity: sessionDetails.severity,
400
317
  entitlementSla: sessionDetails.sla,
401
318
  accountNumberRef: sessionDetails.accountNumber || loggedInUserAccountNumber,
402
- groupNumber: sessionDetails.folderNumber || null,
319
+ groupNumber: sessionDetails.folderNumber || '-1',
403
320
  fts: sessionDetails.isFts,
404
321
  contactInfo24x7: sessionDetails.contactInfo24X7,
405
322
  contactSSOName: sessionDetails.contactSsoUsername || loggedInUserSSO,