Skip to content

Commit

Permalink
Merge pull request #1039 from bcgov/feature/ALCS-1175
Browse files Browse the repository at this point in the history
Add Public NOI View
  • Loading branch information
dhaselhan authored Oct 10, 2023
2 parents f766aa7 + e592a28 commit c3cffaf
Show file tree
Hide file tree
Showing 107 changed files with 3,172 additions and 443 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h5>Are you sure you want to change your application type?</h5>
</div>

<ng-container *ngIf="stepIdx === prescribedBodyStep">
<app-presribed-body [value]="prescribedBody" (select)="onSelectPrescribedBody($event)"></app-presribed-body>
<app-prescribed-body [value]="prescribedBody" (select)="onSelectPrescribedBody($event)"></app-prescribed-body>
</ng-container>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,4 @@ export class SubmissionDocumentsComponent implements OnInit, OnDestroy {
this.$destroy.next();
this.$destroy.complete();
}

protected readonly open = open;
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h4 *ngIf="currentStep === steps.prescribedBody">
</div>
</ng-container>
<ng-container *ngIf="currentStep === steps.prescribedBody">
<app-presribed-body (select)="onSelectPrescribedBody($event)"></app-presribed-body>
<app-prescribed-body (select)="onSelectPrescribedBody($event)"></app-prescribed-body>
</ng-container>
<ng-container *ngIf="currentStep === steps.srwType">
<div class="step-description">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatDialogRef } from '@angular/material/dialog';

Expand All @@ -9,10 +10,10 @@ describe('DeleteStructureConfirmationDialogComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ DeleteStructureConfirmationDialogComponent ],
declarations: [DeleteStructureConfirmationDialogComponent],
providers: [{ provide: MatDialogRef, useValue: {} }],
})
.compileComponents();
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();

fixture = TestBed.createComponent(DeleteStructureConfirmationDialogComponent);
component = fixture.componentInstance;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatDialogRef } from '@angular/material/dialog';

Expand All @@ -11,6 +12,7 @@ describe('SoilRemovalConfirmationDialogComponent', () => {
await TestBed.configureTestingModule({
declarations: [SoilRemovalConfirmationDialogComponent],
providers: [{ provide: MatDialogRef, useValue: {} }],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();

fixture = TestBed.createComponent(SoilRemovalConfirmationDialogComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
></app-no-data>
</div>
</div>

<div class="subheading2 grid-1">Proposal Map / Site Plan</div>
<div class="grid-double">
<a *ngFor="let map of proposalMap" (click)="openFile(map.uuid)">
Expand Down Expand Up @@ -207,10 +206,10 @@

<div class="subheading2 grid-1">Reclamation Plan</div>
<div class="grid-double">
<a *ngFor="let file of crossSections" (click)="openFile(file.uuid)">
<a *ngFor="let file of reclamationPlans" (click)="openFile(file.uuid)">
{{ file.fileName }}
</a>
<app-no-data [showRequired]="showErrors" *ngIf="crossSections.length === 0"></app-no-data>
<app-no-data [showRequired]="showErrors" *ngIf="reclamationPlans.length === 0"></app-no-data>
</div>

<ng-container *ngIf="_noiSubmission.soilIsExtractionOrMining">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { NoticeOfIntentParcelService } from '../../../../services/notice-of-inte

import { PfrsDetailsComponent } from './pfrs-details.component';

describe('RosoDetailsComponent', () => {
describe('PfrsDetailsComponent', () => {
let component: PfrsDetailsComponent;
let fixture: ComponentFixture<PfrsDetailsComponent>;
let mockNoiDocumentService: DeepMocked<NoticeOfIntentDocumentService>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { NoticeOfIntentParcelService } from '../../../../services/notice-of-inte

import { PofoDetailsComponent } from './pofo-details.component';

describe('RosoDetailsComponent', () => {
describe('PofoDetailsComponent', () => {
let component: PofoDetailsComponent;
let fixture: ComponentFixture<PofoDetailsComponent>;
let mockNoiDocumentService: DeepMocked<NoticeOfIntentDocumentService>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,4 @@ export class SubmissionDocumentsComponent implements OnInit, OnDestroy {
this.$destroy.next();
this.$destroy.complete();
}

protected readonly open = open;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatDialogRef } from '@angular/material/dialog';

Expand All @@ -11,6 +12,7 @@ describe('ChangeSurveyPlanConfirmationDialogComponent', () => {
await TestBed.configureTestingModule({
declarations: [ChangeSurveyPlanConfirmationDialogComponent],
providers: [{ provide: MatDialogRef, useValue: {} }],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();

fixture = TestBed.createComponent(ChangeSurveyPlanConfirmationDialogComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ export class SubmissionDocumentsComponent implements OnInit, OnDestroy {
this.$destroy.next();
this.$destroy.complete();
}

protected readonly open = open;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Component, Input } from '@angular/core';
import { ApplicationPortalDecisionDto } from '../../../../services/application-decision/application-decision.dto';
import { SUBMISSION_STATUS } from '../../../../services/application-submission/application-submission.dto';
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../services/public/public.dto';

@Component({
selector: 'app-public-alc-review',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { Subject } from 'rxjs';
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicService } from '../../../../../services/public/public.service';

@Component({
Expand All @@ -29,14 +30,14 @@ export class PublicSubmissionDocumentsComponent implements OnInit, OnDestroy {
}

async openFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
window.open(res.url, '_blank');
}
}

async downloadFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
const downloadLink = document.createElement('a');
downloadLink.href = res.url;
Expand All @@ -54,6 +55,4 @@ export class PublicSubmissionDocumentsComponent implements OnInit, OnDestroy {
this.$destroy.next();
this.$destroy.complete();
}

protected readonly open = open;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { SUBMISSION_STATUS } from '../../../../services/application-submission/a
import {
PublicApplicationSubmissionDto,
PublicApplicationSubmissionReviewDto,
PublicDocumentDto,
} from '../../../../services/public/public.dto';
} from '../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../services/public/public.dto';
import { PublicService } from '../../../../services/public/public.service';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

Expand All @@ -30,7 +30,7 @@ export class PublicLfngReviewComponent implements OnInit {
}

async openFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
window.open(res.url, '_blank');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { Subject, takeUntil } from 'rxjs';
import { ApplicationPortalDecisionDto } from '../../../services/application-decision/application-decision.dto';
import { SUBMISSION_STATUS } from '../../../services/application-submission/application-submission.dto';
import {
PublicApplicationParcelDto,
PublicApplicationSubmissionDto,
PublicApplicationSubmissionReviewDto,
PublicDocumentDto,
} from '../../../services/public/public.dto';
} from '../../../services/public/public-application.dto';
import { PublicDocumentDto, PublicParcelDto } from '../../../services/public/public.dto';
import { PublicService } from '../../../services/public/public.service';

@Component({
Expand All @@ -24,7 +23,7 @@ export class PublicApplicationComponent implements OnInit, OnDestroy {
submission: PublicApplicationSubmissionDto | undefined;
review: PublicApplicationSubmissionReviewDto | undefined;
documents: PublicDocumentDto[] = [];
parcels: PublicApplicationParcelDto[] = [];
parcels: PublicParcelDto[] = [];
decisions: ApplicationPortalDecisionDto[] = [];

constructor(private publicService: PublicService, private route: ActivatedRoute) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatSortModule } from '@angular/material/sort';
import { MatTreeModule } from '@angular/material/tree';
import { RouterModule, Routes } from '@angular/router';
import { SharedModule } from '../../../shared/shared.module';
import { PublicAlcReviewComponent } from './alc-review/alc-review.component';
import { PublicDecisionsComponent } from './alc-review/decisions/decisions.component';
import { PublicSubmissionDocumentsComponent } from './alc-review/submission-documents/submission-documents.component';
import { PublicLfngReviewComponent } from './lfng-review/lfng-review.component';
import { PublicApplicationComponent } from './public-application.component';
import { ExclDetailsComponent } from './submission/excl-details/excl-details.component';
import { InclDetailsComponent } from './submission/incl-details/incl-details.component';
import { NaruDetailsComponent } from './submission/naru-details/naru-details.component';
import { NfuDetailsComponent } from './submission/nfu-details/nfu-details.component';
import { ParcelComponent } from './submission/parcel/parcel.component';
import { PfrsDetailsComponent } from './submission/pfrs-details/pfrs-details.component';
import { PofoDetailsComponent } from './submission/pofo-details/pofo-details.component';
import { RosoDetailsComponent } from './submission/roso-details/roso-details.component';
import { SubdDetailsComponent } from './submission/subd-details/subd-details.component';
import { SubmissionDetailsComponent } from './submission/submission-details.component';
import { TurDetailsComponent } from './submission/tur-details/tur-details.component';

const routes: Routes = [
{
path: ':fileId',
component: PublicApplicationComponent,
},
];

@NgModule({
declarations: [
PublicApplicationComponent,
PublicLfngReviewComponent,
PublicAlcReviewComponent,
PublicSubmissionDocumentsComponent,
PublicDecisionsComponent,
ParcelComponent,
SubmissionDetailsComponent,
NfuDetailsComponent,
TurDetailsComponent,
SubdDetailsComponent,
RosoDetailsComponent,
PofoDetailsComponent,
PfrsDetailsComponent,
NaruDetailsComponent,
ExclDetailsComponent,
InclDetailsComponent,
],
imports: [
CommonModule,
SharedModule,
MatPaginatorModule,
MatSortModule,
RouterModule.forChild(routes),
MatAutocompleteModule,
MatTreeModule,
],
})
export class PublicApplicationModule {}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicService } from '../../../../../services/public/public.service';
import { DOCUMENT_TYPE } from '../../../../../shared/dto/document.dto';

Expand All @@ -25,7 +26,7 @@ export class ExclDetailsComponent {
constructor(private router: Router, private publicService: PublicService) {}

async openFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
window.open(res?.url, '_blank');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicService } from '../../../../../services/public/public.service';
import { DOCUMENT_TYPE } from '../../../../../shared/dto/document.dto';

Expand All @@ -25,7 +26,7 @@ export class InclDetailsComponent {
constructor(private router: Router, private publicService: PublicService) {}

async openFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
window.open(res?.url, '_blank');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicService } from '../../../../../services/public/public.service';
import { DOCUMENT_TYPE } from '../../../../../shared/dto/document.dto';

Expand All @@ -20,7 +21,7 @@ export class NaruDetailsComponent {
constructor(private router: Router, private publicService: PublicService) {}

async openFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
window.open(res?.url, '_blank');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicService } from '../../../../../services/public/public.service';
import { DOCUMENT_TYPE } from '../../../../../shared/dto/document.dto';

Expand All @@ -21,7 +22,7 @@ export class NfuDetailsComponent {
constructor(private router: Router, private publicService: PublicService) {}

async openFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
window.open(res?.url, '_blank');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Component, Input } from '@angular/core';
import { Subject } from 'rxjs';
import { PARCEL_OWNERSHIP_TYPE } from '../../../../../services/application-parcel/application-parcel.dto';
import { PublicApplicationParcelDto, PublicApplicationSubmissionDto } from '../../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicParcelDto } from '../../../../../services/public/public.dto';

@Component({
selector: 'app-parcel',
Expand All @@ -12,7 +13,7 @@ export class ParcelComponent {
$destroy = new Subject<void>();

@Input() applicationSubmission!: PublicApplicationSubmissionDto;
@Input() parcels: PublicApplicationParcelDto[] = [];
@Input() parcels: PublicParcelDto[] = [];

PARCEL_OWNERSHIP_TYPES = PARCEL_OWNERSHIP_TYPE;
pageTitle: string = 'Identify Parcel(s) Under Application';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicService } from '../../../../../services/public/public.service';
import { DOCUMENT_TYPE } from '../../../../../shared/dto/document.dto';

Expand All @@ -23,7 +24,7 @@ export class PfrsDetailsComponent {
constructor(private router: Router, private publicService: PublicService) {}

async openFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
window.open(res?.url, '_blank');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicApplicationSubmissionDto } from '../../../../../services/public/public-application.dto';
import { PublicDocumentDto } from '../../../../../services/public/public.dto';
import { PublicService } from '../../../../../services/public/public.service';
import { DOCUMENT_TYPE } from '../../../../../shared/dto/document.dto';

Expand All @@ -23,7 +24,7 @@ export class PofoDetailsComponent {
constructor(private router: Router, private publicService: PublicService) {}

async openFile(uuid: string) {
const res = await this.publicService.getApplicationFileUrl(this.applicationSubmission.fileNumber, uuid);
const res = await this.publicService.getApplicationOpenFileUrl(this.applicationSubmission.fileNumber, uuid);
if (res) {
window.open(res?.url, '_blank');
}
Expand Down
Loading

0 comments on commit c3cffaf

Please sign in to comment.