Skip to content

Commit

Permalink
Merge pull request #1437 from bcgov/feature/ALCS-1568
Browse files Browse the repository at this point in the history
Bug Fixes
  • Loading branch information
dhaselhan authored Feb 20, 2024
2 parents f484be6 + 87e6f03 commit 468f20c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@
<span>{{ _noiSubmission.purpose }}</span>
</div>

<div class="subheading2 grid-1">Describe the type, origin and quality of fill proposed to be placed.</div>
<div class="grid-double">
<span>{{ _noiSubmission.soilFillTypeToPlace }}</span>
</div>

<div class="subheading2 grid-1">Placement of Fill Project Duration</div>
<div class="grid-double">
<div *ngIf="_noiSubmission.soilProjectDuration">
{{ _noiSubmission.soilProjectDuration }}
</div>
<app-no-data
*ngIf="!_noiSubmission.soilProjectDuration"
></app-no-data>
<app-no-data *ngIf="!_noiSubmission.soilProjectDuration"></app-no-data>
</div>

<div class="grid-1"></div>
Expand Down Expand Up @@ -71,11 +74,6 @@
<span *ngIf="_noiSubmission.soilAlreadyPlacedAverageDepth">m</span>
</div>

<div class="subheading2 grid-1">Describe the type, origin and quality of fill proposed to be placed.</div>
<div class="grid-double">
<span>{{ _noiSubmission.soilFillTypeToPlace }}</span>
</div>

<div class="subheading2 grid-1">Proposal Map / Site Plan</div>
<div class="grid-double multiple-documents">
<a *ngFor="let file of proposalMap" (click)="openFile(file)">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, ViewChild } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { ApplicationDocumentDto } from '../../services/application-document/application-document.dto';
import { FileHandle } from './drag-drop.directive';
Expand All @@ -21,12 +21,21 @@ export class FileDragDropComponent implements OnInit {
@Input() showErrors = false;
@Input() showVirusError = false;

private uploadClicked = false;

@ViewChild('fileUpload') fileUpload!: ElementRef<HTMLInputElement>;

constructor(private sanitizer: DomSanitizer) {}

ngOnInit(): void {}

@HostListener('window:focus')
onFocus() {
if (this.uploadClicked) {
this.showErrors = true;
}
}

_deleteFile(file: ApplicationDocumentDto) {
this.showErrors = true;
this.deleteFile.emit(file);
Expand All @@ -42,12 +51,13 @@ export class FileDragDropComponent implements OnInit {
}

onFileUploadClicked() {
this.showErrors = true;
this.uploadClicked = true;
this.beforeFileUploadOpened.emit();
this.fileUpload.nativeElement.click();
}

fileSelected($event: Event) {
this.showErrors = true;
const target = $event.target as HTMLInputElement;
const selectedFiles = target.files as FileList;
for (let i = 0; i < selectedFiles.length; i++) {
Expand Down

0 comments on commit 468f20c

Please sign in to comment.