Skip to content

Commit

Permalink
Removed modal from delegated examiner
Browse files Browse the repository at this point in the history
  • Loading branch information
RLCorp committed May 1, 2024
1 parent 1812ea1 commit 699dc66
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 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,9 @@ 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';
// import {
// JournalFutureTestModal
// } from '@pages/journal/components/journal-future-test-modal/journal-future-test-modal';

@Component({
selector: 'test-outcome',
Expand Down Expand Up @@ -249,20 +251,24 @@ export class TestOutcomeComponent implements OnInit {
}

async rekeyDelegatedTest(): Promise<void> {
/* TODO Re-introduce in 4.13
(should be as simple as uncommenting the code and updating the visuals to reflect the new design)
*/

//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();
}
// 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> => {
Expand Down

0 comments on commit 699dc66

Please sign in to comment.