Skip to content

Commit

Permalink
Merge pull request #1093 from bcgov/feature/ALCS-1203-2
Browse files Browse the repository at this point in the history
Update Portal Decisions
  • Loading branch information
dhaselhan authored Oct 26, 2023
2 parents 9470bc9 + 88409a0 commit 0003322
Show file tree
Hide file tree
Showing 32 changed files with 295 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,34 @@ <h4>Decision #{{ decisions.length - index }}</h4>
#{{ decision.resolutionNumber }}/{{ decision.resolutionYear }}
</div>

<div>
<div class="subheading2">Decision Outcome</div>
{{ decision.outcome.label }} {{ decision.isSubjectToConditions ? '- Subject to Conditions' : '' }}
<div class="full-width">
<div class="subheading2">Decision Summary</div>
{{ decision.decisionDescription }}
</div>

<div>
<div class="full-width">
<div class="subheading2">Decision Document</div>
<div *ngFor="let document of decision.documents">
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
<div class="document split" *ngFor="let document of decision.documents">
<div>
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
&nbsp;({{ document.fileSize | filesize }})
</div>
<button class="center" mat-button (click)="openFile(document.uuid)">
<mat-icon>file_download</mat-icon>
Download
</button>
</div>
<div class="document responsive left" *ngFor="let document of decision.documents">
<div class="document-name">
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
</div>
<div class="split">
<div>{{ document.fileSize | filesize }}</div>
<button class="center" mat-button (click)="openFile(document.uuid)">
<mat-icon>file_download</mat-icon>
Download
</button>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@
@media screen and (min-width: $tabletBreakpoint) {
padding: rem(16);
margin: rem(24) 0 rem(40) 0;
grid-template-columns: 50% 50%;
grid-template-columns: 49% 49%;

.full-width {
grid-column: 1/3;
}
}
}

.document {
display: none;
padding: rem(9) rem(16);
border-radius: rem(4);
border: rem(1) solid colors.$grey;
background: colors.$white;
margin: rem(8) 0;

@media screen and (min-width: $tabletBreakpoint) {
display: flex;
}
}

.responsive {
display: block;

@media screen and (min-width: $tabletBreakpoint) {
display: none;
}
}

.document-name {
padding: rem(6) 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h4 *ngIf="application">Application ID: {{ application.fileNumber }}</h4>
<button (click)="onNavigateHome()" mat-button color="accent"><mat-icon>chevron_left</mat-icon>Return to Inbox</button>
<div>
<div class="navigation">
<mat-tab-group>
<mat-tab-group [(selectedIndex)]="selectedIndex">
<mat-tab label="Applicant Submission">
<div *ngIf="application" class="content">
<section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class ViewApplicationSubmissionComponent implements OnInit, OnDestroy {
$application = new BehaviorSubject<ApplicationSubmissionDetailedDto | undefined>(undefined);
$applicationDocuments = new BehaviorSubject<ApplicationDocumentDto[]>([]);
applicationReview: ApplicationSubmissionReviewDto | undefined;
selectedIndex = 0;

$destroy = new Subject<void>();

Expand Down Expand Up @@ -50,6 +51,10 @@ export class ViewApplicationSubmissionComponent implements OnInit, OnDestroy {
async loadApplication(fileId: string) {
this.application = await this.applicationService.getByFileId(fileId);
this.$application.next(this.application);

if (this.application?.status.code === SUBMISSION_STATUS.ALC_DECISION) {
this.selectedIndex = 2;
}
this.loadApplicationDocuments(fileId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,34 @@ <h4>Decision #{{ decisions.length - index }}</h4>
#{{ decision.resolutionNumber }}/{{ decision.resolutionYear }}
</div>

<div>
<div class="subheading2">Decision Outcome</div>
{{ decision.outcome.label }} {{ decision.isSubjectToConditions ? '- Subject to Conditions' : '' }}
<div class="full-width">
<div class="subheading2">Decision Summary</div>
{{ decision.decisionDescription }}
</div>

<div>
<div class="full-width">
<div class="subheading2">Decision Document</div>
<div *ngFor="let document of decision.documents">
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
<div class="document split" *ngFor="let document of decision.documents">
<div>
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
&nbsp;({{ document.fileSize | filesize }})
</div>
<button class="center" mat-button (click)="openFile(document.uuid)">
<mat-icon>file_download</mat-icon>
Download
</button>
</div>
<div class="document responsive left" *ngFor="let document of decision.documents">
<div class="document-name">
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
</div>
<div class="split">
<div>{{ document.fileSize | filesize }}</div>
<button class="center" mat-button (click)="openFile(document.uuid)">
<mat-icon>file_download</mat-icon>
Download
</button>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@
@media screen and (min-width: $tabletBreakpoint) {
padding: rem(16);
margin: rem(24) 0 rem(40) 0;
grid-template-columns: 50% 50%;
grid-template-columns: 49% 49%;

.full-width {
grid-column: 1/3;
}
}
}

.document {
display: none;
padding: rem(9) rem(16);
border-radius: rem(4);
border: rem(1) solid colors.$grey;
background: colors.$white;
margin: rem(8) 0;

@media screen and (min-width: $tabletBreakpoint) {
display: flex;
}
}

.responsive {
display: block;

@media screen and (min-width: $tabletBreakpoint) {
display: none;
}
}

.document-name {
padding: rem(6) 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h4 *ngIf="submission">NOI ID: {{ submission.fileNumber }}</h4>
<button (click)="onNavigateHome()" mat-button color="accent"><mat-icon>chevron_left</mat-icon>Return to Inbox</button>
<div>
<div class="navigation">
<mat-tab-group>
<mat-tab-group [(selectedIndex)]="selectedIndex">
<mat-tab label="Applicant Submission">
<div *ngIf="submission" class="content">
<section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { ActivatedRoute, Router } from '@angular/router';
import { BehaviorSubject, Subject, takeUntil } from 'rxjs';
import { NoticeOfIntentDocumentDto } from '../../../services/notice-of-intent-document/notice-of-intent-document.dto';
import { NoticeOfIntentDocumentService } from '../../../services/notice-of-intent-document/notice-of-intent-document.service';
import { NoticeOfIntentSubmissionDetailedDto } from '../../../services/notice-of-intent-submission/notice-of-intent-submission.dto';
import {
NOI_SUBMISSION_STATUS,
NoticeOfIntentSubmissionDetailedDto,
} from '../../../services/notice-of-intent-submission/notice-of-intent-submission.dto';
import { NoticeOfIntentSubmissionService } from '../../../services/notice-of-intent-submission/notice-of-intent-submission.service';

@Component({
Expand All @@ -16,6 +19,7 @@ export class ViewNoticeOfIntentSubmissionComponent implements OnInit, OnDestroy
$noiSubmission = new BehaviorSubject<NoticeOfIntentSubmissionDetailedDto | undefined>(undefined);
$noiDocuments = new BehaviorSubject<NoticeOfIntentDocumentDto[]>([]);
submission: NoticeOfIntentSubmissionDetailedDto | undefined;
selectedIndex = 0;

constructor(
private noiSubmissionService: NoticeOfIntentSubmissionService,
Expand All @@ -37,6 +41,9 @@ export class ViewNoticeOfIntentSubmissionComponent implements OnInit, OnDestroy
async loadSubmission(fileId: string) {
const noiSubmission = await this.noiSubmissionService.getByFileId(fileId);
this.submission = noiSubmission;
if (this.submission?.status.code === NOI_SUBMISSION_STATUS.ALC_DECISION) {
this.selectedIndex = 1;
}
this.$noiSubmission.next(noiSubmission);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h4 *ngIf="submission">Notification ID: {{ submission.fileNumber }}</h4>
<button (click)="onNavigateHome()" mat-button color="accent"><mat-icon>chevron_left</mat-icon>Return to Inbox</button>
<div>
<div class="navigation">
<mat-tab-group>
<mat-tab-group [(selectedIndex)]="selectedIndex">
<mat-tab label="Applicant Submission">
<div *ngIf="submission" class="content">
<section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { BehaviorSubject, Subject, takeUntil } from 'rxjs';
import { NotificationDocumentDto } from '../../../services/notification-document/notification-document.dto';
import { NotificationDocumentService } from '../../../services/notification-document/notification-document.service';
import {
NOTIFICATION_STATUS,
NotificationSubmissionDetailedDto,
NotificationSubmissionDto,
} from '../../../services/notification-submission/notification-submission.dto';
import { NotificationSubmissionService } from '../../../services/notification-submission/notification-submission.service';
import { ConfirmationDialogService } from '../../../shared/confirmation-dialog/confirmation-dialog.service';
Expand All @@ -20,6 +20,7 @@ export class ViewNotificationSubmissionComponent implements OnInit, OnDestroy {
$notificationSubmission = new BehaviorSubject<NotificationSubmissionDetailedDto | undefined>(undefined);
$notificationDocuments = new BehaviorSubject<NotificationDocumentDto[]>([]);
submission: NotificationSubmissionDetailedDto | undefined;
selectedIndex = 0;

constructor(
private notificationSubmissionService: NotificationSubmissionService,
Expand All @@ -42,6 +43,9 @@ export class ViewNotificationSubmissionComponent implements OnInit, OnDestroy {
async loadSubmission(fileId: string) {
const notificationSubmission = await this.notificationSubmissionService.getByFileId(fileId);
this.submission = notificationSubmission;
if (this.submission?.status.code === NOTIFICATION_STATUS.ALC_RESPONSE) {
this.selectedIndex = 1;
}
this.$notificationSubmission.next(notificationSubmission);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,34 @@ <h4>Decision #{{ applicationDecisions.length - index }}</h4>
#{{ decision.resolutionNumber }}/{{ decision.resolutionYear }}
</div>

<div>
<div class="subheading2">Decision Outcome</div>
{{ decision.outcome.label }} {{ decision.isSubjectToConditions ? '- Subject to Conditions' : '' }}
<div class="full-width">
<div class="subheading2">Decision Summary</div>
{{ decision.decisionDescription }}
</div>
<div>

<div class="full-width">
<div class="subheading2">Decision Document</div>
<div *ngFor="let document of decision.documents">
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
<div class="document split" *ngFor="let document of decision.documents">
<div>
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
&nbsp;({{ document.fileSize | filesize }})
</div>
<button class="center" mat-button (click)="openFile(document.uuid)">
<mat-icon>file_download</mat-icon>
Download
</button>
</div>
<div class="document responsive left" *ngFor="let document of decision.documents">
<div class="document-name">
<a (click)="openFile(document.uuid)">{{ document.fileName }}</a>
</div>
<div class="split">
<div>{{ document.fileSize | filesize }}</div>
<button class="center" mat-button (click)="openFile(document.uuid)">
<mat-icon>file_download</mat-icon>
Download
</button>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@
@media screen and (min-width: $tabletBreakpoint) {
padding: rem(16);
margin: rem(24) 0 rem(40) 0;
grid-template-columns: 50% 50%;
grid-template-columns: 49% 49%;

.full-width {
grid-column: 1/3;
}
}
}

.document {
display: none;
padding: rem(9) rem(16);
border-radius: rem(4);
border: rem(1) solid colors.$grey;
background: colors.$white;
margin: rem(8) 0;

@media screen and (min-width: $tabletBreakpoint) {
display: flex;
}
}

.responsive {
display: block;

@media screen and (min-width: $tabletBreakpoint) {
display: none;
}
}

.document-name {
padding: rem(6) 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h4 *ngIf="submission">Application ID: {{ submission.fileNumber }}</h4>
</button>
<div>
<div class="navigation">
<mat-tab-group>
<mat-tab-group [(selectedIndex)]="selectedIndex">
<mat-tab label="Applicant Submission">
<div *ngIf="submission" class="content">
<section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class PublicApplicationComponent implements OnInit, OnDestroy {
documents: PublicDocumentDto[] = [];
parcels: PublicParcelDto[] = [];
decisions: ApplicationPortalDecisionDto[] = [];
selectedIndex = 0;

constructor(private publicService: PublicService, private route: ActivatedRoute) {}

Expand All @@ -42,6 +43,9 @@ export class PublicApplicationComponent implements OnInit, OnDestroy {
if (res) {
const { submission, documents, parcels, review, decisions } = res;

if (submission.status.code === SUBMISSION_STATUS.ALC_DECISION) {
this.selectedIndex = 2;
}
this.submission = submission;
this.documents = documents;
this.parcels = parcels;
Expand Down
Loading

0 comments on commit 0003322

Please sign in to comment.