Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ <h4>Audit and Chair Review</h4>
</div>
</section>
</ng-container>
<div class="right" *ngIf="decision.isDraft">
<button mat-stroked-button color="warn" (click)="deleteDecision(decision.uuid)">Delete draft</button>
<div class="right">
<button *ngIf="decision.isDraft" mat-stroked-button color="warn" (click)="deleteDecision(decision.uuid)">Delete draft</button>
<button mat-flat-button color="link" (click)="toggleSummary()">{{ isSummary ? 'View Less' : 'View More' }} <mat-icon iconPositionEnd>{{ isSummary ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</mat-icon></button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h3 class="card-title">
color="accent"
mat-flat-button
[mat-dialog-close]="isDirty"
[routerLink]="['application', application.fileNumber]"
[routerLink]="[routerLink]"
>
View Detail
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ApplicationSubmissionToSubmissionStatusDto,
DEFAULT_NO_STATUS,
} from '../../../../services/application/application-submission-status/application-submission-status.dto';
import { SUBMISSION_STATUS } from '../../../../services/application/application.dto';
import { ApplicationSubmissionStatusService } from '../../../../services/application/application-submission-status/application-submission-status.service';
import { ApplicationDto } from '../../../../services/application/application.dto';
import { ApplicationService } from '../../../../services/application/application.service';
Expand All @@ -30,6 +31,8 @@ export class ApplicationDialogComponent extends CardDialogComponent implements O
application: ApplicationDto = this.data;
status?: ApplicationSubmissionStatusPill;

routerLink = `application/`;

constructor(
@Inject(MAT_DIALOG_DATA) public data: ApplicationDto,
private applicationService: ApplicationService,
Expand Down Expand Up @@ -61,7 +64,7 @@ export class ApplicationDialogComponent extends CardDialogComponent implements O

async populateApplicationSubmissionStatus(fileNumber: string) {
let submissionStatus: ApplicationSubmissionToSubmissionStatusDto | null = null;

this.routerLink = this.routerLink + fileNumber;
try {
submissionStatus = await this.applicationSubmissionStatusService.fetchCurrentStatusByFileNumber(
fileNumber,
Expand All @@ -72,6 +75,9 @@ export class ApplicationDialogComponent extends CardDialogComponent implements O
}

if (submissionStatus) {
if (submissionStatus.statusTypeCode === SUBMISSION_STATUS.ALC_DECISION) {
this.routerLink = this.routerLink + '/decision'
}
this.status = {
backgroundColor: submissionStatus.status.alcsBackgroundColor,
textColor: submissionStatus.status.alcsColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h3 class="card-title">
color="accent"
mat-flat-button
[mat-dialog-close]="isDirty"
[routerLink]="['notice-of-intent', noticeOfIntent.fileNumber]"
[routerLink]="[routerLink]"
>
View Detail
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Component, Inject, OnInit } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import {
ApplicationSubmissionToSubmissionStatusDto,
DEFAULT_NO_STATUS,
} from '../../../../services/application/application-submission-status/application-submission-status.dto';
import { NOI_SUBMISSION_STATUS } from '../../../../services/notice-of-intent/notice-of-intent.dto';
import { AuthenticationService } from '../../../../services/authentication/authentication.service';
import { BoardService, BoardWithFavourite } from '../../../../services/board/board.service';
import { CardService } from '../../../../services/card/card.service';
Expand Down Expand Up @@ -35,6 +35,8 @@ export class NoticeOfIntentDialogComponent extends CardDialogComponent implement
noticeOfIntent: NoticeOfIntentDto = this.data;
RETROACTIVE_TYPE = RETROACTIVE_TYPE_LABEL;

routerLink = `notice-of-intent/`;

constructor(
@Inject(MAT_DIALOG_DATA) public data: NoticeOfIntentDto,
private dialogRef: MatDialogRef<NoticeOfIntentDialogComponent>,
Expand Down Expand Up @@ -76,7 +78,7 @@ export class NoticeOfIntentDialogComponent extends CardDialogComponent implement

private async populateSubmissionStatus(fileNumber: string) {
let submissionStatus: NoticeOfIntentSubmissionToSubmissionStatusDto | null = null;

this.routerLink = this.routerLink + fileNumber;
try {
submissionStatus = await this.noticeOfIntentSubmissionStatusService.fetchCurrentStatusByFileNumber(
fileNumber,
Expand All @@ -85,8 +87,10 @@ export class NoticeOfIntentDialogComponent extends CardDialogComponent implement
} catch (e) {
console.warn(`No statuses for ${fileNumber}. Is it a manually created submission?`);
}

if (submissionStatus) {
if (submissionStatus.statusTypeCode === NOI_SUBMISSION_STATUS.ALC_DECISION) {
this.routerLink = this.routerLink + '/decision'
}
this.status = {
backgroundColor: submissionStatus.status.alcsBackgroundColor,
textColor: submissionStatus.status.alcsColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ <h4>Audit</h4>
</div>
</section>
</ng-container>
<div class="right" *ngIf="decision.isDraft">
<button mat-stroked-button color="warn" (click)="deleteDecision(decision.uuid)">Delete draft</button>
<div class="right">
<button *ngIf="decision.isDraft" mat-stroked-button color="warn" (click)="deleteDecision(decision.uuid)">Delete draft</button>
<button mat-flat-button color="link" (click)="toggleSummary()">{{ isSummary ? 'View Less' : 'View More' }} <mat-icon iconPositionEnd>{{ isSummary ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</mat-icon></button>
</div>
</div>
Expand Down
Loading