Skip to content

Commit

Permalink
10007: WIP Remove isLoggedInAction
Browse files Browse the repository at this point in the history
  • Loading branch information
pixiwyn committed Dec 20, 2023
1 parent 7fdb6a1 commit e65d866
Show file tree
Hide file tree
Showing 47 changed files with 165 additions and 535 deletions.
1 change: 0 additions & 1 deletion temp_delete_me.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

::: SOLO TO DO :::
- consistent (LoginInteractor). Lets go with Login.
- delete isLoggedInAction. (Seems to be working now - KS)


::: ON HOLD :::
Expand Down
43 changes: 0 additions & 43 deletions web-client/src/presenter/actions/isLoggedInAction.test.ts

This file was deleted.

16 changes: 0 additions & 16 deletions web-client/src/presenter/actions/isLoggedInAction.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -25,11 +23,5 @@ const gotoJudgeActivityReport = [
];

export const gotoJudgeActivityReportSequence = [
isLoggedInAction,
{
isLoggedIn: startWebSocketConnectionSequenceDecorator(
gotoJudgeActivityReport,
),
unauthorized: [navigateToLoginSequence],
},
startWebSocketConnectionSequenceDecorator(gotoJudgeActivityReport),
];
Original file line number Diff line number Diff line change
@@ -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,
];
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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'),
]),
];
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
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';
import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator';
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'),
]),
];
Original file line number Diff line number Diff line change
@@ -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'),
]),
];
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -25,9 +23,5 @@ export const gotoAddPaperFiling = [
];

export const gotoAddPaperFilingSequence = [
isLoggedInAction,
{
isLoggedIn: startWebSocketConnectionSequenceDecorator(gotoAddPaperFiling),
unauthorized: [navigateToLoginSequence],
},
startWebSocketConnectionSequenceDecorator(gotoAddPaperFiling),
];
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
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';
import { startWebSocketConnectionSequenceDecorator } from '../utilities/startWebSocketConnectionSequenceDecorator';
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'),
]),
];
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -31,9 +29,5 @@ const gotoAddTrialSession = [
];

export const gotoAddTrialSessionSequence = [
isLoggedInAction,
{
isLoggedIn: startWebSocketConnectionSequenceDecorator(gotoAddTrialSession),
unauthorized: [navigateToLoginSequence],
},
startWebSocketConnectionSequenceDecorator(gotoAddTrialSession),
];
32 changes: 13 additions & 19 deletions web-client/src/presenter/sequences/gotoApplyStampSequence.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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'),
]),
];
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -14,10 +12,4 @@ const gotoBeforeYouFileDocument = startWebSocketConnectionSequenceDecorator([
setupCurrentPageAction('BeforeYouFileADocument'),
]);

export const gotoBeforeYouFileDocumentSequence = [
isLoggedInAction,
{
isLoggedIn: gotoBeforeYouFileDocument,
unauthorized: [navigateToLoginSequence],
},
];
export const gotoBeforeYouFileDocumentSequence = [gotoBeforeYouFileDocument];
Loading

0 comments on commit e65d866

Please sign in to comment.