Skip to content

Commit

Permalink
Merge pull request #1400 from bcgov/develop
Browse files Browse the repository at this point in the history
Deployment PR - 935
  • Loading branch information
dhaselhan authored Feb 22, 2024
2 parents e96ef98 + 202f01d commit 6be0736
Show file tree
Hide file tree
Showing 232 changed files with 4,379 additions and 753 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ node_modules/
/test-results/
playwright-report/
playwright/.cache/
.~lock.*
.~lock.*

/ora2pg_data
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
padding: 16px;
margin: 24px 0 40px 0;
grid-template-columns: minmax(60px, 1fr) minmax(60px, 1fr) minmax(60px, 1fr) minmax(60px, 1fr);
white-space: pre-line;

.full-width {
grid-column: 1/5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@
<div class="grid-double">
<span> {{ _applicationSubmission.subdIsHomeSiteSeverance ? 'Yes' : 'No' }}</span>
</div>
<div class="subheading2 grid-1">Proof of Homesite Severance Qualification</div>
<div class="grid-double">
<div *ngFor="let document of homesiteDocuments">
<a (click)="openFile(document)">
{{ document.fileName }}
</a>
<ng-container *ngIf="_applicationSubmission.subdIsHomeSiteSeverance">
<div class="subheading2 grid-1">Proof of Homesite Severance Qualification</div>
<div class="grid-double">
<div *ngFor="let document of homesiteDocuments">
<a (click)="openFile(document)">
{{ document.fileName }}
</a>
</div>
</div>
</div>
</ng-container>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
[showStatus]="true"
[submissionStatusService]="applicationStatusService"
></app-details-header>
<div class="content">
<div class="content" *ngIf="application">
<div *ngIf="showSubmittedToAlcMenuItems" class="nav">
<div *ngFor="let route of childRoutes" class="nav-link">
<div
*ngIf="route.portalOnly ? isApplicantSubmission : true"
*ngIf="
(!route.portalOnly || isApplicantSubmission) &&
(route.appTypes ? route.appTypes.includes(application.type.code) : true)
"
[routerLink]="route.path ? route.path : './'"
routerLinkActive="active"
[routerLinkActiveOptions]="{ exact: route.path === '' }"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import { SYSTEM_SOURCE_TYPES } from '../../shared/dto/system-source.types.dto';
import { ApplicantInfoComponent } from './applicant-info/applicant-info.component';
import { ApplicationMeetingComponent } from './application-meeting/application-meeting.component';
import { BoundaryAmendmentComponent } from './boundary-amendment/boundary-amendment.component';
import { decisionChildRoutes, DecisionModule } from './decision/decision.module';
import { DocumentsComponent } from './documents/documents.component';
import { InfoRequestsComponent } from './info-requests/info-requests.component';
Expand Down Expand Up @@ -148,6 +149,14 @@ export const appChildRoutes = [
component: PostDecisionComponent,
portalOnly: false,
},
{
path: 'boundary-amendments',
menuTitle: 'Boundary Amendments',
icon: 'border_style',
component: BoundaryAmendmentComponent,
portalOnly: false,
appTypes: ['INCL', 'EXCL'],
},
{
path: 'documents',
menuTitle: 'Documents',
Expand All @@ -164,7 +173,7 @@ export const appChildRoutes = [
})
export class ApplicationComponent implements OnInit, OnDestroy {
destroy = new Subject<void>();
childRoutes = appChildRoutes;
childRoutes: any = appChildRoutes;
unsubmittedRoutes = unsubmittedRoutes;
submittedLfngRoutes = submittedLfngRoutes;

Expand Down Expand Up @@ -224,7 +233,6 @@ export class ApplicationComponent implements OnInit, OnDestroy {
(s) => s.statusTypeCode === SUBMISSION_STATUS.SUBMITTED_TO_ALC && !!s.effectiveDate,
);
this.showSubmittedToLfngMenuItems = wasSubmittedToLfng && !submittedToAlcsStatus;

this.showSubmittedToAlcMenuItems = this.isApplicantSubmission ? !!submittedToAlcsStatus : true;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import { ApplicationMeetingDialogComponent } from './application-meeting/applica
import { ApplicationMeetingComponent } from './application-meeting/application-meeting.component';
import { CreateApplicationMeetingDialogComponent } from './application-meeting/create-application-meeting-dialog/create-application-meeting-dialog.component';
import { appChildRoutes, ApplicationComponent } from './application.component';
import { BoundaryAmendmentComponent } from './boundary-amendment/boundary-amendment.component';
import { EditBoundaryAmendmentDialogComponent } from './boundary-amendment/edit-boundary-amendment-dialog/edit-boundary-amendment-dialog.component';
import { DecisionModule } from './decision/decision.module';
import { DocumentUploadDialogComponent } from './documents/document-upload-dialog/document-upload-dialog.component';
import { DocumentsComponent } from './documents/documents.component';
import { InfoRequestsComponent } from './info-requests/info-requests.component';
import { InfoRequestDialogComponent } from './info-requests/info-rquest-dialog/info-request-dialog.component';
import { InfoRequestDialogComponent } from './info-requests/info-request-dialog/info-request-dialog.component';
import { IntakeComponent } from './intake/intake.component';
import { LfngInfoComponent } from './lfng-info/lfng-info.component';
import { ReturnApplicationDialogComponent } from './lfng-info/return-application-dialog/return-application-dialog.component';
Expand Down Expand Up @@ -82,6 +84,8 @@ const routes: Routes = [
ParcelPrepComponent,
UncancelApplicationDialogComponent,
ReturnApplicationDialogComponent,
BoundaryAmendmentComponent,
EditBoundaryAmendmentDialogComponent,
],
imports: [SharedModule, RouterModule.forChild(routes), ApplicationDetailsModule, DecisionModule],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<div class="split">
<h3>ALR Boundary</h3>
<button mat-flat-button color="primary" (click)="onCreateAmendment()">+ Amendment</button>
</div>
<section>
<div *ngFor="let amendment of amendments; let i = index" class="amendment">
<div class="menu">
<button (click)="onEditAmendment(amendment)" matTooltip="Edit Amendment" mat-icon-button>
<mat-icon>edit</mat-icon>
</button>
<button (click)="onDeleteAmendment(amendment.uuid)" matTooltip="Delete Amendment" mat-icon-button>
<mat-icon>delete</mat-icon>
</button>
</div>
<div class="subheading1">Amendment #{{ amendments.length - i }}</div>
<div class="content">
<div class="full-grid-line">
<div class="subheading2">Amendment Type</div>
{{ amendment.type }}
</div>
<div>
<div class="subheading2">Decision Components</div>
<div *ngFor="let component of amendment.decisionComponents">
{{ component.label }}
</div>
</div>
<div>
<div class="subheading2">Area Included or Excluded (ha)</div>
<app-inline-number
[value]="amendment.area.toString()"
(save)="onSaveAlrArea(amendment.uuid, $event)"
[decimals]="5"
></app-inline-number>
</div>
<div>
<div class="subheading2">ALR Boundary Amendment Year</div>
<app-inline-dropdown
[value]="amendment.year?.toString()"
[options]="years"
(save)="onSaveYear(amendment.uuid, $event)"
/>
</div>
<div>
<div class="subheading2">ALR Boundary Amendment Period</div>
<app-inline-dropdown
[value]="amendment.period?.toString()"
[options]="periods"
(save)="onSavePeriod(amendment.uuid, $event)"
/>
</div>
</div>
</div>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
@use '../../../../styles/colors';

section {
margin: 32px 0;
}

.amendment {
margin: 24px 0;
position: relative;
box-shadow: 0 2px 8px 1px rgba(0, 0, 0, 0.25);
padding: 32px;

.menu {
position: absolute;
top: 0;
right: 0;
height: 36px;
background: colors.$primary-color-dark;
box-shadow: -1px 1px 4px rgba(0, 0, 0, 0.25);
border-radius: 0 4px 0 10px;

button {
color: colors.$white;
width: 36px;
height: 36px;
line-height: 36px;
}

mat-icon {
position: absolute;
top: 8px;
left: 8px;
font-size: 21px;
width: 20px;
height: 36px;
}
}

.content {
margin-top: 16px;
margin-bottom: 32px;
display: grid;
grid-template-columns: 1fr 1fr;
grid-row-gap: 24px;
column-gap: 12px;

.subheading2 {
margin-bottom: 6px !important;
}

& > div {
font-size: 16px;
word-wrap: break-word;
}

.full-grid-line {
grid-column: 1 / 3;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatDialog } from '@angular/material/dialog';
import { createMock, DeepMocked } from '@golevelup/ts-jest';
import { BehaviorSubject } from 'rxjs';
import { ApplicationBoundaryAmendmentService } from '../../../services/application/application-boundary-amendments/application-boundary-amendment.service';
import { ApplicationDetailService } from '../../../services/application/application-detail.service';
import { ApplicationSubmissionStatusService } from '../../../services/application/application-submission-status/application-submission-status.service';
import { ApplicationTimelineService } from '../../../services/application/application-timeline/application-timeline.service';
import { ApplicationDto } from '../../../services/application/application.dto';

import { BoundaryAmendmentComponent } from './boundary-amendment.component';

describe('BoundaryAmendmentComponent', () => {
let component: BoundaryAmendmentComponent;
let fixture: ComponentFixture<BoundaryAmendmentComponent>;
let mockAppDetailService: DeepMocked<ApplicationDetailService>;

beforeEach(async () => {
mockAppDetailService = createMock();
mockAppDetailService.$application = new BehaviorSubject<ApplicationDto | undefined>(undefined);

await TestBed.configureTestingModule({
providers: [
{
provide: ApplicationDetailService,
useValue: mockAppDetailService,
},
{
provide: ApplicationBoundaryAmendmentService,
useValue: {},
},
{
provide: MatDialog,
useValue: {},
},
],
declarations: [BoundaryAmendmentComponent],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();

fixture = TestBed.createComponent(BoundaryAmendmentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading

0 comments on commit 6be0736

Please sign in to comment.