Skip to content

Commit

Permalink
allow system admin to access system even in hardware error states (#5535
Browse files Browse the repository at this point in the history
)
  • Loading branch information
adghayes authored Oct 17, 2024
1 parent 8459d5a commit 1d50a65
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions apps/mark-scan/frontend/src/app_root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,25 +351,13 @@ export function AppRoot(): JSX.Element | null {
const machineConfig = machineConfigQuery.data;
const usbDriveStatus = usbDriveStatusQuery.data;

if (stateMachineState === 'unrecoverable_error') {
return <UnrecoverableErrorPage />;
}

if (
authStatus.status === 'logged_out' &&
authStatus.reason === 'no_card_reader'
) {
return <SetupCardReaderPage />;
}

if (stateMachineState === 'cover_open_unauthorized') {
return <ScannerOpenAlarmScreen />;
}

if (stateMachineState === 'no_hardware') {
return <NoPaperHandlerPage />;
}

if (authStatus.status === 'checking_pin') {
return (
<UnlockMachineScreen
Expand Down Expand Up @@ -416,6 +404,18 @@ export function AppRoot(): JSX.Element | null {
);
}

if (stateMachineState === 'unrecoverable_error') {
return <UnrecoverableErrorPage />;
}

if (stateMachineState === 'cover_open_unauthorized') {
return <ScannerOpenAlarmScreen />;
}

if (stateMachineState === 'no_hardware') {
return <NoPaperHandlerPage />;
}

if (isElectionManagerAuth(authStatus)) {
if (!electionDefinition) {
return <UnconfiguredElectionScreenWrapper />;
Expand Down

0 comments on commit 1d50a65

Please sign in to comment.