@rh-support/troubleshoot 2.6.354 → 2.6.357

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 (345) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
  7. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
  9. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
  10. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
  11. package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
  12. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/Case.js +60 -33
  14. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  15. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
  16. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
  17. package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
  18. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
  20. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
  21. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
  23. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
  24. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
  25. package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
  26. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  27. package/lib/esm/components/CaseEditView/CaseOverview/index.js +76 -45
  28. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
  29. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
  30. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
  31. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
  32. package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
  33. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
  34. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
  35. package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  39. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
  40. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  41. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
  42. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
  43. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
  44. package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
  45. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  46. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
  47. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  48. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +23 -10
  49. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
  50. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
  51. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
  52. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
  53. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
  54. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
  55. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +132 -57
  56. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
  57. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
  58. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  59. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
  60. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  61. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
  62. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
  63. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
  64. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
  65. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
  66. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
  67. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
  68. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
  69. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
  70. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
  71. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
  72. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
  73. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
  74. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
  75. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
  76. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
  77. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
  78. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
  79. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
  80. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
  81. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
  82. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
  83. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
  84. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
  85. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
  86. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  87. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
  88. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  89. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
  90. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
  91. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
  92. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
  93. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
  94. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
  95. package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
  96. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
  97. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
  98. package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
  99. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
  100. package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
  101. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  102. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
  103. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  104. package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
  105. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  106. package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
  107. package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
  108. package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
  109. package/lib/esm/components/CaseInformation/CaseLabels.js +103 -0
  110. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  111. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
  112. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
  113. package/lib/esm/components/CaseInformation/Description.js +1 -1
  114. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  115. package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
  116. package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
  117. package/lib/esm/components/CaseInformation/Fts.js +31 -17
  118. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  119. package/lib/esm/components/CaseInformation/Severity.js +21 -13
  120. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  121. package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
  122. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
  123. package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
  124. package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +110 -0
  125. package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
  126. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
  127. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  128. package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
  129. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  130. package/lib/esm/components/CaseManagement/Cep.js +11 -9
  131. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
  132. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
  133. package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +22 -3
  134. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
  135. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  136. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +15 -22
  137. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
  138. package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
  139. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
  140. package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
  141. package/lib/esm/components/EditDescription/EditDescription.js +1 -1
  142. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  143. package/lib/esm/components/IdeaInformation/IdeaInformation.js +16 -18
  144. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  145. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
  146. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
  147. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  148. package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
  149. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  150. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
  151. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  152. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
  153. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
  154. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
  155. package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
  156. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  157. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
  158. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
  159. package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
  160. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  161. package/lib/esm/components/Recommendations/AsideResults.js +4 -3
  162. package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
  163. package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
  164. package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
  165. package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
  166. package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
  167. package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
  168. package/lib/esm/components/Recommendations/Recommendations.js +3 -9
  169. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  170. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
  171. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  172. package/lib/esm/components/Review/Review.js +25 -19
  173. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  174. package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
  175. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  176. package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
  177. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
  178. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  179. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +104 -62
  180. package/lib/esm/components/shared/Constants.d.ts +5 -0
  181. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  182. package/lib/esm/components/shared/Constants.js +5 -0
  183. package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
  184. package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
  185. package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
  186. package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
  187. package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
  188. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
  189. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  190. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
  191. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
  192. package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
  193. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +21 -5
  194. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
  195. package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +210 -34
  196. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
  197. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
  198. package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
  199. package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
  200. package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
  201. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
  202. package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
  203. package/lib/esm/components/shared/fileUpload/useFileUploader.js +116 -47
  204. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  205. package/lib/esm/components/shared/useIsSectionValid.js +22 -57
  206. package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
  207. package/lib/esm/components/shared/usePostComment.js +16 -28
  208. package/lib/esm/components/shared/utils.d.ts +1 -0
  209. package/lib/esm/components/shared/utils.d.ts.map +1 -1
  210. package/lib/esm/components/shared/utils.js +9 -3
  211. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  212. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
  213. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  214. package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
  215. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  216. package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
  217. package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
  218. package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
  219. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  220. package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
  221. package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
  222. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  223. package/lib/esm/constants/caseDetailsConstants.js +5 -0
  224. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  225. package/lib/esm/css/app.css +28 -0
  226. package/lib/esm/css/case.css +60 -209
  227. package/lib/esm/graphql/index.d.ts +4 -0
  228. package/lib/esm/graphql/index.d.ts.map +1 -0
  229. package/lib/esm/graphql/index.js +3 -0
  230. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
  231. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
  232. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
  233. package/lib/esm/graphql/mutations/index.d.ts +2 -0
  234. package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
  235. package/lib/esm/graphql/mutations/index.js +1 -0
  236. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
  237. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
  238. package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
  239. package/lib/esm/graphql/queries/index.d.ts +2 -0
  240. package/lib/esm/graphql/queries/index.d.ts.map +1 -0
  241. package/lib/esm/graphql/queries/index.js +1 -0
  242. package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
  243. package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
  244. package/lib/esm/graphql/schemas/escalation.js +1 -0
  245. package/lib/esm/graphql/schemas/index.d.ts +2 -0
  246. package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
  247. package/lib/esm/graphql/schemas/index.js +1 -0
  248. package/lib/esm/hooks/useAB.d.ts.map +1 -1
  249. package/lib/esm/hooks/useAB.js +45 -23
  250. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
  251. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
  252. package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
  253. package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
  254. package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
  255. package/lib/esm/hooks/useCaseComments/index.js +5 -0
  256. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
  257. package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
  258. package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
  259. package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
  260. package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
  261. package/lib/esm/hooks/useCaseComments/types.js +1 -0
  262. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
  263. package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
  264. package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
  265. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
  266. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
  267. package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
  268. package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
  269. package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
  270. package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
  271. package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
  272. package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
  273. package/lib/esm/hooks/useCaseHistory.js +98 -0
  274. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +21 -0
  275. package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
  276. package/lib/esm/hooks/useCaseLabelLinkMutations.js +91 -0
  277. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
  278. package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
  279. package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
  280. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  281. package/lib/esm/hooks/useResetCaseCreate.js +18 -11
  282. package/lib/esm/hooks/useS3Upload.d.ts +5 -4
  283. package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
  284. package/lib/esm/hooks/useS3Upload.js +28 -30
  285. package/lib/esm/i18n/template-de.d.ts +2 -2
  286. package/lib/esm/i18n/template-de.js +2 -2
  287. package/lib/esm/i18n/template-es.d.ts +2 -2
  288. package/lib/esm/i18n/template-es.js +2 -2
  289. package/lib/esm/i18n/template-fr.d.ts +2 -2
  290. package/lib/esm/i18n/template-fr.js +2 -2
  291. package/lib/esm/i18n/template-it.d.ts +2 -2
  292. package/lib/esm/i18n/template-it.js +2 -2
  293. package/lib/esm/i18n/template-jp.d.ts +2 -2
  294. package/lib/esm/i18n/template-jp.js +2 -2
  295. package/lib/esm/i18n/template-ko.d.ts +2 -2
  296. package/lib/esm/i18n/template-ko.js +2 -2
  297. package/lib/esm/i18n/template-pt.d.ts +2 -2
  298. package/lib/esm/i18n/template-pt.js +2 -2
  299. package/lib/esm/i18n/template-ru.d.ts +2 -2
  300. package/lib/esm/i18n/template-ru.js +2 -2
  301. package/lib/esm/i18n/template-zh.d.ts +2 -2
  302. package/lib/esm/i18n/template-zh.js +2 -2
  303. package/lib/esm/index.js +1 -0
  304. package/lib/esm/models/cache.d.ts +0 -2
  305. package/lib/esm/models/cache.d.ts.map +1 -1
  306. package/lib/esm/models/caseHistory.d.ts +80 -0
  307. package/lib/esm/models/caseHistory.d.ts.map +1 -0
  308. package/lib/esm/models/caseHistory.js +1 -0
  309. package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
  310. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  311. package/lib/esm/reducers/CaseConstNTypes.js +31 -7
  312. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
  313. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  314. package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
  315. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
  316. package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
  317. package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
  318. package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
  319. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  320. package/lib/esm/reducers/CaseHelpers.js +117 -17
  321. package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
  322. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  323. package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
  324. package/lib/esm/reducers/CaseReducer.d.ts +56 -11
  325. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  326. package/lib/esm/reducers/CaseReducer.js +279 -99
  327. package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
  328. package/lib/esm/reducers/RecommendationsReducer.js +15 -18
  329. package/lib/esm/scss/_main.scss +9 -0
  330. package/lib/esm/utils/TimelineUtils.d.ts +41 -0
  331. package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
  332. package/lib/esm/utils/TimelineUtils.js +135 -0
  333. package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
  334. package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
  335. package/lib/esm/utils/caseHistoryUtils.js +165 -0
  336. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
  337. package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
  338. package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
  339. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
  340. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
  341. package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
  342. package/package.json +9 -8
  343. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
  344. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
  345. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
@@ -7,8 +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 { useApolloClient } from '@apollo/client/react';
10
11
  import { publicApi } from '@cee-eng/hydrajs';
11
- import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
12
+ import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant, TextArea, TextInput, } from '@patternfly/react-core';
12
13
  import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
13
14
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
14
15
  import { SingleSelectDropdown, useFetch } from '@rh-support/components';
@@ -16,41 +17,19 @@ import isEqual from 'lodash/isEqual';
16
17
  import React, { useEffect, useState } from 'react';
17
18
  import { Trans, useTranslation } from 'react-i18next';
18
19
  import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
19
- import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
20
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
21
- import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
22
- import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetails } from '../../../reducers/CaseReducer';
23
- const getLocaleNameFromLocalCode = (localeCode) => {
24
- if ('Intl' in window && 'DisplayNames' in Intl) {
25
- try {
26
- const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
27
- // https://github.com/microsoft/TypeScript/issues/41338
28
- const langName = new Intl.DisplayNames([lang], { type: 'language' });
29
- const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
30
- return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
31
- }
32
- catch (e) {
33
- return localeCode;
34
- }
35
- }
36
- return localeCode;
37
- };
38
- const formatSessionLinks = (sessionLink) => {
39
- const links = sessionLink
40
- .split(/[;,| \n\r\t]+/)
41
- .map((link) => link.trim())
42
- .filter(Boolean);
43
- const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
44
- return formattedLinks;
45
- };
20
+ import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
21
+ import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetailsGraphQL } from '../../../reducers/CaseReducer';
22
+ import { formatSessionLinks, getLocaleNameFromLocalCode, REMOTE_SESSION_FIELD_LENGTH_LIMIT, } from './remoteSessionUtils';
46
23
  export function NewEssTermsModal(props) {
47
24
  const { t } = useTranslation();
48
25
  const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
49
26
  remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
50
27
  }), isEqual);
51
28
  const [isTermsChecked, setIsTermsChecked] = useState(false);
29
+ const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
52
30
  const { request } = useFetch(publicApi.terms.getRequiredTerms);
53
31
  const caseDispatch = useCaseDispatch();
32
+ const apolloClient = useApolloClient();
54
33
  const [selectedTranslation, setSelectedTranslation] = useState({
55
34
  id: '5001',
56
35
  isDefault: false,
@@ -93,15 +72,32 @@ export function NewEssTermsModal(props) {
93
72
  fetchTerms();
94
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
95
74
  }, []);
96
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
97
- propgateErrors: true,
98
- });
99
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
100
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
101
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
75
+ const client = useApolloClient();
76
+ const { createComment, loading: isPostingComment } = useCreateCaseComment();
77
+ const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
102
78
  const updateSessionExpectation = (event, value) => setSessionExpectations(value);
103
79
  const updateImpact = (event, value) => setImpact(value);
104
80
  const updateSessionLink = (event, value) => setSessionLink(value);
81
+ const getVariantSessionExpectations = () => {
82
+ if (!sessionExpectations)
83
+ return ProgressVariant.success;
84
+ if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
85
+ return ProgressVariant.warning;
86
+ }
87
+ else {
88
+ return ProgressVariant.success;
89
+ }
90
+ };
91
+ const getVariantImpact = () => {
92
+ if (!impact)
93
+ return ProgressVariant.success;
94
+ if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
95
+ return ProgressVariant.warning;
96
+ }
97
+ else {
98
+ return ProgressVariant.success;
99
+ }
100
+ };
105
101
  // To handle modal cancel and close
106
102
  const onCancel = () => {
107
103
  if (agreeLoading || isPostingComment)
@@ -127,21 +123,26 @@ export function NewEssTermsModal(props) {
127
123
  };
128
124
  // Function to ack remote session terms and post comment
129
125
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
130
- const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
126
+ const requestComment = t(`<p><strong>Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).</strong></p><p>Submitted a remote session request with following details:</p><p><strong>Preferred Time and Expectations of remote session</strong></p><p>${sessionExpectations}</p><p><strong>Describe the impact to you or the business</strong></p><p>${impact}</p>${sessionLink
127
+ ? `<p><strong>Remote session link</strong></p><p>${formatSessionLinks(sessionLink)}</p>`
128
+ : ''}<p>This action does not initiate a remote session. A Red Hat Associate will get back to you soon.</p>`);
131
129
  try {
132
- yield updateCaseDetails(caseDispatch, props.caseNumber, {
130
+ yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
133
131
  remoteSessionTermsAcked: true,
134
- screenSessionRequested: true,
135
132
  waitingOnCallback: true,
136
- });
133
+ }, false, { existingCaseDetails });
137
134
  try {
138
- yield postCommentRequest({
135
+ yield createComment({
136
+ caseId: caseSalesforceId,
137
+ body: requestComment,
138
+ isPublic: true,
139
+ });
140
+ client.refetchQueries({ include: [GET_CASE_COMMENTS] });
141
+ yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
142
+ apolloClient,
139
143
  caseNumber: props.caseNumber,
140
- commentBody: requestComment,
141
- contentType: 'markdown',
144
+ existingCaseDetails,
142
145
  });
143
- updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
144
- checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
145
146
  setAgreeLoading(false);
146
147
  setHasSubmitted(true);
147
148
  // ToastNotification.addSuccessMessage(
@@ -170,8 +171,9 @@ export function NewEssTermsModal(props) {
170
171
  onCancel();
171
172
  setAgreeLoading(false);
172
173
  setIsTermsChecked(false);
173
- yield updateCaseDetails(caseDispatch, props.caseNumber, {
174
- screenSessionRequested: false,
174
+ yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
175
+ remoteSessionTermsAcked: false,
176
+ waitingOnCallback: false,
175
177
  });
176
178
  // ToastNotification.addDangerMessage(
177
179
  // t('Could not submit a request for remote session'),
@@ -215,12 +217,14 @@ export function NewEssTermsModal(props) {
215
217
  React.createElement("label", { className: "pf-v6-u-mt-md" },
216
218
  React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
217
219
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
218
- React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })),
220
+ React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Preferred Time and Expectations for Remote Session" }),
221
+ React.createElement(Progress, { value: sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantSessionExpectations(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
219
222
  React.createElement("div", null,
220
223
  React.createElement("label", { className: "pf-v6-u-mt-md" },
221
224
  React.createElement(Trans, null, "Describe the impact to you or the business"),
222
225
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
223
- React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })),
226
+ React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Describe the impact to you or the business" }),
227
+ React.createElement(Progress, { value: impact === null || impact === void 0 ? void 0 : impact.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantImpact(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
224
228
  React.createElement("div", null,
225
229
  React.createElement("label", { className: "pf-v6-u-mt-md" },
226
230
  React.createElement(Trans, null, "Remote session link (optional)")),
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AA4BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0XxD"}
1
+ {"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAibxD"}
@@ -7,8 +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 { useApolloClient } from '@apollo/client/react';
10
11
  import { publicApi } from '@cee-eng/hydrajs';
11
- import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
12
+ import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant, TextArea, TextInput, } from '@patternfly/react-core';
12
13
  import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
13
14
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
14
15
  import { SingleSelectDropdown, useFetch } from '@rh-support/components';
@@ -16,41 +17,19 @@ import isEqual from 'lodash/isEqual';
16
17
  import React, { useEffect, useState } from 'react';
17
18
  import { Trans, useTranslation } from 'react-i18next';
18
19
  import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
19
- import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
20
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
21
- import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
22
- import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetails, } from '../../../reducers/CaseReducer';
23
- const getLocaleNameFromLocalCode = (localeCode) => {
24
- if ('Intl' in window && 'DisplayNames' in Intl) {
25
- try {
26
- const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
27
- // https://github.com/microsoft/TypeScript/issues/41338
28
- const langName = new Intl.DisplayNames([lang], { type: 'language' });
29
- const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
30
- return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
31
- }
32
- catch (e) {
33
- return localeCode;
34
- }
35
- }
36
- return localeCode;
37
- };
38
- const formatSessionLinks = (sessionLink) => {
39
- const links = sessionLink
40
- .split(/[;,| \n\r\t]+/)
41
- .map((link) => link.trim())
42
- .filter(Boolean);
43
- const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
44
- return formattedLinks;
45
- };
20
+ import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
21
+ import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetailsGraphQL, } from '../../../reducers/CaseReducer';
22
+ import { formatSessionLinks, getLocaleNameFromLocalCode, REMOTE_SESSION_FIELD_LENGTH_LIMIT, } from './remoteSessionUtils';
46
23
  export function RemoteSessionAgreementModal(props) {
47
24
  const { t } = useTranslation();
48
25
  const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
49
26
  remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
27
+ caseDetails: state.caseDetails,
50
28
  }), isEqual);
51
29
  const [isTermsChecked, setIsTermsChecked] = useState(false);
52
30
  const { request } = useFetch(publicApi.terms.getRequiredTerms);
53
31
  const caseDispatch = useCaseDispatch();
32
+ const apolloClient = useApolloClient();
54
33
  const [selectedTranslation, setSelectedTranslation] = useState({
55
34
  id: '5001',
56
35
  isDefault: false,
@@ -93,15 +72,32 @@ export function RemoteSessionAgreementModal(props) {
93
72
  fetchTerms();
94
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
95
74
  }, []);
96
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
97
- propgateErrors: true,
98
- });
99
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
100
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
101
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
75
+ const client = useApolloClient();
76
+ const { createComment, loading: isPostingComment } = useCreateCaseComment();
77
+ const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
102
78
  const updateSessionExpectation = (event, value) => setSessionExpectations(value);
103
79
  const updateImpact = (event, value) => setImpact(value);
104
80
  const updateSessionLink = (event, value) => setSessionLink(value);
81
+ const getVariantSessionExpectations = () => {
82
+ if (!sessionExpectations)
83
+ return ProgressVariant.success;
84
+ if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
85
+ return ProgressVariant.warning;
86
+ }
87
+ else {
88
+ return ProgressVariant.success;
89
+ }
90
+ };
91
+ const getVariantImpact = () => {
92
+ if (!impact)
93
+ return ProgressVariant.success;
94
+ if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
95
+ return ProgressVariant.warning;
96
+ }
97
+ else {
98
+ return ProgressVariant.success;
99
+ }
100
+ };
105
101
  // To handle modal cancel and close
106
102
  const onCancel = () => {
107
103
  if (agreeLoading || isPostingComment)
@@ -115,23 +111,30 @@ export function RemoteSessionAgreementModal(props) {
115
111
  props.onClose && props.onClose();
116
112
  };
117
113
  const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
114
+ const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
118
115
  // Function to ack remote session terms and post comment
119
116
  const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
120
- const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
117
+ const requestComment = t(`<p><strong>Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).</strong></p><p>Submitted a remote session request with following details:</p><p><strong>Preferred Time and Expectations of remote session</strong></p><p>${sessionExpectations}</p><p><strong>Describe the impact to you or the business</strong></p><p>${impact}</p>${sessionLink
118
+ ? `<p><strong>Remote session link</strong></p><p>${formatSessionLinks(sessionLink)}</p>`
119
+ : ''}<p>This action does not initiate a remote session. A Red Hat Associate will get back to you soon.</p>`);
121
120
  try {
122
- yield updateCaseDetails(caseDispatch, props.caseNumber, {
121
+ yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
123
122
  remoteSessionTermsAcked: true,
124
123
  waitingOnCallback: true,
125
- });
124
+ }, false, { existingCaseDetails });
126
125
  setRemoteRiderFlag(caseDispatch, true);
127
126
  try {
128
- yield postCommentRequest({
127
+ yield createComment({
128
+ caseId: caseSalesforceId,
129
+ body: requestComment,
130
+ isPublic: true,
131
+ });
132
+ client.refetchQueries({ include: [GET_CASE_COMMENTS] });
133
+ yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
134
+ apolloClient: client,
129
135
  caseNumber: props.caseNumber,
130
- commentBody: requestComment,
131
- contentType: 'markdown',
136
+ existingCaseDetails,
132
137
  });
133
- updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
134
- checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
135
138
  setAgreeLoading(false);
136
139
  setHasSubmitted(true);
137
140
  // ToastNotification.addSuccessMessage(
@@ -198,12 +201,14 @@ export function RemoteSessionAgreementModal(props) {
198
201
  React.createElement("label", { className: "pf-v6-u-mt-md" },
199
202
  React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
200
203
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
201
- React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })),
204
+ React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Preferred Time and Expectations for Remote Session" }),
205
+ React.createElement(Progress, { value: sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantSessionExpectations(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
202
206
  React.createElement("div", null,
203
207
  React.createElement("label", { className: "pf-v6-u-mt-md" },
204
208
  React.createElement(Trans, null, "Describe the impact to you or the business"),
205
209
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
206
- React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })),
210
+ React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Describe the impact to you or the business" }),
211
+ React.createElement(Progress, { value: impact === null || impact === void 0 ? void 0 : impact.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantImpact(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
207
212
  React.createElement("div", null,
208
213
  React.createElement("label", { className: "pf-v6-u-mt-md" },
209
214
  React.createElement(Trans, null, "Remote session link (optional)")),
@@ -0,0 +1,4 @@
1
+ export declare const REMOTE_SESSION_FIELD_LENGTH_LIMIT = 2000;
2
+ export declare const getLocaleNameFromLocalCode: (localeCode: string) => string;
3
+ export declare const formatSessionLinks: (sessionLink: string) => string;
4
+ //# sourceMappingURL=remoteSessionUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remoteSessionUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAEtD,eAAO,MAAM,0BAA0B,GAAI,YAAY,MAAM,KAAG,MAa/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MAOxD,CAAC"}
@@ -0,0 +1,23 @@
1
+ export const REMOTE_SESSION_FIELD_LENGTH_LIMIT = 2000;
2
+ export const getLocaleNameFromLocalCode = (localeCode) => {
3
+ if ('Intl' in window && 'DisplayNames' in Intl) {
4
+ try {
5
+ const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
6
+ // https://github.com/microsoft/TypeScript/issues/41338
7
+ const langName = new Intl.DisplayNames([lang], { type: 'language' });
8
+ const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
9
+ return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
10
+ }
11
+ catch (e) {
12
+ return localeCode;
13
+ }
14
+ }
15
+ return localeCode;
16
+ };
17
+ export const formatSessionLinks = (sessionLink) => {
18
+ const links = sessionLink
19
+ .split(/[;,| \n\r\t]+/)
20
+ .map((link) => link.trim())
21
+ .filter(Boolean);
22
+ return links.map((link) => `<a href="${link}">${link}</a>`).join('<br>');
23
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,sBAAsB,sBAoYrC"}
1
+ {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuC/D,wBAAgB,sBAAsB,sBAgYrC"}
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { useApolloClient } from '@apollo/client/react';
10
11
  import { contacts } from '@cee-eng/hydrajs';
11
12
  import { InputGroupText, ValidatedOptions } from '@patternfly/react-core';
12
13
  import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
@@ -14,6 +15,7 @@ import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon
14
15
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
15
16
  import { getPhoneObj, PhoneInput, ToastNotification } from '@rh-support/components';
16
17
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
18
+ import { GET_ACCOUNT_CONTACTS } from '@rh-support/utils';
17
19
  import isEmpty from 'lodash/isEmpty';
18
20
  import isEqual from 'lodash/isEqual';
19
21
  import React, { useContext, useEffect, useState } from 'react';
@@ -22,21 +24,43 @@ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHON
22
24
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
23
25
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
24
26
  import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
25
- import { setCaseState, updateCaseDetails } from '../../../../reducers/CaseReducer';
27
+ import { setCaseState, updateCaseDetails, updateCaseDetailsGraphQL } from '../../../../reducers/CaseReducer';
26
28
  import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
27
29
  import { removeAllChars, trimAndReplacePlus } from '../../../shared/utils';
28
30
  import { PDFContext } from '../../PDFContainer';
31
+ function fetchContactBySSO(apolloClient, accountNumber, ssoUsername) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
34
+ const { data } = yield apolloClient.query({
35
+ query: GET_ACCOUNT_CONTACTS,
36
+ variables: {
37
+ accountNumber: { eq: accountNumber },
38
+ contactsWhere: { SSOUserName__c: { eq: ssoUsername } },
39
+ first: 1,
40
+ },
41
+ fetchPolicy: 'network-only',
42
+ });
43
+ const response = data;
44
+ const contactNode = (_j = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Contacts) === null || _g === void 0 ? void 0 : _g.edges) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.node;
45
+ return {
46
+ phone: (_l = (_k = contactNode === null || contactNode === void 0 ? void 0 : contactNode.Phone) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : '',
47
+ };
48
+ });
49
+ }
29
50
  export function CaseContactPhoneNumber() {
30
51
  var _a;
31
- const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, } = useCaseSelector((state) => ({
52
+ const apolloClient = useApolloClient();
53
+ const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, accountNumberRef, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, existingCaseDetails, } = useCaseSelector((state) => ({
32
54
  phoneCountryCode: state.caseDetails.phoneCountryCode || '',
33
55
  phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
34
56
  caseNumber: state.caseDetails.caseNumber,
35
57
  contactSSOName: state.caseDetails.contactSSOName,
58
+ accountNumberRef: state.caseDetails.accountNumberRef,
36
59
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
37
60
  isCaseOwnerUpdating: state.isCaseOwnerUpdating,
38
61
  hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
39
62
  isCasePhoneUpdating: state.isCasePhoneUpdating,
63
+ existingCaseDetails: state.caseDetails,
40
64
  }), isEqual);
41
65
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
42
66
  const canEditCase = useCanEditCase();
@@ -79,8 +103,10 @@ export function CaseContactPhoneNumber() {
79
103
  const phoneLine = (_a = getPhoneObj(localFullPhoneState)) === null || _a === void 0 ? void 0 : _a.phoneLine;
80
104
  const countryCode = (_b = getPhoneObj(localFullPhoneState)) === null || _b === void 0 ? void 0 : _b.countryCode;
81
105
  try {
82
- // update case contact info
83
- yield updateCaseDetails(caseDispatch, caseNumber, Object.assign(Object.assign({ phoneCountryCode: countryCode, phoneAreaCodePrefixLineNumber: phoneLine }, (contactSSOName === loggedInUser.data.ssoUsername && { suppliedPhoneNumberVerified: 'True' })), (!countryCode && !phoneLine && { clearPhoneNumber: true, suppliedPhoneNumberVerified: 'False' })));
106
+ yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, {
107
+ phoneCountryCode: countryCode,
108
+ phoneAreaCodePrefixLineNumber: phoneLine,
109
+ }, false, { existingCaseDetails });
84
110
  setIsSavedClicked(false);
85
111
  setCaseState(caseDispatch, { isCasePhoneUpdating: false });
86
112
  ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
@@ -167,6 +193,10 @@ export function CaseContactPhoneNumber() {
167
193
  // eslint-disable-next-line react-hooks/exhaustive-deps
168
194
  }, [suppliedPhoneNumberVerified]);
169
195
  useEffect(() => {
196
+ if (!isEmpty(phoneCountryCode) || !isEmpty(phoneAreaCodePrefixLineNumber)) {
197
+ setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
198
+ return;
199
+ }
170
200
  if (isEmpty(contactSSOName)) {
171
201
  setLocalFullPhoneState('');
172
202
  return;
@@ -180,29 +210,17 @@ export function CaseContactPhoneNumber() {
180
210
  if (contactSSOName === loggedInUser.data.ssoUsername) {
181
211
  try {
182
212
  setIsFetchingSSO(true);
183
- const loggedInUserContact = yield (contacts === null || contacts === void 0 ? void 0 : contacts.getSFDCContactBySso(contactSSOName));
213
+ const loggedInUserContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
184
214
  setIsFetchingSSO(false);
185
- if (loggedInUserContact.supportPhoneAreaCodePrefixLineNumber) {
186
- // User has opened a case before and has phone and area code in her/his contact on SF
187
- _phoneAreaCodePrefixLineNumber = loggedInUserContact.supportPhoneAreaCodePrefixLineNumber;
188
- _phoneCountryCode = loggedInUserContact.supportPhoneCountryCode;
189
- _suppliedPhoneNumberVerified =
190
- isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
191
- isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
192
- ? hasLoggedInUserConfirmedPhoneNumber
193
- : 'False';
194
- }
195
- else {
196
- const phoneLine = getPhoneObj(loggedInUserContact.phone).phoneLine || '';
197
- const countryCode = getPhoneObj(loggedInUserContact.phone).countryCode;
198
- _phoneAreaCodePrefixLineNumber = phoneLine;
199
- _phoneCountryCode = countryCode;
200
- _suppliedPhoneNumberVerified =
201
- isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
202
- isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
203
- ? hasLoggedInUserConfirmedPhoneNumber
204
- : 'False';
205
- }
215
+ const phoneLine = getPhoneObj(loggedInUserContact.phone).phoneLine || '';
216
+ const countryCode = getPhoneObj(loggedInUserContact.phone).countryCode;
217
+ _phoneAreaCodePrefixLineNumber = phoneLine;
218
+ _phoneCountryCode = countryCode;
219
+ _suppliedPhoneNumberVerified =
220
+ isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
221
+ isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
222
+ ? hasLoggedInUserConfirmedPhoneNumber
223
+ : 'False';
206
224
  }
207
225
  catch (_a) {
208
226
  _phoneAreaCodePrefixLineNumber = '';
@@ -216,18 +234,11 @@ export function CaseContactPhoneNumber() {
216
234
  // user is openning case for others (use is partner or red hatter)
217
235
  try {
218
236
  setIsFetchingSSO(true);
219
- const selectedContact = yield contacts.getSFDCContactBySso(contactSSOName);
237
+ const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
220
238
  setIsFetchingSSO(false);
221
- if (selectedContact.supportPhoneAreaCodePrefixLineNumber) {
222
- _phoneAreaCodePrefixLineNumber = selectedContact.supportPhoneAreaCodePrefixLineNumber;
223
- _phoneCountryCode = selectedContact.supportPhoneCountryCode;
224
- _suppliedPhoneNumberVerified = 'Deferred';
225
- }
226
- else {
227
- _phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
228
- _phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
229
- _suppliedPhoneNumberVerified = 'Deferred';
230
- }
239
+ _phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
240
+ _phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
241
+ _suppliedPhoneNumberVerified = 'Deferred';
231
242
  }
232
243
  catch (e) {
233
244
  _phoneAreaCodePrefixLineNumber = '';
@@ -252,14 +263,9 @@ export function CaseContactPhoneNumber() {
252
263
  setLocalFullPhoneState(checkingPlusInLocalFullPhone(_localFullPhone));
253
264
  setCaseState(caseDispatch, { isCasePhoneUpdating: false });
254
265
  });
255
- if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber)) {
256
- initContactPhoneNumber();
257
- }
258
- else {
259
- setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
260
- }
266
+ initContactPhoneNumber();
261
267
  // eslint-disable-next-line react-hooks/exhaustive-deps
262
- }, [contactSSOName]);
268
+ }, [contactSSOName, phoneCountryCode, phoneAreaCodePrefixLineNumber]);
263
269
  return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
264
270
  React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
265
271
  React.createElement(Trans, null, "Case owner's phone number"),
@@ -275,7 +281,7 @@ export function CaseContactPhoneNumber() {
275
281
  isCasePhoneUpdating, style: { display: isExportingPDF ? 'none' : '' } },
276
282
  React.createElement(CheckIcon, null)),
277
283
  React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' }, disabled: isCaseOwnerUpdating || isCasePhoneUpdating, "aria-label": "Clear" },
278
- React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating },
284
+ React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating || canEditCase.isCaseNotEditable },
279
285
  React.createElement(PencilAltIcon, null)))),
280
286
  !invalid &&
281
287
  (localFullPhone === null || localFullPhone === void 0 ? void 0 : localFullPhone.length) <= PHONE_LIMIT &&
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAkBvD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAgE1D"}
1
+ {"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAqBvD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAwF1D"}