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: LCSD 7382, 7498 #4317

Merged
merged 22 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
428c337
Revert "LCSD-7312: Add proof of valid interest back to Dormancy Reins…
gary-jipp Sep 26, 2024
ae65a6d
LCSD-7367 (#4294)
simranjeetgit Nov 9, 2024
e469319
LCSD-7483: Add banner for dynamics upgrade (#4296)
vijaivir Nov 12, 2024
2784689
LCSD-6147 (#4298)
JSuiBCGov Nov 13, 2024
08a2edb
Update banner text (#4297)
vijaivir Nov 12, 2024
532c577
LCSD-6857 LCSD-7322 (#4300)
simranjeetgit Nov 13, 2024
cecd80e
LCSD-7413 SEP refund policy (#4302)
JSuiBCGov Nov 14, 2024
a9a7fb7
LCSD-7414: Added refund policy for renewal applications (#4301)
vijaivir Nov 14, 2024
e9a0e4b
LCSD-7235: Fixed typo, rearrange refund policy section, add declarati…
vijaivir Nov 14, 2024
e75f68f
LCSD-7312: Add proof of valid interest back to dormancy reinstatement…
sam-warren Nov 14, 2024
09f4eb3
LCSD-7322 (#4304)
simranjeetgit Nov 18, 2024
8c21151
Revert System Maintenance Banner (#4305)
vijaivir Nov 18, 2024
c3ad739
LCSD-6465 remove "aircraft" from LP application (#4307)
JSuiBCGov Nov 18, 2024
6283b60
Merge branch 'master' into develop
vijaivir Nov 18, 2024
9ed8a8d
Add closing section (#4309)
vijaivir Nov 18, 2024
b3d0791
Fixed merge issues
simranjeetgit Nov 18, 2024
1634c3d
Merge branch 'develop' of https://github.com/bcgov/jag-lcrb-carla-pub…
simranjeetgit Nov 18, 2024
897ac5e
Merge branch 'master' of https://github.com/bcgov/jag-lcrb-carla-publ…
simranjeetgit Nov 18, 2024
f519c20
LCSD-7322 Dev test (#4312)
simranjeetgit Nov 19, 2024
7ae6d45
LCSD-7498 (#4313)
simranjeetgit Nov 19, 2024
6d22178
LCSD-7382: Reverted logic for Establishment Hours of Sale (#4315)
vijaivir Nov 20, 2024
e6dd1a6
LCSD-7382: Adding the Unit Test and Styling for the Hours of Sale Rev…
vijaivir Nov 21, 2024
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 Expand Up @@ -2144,6 +2150,127 @@ <h3 class="blue-header" *ngIf="showGroceryQuestion()">Grocery Declaration</h3>

</div>

<!-- Hours of Sale -->
<section class="ngtest-hours-of-sale" *ngIf="application?.applicationType?.showHoursOfSale">
<h3 class="blue-header">HOURS OF SALE</h3>
<div class="padded-section content-bottom">
<p *ngIf="application?.applicationType?.name === ApplicationTypeNames.FP || application?.applicationType?.name === ApplicationTypeNames.FPRelo">
The standard service hours for a Food Primary are between 9:00AM and midnight. You may extend these hours by
submitting an Extend Hours of Service Beyond Standard Service Hours application from the application dashboard after
you submit your Food Primary application. LG/IN approval is required.
</p>
<p *ngIf="application?.applicationType?.name !== ApplicationTypeNames.FP && application?.applicationType?.name !== ApplicationTypeNames.FPRelo">
Indicate the
proposed hours of sales below.
</p>
<table class="store-hours">
<tr>
<th class="lead"></th>
<th>Sunday</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
</tr>
<tr>
<th>Open</th>
<td>
<select class="form-control" formControlName="serviceHoursSundayOpen">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursMondayOpen">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursTuesdayOpen">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursWednesdayOpen">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursThursdayOpen">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursFridayOpen">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursSaturdayOpen">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
</tr>
<tr>
<th>Close</th>
<td>
<select class="form-control" formControlName="serviceHoursSundayClose">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursMondayClose">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursTuesdayClose">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursWednesdayClose">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursThursdayClose">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursFridayClose">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
<td>
<select class="form-control" formControlName="serviceHoursSaturdayClose">
<option value=""> -- </option>
<option *ngFor="let item of ServiceHours" [value]="item">{{item}}</option>
</select>
</td>
</tr>
</table>
<p class="error-states" *ngIf="showValidationMessages && !isHoursOfSaleValid()">
Hours of Sale are required
</p>
</div>
</section>

<!-- Licensed Producer -->
<div *ngIf="application?.applicationType?.name === ApplicationTypeNames.Marketer">
<h3 class="blue-header">INFORMATION ABOUT THE LICENSED PRODUCER</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,26 @@
.normal-mode {
display: none;
}

.store-hours {
width: 100%;
border-collapse: separate;
border-spacing: 2px;

th {
text-align: center;
}

td,
th {
padding: 5px;
background-color: #E1E8F2;
}

th.lead {
background-color: transparent;
}
}

td.primary {
padding: 10px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,27 @@ describe("ApplicationComponent",
expect(elem).toBeFalsy();
});

it("should show hours of sale if enabled",
() => {
applicationService.getApplicationById = () => of({
applicationType: {
'showHoursOfSale': true,
contentTypes: []
} as any
} as Application);
fixture = TestBed.createComponent(ApplicationComponent);
component = fixture.debugElement.componentInstance;
fixture.detectChanges();
const elem = fixture.debugElement.query(By.css(".ngtest-hours-of-sale")).nativeElement;
expect(elem).not.toBeFalsy();
});

it("should hide hours of sale if disabled",
() => {
const elem = fixture.debugElement.query(By.css(".ngtest-hours-of-sale"));
expect(elem).toBeFalsy();
});

it("should be invalid if no supporting documents are uploaded",
() => {
applicationService.getApplicationById = () => of({
Expand Down
Loading