Forked from an inaccessible project.
-
Previously, the alert component only worked with the degree planner view. Now the alert component can be used in any view that supplies a list of alerts.
Previously, the alert component only worked with the degree planner view. Now the alert component can be used in any view that supplies a list of alerts.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
actions.ts 2.31 KiB
import { DARSState } from '@app/dars/store/state';
import { Action } from '@ngrx/store';
import { AuditMetadata } from '../models/audit-metadata';
import { Audit } from '../models/audit';
export enum DarsActionTypes {
ErrorLoadingMetadata = '[DARS] Error Loading Metadata',
StartLoadingMetadata = '[DARS] Start Loading Metadata',
DoneLoadingMetadata = '[DARS] Done Loading Metadata',
AddAuditMetadata = '[DARS] Add Audit Metadata',
ErrorLoadingAudit = '[DARS] Error Loading Audit',
StartLoadingAudit = '[DARS] Start Loading Audit',
DoneLoadingAudit = '[DARS] Done Loading Audit',
CloseAudit = '[DARS] Close Audit',
PopulateDarsState = '[DARS] Done Loading state',
DismissAlert = '[DARS] Dismiss Alert',
}
export class ErrorLoadingMetadata implements Action {
public readonly type = DarsActionTypes.ErrorLoadingMetadata;
constructor(public payload: { message: string }) {}
}
export class StartLoadingMetadata implements Action {
public readonly type = DarsActionTypes.StartLoadingMetadata;
}
export class DoneLoadingMetadata implements Action {
public readonly type = DarsActionTypes.DoneLoadingMetadata;
constructor(public payload: DARSState) {}
}
export class ErrorLoadingAudit implements Action {
public readonly type = DarsActionTypes.ErrorLoadingAudit;
constructor(public payload: { message: string }) {}
}
export class AddAuditMetadata implements Action {
public readonly type = DarsActionTypes.AddAuditMetadata;
constructor(
public payload: {
programMetadata: AuditMetadata[];
whatIfMetadata: AuditMetadata[];
},
) {}
}
export class PopulateDarsState implements Action {
public readonly type = DarsActionTypes.PopulateDarsState;
constructor(public payload: Partial<DARSState>) {}
}
export class StartLoadingAudit implements Action {
public readonly type = DarsActionTypes.StartLoadingAudit;
constructor(public payload: AuditMetadata) {}
}
export class DoneLoadingAudit implements Action {
public readonly type = DarsActionTypes.DoneLoadingAudit;
constructor(public payload: { metadata: AuditMetadata; audit: Audit }) {}
}
export class CloseAudit implements Action {
public readonly type = DarsActionTypes.CloseAudit;
}
export class DismissAlert implements Action {
public readonly type = DarsActionTypes.DismissAlert;
constructor(public payload: { key: string }) {}
}