Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to Master Updated SEP refund policy content & bug fixes #4314

Merged
merged 20 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1846,10 +1846,13 @@ <h3 class="blue-header" *ngIf="this.isLP()">ESTABLISHMENT TYPE</h3>
</app-file-uploader>
</section>
<br>
<section *ngIf="application.applicationType.serviceAreas" > <p>Enter the total occupant load as indicated by your local government. This number can be either the total stamped on the floor plan or the sum of occupant loads across all service areas, as listed in the occupant load stamp. </p>

<app-field [required]="true" label="Total occupant load" [valid]="!showValidationMessages || form.get('totalOccupantLoad').valid" errorMessage="Total occupant load is required."> <input class="form-control" formControlName="totalOccupantLoad" id="totalOccupantLoad"
style="width: 250px;" type="number" min="1" placeholder="Total occupant load" (input)="validateInput($event)" /></app-field></section>
<div>
<section *ngIf="application.applicationType.serviceAreas" > <p>Enter the total occupant load as indicated by your local government. This number can be either the total stamped on the floor plan or the sum of occupant loads across all service areas, as listed in the occupant load stamp. </p>
<app-field [required]="true" label="Total occupant load" [valid]="!showValidationMessages || form.get('totalOccupantLoad').valid" errorMessage="Total occupant load is required."> <input class="form-control" formControlName="totalOccupantLoad" id="totalOccupantLoad"
style="width: 250px;" type="number" min="1" placeholder="Total occupant load" (input)="validateInput($event)" /></app-field>
</section>
</div>
</div>

</section>
Expand All @@ -1865,17 +1868,20 @@ <h3 class="blue-header" *ngIf="application.applicationType.serviceAreas">SERVICE
<app-capacity-table formControlName="serviceAreas" [areaCategory]="getAreaCategoryNumber('Service')"
[enabled]="!isOpenedByLGForApproval && !lGHasApproved()">
</app-capacity-table>
<div *ngIf="!isOccupantLoadCorrect()">
<br>
<p class="error-text">The sum of occupant loads across all service areas does not match the total occupant load entered in the total occupant load field.</p>

</div>

<div *ngIf="!showOccupantLoadCheckBox">
<mat-checkbox formControlName="totalOccupantLoadExceed" > <span class="error-states">*</span>
I affirm that the combined service area capacity exceeds the total occupant load.
</mat-checkbox>
</div>
<div *ngIf="!hideOcupantLoadFields()" >
<div *ngIf="!isOccupantLoadCorrect()">
<br>
<p class="error-text">The sum of occupant loads across all service areas does not match the total occupant load entered in the total occupant load field.</p>

</div>

<div *ngIf="!showOccupantLoadCheckBox">
<mat-checkbox formControlName="totalOccupantLoadExceed" > <span class="error-states">*</span>
I affirm that the combined service area capacity exceeds the total occupant load.
</mat-checkbox>
</div>
</div>
</app-field>

<mat-card class="mat-elevation-z0 mb-3" *ngIf="showHoldsOtherManufactureLicence()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@ export class ApplicationComponent extends FormBase implements OnInit {
valid = false;
this.validationMessages.push('At least one service area is required.');
}else{

if(!this.isOccupantLoadCorrect()){
valid = false;
this.validationMessages.push('The sum of occupant loads across all service areas does not match the total occupant load entered in the total occupant load field.');
Expand Down Expand Up @@ -1790,18 +1791,27 @@ export class ApplicationComponent extends FormBase implements OnInit {
}

isOccupantLoadCorrect(): Boolean{
if(this.hideOcupantLoadFields()){
this.form.get('totalOccupantLoadExceed').disable();
return true;
}
const serviceArea = ('areas' in this.form.get('serviceAreas').value) ? this.form.get('serviceAreas').value['areas'] : this.form.get('serviceAreas').value;
let totalCapacity = serviceArea.reduce((sum,item)=> Number(sum+(+item.capacity)),0);
let totalOccupantLoad = this.form.get('totalOccupantLoad').value | 0;
const isExceeded:boolean = totalOccupantLoad>=totalCapacity
if(isExceeded){
this.form.controls['totalOccupantLoadExceed'].enabled;
this.form.get('totalOccupantLoadExceed').enable();
this.showOccupantLoadCheckBox = true;
}else{
this.form.controls['totalOccupantLoadExceed'].disabled;
this.form.get('totalOccupantLoadExceed').disable();
this.showOccupantLoadCheckBox = false;

}
return this.form.get('totalOccupantLoadExceed').value === true || isExceeded;
}

//Check if applicant is waiting for LG approcval or has been approved by LG.
//In this case do not block user to pay and submit if the fields are empty
hideOcupantLoadFields(): Boolean{
return this.isOpenedByLGForApproval || this.lGHasApproved();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ <h4>LIQUOR QUANTITIES</h4>
<ul>
<li>The LCRB has made an error</li>
<li>You have overpaid</li>
<li>The event is cancelled due to exceptional circumstances such as a provincial state of emergency.</li>
<li>The event is cancelled due to exceptional circumstances such as a provincial state of emergency</li>
</ul>

<p>The LCRB investigates all credit card chargeback requests for fees and will dispute chargeback requests. A note will also be made on your LCRB account and there may be consequences for fraudulent requests.</p>
Expand Down Expand Up @@ -553,7 +553,7 @@ <h2 style="margin-bottom: 24px;">Declaration</h2>
<h3>Application Approved!</h3>

<p><fa-icon [icon]="faExclamationTriangle" style="margin-right: 10px;"></fa-icon>You must pay these fees to get a special event permit. If you do not pay these fees, your application will not be valid and a licence will not be issued for your event.</p>
<p>In the event that the information on this application is no longer correct or if you wish to make additional changes, you may contact the LCRB or withdraw your application up to 24 hours before the event begins.</p>
<p>If the information on this application is no longer correct or if you wish to make additional changes, you may contact the LCRB or withdraw your application up to 24 hours before the event begins.</p>
<button mat-raised-button color="primary" (click)="payNow()"><fa-icon [icon]="faShoppingCart" style="margin-right: 10px;"></fa-icon>PAY NOW</button>

<div *ngIf="showRefundPolicyError" class="error-text">
Expand Down