Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
* Add missing space to primary contact text
* Delete dead code in alc-review components
* Remove binding from spans as button was already bound
* Add disabled to start review to prevent duplicate clicks
* Remove parcel pid disabled flag from middle of page
  • Loading branch information
Daniel Haselhan committed Jan 26, 2024
1 parent e3c9305 commit 0cfbef1
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h3 *ngIf="selectedLocalGovernment">
<label for="authorization-letter" class="subheading2">Authorization Letters</label>
<p class="subtext">
For privately owned Fee Simple parcels, the letter must be signed by all individual landowners and the
majority of directors within the organization.For Crown parcels or Fee Simple parcels owned by a government,
majority of directors within the organization. For Crown parcels or Fee Simple parcels owned by a government,
the letter must be signed by senior level staff.
</p>
<app-info-banner>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ export class AlcReviewComponent implements OnInit, OnDestroy {
showUpdateAfterSubmitLabel = false;
showALCSection = false;

constructor(
private applicationReviewService: ApplicationSubmissionReviewService,
private router: Router,
) {}
constructor() {}

ngOnInit(): void {
this.$application.pipe(takeUntil(this.$destroy)).subscribe((application) => {
Expand Down Expand Up @@ -60,14 +57,4 @@ export class AlcReviewComponent implements OnInit, OnDestroy {
this.$destroy.next();
this.$destroy.complete();
}

async onReview(fileId: string) {
if (this.application?.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG) {
const review = await this.applicationReviewService.startReview(fileId);
if (!review) {
return;
}
}
await this.router.navigateByUrl(`application/${fileId}/review`);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,40 @@ <h2>Applicant Submission</h2>
<button mat-flat-button color="accent" (click)="onDownloadSubmissionPdf(application.fileNumber)">
Download PDF
</button>
<button mat-flat-button color="primary" *ngIf="application && application.canEdit"
[routerLink]="'/application/' + application.fileNumber + '/edit'">
<button
mat-flat-button
color="primary"
*ngIf="application && application.canEdit"
[routerLink]="'/application/' + application.fileNumber + '/edit'"
>
<div class="continue-button-content">
<span>Continue Application</span>
<mat-icon>keyboard_double_arrow_right</mat-icon>
</div>
</button>
<button (click)="onReview(application.fileNumber)" mat-flat-button color="primary"
<button
(click)="onReview(application.fileNumber)"
[disabled]="isLoading"
mat-flat-button
color="primary"
*ngIf="
application && application.canReview && (
application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG ||
application.status.code === SUBMISSION_STATUS.RETURNED_TO_LG ||
application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG)
">
application &&
application.canReview &&
(application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG ||
application.status.code === SUBMISSION_STATUS.RETURNED_TO_LG ||
application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG)
"
>
<div class="continue-button-content">
<span
*ngIf="
application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG ||
application.status.code === SUBMISSION_STATUS.RETURNED_TO_LG
"
(click)="onReview(application.fileNumber)"
class="subheading2"
>Continue Application Review</span
>
<span
*ngIf="application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG"
(click)="onReview(application.fileNumber)"
class="subheading2"
<span *ngIf="application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG" class="subheading2"
>Start Application Review</span
>
<mat-icon>keyboard_double_arrow_right</mat-icon>
Expand Down Expand Up @@ -115,41 +121,42 @@ <h2>Applicant Submission</h2>
</mat-tab>
</mat-tab-group>
<div *ngIf="application && application.canEdit" class="continue-button-container">
<button mat-stroked-button color="warn" (click)="onCancel(application.uuid)">
Cancel Application
</button>
<button mat-flat-button color="primary" *ngIf="application && application.canEdit"
[routerLink]="'/application/' + application.fileNumber + '/edit'">
<button mat-stroked-button color="warn" (click)="onCancel(application.uuid)">Cancel Application</button>
<button
mat-flat-button
color="primary"
*ngIf="application && application.canEdit"
[routerLink]="'/application/' + application.fileNumber + '/edit'"
>
<div class="continue-button-content">
<span>Continue Application</span>
<mat-icon>keyboard_double_arrow_right</mat-icon>
</div>
</button>
</div>
<div *ngIf="application && application.canReview" class="continue-button-container">
<button mat-stroked-button color="warn" (click)="onCancel(application.uuid)">
Cancel Application
</button>
<button (click)="onReview(application.fileNumber)" mat-flat-button color="primary"
<button mat-stroked-button color="warn" (click)="onCancel(application.uuid)">Cancel Application</button>
<button
(click)="onReview(application.fileNumber)"
[disabled]="isLoading"
mat-flat-button
color="primary"
*ngIf="
application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG ||
application.status.code === SUBMISSION_STATUS.RETURNED_TO_LG ||
application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG ||
application.status.code === SUBMISSION_STATUS.RETURNED_TO_LG ||
application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG
">
"
>
<div class="continue-button-content">
<span
*ngIf="
application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG ||
application.status.code === SUBMISSION_STATUS.RETURNED_TO_LG
"
(click)="onReview(application.fileNumber)"
class="subheading2"
>Continue Application Review</span
>
<span
*ngIf="application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG"
(click)="onReview(application.fileNumber)"
class="subheading2"
<span *ngIf="application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG" class="subheading2"
>Start Application Review</span
>
<mat-icon>keyboard_double_arrow_right</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class ViewApplicationSubmissionComponent implements OnInit, OnDestroy {
selectedIndex = 0;

$destroy = new Subject<void>();
isLoading = false;

SUBMISSION_STATUS = SUBMISSION_STATUS;

Expand Down Expand Up @@ -80,14 +81,15 @@ export class ViewApplicationSubmissionComponent implements OnInit, OnDestroy {
}

async onReview(fileId: string) {
this.isLoading = true;
if (this.application?.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG) {
// FIXME: Service call is being called twice on banner button click causing error toast
const review = await this.applicationReviewService.startReview(fileId);
if (!review) {
return;
}
}
await this.router.navigateByUrl(`application/${fileId}/review`);
this.isLoading = false;
}

async openFile(uuid: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@
>
to obtain a recent copy (not older than 1 year) of the Certificate of Title
</div>
{{ parcelForm.controls.pid.disabled }}
<app-file-drag-drop
id="certificate-of-title-upload"
[uploadedFiles]="parcel.certificateOfTitle ? [parcel.certificateOfTitle] : []"
Expand Down Expand Up @@ -333,7 +332,7 @@ <h6 class="owner-search-option" *ngIf="filteredOwners.length">OR</h6>
</div>
<div class="row">
<div class="key"><strong>Phone Number:</strong></div>
<div class="value">{{ selectedOwner.phoneNumber ?? '' | mask : '(000) 000-0000' }}</div>
<div class="value">{{ selectedOwner.phoneNumber ?? '' | mask : '(000) 000-0000' }}</div>
</div>
<div class="row">
<div class="key"><strong>Email:</strong></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h3 *ngIf="selectedLocalGovernment">
<label for="authorization-letter" class="subheading2">Authorization Letters</label>
<p class="subtext">
For privately owned Fee Simple parcels, the letter must be signed by all individual landowners and the
majority of directors within the organization.For Crown parcels or Fee Simple parcels owned by a government,
majority of directors within the organization. For Crown parcels or Fee Simple parcels owned by a government,
the letter must be signed by senior level staff.
</p>
<app-info-banner>
Expand Down

0 comments on commit 0cfbef1

Please sign in to comment.