From e65d86617ce76aa93cb8beeb5897b4f1b31cbafb Mon Sep 17 00:00:00 2001 From: Kaitlyn Swann Date: Wed, 20 Dec 2023 15:36:33 -0700 Subject: [PATCH] 10007: WIP Remove isLoggedInAction --- temp_delete_me.md | 1 - .../actions/isLoggedInAction.test.ts | 43 ------------------ .../src/presenter/actions/isLoggedInAction.ts | 16 ------- .../gotoJudgeActivityReportSequence.ts | 10 +---- .../disengageAppMaintenanceSequence.ts | 20 +++------ .../gotoAddCourtIssuedDocketEntrySequence.ts | 40 +++++++---------- .../gotoAddDeficiencyStatisticsSequence.ts | 26 +++++------ .../gotoAddOtherStatisticsSequence.ts | 22 ++++------ .../sequences/gotoAddPaperFilingSequence.ts | 8 +--- .../gotoAddPetitionerToCaseSequence.ts | 24 ++++------ .../sequences/gotoAddTrialSessionSequence.ts | 8 +--- .../sequences/gotoApplyStampSequence.ts | 32 ++++++-------- .../gotoBeforeYouFileDocumentSequence.ts | 10 +---- .../gotoBlockedCasesReportSequence.ts | 10 +---- .../gotoCaseDeadlineReportSequence.ts | 10 +---- .../gotoCaseInventoryReportSequence.ts | 26 +++++------ .../sequences/gotoContactEditSequence.ts | 10 +---- .../sequences/gotoCreateOrderSequence.ts | 44 ++++++++----------- .../sequences/gotoCustomCaseReportSequence.ts | 10 +---- .../sequences/gotoDashboardSequence.ts | 10 +---- .../sequences/gotoDocketEntryQcSequence.ts | 10 +---- .../gotoEditCorrespondenceDocumentSequence.ts | 8 +--- .../gotoEditCourtIssuedDocketEntrySequence.ts | 8 +--- .../gotoEditDeficiencyStatisticSequence.ts | 26 +++++------ .../gotoEditDocketEntryMetaSequence.ts | 10 +---- .../sequences/gotoEditOrderSequence.ts | 10 +---- .../gotoEditOtherStatisticsSequence.ts | 24 ++++------ .../sequences/gotoEditPaperFilingSequence.ts | 8 +--- .../sequences/gotoEditTrialSessionSequence.ts | 10 +---- ...toEditUploadCourtIssuedDocumentSequence.ts | 8 +--- .../sequences/gotoFileDocumentSequence.ts | 10 +---- .../sequences/gotoMessageDetailSequence.ts | 10 +---- .../sequences/gotoMessagesSequence.ts | 10 +---- .../sequences/gotoPendingReportSequence.ts | 10 +---- .../gotoPractitionerAddDocumentSequence.ts | 10 +---- .../gotoPractitionerDetailSequence.ts | 22 ++++------ .../gotoPractitionerDocumentationSequence.ts | 24 ++++------ .../gotoPractitionerEditDocumentSequence.ts | 10 +---- .../sequences/gotoRequestAccessSequence.ts | 10 +---- .../gotoTrialSessionDetailSequence.ts | 10 +---- .../gotoTrialSessionPlanningReportSequence.ts | 8 +--- .../gotoTrialSessionWorkingCopySequence.ts | 10 +---- ...otoUploadCorrespondenceDocumentSequence.ts | 8 +--- .../gotoUploadCourtIssuedDocumentSequence.ts | 8 +--- .../sequences/gotoVerifyEmailSequence.ts | 16 +++---- .../sequences/gotoWorkQueueSequence.ts | 10 +---- .../openAppMaintenanceModalSequence.ts | 12 +---- 47 files changed, 165 insertions(+), 535 deletions(-) delete mode 100644 web-client/src/presenter/actions/isLoggedInAction.test.ts delete mode 100644 web-client/src/presenter/actions/isLoggedInAction.ts diff --git a/temp_delete_me.md b/temp_delete_me.md index 996ff1be738..1ce52779514 100644 --- a/temp_delete_me.md +++ b/temp_delete_me.md @@ -27,7 +27,6 @@ ::: SOLO TO DO ::: - consistent (LoginInteractor). Lets go with Login. -- delete isLoggedInAction. (Seems to be working now - KS) ::: ON HOLD ::: diff --git a/web-client/src/presenter/actions/isLoggedInAction.test.ts b/web-client/src/presenter/actions/isLoggedInAction.test.ts deleted file mode 100644 index 1302bea8227..00000000000 --- a/web-client/src/presenter/actions/isLoggedInAction.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { isLoggedInAction } from './isLoggedInAction'; -import { presenter } from '../presenter-mock'; -import { runAction } from '@web-client/presenter/test.cerebral'; - -describe('isLoggedInAction', () => { - const isLoggedInStub = jest.fn(); - const unauthorizedStub = jest.fn(); - - beforeAll(() => { - presenter.providers.path = { - isLoggedIn: isLoggedInStub, - unauthorized: unauthorizedStub, - }; - - presenter.providers.router = { - route: () => {}, - }; - }); - - it('should call path.isLoggedIn if currentUser is defined', async () => { - await runAction(isLoggedInAction, { - modules: { - presenter, - }, - state: { - token: 'a', - }, - }); - - expect(isLoggedInStub).toHaveBeenCalled(); - }); - - it('should call the unauthorized path if currentUser is undefined', async () => { - await runAction(isLoggedInAction, { - modules: { - presenter, - }, - state: {}, - }); - - expect(unauthorizedStub).toHaveBeenCalled(); - }); -}); diff --git a/web-client/src/presenter/actions/isLoggedInAction.ts b/web-client/src/presenter/actions/isLoggedInAction.ts deleted file mode 100644 index e7e8200b442..00000000000 --- a/web-client/src/presenter/actions/isLoggedInAction.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { state } from '@web-client/presenter/app.cerebral'; - -/** - * invokes the path in the sequences depending on if the user is logged in or not - * @param {object} providers the providers object - * @param {object} providers.path the cerebral path which is contains the next paths that can be invoked - * @param {object} providers.router the riot.router object that is used for getting the current route - * @returns {object} the list of section work items - */ -export const isLoggedInAction = async ({ get, path, router }: ActionProps) => { - if (get(state.token)) { - return path['isLoggedIn'](); - } else { - return path['unauthorized']({ path: await router.route() }); - } -}; diff --git a/web-client/src/presenter/sequences/JudgeActivityReport/gotoJudgeActivityReportSequence.ts b/web-client/src/presenter/sequences/JudgeActivityReport/gotoJudgeActivityReportSequence.ts index d65629905b8..e28e88aca97 100644 --- a/web-client/src/presenter/sequences/JudgeActivityReport/gotoJudgeActivityReportSequence.ts +++ b/web-client/src/presenter/sequences/JudgeActivityReport/gotoJudgeActivityReportSequence.ts @@ -2,8 +2,6 @@ import { clearErrorAlertsAction } from '../../actions/clearErrorAlertsAction'; import { clearScreenMetadataAction } from '../../actions/clearScreenMetadataAction'; import { closeMobileMenuAction } from '../../actions/closeMobileMenuAction'; import { getUsersInSectionAction } from '../../actions/getUsersInSectionAction'; -import { isLoggedInAction } from '../../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { resetJudgeActivityReportStateAction } from '../../actions/resetJudgeActivityReportStateAction'; import { setAllAndCurrentJudgesAction } from '../../actions/setAllAndCurrentJudgesAction'; import { setJudgeLastNameOnJudgeActivityReportAction } from '../../actions/JudgeActivityReport/setJudgeLastNameOnJudgeActivityReportAction'; @@ -25,11 +23,5 @@ const gotoJudgeActivityReport = [ ]; export const gotoJudgeActivityReportSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator( - gotoJudgeActivityReport, - ), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator(gotoJudgeActivityReport), ]; diff --git a/web-client/src/presenter/sequences/disengageAppMaintenanceSequence.ts b/web-client/src/presenter/sequences/disengageAppMaintenanceSequence.ts index 801a379eceb..4060aa47679 100644 --- a/web-client/src/presenter/sequences/disengageAppMaintenanceSequence.ts +++ b/web-client/src/presenter/sequences/disengageAppMaintenanceSequence.ts @@ -1,23 +1,15 @@ import { clearModalSequence } from './clearModalSequence'; import { getUserAction } from '../actions/getUserAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToPathAction } from '../actions/navigateToPathAction'; import { navigateToPathSequence } from './navigateToPathSequence'; import { setMaintenanceModeAction } from '../actions/setMaintenanceModeAction'; import { setUserAction } from '../actions/setUserAction'; import { setUserPermissionsAction } from '../actions/setUserPermissionsAction'; export const disengageAppMaintenanceSequence = [ - isLoggedInAction, - { - isLoggedIn: [ - getUserAction, - setUserAction, - setUserPermissionsAction, - clearModalSequence, - setMaintenanceModeAction, - navigateToPathSequence, - ], - unauthorized: [navigateToPathAction], - }, + getUserAction, + setUserAction, + setUserPermissionsAction, + clearModalSequence, + setMaintenanceModeAction, + navigateToPathSequence, ]; diff --git a/web-client/src/presenter/sequences/gotoAddCourtIssuedDocketEntrySequence.ts b/web-client/src/presenter/sequences/gotoAddCourtIssuedDocketEntrySequence.ts index 8725a7f1406..e6514b2c3a5 100644 --- a/web-client/src/presenter/sequences/gotoAddCourtIssuedDocketEntrySequence.ts +++ b/web-client/src/presenter/sequences/gotoAddCourtIssuedDocketEntrySequence.ts @@ -3,8 +3,6 @@ import { generateCourtIssuedDocumentTitleAction } from '../actions/CourtIssuedDo import { getCaseAction } from '../actions/getCaseAction'; import { getFilterCurrentJudgeUsersAction } from '../actions/getFilterCurrentJudgeUsersAction'; import { getUsersInSectionAction } from '../actions/getUsersInSectionAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setCourtIssuedDocumentInitialDataAction } from '../actions/CourtIssuedDocketEntry/setCourtIssuedDocumentInitialDataAction'; import { setDefaultServiceStampAction } from '../actions/CourtIssuedDocketEntry/setDefaultServiceStampAction'; @@ -17,25 +15,21 @@ import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWeb import { stopShowValidationAction } from '../actions/stopShowValidationAction'; export const gotoAddCourtIssuedDocketEntrySequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - setupCurrentPageAction('Interstitial'), - stopShowValidationAction, - clearFormAction, - setRedirectUrlAction, - getUsersInSectionAction({ section: 'judge' }), - getFilterCurrentJudgeUsersAction, - setUsersByKeyAction('judges'), - getCaseAction, - setCaseAction, - setDocketEntryIdAction, - setCourtIssuedDocumentInitialDataAction, - setDefaultServiceStampAction, - generateCourtIssuedDocumentTitleAction, - setIsEditingDocketEntryAction(false), - setupCurrentPageAction('CourtIssuedDocketEntry'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + setupCurrentPageAction('Interstitial'), + stopShowValidationAction, + clearFormAction, + setRedirectUrlAction, + getUsersInSectionAction({ section: 'judge' }), + getFilterCurrentJudgeUsersAction, + setUsersByKeyAction('judges'), + getCaseAction, + setCaseAction, + setDocketEntryIdAction, + setCourtIssuedDocumentInitialDataAction, + setDefaultServiceStampAction, + generateCourtIssuedDocumentTitleAction, + setIsEditingDocketEntryAction(false), + setupCurrentPageAction('CourtIssuedDocketEntry'), + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoAddDeficiencyStatisticsSequence.ts b/web-client/src/presenter/sequences/gotoAddDeficiencyStatisticsSequence.ts index 62efe3b5b39..28e2f2e317c 100644 --- a/web-client/src/presenter/sequences/gotoAddDeficiencyStatisticsSequence.ts +++ b/web-client/src/presenter/sequences/gotoAddDeficiencyStatisticsSequence.ts @@ -1,8 +1,6 @@ import { clearConfirmationTextAction } from '../actions/clearConfirmationTextAction'; import { clearFormAction } from '../actions/clearFormAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDefaultFormForAddDeficiencyStatisticsAction } from '../actions/setDefaultFormForAddDeficiencyStatisticsAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; @@ -10,18 +8,14 @@ import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWeb import { stopShowValidationAction } from '../actions/stopShowValidationAction'; export const gotoAddDeficiencyStatisticsSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - setupCurrentPageAction('Interstitial'), - stopShowValidationAction, - clearFormAction, - clearConfirmationTextAction, - getCaseAction, - setCaseAction, - setDefaultFormForAddDeficiencyStatisticsAction, - setupCurrentPageAction('AddDeficiencyStatistics'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + setupCurrentPageAction('Interstitial'), + stopShowValidationAction, + clearFormAction, + clearConfirmationTextAction, + getCaseAction, + setCaseAction, + setDefaultFormForAddDeficiencyStatisticsAction, + setupCurrentPageAction('AddDeficiencyStatistics'), + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoAddOtherStatisticsSequence.ts b/web-client/src/presenter/sequences/gotoAddOtherStatisticsSequence.ts index 2827432aedf..f660263b765 100644 --- a/web-client/src/presenter/sequences/gotoAddOtherStatisticsSequence.ts +++ b/web-client/src/presenter/sequences/gotoAddOtherStatisticsSequence.ts @@ -1,23 +1,17 @@ import { clearFormAction } from '../actions/clearFormAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; import { stopShowValidationAction } from '../actions/stopShowValidationAction'; export const gotoAddOtherStatisticsSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - setupCurrentPageAction('Interstitial'), - stopShowValidationAction, - clearFormAction, - getCaseAction, - setCaseAction, - setupCurrentPageAction('AddOtherStatistics'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + setupCurrentPageAction('Interstitial'), + stopShowValidationAction, + clearFormAction, + getCaseAction, + setCaseAction, + setupCurrentPageAction('AddOtherStatistics'), + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoAddPaperFilingSequence.ts b/web-client/src/presenter/sequences/gotoAddPaperFilingSequence.ts index e6f63ad0138..bae06be83c3 100644 --- a/web-client/src/presenter/sequences/gotoAddPaperFilingSequence.ts +++ b/web-client/src/presenter/sequences/gotoAddPaperFilingSequence.ts @@ -2,8 +2,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScansAction } from '../actions/clearScansAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { resetAddPaperFilingAction } from '../actions/resetAddPaperFilingAction'; import { setCaseAction } from '../actions/setCaseAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; @@ -25,9 +23,5 @@ export const gotoAddPaperFiling = [ ]; export const gotoAddPaperFilingSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator(gotoAddPaperFiling), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator(gotoAddPaperFiling), ]; diff --git a/web-client/src/presenter/sequences/gotoAddPetitionerToCaseSequence.ts b/web-client/src/presenter/sequences/gotoAddPetitionerToCaseSequence.ts index ec7da357d1d..8648ad8d5ef 100644 --- a/web-client/src/presenter/sequences/gotoAddPetitionerToCaseSequence.ts +++ b/web-client/src/presenter/sequences/gotoAddPetitionerToCaseSequence.ts @@ -1,7 +1,5 @@ import { clearFormAction } from '../actions/clearFormAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDefaultAddPetitionerToCaseFormAction } from '../actions/setDefaultAddPetitionerToCaseFormAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; @@ -9,17 +7,13 @@ import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWeb import { stopShowValidationAction } from '../actions/stopShowValidationAction'; export const gotoAddPetitionerToCaseSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - setupCurrentPageAction('Interstitial'), - stopShowValidationAction, - clearFormAction, - getCaseAction, - setCaseAction, - setDefaultAddPetitionerToCaseFormAction, - setupCurrentPageAction('AddPetitionerToCase'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + setupCurrentPageAction('Interstitial'), + stopShowValidationAction, + clearFormAction, + getCaseAction, + setCaseAction, + setDefaultAddPetitionerToCaseFormAction, + setupCurrentPageAction('AddPetitionerToCase'), + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoAddTrialSessionSequence.ts b/web-client/src/presenter/sequences/gotoAddTrialSessionSequence.ts index 059c6207fd7..9f3b6248ba2 100644 --- a/web-client/src/presenter/sequences/gotoAddTrialSessionSequence.ts +++ b/web-client/src/presenter/sequences/gotoAddTrialSessionSequence.ts @@ -3,8 +3,6 @@ import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction' import { getSetJudgesSequence } from './getSetJudgesSequence'; import { getTrialSessionsAction } from '../actions/TrialSession/getTrialSessionsAction'; import { getUsersInSectionAction } from '../actions/getUsersInSectionAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { parallel } from 'cerebral/factories'; import { setDefaultTrialSessionFormValuesAction } from '../actions/setDefaultTrialSessionFormValuesAction'; import { setTrialSessionsAction } from '../actions/TrialSession/setTrialSessionsAction'; @@ -31,9 +29,5 @@ const gotoAddTrialSession = [ ]; export const gotoAddTrialSessionSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator(gotoAddTrialSession), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator(gotoAddTrialSession), ]; diff --git a/web-client/src/presenter/sequences/gotoApplyStampSequence.ts b/web-client/src/presenter/sequences/gotoApplyStampSequence.ts index 6596a2e9db9..6aaff694aca 100644 --- a/web-client/src/presenter/sequences/gotoApplyStampSequence.ts +++ b/web-client/src/presenter/sequences/gotoApplyStampSequence.ts @@ -1,8 +1,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearPDFStampDataAction } from '../actions/StampMotion/clearPDFStampDataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDocketEntryIdAction } from '../actions/setDocketEntryIdAction'; import { setDocketEntrySelectedFromMessageAction } from '../actions/setDocketEntrySelectedFromMessageAction'; @@ -13,21 +11,17 @@ import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; export const goToApplyStampSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - setupCurrentPageAction('Interstitial'), - getCaseAction, - setCaseAction, - setDocketEntryIdAction, - setDocketEntrySelectedFromMessageAction, - clearPDFStampDataAction, - clearFormAction, - setSignatureNameForPdfSigningAction, - setPDFForStampAction, - setPDFPageForSigningAction, - setupCurrentPageAction('ApplyStamp'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + setupCurrentPageAction('Interstitial'), + getCaseAction, + setCaseAction, + setDocketEntryIdAction, + setDocketEntrySelectedFromMessageAction, + clearPDFStampDataAction, + clearFormAction, + setSignatureNameForPdfSigningAction, + setPDFForStampAction, + setPDFPageForSigningAction, + setupCurrentPageAction('ApplyStamp'), + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoBeforeYouFileDocumentSequence.ts b/web-client/src/presenter/sequences/gotoBeforeYouFileDocumentSequence.ts index b243cbdfd59..af79f0a9ab1 100644 --- a/web-client/src/presenter/sequences/gotoBeforeYouFileDocumentSequence.ts +++ b/web-client/src/presenter/sequences/gotoBeforeYouFileDocumentSequence.ts @@ -1,6 +1,4 @@ import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; @@ -14,10 +12,4 @@ const gotoBeforeYouFileDocument = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('BeforeYouFileADocument'), ]); -export const gotoBeforeYouFileDocumentSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoBeforeYouFileDocument, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoBeforeYouFileDocumentSequence = [gotoBeforeYouFileDocument]; diff --git a/web-client/src/presenter/sequences/gotoBlockedCasesReportSequence.ts b/web-client/src/presenter/sequences/gotoBlockedCasesReportSequence.ts index 9aee35fa5e4..6be90035d0f 100644 --- a/web-client/src/presenter/sequences/gotoBlockedCasesReportSequence.ts +++ b/web-client/src/presenter/sequences/gotoBlockedCasesReportSequence.ts @@ -2,8 +2,6 @@ import { clearErrorAlertsAction } from '../actions/clearErrorAlertsAction'; import { clearFormAction } from '../actions/clearFormAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { closeMobileMenuAction } from '../actions/closeMobileMenuAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; @@ -16,10 +14,4 @@ const gotoBlockedCasesReport = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('BlockedCasesReport'), ]); -export const gotoBlockedCasesReportSequence = [ - isLoggedInAction, - { - isLoggedIn: [gotoBlockedCasesReport], - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoBlockedCasesReportSequence = [gotoBlockedCasesReport]; diff --git a/web-client/src/presenter/sequences/gotoCaseDeadlineReportSequence.ts b/web-client/src/presenter/sequences/gotoCaseDeadlineReportSequence.ts index 5f9d7abeb4d..b3f50c405be 100644 --- a/web-client/src/presenter/sequences/gotoCaseDeadlineReportSequence.ts +++ b/web-client/src/presenter/sequences/gotoCaseDeadlineReportSequence.ts @@ -4,8 +4,6 @@ import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction' import { closeMobileMenuAction } from '../actions/closeMobileMenuAction'; import { getCaseDeadlinesAction } from '../actions/CaseDeadline/getCaseDeadlinesAction'; import { getSetJudgesSequence } from './getSetJudgesSequence'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { parallel } from 'cerebral/factories'; import { setCaseDeadlinesAction } from '../actions/CaseDeadline/setCaseDeadlinesAction'; import { setDefaultCaseDeadlinesReportDatesAction } from '../actions/CaseDeadline/setDefaultCaseDeadlinesReportDatesAction'; @@ -31,10 +29,4 @@ const gotoCaseDeadlineReport = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('CaseDeadlines'), ]); -export const gotoCaseDeadlineReportSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoCaseDeadlineReport, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoCaseDeadlineReportSequence = [gotoCaseDeadlineReport]; diff --git a/web-client/src/presenter/sequences/gotoCaseInventoryReportSequence.ts b/web-client/src/presenter/sequences/gotoCaseInventoryReportSequence.ts index 77e6a029dde..c652d477982 100644 --- a/web-client/src/presenter/sequences/gotoCaseInventoryReportSequence.ts +++ b/web-client/src/presenter/sequences/gotoCaseInventoryReportSequence.ts @@ -3,9 +3,7 @@ import { closeMobileMenuAction } from '../actions/closeMobileMenuAction'; import { fetchUserNotificationsSequence } from './fetchUserNotificationsSequence'; import { getSetJudgesSequence } from './getSetJudgesSequence'; import { hasCaseInventoryReportFilterSelectedAction } from '../actions/CaseInventoryReport/hasCaseInventoryReportFilterSelectedAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; import { navigateToDashboardAction } from '../actions/navigateToDashboardAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { openCaseInventoryReportModalSequence } from './openCaseInventoryReportModalSequence'; import { parallel } from 'cerebral/factories'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; @@ -25,18 +23,14 @@ const gotoDashboardWithModal = [ ]; export const gotoCaseInventoryReportSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - hasCaseInventoryReportFilterSelectedAction, - { - no: gotoDashboardWithModal, - proceed: parallel([ - fetchUserNotificationsSequence, - gotoCaseInventoryReport, - ]), - }, - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + hasCaseInventoryReportFilterSelectedAction, + { + no: gotoDashboardWithModal, + proceed: parallel([ + fetchUserNotificationsSequence, + gotoCaseInventoryReport, + ]), + }, + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoContactEditSequence.ts b/web-client/src/presenter/sequences/gotoContactEditSequence.ts index 09f4c3e0d55..3f8d4f2085a 100644 --- a/web-client/src/presenter/sequences/gotoContactEditSequence.ts +++ b/web-client/src/presenter/sequences/gotoContactEditSequence.ts @@ -1,8 +1,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setupContactFormAction } from '../actions/setupContactFormAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; @@ -18,10 +16,4 @@ const gotoContactEdit = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('ContactEdit'), ]); -export const gotoContactEditSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoContactEdit, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoContactEditSequence = [gotoContactEdit]; diff --git a/web-client/src/presenter/sequences/gotoCreateOrderSequence.ts b/web-client/src/presenter/sequences/gotoCreateOrderSequence.ts index 213e85a516f..0d1c21fb10c 100644 --- a/web-client/src/presenter/sequences/gotoCreateOrderSequence.ts +++ b/web-client/src/presenter/sequences/gotoCreateOrderSequence.ts @@ -2,9 +2,7 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearModalAction } from '../actions/clearModalAction'; import { convertHtml2PdfSequence } from './convertHtml2PdfSequence'; import { hasOrderTypeSelectedAction } from '../actions/CourtIssuedOrder/hasOrderTypeSelectedAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; import { navigateToCaseDetailAction } from '../actions/navigateToCaseDetailAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { openCreateOrderChooseTypeModalSequence } from './openCreateOrderChooseTypeModalSequence'; import { setCreateOrderModalDataOnFormAction } from '../actions/CourtIssuedOrder/setCreateOrderModalDataOnFormAction'; import { setIsCreatingOrderAction } from '../actions/setIsCreatingOrderAction'; @@ -21,27 +19,23 @@ export const gotoCaseDetailWithModal = [ ]; export const gotoCreateOrderSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - setRedirectUrlAction, - hasOrderTypeSelectedAction, - { - no: gotoCaseDetailWithModal, - proceed: [ - unsetDocumentToEditAction, - clearModalAction, - setSelectedConsolidatedCasesToMultiDocketOnAction(false), - setupCurrentPageAction('Interstitial'), - stopShowValidationAction, - clearFormAction, - setCreateOrderModalDataOnFormAction, - setIsCreatingOrderAction, - convertHtml2PdfSequence, - setupCurrentPageAction('CreateOrder'), - ], - }, - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + setRedirectUrlAction, + hasOrderTypeSelectedAction, + { + no: gotoCaseDetailWithModal, + proceed: [ + unsetDocumentToEditAction, + clearModalAction, + setSelectedConsolidatedCasesToMultiDocketOnAction(false), + setupCurrentPageAction('Interstitial'), + stopShowValidationAction, + clearFormAction, + setCreateOrderModalDataOnFormAction, + setIsCreatingOrderAction, + convertHtml2PdfSequence, + setupCurrentPageAction('CreateOrder'), + ], + }, + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoCustomCaseReportSequence.ts b/web-client/src/presenter/sequences/gotoCustomCaseReportSequence.ts index fb88e32ee66..b5645d0269a 100644 --- a/web-client/src/presenter/sequences/gotoCustomCaseReportSequence.ts +++ b/web-client/src/presenter/sequences/gotoCustomCaseReportSequence.ts @@ -1,6 +1,4 @@ import { getSetJudgesSequence } from './getSetJudgesSequence'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { resetCustomCaseReportStateAction } from '../actions/resetCustomCaseReportStateAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; @@ -12,10 +10,4 @@ const gotoCustomCaseReport = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('CustomCaseReport'), ]); -export const gotoCustomCaseReportSequence = [ - isLoggedInAction, - { - isLoggedIn: [gotoCustomCaseReport], - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoCustomCaseReportSequence = [gotoCustomCaseReport]; diff --git a/web-client/src/presenter/sequences/gotoDashboardSequence.ts b/web-client/src/presenter/sequences/gotoDashboardSequence.ts index 40c9cec938c..7af7af8f9a3 100644 --- a/web-client/src/presenter/sequences/gotoDashboardSequence.ts +++ b/web-client/src/presenter/sequences/gotoDashboardSequence.ts @@ -9,8 +9,6 @@ import { getOpenAndClosedCasesForUserAction } from '../actions/Dashboard/getOpen import { getPendingMotionDocketEntriesForCurrentJudgeAction } from '@web-client/presenter/actions/PendingMotion/getPendingMotionDocketEntriesForCurrentJudgeAction'; import { getSubmittedAndCavCasesForCurrentJudgeAction } from '@web-client/presenter/actions/CaseWorksheet/getSubmittedAndCavCasesForCurrentJudgeAction'; import { getTrialSessionsForJudgeAction } from '../actions/TrialSession/getTrialSessionsForJudgeAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { navigateToMessagesAction } from '../actions/navigateToMessagesAction'; import { navigateToSectionDocumentQCAction } from '../actions/navigateToSectionDocumentQCAction'; import { parallel } from 'cerebral'; @@ -124,10 +122,4 @@ const goToDashboard = [ }, ]; -export const gotoDashboardSequence = [ - isLoggedInAction, - { - isLoggedIn: [goToDashboard], - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoDashboardSequence = [goToDashboard]; diff --git a/web-client/src/presenter/sequences/gotoDocketEntryQcSequence.ts b/web-client/src/presenter/sequences/gotoDocketEntryQcSequence.ts index 1943f54bd5d..ea51d779a2d 100644 --- a/web-client/src/presenter/sequences/gotoDocketEntryQcSequence.ts +++ b/web-client/src/presenter/sequences/gotoDocketEntryQcSequence.ts @@ -4,9 +4,7 @@ import { clearScansAction } from '../actions/clearScansAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; import { getShouldMarkReadAction } from '../actions/getShouldMarkReadAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; import { isWorkItemAlreadyCompletedAction } from '../actions/isWorkItemAlreadyCompletedAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDocketEntryFormForDocketEditAction } from '../actions/EditDocketRecord/setDocketEntryFormForDocketEditAction'; import { setDocketEntryIdAction } from '../actions/setDocketEntryIdAction'; @@ -48,10 +46,4 @@ export const gotoDocketEntryQc = startWebSocketConnectionSequenceDecorator([ }, ]); -export const gotoDocketEntryQcSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoDocketEntryQc, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoDocketEntryQcSequence = [gotoDocketEntryQc]; diff --git a/web-client/src/presenter/sequences/gotoEditCorrespondenceDocumentSequence.ts b/web-client/src/presenter/sequences/gotoEditCorrespondenceDocumentSequence.ts index f4ee1df55db..f8a8ae86f52 100644 --- a/web-client/src/presenter/sequences/gotoEditCorrespondenceDocumentSequence.ts +++ b/web-client/src/presenter/sequences/gotoEditCorrespondenceDocumentSequence.ts @@ -1,8 +1,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDocketEntryIdFromCorrespondenceAction } from '../actions/setDocketEntryIdFromCorrespondenceAction'; import { setDocumentToFormFromCorrespondenceAction } from '../actions/EditUploadCourtIssuedDocument/setDocumentToFormFromCorrespondenceAction'; @@ -26,9 +24,5 @@ const gotoEditCorrespondenceDocument = ]); export const gotoEditCorrespondenceDocumentSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoEditCorrespondenceDocument, - unauthorized: [navigateToLoginSequence], - }, + gotoEditCorrespondenceDocument, ]; diff --git a/web-client/src/presenter/sequences/gotoEditCourtIssuedDocketEntrySequence.ts b/web-client/src/presenter/sequences/gotoEditCourtIssuedDocketEntrySequence.ts index 31e7e9c70e4..a634817739a 100644 --- a/web-client/src/presenter/sequences/gotoEditCourtIssuedDocketEntrySequence.ts +++ b/web-client/src/presenter/sequences/gotoEditCourtIssuedDocketEntrySequence.ts @@ -4,8 +4,6 @@ import { generateCourtIssuedDocumentTitleAction } from '../actions/CourtIssuedDo import { getCaseAction } from '../actions/getCaseAction'; import { getFilterCurrentJudgeUsersAction } from '../actions/getFilterCurrentJudgeUsersAction'; import { getUsersInSectionAction } from '../actions/getUsersInSectionAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDocketEntryFormForDocketEditAction } from '../actions/EditDocketRecord/setDocketEntryFormForDocketEditAction'; import { setDocketEntryIdAction } from '../actions/setDocketEntryIdAction'; @@ -36,9 +34,5 @@ export const gotoEditCourtIssuedDocketEntry = ]); export const gotoEditCourtIssuedDocketEntrySequence = [ - isLoggedInAction, - { - isLoggedIn: gotoEditCourtIssuedDocketEntry, - unauthorized: [navigateToLoginSequence], - }, + gotoEditCourtIssuedDocketEntry, ]; diff --git a/web-client/src/presenter/sequences/gotoEditDeficiencyStatisticSequence.ts b/web-client/src/presenter/sequences/gotoEditDeficiencyStatisticSequence.ts index 6deee9214a1..79cb3eaf81c 100644 --- a/web-client/src/presenter/sequences/gotoEditDeficiencyStatisticSequence.ts +++ b/web-client/src/presenter/sequences/gotoEditDeficiencyStatisticSequence.ts @@ -1,8 +1,6 @@ import { clearConfirmationTextAction } from '../actions/clearConfirmationTextAction'; import { clearFormAction } from '../actions/clearFormAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setEditDeficiencyStatisticFormAction } from '../actions/setEditDeficiencyStatisticFormAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; @@ -10,18 +8,14 @@ import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWeb import { stopShowValidationAction } from '../actions/stopShowValidationAction'; export const gotoEditDeficiencyStatisticSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - setupCurrentPageAction('Interstitial'), - stopShowValidationAction, - clearFormAction, - clearConfirmationTextAction, - getCaseAction, - setCaseAction, - setEditDeficiencyStatisticFormAction, - setupCurrentPageAction('EditDeficiencyStatistic'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + setupCurrentPageAction('Interstitial'), + stopShowValidationAction, + clearFormAction, + clearConfirmationTextAction, + getCaseAction, + setCaseAction, + setEditDeficiencyStatisticFormAction, + setupCurrentPageAction('EditDeficiencyStatistic'), + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoEditDocketEntryMetaSequence.ts b/web-client/src/presenter/sequences/gotoEditDocketEntryMetaSequence.ts index d24f6a35b00..f7a8ddd3d73 100644 --- a/web-client/src/presenter/sequences/gotoEditDocketEntryMetaSequence.ts +++ b/web-client/src/presenter/sequences/gotoEditDocketEntryMetaSequence.ts @@ -9,8 +9,6 @@ import { getCaseAction } from '../actions/getCaseAction'; import { getFilterCurrentJudgeUsersAction } from '../actions/getFilterCurrentJudgeUsersAction'; import { getUsersInSectionAction } from '../actions/getUsersInSectionAction'; import { initCourtIssuedOrderFormPropsFromEventCodeAction } from '../actions/EditDocketRecordEntry/initCourtIssuedOrderFormPropsFromEventCodeAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDefaultEditDocketEntryMetaTabAction } from '../actions/setDefaultEditDocketEntryMetaTabAction'; import { setDocketEntryMetaFormForEditAction } from '../actions/EditDocketRecordEntry/setDocketEntryMetaFormForEditAction'; @@ -49,10 +47,4 @@ export const gotoEditDocketEntryMeta = setupCurrentPageAction('EditDocketEntryMeta'), ]); -export const gotoEditDocketEntryMetaSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoEditDocketEntryMeta, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoEditDocketEntryMetaSequence = [gotoEditDocketEntryMeta]; diff --git a/web-client/src/presenter/sequences/gotoEditOrderSequence.ts b/web-client/src/presenter/sequences/gotoEditOrderSequence.ts index 822c745378a..296b473fb8f 100644 --- a/web-client/src/presenter/sequences/gotoEditOrderSequence.ts +++ b/web-client/src/presenter/sequences/gotoEditOrderSequence.ts @@ -3,8 +3,6 @@ import { clearModalAction } from '../actions/clearModalAction'; import { convertHtml2PdfSequence } from './convertHtml2PdfSequence'; import { getCaseAction } from '../actions/getCaseAction'; import { getDocumentContentsAction } from '../actions/getDocumentContentsAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDefaultTabStateAction } from '../actions/setDefaultTabStateAction'; import { setDocumentToEditAction } from '../actions/setDocumentToEditAction'; @@ -34,13 +32,7 @@ const gotoEditOrder = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('CreateOrder'), ]); -export const gotoEditOrderSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoEditOrder, - unauthorized: [navigateToLoginSequence], - }, -] as unknown as (props: { +export const gotoEditOrderSequence = [gotoEditOrder] as unknown as (props: { docketEntryIdToEdit: string; docketNumber: string; }) => void; diff --git a/web-client/src/presenter/sequences/gotoEditOtherStatisticsSequence.ts b/web-client/src/presenter/sequences/gotoEditOtherStatisticsSequence.ts index 394c5a2a103..13414ef35c3 100644 --- a/web-client/src/presenter/sequences/gotoEditOtherStatisticsSequence.ts +++ b/web-client/src/presenter/sequences/gotoEditOtherStatisticsSequence.ts @@ -1,7 +1,5 @@ import { clearFormAction } from '../actions/clearFormAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setEditOtherStatisticsFormAction } from '../actions/setEditOtherStatisticsFormAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; @@ -9,17 +7,13 @@ import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWeb import { stopShowValidationAction } from '../actions/stopShowValidationAction'; export const gotoEditOtherStatisticsSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - setupCurrentPageAction('Interstitial'), - stopShowValidationAction, - clearFormAction, - getCaseAction, - setCaseAction, - setEditOtherStatisticsFormAction, - setupCurrentPageAction('EditOtherStatistics'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + setupCurrentPageAction('Interstitial'), + stopShowValidationAction, + clearFormAction, + getCaseAction, + setCaseAction, + setEditOtherStatisticsFormAction, + setupCurrentPageAction('EditOtherStatistics'), + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoEditPaperFilingSequence.ts b/web-client/src/presenter/sequences/gotoEditPaperFilingSequence.ts index af941125a8a..d4f53d2bb62 100644 --- a/web-client/src/presenter/sequences/gotoEditPaperFilingSequence.ts +++ b/web-client/src/presenter/sequences/gotoEditPaperFilingSequence.ts @@ -2,8 +2,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScansAction } from '../actions/clearScansAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDocketEntryFormForDocketEditAction } from '../actions/EditDocketRecord/setDocketEntryFormForDocketEditAction'; import { setDocketEntryIdAction } from '../actions/setDocketEntryIdAction'; @@ -33,9 +31,5 @@ export const gotoEditPaperFiling = [ ]; export const gotoEditPaperFilingSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator(gotoEditPaperFiling), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator(gotoEditPaperFiling), ]; diff --git a/web-client/src/presenter/sequences/gotoEditTrialSessionSequence.ts b/web-client/src/presenter/sequences/gotoEditTrialSessionSequence.ts index 72f3883c73d..b10bba82a1e 100644 --- a/web-client/src/presenter/sequences/gotoEditTrialSessionSequence.ts +++ b/web-client/src/presenter/sequences/gotoEditTrialSessionSequence.ts @@ -5,8 +5,6 @@ import { getSetJudgesSequence } from './getSetJudgesSequence'; import { getTrialSessionDetailsAction } from '../actions/TrialSession/getTrialSessionDetailsAction'; import { getTrialSessionsAction } from '../actions/TrialSession/getTrialSessionsAction'; import { getUsersInSectionAction } from '../actions/getUsersInSectionAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setTrialSessionDetailsAction } from '../actions/TrialSession/setTrialSessionDetailsAction'; import { setTrialSessionDetailsOnFormAction } from '../actions/TrialSession/setTrialSessionDetailsOnFormAction'; import { setTrialSessionsAction } from '../actions/TrialSession/setTrialSessionsAction'; @@ -34,10 +32,4 @@ const gotoEditTrialSession = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('EditTrialSession'), ]); -export const gotoEditTrialSessionSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoEditTrialSession, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoEditTrialSessionSequence = [gotoEditTrialSession]; diff --git a/web-client/src/presenter/sequences/gotoEditUploadCourtIssuedDocumentSequence.ts b/web-client/src/presenter/sequences/gotoEditUploadCourtIssuedDocumentSequence.ts index 5624cf56a4b..2a65d9d92d4 100644 --- a/web-client/src/presenter/sequences/gotoEditUploadCourtIssuedDocumentSequence.ts +++ b/web-client/src/presenter/sequences/gotoEditUploadCourtIssuedDocumentSequence.ts @@ -1,8 +1,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDocketEntryIdAction } from '../actions/setDocketEntryIdAction'; import { setDocumentToFormAction } from '../actions/EditUploadCourtIssuedDocument/setDocumentToFormAction'; @@ -26,9 +24,5 @@ const gotoEditUploadCourtIssuedDocument = ]); export const gotoEditUploadCourtIssuedDocumentSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoEditUploadCourtIssuedDocument, - unauthorized: [navigateToLoginSequence], - }, + gotoEditUploadCourtIssuedDocument, ]; diff --git a/web-client/src/presenter/sequences/gotoFileDocumentSequence.ts b/web-client/src/presenter/sequences/gotoFileDocumentSequence.ts index 9f7d561551e..21e01400b15 100644 --- a/web-client/src/presenter/sequences/gotoFileDocumentSequence.ts +++ b/web-client/src/presenter/sequences/gotoFileDocumentSequence.ts @@ -1,8 +1,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setDefaultFilersMapAction } from '../actions/setDefaultFilersMapAction'; import { setWizardStepAction } from '../actions/setWizardStepAction'; @@ -22,10 +20,4 @@ const gotoFileDocument = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('FileDocumentWizard'), ]); -export const gotoFileDocumentSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoFileDocument, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoFileDocumentSequence = [gotoFileDocument]; diff --git a/web-client/src/presenter/sequences/gotoMessageDetailSequence.ts b/web-client/src/presenter/sequences/gotoMessageDetailSequence.ts index 4dcfaaa6280..986788d993e 100644 --- a/web-client/src/presenter/sequences/gotoMessageDetailSequence.ts +++ b/web-client/src/presenter/sequences/gotoMessageDetailSequence.ts @@ -6,8 +6,6 @@ import { getJudgesCaseNoteForCaseAction } from '@web-client/presenter/actions/Tr import { getMessageThreadAction } from '../actions/getMessageThreadAction'; import { getMostRecentMessageInThreadAction } from '../actions/getMostRecentMessageInThreadAction'; import { getShouldMarkMessageAsReadAction } from '../actions/getShouldMarkMessageAsReadAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setCaseDetailPageTabActionGenerator } from '../actions/setCaseDetailPageTabActionGenerator'; import { setDefaultIsExpandedAction } from '../actions/setDefaultIsExpandedAction'; @@ -48,10 +46,4 @@ const gotoMessageDetail = startWebSocketConnectionSequenceDecorator( ]), ); -export const gotoMessageDetailSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoMessageDetail, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoMessageDetailSequence = [gotoMessageDetail]; diff --git a/web-client/src/presenter/sequences/gotoMessagesSequence.ts b/web-client/src/presenter/sequences/gotoMessagesSequence.ts index 0f4b1f8dd0b..b17bd16b2ed 100644 --- a/web-client/src/presenter/sequences/gotoMessagesSequence.ts +++ b/web-client/src/presenter/sequences/gotoMessagesSequence.ts @@ -9,8 +9,6 @@ import { getInboxMessagesForSectionAction } from '../actions/getInboxMessagesFor import { getInboxMessagesForUserAction } from '../actions/getInboxMessagesForUserAction'; import { getOutboxMessagesForSectionAction } from '../actions/getOutboxMessagesForSectionAction'; import { getOutboxMessagesForUserAction } from '../actions/getOutboxMessagesForUserAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { parallel } from 'cerebral'; import { resetCacheKeyAction } from '../actions/resetCacheKeyAction'; import { setDefaultTableSortAction } from '../actions/setDefaultTableSortAction'; @@ -46,10 +44,4 @@ const goToMessages = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('Messages'), ]); -export const gotoMessagesSequence = [ - isLoggedInAction, - { - isLoggedIn: goToMessages, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoMessagesSequence = [goToMessages]; diff --git a/web-client/src/presenter/sequences/gotoPendingReportSequence.ts b/web-client/src/presenter/sequences/gotoPendingReportSequence.ts index 1bfc49d136e..1687c3921ad 100644 --- a/web-client/src/presenter/sequences/gotoPendingReportSequence.ts +++ b/web-client/src/presenter/sequences/gotoPendingReportSequence.ts @@ -4,8 +4,6 @@ import { clearPendingReportsAction } from '../actions/PendingItems/clearPendingR import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { closeMobileMenuAction } from '../actions/closeMobileMenuAction'; import { getSetJudgesSequence } from './getSetJudgesSequence'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; @@ -20,10 +18,4 @@ const gotoPendingReport = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('PendingReport'), ]); -export const gotoPendingReportSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoPendingReport, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoPendingReportSequence = [gotoPendingReport]; diff --git a/web-client/src/presenter/sequences/gotoPractitionerAddDocumentSequence.ts b/web-client/src/presenter/sequences/gotoPractitionerAddDocumentSequence.ts index 35c1e27a670..ec3681d181c 100644 --- a/web-client/src/presenter/sequences/gotoPractitionerAddDocumentSequence.ts +++ b/web-client/src/presenter/sequences/gotoPractitionerAddDocumentSequence.ts @@ -1,7 +1,5 @@ import { clearFormAction } from '../actions/clearFormAction'; import { getPractitionerDetailAction } from '../actions/getPractitionerDetailAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setPractitionerDetailAction } from '../actions/setPractitionerDetailAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; @@ -17,11 +15,5 @@ export const gotoPractitionerAddDocument = [ ]; export const gotoPractitionerAddDocumentSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator( - gotoPractitionerAddDocument, - ), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator(gotoPractitionerAddDocument), ]; diff --git a/web-client/src/presenter/sequences/gotoPractitionerDetailSequence.ts b/web-client/src/presenter/sequences/gotoPractitionerDetailSequence.ts index 0e07945e1db..16897373e0f 100644 --- a/web-client/src/presenter/sequences/gotoPractitionerDetailSequence.ts +++ b/web-client/src/presenter/sequences/gotoPractitionerDetailSequence.ts @@ -1,7 +1,5 @@ import { clearErrorAlertsAction } from '../actions/clearErrorAlertsAction'; import { getPractitionerDetailAction } from '../actions/getPractitionerDetailAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setInitialTableSortAction } from '../actions/setInitialTableSortAction'; import { setPractitionerDetailAction } from '../actions/setPractitionerDetailAction'; import { setTabFromPropsAction } from '../actions/setTabFromPropsAction'; @@ -11,17 +9,13 @@ import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWeb export const gotoPractitionerDetailSequence = [ showProgressSequenceDecorator([ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - clearErrorAlertsAction, - setTabFromPropsAction, - setInitialTableSortAction, - getPractitionerDetailAction, - setPractitionerDetailAction, - setupCurrentPageAction('PractitionerInformation'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + clearErrorAlertsAction, + setTabFromPropsAction, + setInitialTableSortAction, + getPractitionerDetailAction, + setPractitionerDetailAction, + setupCurrentPageAction('PractitionerInformation'), + ]), ]), ]; diff --git a/web-client/src/presenter/sequences/gotoPractitionerDocumentationSequence.ts b/web-client/src/presenter/sequences/gotoPractitionerDocumentationSequence.ts index acef8611fe0..74365ff3fb5 100644 --- a/web-client/src/presenter/sequences/gotoPractitionerDocumentationSequence.ts +++ b/web-client/src/presenter/sequences/gotoPractitionerDocumentationSequence.ts @@ -1,8 +1,6 @@ import { clearErrorAlertsAction } from '../actions/clearErrorAlertsAction'; import { getPractitionerDetailAction } from '../actions/getPractitionerDetailAction'; import { getPractitionerDocumentsAction } from '../actions/getPractitionerDocumentsAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setPractitionerDetailAction } from '../actions/setPractitionerDetailAction'; import { setPractitionerDocumentsAction } from '../actions/setPractitionerDocumentsAction'; import { setTabFromPropsAction } from '../actions/setTabFromPropsAction'; @@ -12,18 +10,14 @@ import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWeb export const gotoPractitionerDocumentationSequence = [ showProgressSequenceDecorator([ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - clearErrorAlertsAction, - setTabFromPropsAction, - getPractitionerDetailAction, - setPractitionerDetailAction, - getPractitionerDocumentsAction, - setPractitionerDocumentsAction, - setupCurrentPageAction('PractitionerInformation'), - ]), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator([ + clearErrorAlertsAction, + setTabFromPropsAction, + getPractitionerDetailAction, + setPractitionerDetailAction, + getPractitionerDocumentsAction, + setPractitionerDocumentsAction, + setupCurrentPageAction('PractitionerInformation'), + ]), ]), ]; diff --git a/web-client/src/presenter/sequences/gotoPractitionerEditDocumentSequence.ts b/web-client/src/presenter/sequences/gotoPractitionerEditDocumentSequence.ts index bac48560444..e855e3ae211 100644 --- a/web-client/src/presenter/sequences/gotoPractitionerEditDocumentSequence.ts +++ b/web-client/src/presenter/sequences/gotoPractitionerEditDocumentSequence.ts @@ -1,8 +1,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { getPractitionerDetailAction } from '../actions/getPractitionerDetailAction'; import { getPractitionerDocumentAction } from '../actions/getPractitionerDocumentAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setPractitionerDetailAction } from '../actions/setPractitionerDetailAction'; import { setPractitionerDocumentFormForEditAction } from '../actions/Practitioners/setPractitionerDocumentFormForEditAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; @@ -21,11 +19,5 @@ export const gotoPractitionerEditDocument = [ ]; export const gotoPractitionerEditDocumentSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator( - gotoPractitionerEditDocument, - ), - unauthorized: [navigateToLoginSequence], - }, + startWebSocketConnectionSequenceDecorator(gotoPractitionerEditDocument), ]; diff --git a/web-client/src/presenter/sequences/gotoRequestAccessSequence.ts b/web-client/src/presenter/sequences/gotoRequestAccessSequence.ts index 91fefa44f6a..7703f59d0f6 100644 --- a/web-client/src/presenter/sequences/gotoRequestAccessSequence.ts +++ b/web-client/src/presenter/sequences/gotoRequestAccessSequence.ts @@ -3,9 +3,7 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; import { getCaseAssociationAction } from '../actions/getCaseAssociationAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; import { navigateToCaseDetailAction } from '../actions/navigateToCaseDetailAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { runPathForUserRoleAction } from '../actions/runPathForUserRoleAction'; import { setCaseAction } from '../actions/setCaseAction'; import { setCaseAssociationAction } from '../actions/setCaseAssociationAction'; @@ -47,10 +45,4 @@ const gotoRequestAccess = startWebSocketConnectionSequenceDecorator([ }, ]); -export const gotoRequestAccessSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoRequestAccess, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoRequestAccessSequence = [gotoRequestAccess]; diff --git a/web-client/src/presenter/sequences/gotoTrialSessionDetailSequence.ts b/web-client/src/presenter/sequences/gotoTrialSessionDetailSequence.ts index 74a162e8561..c9759c12fe0 100644 --- a/web-client/src/presenter/sequences/gotoTrialSessionDetailSequence.ts +++ b/web-client/src/presenter/sequences/gotoTrialSessionDetailSequence.ts @@ -3,11 +3,9 @@ import { getCalendaredCasesForTrialSessionAction } from '../actions/TrialSession import { getEligibleCasesForTrialSessionAction } from '../actions/TrialSession/getEligibleCasesForTrialSessionAction'; import { getTrialSessionDetailsAction } from '../actions/TrialSession/getTrialSessionDetailsAction'; import { getUsersInSectionAction } from '../actions/getUsersInSectionAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; import { isTrialSessionCalendaredAction } from '../actions/TrialSession/isTrialSessionCalendaredAction'; import { mergeCaseOrderIntoCalendaredCasesAction } from '../actions/TrialSession/mergeCaseOrderIntoCalendaredCasesAction'; import { mergeCaseOrderIntoEligibleCasesAction } from '../actions/TrialSession/mergeCaseOrderIntoEligibleCasesAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { parallel } from 'cerebral/factories'; import { setCalendaredCasesOnTrialSessionAction } from '../actions/TrialSession/setCalendaredCasesOnTrialSessionAction'; import { setDefaultTrialSessionDetailTabAction } from '../actions/TrialSession/setDefaultTrialSessionDetailTabAction'; @@ -46,10 +44,4 @@ const gotoTrialSessionDetails = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('TrialSessionDetail'), ]); -export const gotoTrialSessionDetailSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoTrialSessionDetails, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoTrialSessionDetailSequence = [gotoTrialSessionDetails]; diff --git a/web-client/src/presenter/sequences/gotoTrialSessionPlanningReportSequence.ts b/web-client/src/presenter/sequences/gotoTrialSessionPlanningReportSequence.ts index 931692481c8..92d7c1794bc 100644 --- a/web-client/src/presenter/sequences/gotoTrialSessionPlanningReportSequence.ts +++ b/web-client/src/presenter/sequences/gotoTrialSessionPlanningReportSequence.ts @@ -1,5 +1,3 @@ -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; @@ -9,9 +7,5 @@ const gotoTrialSessionPlanningReport = ]); export const gotoTrialSessionPlanningReportSequence = [ - isLoggedInAction, - { - isLoggedIn: gotoTrialSessionPlanningReport, - unauthorized: [navigateToLoginSequence], - }, + gotoTrialSessionPlanningReport, ]; diff --git a/web-client/src/presenter/sequences/gotoTrialSessionWorkingCopySequence.ts b/web-client/src/presenter/sequences/gotoTrialSessionWorkingCopySequence.ts index 519aa8f428c..89de20a14a3 100644 --- a/web-client/src/presenter/sequences/gotoTrialSessionWorkingCopySequence.ts +++ b/web-client/src/presenter/sequences/gotoTrialSessionWorkingCopySequence.ts @@ -8,11 +8,9 @@ import { getTrialSessionWorkingCopyAction } from '../actions/TrialSession/getTri import { getUserCaseNoteForCasesAction } from '../actions/TrialSession/getUserCaseNoteForCasesAction'; import { getUsersInSectionAction } from '../actions/getUsersInSectionAction'; import { gotoTrialSessionDetailSequence } from './gotoTrialSessionDetailSequence'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; import { isTrialSessionCalendaredAction } from '../actions/TrialSession/isTrialSessionCalendaredAction'; import { isUserAssociatedWithTrialSessionAction } from '../actions/TrialSession/isUserAssociatedWithTrialSessionAction'; import { mergeCaseOrderIntoCalendaredCasesAction } from '../actions/TrialSession/mergeCaseOrderIntoCalendaredCasesAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { runPathForUserRoleAction } from '../actions/runPathForUserRoleAction'; import { setCalendaredCasesOnTrialSessionAction } from '../actions/TrialSession/setCalendaredCasesOnTrialSessionAction'; import { setCaseNotesOntoCalendaredCasesAction } from '../actions/TrialSession/setCaseNotesOntoCalendaredCasesAction'; @@ -83,10 +81,4 @@ const gotoTrialSessionDetails = startWebSocketConnectionSequenceDecorator([ }, ]); -export const gotoTrialSessionWorkingCopySequence = [ - isLoggedInAction, - { - isLoggedIn: gotoTrialSessionDetails, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoTrialSessionWorkingCopySequence = [gotoTrialSessionDetails]; diff --git a/web-client/src/presenter/sequences/gotoUploadCorrespondenceDocumentSequence.ts b/web-client/src/presenter/sequences/gotoUploadCorrespondenceDocumentSequence.ts index 394f56e458e..fd78163c6e5 100644 --- a/web-client/src/presenter/sequences/gotoUploadCorrespondenceDocumentSequence.ts +++ b/web-client/src/presenter/sequences/gotoUploadCorrespondenceDocumentSequence.ts @@ -2,8 +2,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScansAction } from '../actions/clearScansAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { resetAddCorrespondenceAction } from '../actions/resetAddCorrespondenceAction'; import { setCaseAction } from '../actions/setCaseAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; @@ -24,9 +22,5 @@ const gotoUploadCorrespondenceDocument = ]); export const gotoUploadCorrespondenceDocumentSequence = [ - isLoggedInAction, - { - isLoggedIn: [gotoUploadCorrespondenceDocument], - unauthorized: [navigateToLoginSequence], - }, + gotoUploadCorrespondenceDocument, ]; diff --git a/web-client/src/presenter/sequences/gotoUploadCourtIssuedDocumentSequence.ts b/web-client/src/presenter/sequences/gotoUploadCourtIssuedDocumentSequence.ts index 0cd81fdeabb..2c8195f9f67 100644 --- a/web-client/src/presenter/sequences/gotoUploadCourtIssuedDocumentSequence.ts +++ b/web-client/src/presenter/sequences/gotoUploadCourtIssuedDocumentSequence.ts @@ -1,8 +1,6 @@ import { clearFormAction } from '../actions/clearFormAction'; import { clearScreenMetadataAction } from '../actions/clearScreenMetadataAction'; import { getCaseAction } from '../actions/getCaseAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { setCaseAction } from '../actions/setCaseAction'; import { setupCurrentPageAction } from '../actions/setupCurrentPageAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; @@ -21,9 +19,5 @@ const gotoUploadCourtIssuedDocument = startWebSocketConnectionSequenceDecorator( ); export const gotoUploadCourtIssuedDocumentSequence = [ - isLoggedInAction, - { - isLoggedIn: [gotoUploadCourtIssuedDocument], - unauthorized: [navigateToLoginSequence], - }, + gotoUploadCourtIssuedDocument, ]; diff --git a/web-client/src/presenter/sequences/gotoVerifyEmailSequence.ts b/web-client/src/presenter/sequences/gotoVerifyEmailSequence.ts index fe8e828b2c7..3d48fce5666 100644 --- a/web-client/src/presenter/sequences/gotoVerifyEmailSequence.ts +++ b/web-client/src/presenter/sequences/gotoVerifyEmailSequence.ts @@ -1,18 +1,12 @@ import { clearUserAction } from '../actions/clearUserAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToPublicEmailVerificationInstructionsAction } from '../actions/Public/navigateToPublicEmailVerificationInstructionsAction'; import { navigateToPublicEmailVerificationSuccessAction } from '../actions/Public/navigateToPublicEmailVerificationSuccessAction'; import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator'; import { verifyUserPendingEmailAction } from '../actions/verifyUserPendingEmailAction'; export const gotoVerifyEmailSequence = [ - isLoggedInAction, - { - isLoggedIn: startWebSocketConnectionSequenceDecorator([ - verifyUserPendingEmailAction, - clearUserAction, - navigateToPublicEmailVerificationSuccessAction, - ]), - unauthorized: [navigateToPublicEmailVerificationInstructionsAction], - }, + startWebSocketConnectionSequenceDecorator([ + verifyUserPendingEmailAction, + clearUserAction, + navigateToPublicEmailVerificationSuccessAction, + ]), ]; diff --git a/web-client/src/presenter/sequences/gotoWorkQueueSequence.ts b/web-client/src/presenter/sequences/gotoWorkQueueSequence.ts index 79cfa62802f..9e7d6655fa2 100644 --- a/web-client/src/presenter/sequences/gotoWorkQueueSequence.ts +++ b/web-client/src/presenter/sequences/gotoWorkQueueSequence.ts @@ -6,8 +6,6 @@ import { closeMobileMenuAction } from '../actions/closeMobileMenuAction'; import { getConstants } from '../../getConstants'; import { getTrialSessionsAction } from '../actions/TrialSession/getTrialSessionsAction'; import { getUsersInSectionAction } from '../actions/getUsersInSectionAction'; -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToLoginSequence } from '@web-client/presenter/sequences/Login/navigateToLoginSequence'; import { parallel } from 'cerebral/factories'; import { runPathForUserRoleAction } from '../actions/runPathForUserRoleAction'; import { setSectionForWorkQueueAction } from '../actions/setSectionForWorkQueueAction'; @@ -69,10 +67,4 @@ const goToWorkQueue = startWebSocketConnectionSequenceDecorator([ setupCurrentPageAction('WorkQueue'), ]); -export const gotoWorkQueueSequence = [ - isLoggedInAction, - { - isLoggedIn: goToWorkQueue, - unauthorized: [navigateToLoginSequence], - }, -]; +export const gotoWorkQueueSequence = [goToWorkQueue]; diff --git a/web-client/src/presenter/sequences/openAppMaintenanceModalSequence.ts b/web-client/src/presenter/sequences/openAppMaintenanceModalSequence.ts index 99ea6cc54bf..ef5f11dad4e 100644 --- a/web-client/src/presenter/sequences/openAppMaintenanceModalSequence.ts +++ b/web-client/src/presenter/sequences/openAppMaintenanceModalSequence.ts @@ -1,15 +1,7 @@ -import { isLoggedInAction } from '../actions/isLoggedInAction'; -import { navigateToPathAction } from '../actions/navigateToPathAction'; import { setMaintenanceModeAction } from '../actions/setMaintenanceModeAction'; import { setShowModalFactoryAction } from '../actions/setShowModalFactoryAction'; export const openAppMaintenanceModalSequence = [ - isLoggedInAction, - { - isLoggedIn: [ - setMaintenanceModeAction, - setShowModalFactoryAction('AppMaintenanceModal'), - ], - unauthorized: [navigateToPathAction], - }, + setMaintenanceModeAction, + setShowModalFactoryAction('AppMaintenanceModal'), ];