Skip to content
Snippets Groups Projects
Commit be1afb31 authored by Isaac Evavold's avatar Isaac Evavold
Browse files

ROENROLL-1714 reduce disclaimer alert padding

parent 088d69ef
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,12 @@ export interface Alert {
message: string;
callback?: () => void;
}
export class DisclaimerAlert implements Alert {
public readonly key = 'disclaimerAlert';
public readonly title = 'This is a planning tool.';
public readonly message =
'If you have questions about your plan or degree, please contact your advisor.';
constructor(public callback: Alert['callback']) {}
}
......@@ -9,13 +9,20 @@
.alert-icon,
.alert-close {
margin: 0 1.5rem;
flex-grow: 0;
flex-shrink: 0;
display: flex;
align-items: center;
}
.alert-icon {
margin: 0 1.5rem;
}
.alert-close {
margin: 0 1.5rem 0 0;
}
.alert-icon mat-icon {
color: #ef6c00;
display: block;
......
......@@ -40,7 +40,7 @@ import { YearMapping, MutableYearMapping } from '@app/core/models/year';
import { Note } from '@app/core/models/note';
import { CourseBase, Course } from '@app/core/models/course';
import { TermCode } from '@app/degree-planner/shared/term-codes/termcode';
import { Alert } from '@app/core/models/alert';
import { Alert, DisclaimerAlert } from '@app/core/models/alert';
import { UpdateUserPreferences } from '../actions/userPreferences.actions';
import { TermCodeFactory } from '@app/degree-planner/services/termcode.factory';
......@@ -85,20 +85,15 @@ export class DegreePlanEffects {
const alerts: Alert[] = [];
if (userPreferences.degreePlannerHasDismissedDisclaimer !== true) {
const key = 'disclaimerAlert';
alerts.push({
key,
title: 'This is a planning tool.',
message:
'If you have questions about your plan or degree, please contact your advisor.',
callback: () => {
alerts.push(
new DisclaimerAlert(() => {
this.store$.dispatch(
new UpdateUserPreferences({
degreePlannerHasDismissedDisclaimer: true,
}),
);
},
});
}),
);
}
const showGrades =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment