Skip to content

Commit

Permalink
Revert "Mes-8978: delegated future test modal (#1646)"
Browse files Browse the repository at this point in the history
This reverts commit dd7083c.
  • Loading branch information
andrewsetterfield authored Jun 21, 2024
1 parent dd7083c commit 36dab03
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 200 deletions.
4 changes: 0 additions & 4 deletions src/app/pages/journal/components/journal-components.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import { ActivitySlotComponent } from './activity-slot/activity-slot';
import { EmptySlotComponent } from './empty-slot/empty-slot';
import { JournalNavigationComponent } from './journal-navigation/journal-navigation';
import { PersonalCommitmentSlotComponent } from './personal-commitment/personal-commitment';
import {
JournalFutureTestModalModule
} from '@pages/journal/components/journal-future-test-modal/journal-future-test-modal.module';

@NgModule({
declarations: [
Expand All @@ -34,7 +31,6 @@ import {
JournalEarlyStartModule,
JournalForceCheckModule,
JournalRekeyModalModule,
JournalFutureTestModalModule,
],
exports: [
ActivitySlotComponent,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

20 changes: 1 addition & 19 deletions src/components/test-slot/test-outcome/test-outcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { CategoryWhitelistProvider } from '@providers/category-whitelist/categor
import { PreviewModeModal } from '@pages/fake-journal/components/preview-mode-modal/preview-mode-modal';
import { ContinueUnuploadedTest } from '@pages/unuploaded-tests/unuploaded-tests.actions';
import { AccessibilityService } from '@providers/accessibility/accessibility.service';
import { JournalFutureTestModal } from '@pages/journal/components/journal-future-test-modal/journal-future-test-modal';

@Component({
selector: 'test-outcome',
Expand Down Expand Up @@ -237,30 +236,13 @@ export class TestOutcomeComponent implements OnInit {
await this.router.navigate([TestFlowPageNames.WAITING_ROOM_PAGE]);
}

async rekeyDelegatedTestStart() {
async rekeyDelegatedTest(): Promise<void> {
this.store$.dispatch(StartTest(this.slotDetail.slotId, this.category, true, true));
this.store$.dispatch(SetExaminerConducted(this.examinerId));
this.store$.dispatch(SetExaminerBooked(this.examinerId));
await this.routeByCat.navigateToPage(TestFlowPageNames.WAITING_ROOM_TO_CAR_PAGE, this.category);
}

async rekeyDelegatedTest(): Promise<void> {
//compare the current date to the date of the test without factoring in time to see if the test is in the future
if (new Date(new Date(this.slot.slotDetail.start).toDateString()) > new Date(new Date().toDateString())) {
const modal: HTMLIonModalElement = await this.modalController.create({
component: JournalFutureTestModal,
cssClass: 'mes-modal-alert text-zoom-regular',
});
await modal.present();
const { data } = await modal.onDidDismiss<ModalEvent>();
if (data === ModalEvent.START) {
await this.rekeyDelegatedTestStart();
}
} else {
await this.rekeyDelegatedTestStart();
}
}

displayRekeyModal = async (): Promise<void> => {
const modal: HTMLIonModalElement = await this.modalController.create({
component: JournalRekeyModal,
Expand Down

0 comments on commit 36dab03

Please sign in to comment.