Skip to content

Commit

Permalink
Re-Merge to Master: LCSD-7141,7126,7329,7328,7327,7275,7312 (#4286)
Browse files Browse the repository at this point in the history
* LCSD-7141 - Convert User Entered Time into PST (3) (#4263)

unifying time zone changes into one pr

Co-authored-by: W. Ross White <[email protected]>

* LCSD-7126 Portal changes for ORV demo (#4266)

* LCSD-7126: Merge Ross's existing work

* LCSD-7126: Update environment configuration

* LCSD-7126-Patch: Fix type error (#4268)

* Re-enable Account URLs on Business Profile (#4269)

* Re-enable account URLs on business profile page

* Re-enable account URL support in API

* LCSD-7329: Multiple File Uploads for Zoning and Valid Interest (#4270)

LCSD-7329: Update Zoning and Valid Interest uploads to allow for multiple documents

* LCSD-7328: Conditionally Disable Temporary Relocation Application (#4271)

* LCSD-7328: Disable temporary relocation if licensee is operating from temporary location

* LCSD-7328: Additional check if license exists.

* LCSD-7327: New Address, LG/IN, Police fields default to blank for LRS Transfer of Location (#4272)

* LCSD-7275: Disallow illegal characters in company name change (#4273)

* LCSD-7328-Patch: Fix issue with processing relocation for LRS (#4274)

* LCSD-7312: Add proof of valid interest back to Dormancy Reinstatement form (#4275)

* LCSD-7312: Add back Proof of valid interest for Dormancy Reinstatement

* LCSD-7312: Add missing <div>

* LCSD-7312: Unrelated - add tech debt TODO note for mismatched fields

* Hide ORV Feature (#4276)

---------

Co-authored-by: williamrosswhite <[email protected]>
Co-authored-by: W. Ross White <[email protected]>
Co-authored-by: Sam Warren <[email protected]>
  • Loading branch information
4 people authored Sep 20, 2024
1 parent d9f57bc commit d4272da
Show file tree
Hide file tree
Showing 27 changed files with 3,602 additions and 1,311 deletions.
4,212 changes: 3,092 additions & 1,120 deletions cllc-public-app/ClientApp/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cllc-public-app/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"leaflet": "^1.7.1",
"lodash": "^4.17.21",
"material-design-icons": "^3.0.1",
"moment-timezone": "^0.5.45",
"mygovbc-bootstrap-theme": "^0.4.1",
"ng-busy": "^12.0.2",
"ng2-currency-mask": "^12.0.3",
Expand Down
2 changes: 1 addition & 1 deletion cllc-public-app/ClientApp/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ const routes: Routes = [
canActivate: [BCeidAuthGuard]
},
{
path: "relocation-type/:applicationId",
path: "relocation-type/:licenceId",
component: RelocationTypeComponent,
canActivate: [BCeidAuthGuard],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,12 @@ <h3 class="blue-header">{{getBusinessTypeName().toLocaleUpperCase()}} DETAILS</h
<input class="form-control" style="max-width: 450px; min-width: 250px;" type="text" disabled
[value]="account?.name || ''">
</app-field>
<!-- TODO: Re-implement this -->
<!-- <app-field label="Account URL(s)" [required]="false"
<app-field label="Account URL(s)" [required]="false"
[valid]="form.get('businessProfile.accountUrls').valid || !form.get('businessProfile.accountUrls').touched"
errorMessage="Please enter valid Account URL(s) separated by commas without spaces (i.e. www.gov.bc.ca,justice.gov.bc.ca)">
<input class="form-control" style="width: 350px;" type="text"
formControlName="accountUrls">
</app-field> -->
</app-field>
<app-field label="Business Number (9 digit number from the Canada Revenue Agency)" [required]="true"
[valid]="form.get('businessProfile.businessNumber').valid || !form.get('businessProfile.businessNumber').touched"
errorMessage="Please enter the business number (9 digits)" *ngIf="['Police'].indexOf(getBusinessTypeName()) == -1">
Expand Down Expand Up @@ -364,6 +363,22 @@ <h2>Update your BCeID information</h2>

</div>
</section>
<!-- 2024-09-13: Temporary disabling this until further development work can be completed to support this feature. -->
<!-- <section class="submit-container" style="background-color: #F2F2F2; border: none; color: #000;">
<h2 style="color: #000">Online Retailer Verification:</h2>
<div class="submit-content">
<p>To obtain the Online Retailer Verification button to place on your Website(s),
please select the "Generate ORV Code" button below. Once you have the code,
you will need to add it to your Website(s).
Consult your development team to add the code to your Website(s).
</p>
</div>
<div style="display: flex; justify-content: center;">
<button class="btn btn-primary" color="primary" (click)="openBadgeTemplateDialog()">
<span class="compact-button">Generate ORV Code</span>
</button>
</div>
</section> -->
<section class="submit-container" style="background-color: #F2F2F2; border: none; color: #000;">
<h2 style="color: #000">Collection Notice:</h2>
<div class="submit-content">
Expand All @@ -380,3 +395,14 @@ <h2 style="color: #000">Collection Notice:</h2>
</div>
</div>
</div>

<!-- Modal HTML -->
<!-- 2024-09-13: Temporary disabling this until further development work can be completed to support this feature. -->
<!-- <ng-template #badgeTemplateDialog>
<h2 mat-dialog-title class="centered-title">Generate ORV Code</h2>
<p>Paste this code into your website to create your Online Retailer Verification button:</p>
<pre><code>{{generatedOrvCode}}</code></pre>
<div mat-dialog-actions class="center-actions">
<button mat-raised-button color="primary" (click)="onCopy()">Copy</button>
</div>
</ng-template> -->
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,20 @@ hr {
}
}
}

.compact-button {
display: block;
line-height: 1.4;
margin: 0;
padding-top: 2px;
padding-bottom: 2px;
}

.centered-title {
text-align: center;
}

.center-actions {
display: flex;
justify-content: center;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { filter, map, catchError, takeWhile } from "rxjs/operators";
import { Component, OnInit, ViewChild, Input, EventEmitter, Output } from "@angular/core";
import { Component, OnInit, ViewChild, Input, TemplateRef, EventEmitter, Output } from "@angular/core";
import { User } from "@models/user.model";
import { ContactDataService } from "@services/contact-data.service";
import { Contact } from "@models/contact.model";
Expand All @@ -24,6 +24,10 @@ import { UserDataService } from "@services/user-data.service";
import { endOfToday } from "date-fns";
import { ApplicationDataService } from "@services/application-data.service";
import { ApplicationTypeNames } from "../../models/application-type.model";
import { MatDialog } from "@angular/material/dialog";
import { Clipboard } from '@angular/cdk/clipboard';
import { MatSnackBar } from '@angular/material/snack-bar';
import { environment } from "environments/environment";

// See the Moment.js docs for the meaning of these formats:
// https://momentjs.com/docs/#/displaying/format/
Expand All @@ -47,7 +51,7 @@ const ValidationFieldNameMap = {
'businessProfile.businessNumber': "Business Number",
'businessProfile.businessType': "Business Type",
'businessProfile.contactPhone': "Corporation Address Business Phone",
// 'businessProfile.accountUrls': "Account URL(s)", TODO: Re-implement this
'businessProfile.accountUrls': "Account URL(s)",
// 'businessProfile.contactEmail': 'Corporation Address Business Email',

'businessProfile.physicalAddressStreet': "Physical Address Street",
Expand Down Expand Up @@ -110,6 +114,10 @@ export class AccountProfileComponent extends FormBase implements OnInit {
validationMessages: string[];
renewalType: string;

@ViewChild('badgeTemplateDialog') badgeTemplateDialog: TemplateRef<any>;
// 2024-09-13: Temporary disabling this until further development work can be completed to support this feature.
// generatedOrvCode: string = `<a href="#" onclick="window.open('https://orgbook-app-b7aa30-dev.apps.silver.devops.gov.bc.ca/verify/BC123456', '_blank', 'width=800,height=600'); return false;">Verify Retailer</a>`

get contacts(): FormArray {
return this.form.get("otherContacts") as FormArray;
}
Expand All @@ -124,7 +132,10 @@ export class AccountProfileComponent extends FormBase implements OnInit {
private fb: FormBuilder,
private router: Router,
private route: ActivatedRoute,
private tiedHouseService: TiedHouseConnectionsDataService
private tiedHouseService: TiedHouseConnectionsDataService,
private dialog: MatDialog,
private clipboard: Clipboard,
private snackBar: MatSnackBar
) {
super();
this.route.paramMap.subscribe(params => {
Expand Down Expand Up @@ -166,7 +177,7 @@ export class AccountProfileComponent extends FormBase implements OnInit {
mailingAddressProvince: ["British Columbia", Validators.required],
mailingAddressCountry: ["Canada", Validators.required],
websiteUrl: [""],
// accountUrls: ["", Validators.pattern("^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/[^\s,]*)?(,(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/[^\s,]*)?)*$")], TODO: Re-implement this
accountUrls: ["", Validators.pattern("^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/[^\s,]*)?(,(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/[^\s,]*)?)*$")],
}),
contact: this.fb.group({
id: [],
Expand Down Expand Up @@ -347,6 +358,27 @@ export class AccountProfileComponent extends FormBase implements OnInit {
}
}

openBadgeTemplateDialog() {
this.dialog.open(this.badgeTemplateDialog, {
disableClose: true,
autoFocus: true,
width: "auto",
height: "auto",
maxWidth: "500px",
maxHeight: "80vh",
panelClass: 'custom-dialog-container'
});
}

// 2024-09-13: Temporary disabling this until further development work can be completed to support this feature.
// onCopy(): void {
// this.clipboard.copy(this.generatedOrvCode);
// this.snackBar.open('HTML copied to clipboard', null, {
// duration: 2000,
// });
// this.dialog.closeAll();
// }

save(): Observable<boolean> {
const _tiedHouse = this.tiedHouseFormData || {};
this.form.get("businessProfile").patchValue({ physicalAddressCountry: "Canada" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,27 @@ <h3 class="blue-header">Discretion Request</h3>
</div>
</section>
</div>
<div *ngIf="application?.applicationType?.name === ApplicationTypeNames.DormancyReinstatement">
<section>
<div>
<h3 class="blue-header">Supporting Documents</h3>
<div class="content-bottom">
<p>
Proof of valid interest (lease or land title) is required - attach a copy when submitting the form.
</p>

<app-file-uploader *ngIf="applicationId" documentType="Supporting Document"
fileTypes="FILE MUST BE IN PDF FORMAT." [disableUploads]="isOpenedByLGForApproval || lGHasApproved()"
[enableFileDeletion]="!isOpenedByLGForApproval && !lGHasApproved()" [multipleFiles]="true"
entityName="application" [useDocumentTypeForName]="true"
(numberOfUploadedFiles)="proofofValidInterestDocuments = $event" [entityId]="applicationId"
[uploadHeader]="'TO UPLOAD SUPPORTING DOCUMENTS'">
</app-file-uploader>

</div>
</div>
</section>
</div>
</section>

<!-- The label of the field will now be used to communicate the message of the alert -->
Expand Down Expand Up @@ -2298,8 +2319,8 @@ <h3 class="blue-header">{{this.application?.licenseType}} Tied House Exemption</
</p>
<section>
<app-file-uploader *ngIf="applicationId" documentType="Valid Interest"
fileTypes="FILE MUST BE IN PDF FORMAT." [disableUploads]="isOpenedByLGForApproval || lGHasApproved()"
[enableFileDeletion]="!isOpenedByLGForApproval && !lGHasApproved()" [multipleFiles]="false"
fileTypes="FILES MUST BE IN PDF FORMAT." [disableUploads]="isOpenedByLGForApproval || lGHasApproved()"
[enableFileDeletion]="!isOpenedByLGForApproval && !lGHasApproved()" [multipleFiles]="true"
entityName="application" [useDocumentTypeForName]="true"
(numberOfUploadedFiles)="uploadedValidInterestDocuments = $event" [entityId]="applicationId"
[uploadHeader]="'TO UPLOAD OWNERSHIP OR LEASE DOCUMENTS, DRAG FILES HERE OR'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,20 @@ export class ApplicationComponent extends FormBase implements OnInit {
}, {});

this.form.patchValue(noNulls);

// LCSD-7327: If the application is a permanent or temporary LRS relocation, set new address, LG/IN, and police fields to empty
if (this.application.applicationType.name === ApplicationTypeNames.LRSTransferofLocation || this.application.applicationType.name === ApplicationTypeNames.LRSTemporaryRelocation) {
// New Address Fields
this.form.get('establishmentAddressStreet').patchValue('');
this.form.get('establishmentAddressCity').patchValue('');
this.form.get('establishmentAddressPostalCode').patchValue('');
this.form.get('establishmentParcelId').patchValue('');
// LG/IN field
this.form.get('indigenousNation').patchValue('');
// Police Field
this.form.get('policeJurisdiction').patchValue('');
}

//LCSD-5764 get address from application if no assigned license
if (this.application != null && this.application.assignedLicence == null) {
if (this.application.establishmentAddressStreet != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
from your local government that the location is zoned appropriately to operate
a {{application?.licenseType}} licence.
</p>
<app-file-uploader *ngIf="application?.id" documentType="Zoning" fileTypes="FILE MUST BE IN PDF FORMAT."
[multipleFiles]="false" entityName="application" [useDocumentTypeForName]="true"
<app-file-uploader *ngIf="application?.id" documentType="Zoning" fileTypes="FILES MUST BE IN PDF FORMAT."
[multipleFiles]="true" entityName="application" [useDocumentTypeForName]="true"
(numberOfUploadedFiles)="uploadedZoningDocuments = $event" [entityId]="application?.id"
[uploadHeader]="'TO UPLOAD ZONING DOCUMENTS, DRAG FILES HERE OR'" #proofOfZoningDocs>
</app-file-uploader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,31 +584,15 @@ <h3 class="blue-header">Corporation Name Change</h3>
and certificate number on the certificate of incorporation have not
changed. The fee is 20 per licence.
</p>
<div class="">

<span>
<strong>Current licensee or holding company name (in full):</strong>
</span>

<mat-form-field class="ml-1 mr-2">
<mat-label>Company Name</mat-label>
<input matInput type="text" formControlName="description2">
<button mat-button *ngIf="value" matSuffix mat-icon-button aria-label="Clear" (click)="value=''">
<mat-icon>close</mat-icon>
</button>
</mat-form-field>

<span>Name changed to (in full):</span>

<mat-form-field class="ml-1 mr-2">
<mat-label>New Company Name</mat-label>
<input matInput type="text" formControlName="description3">
<button mat-button *ngIf="value" matSuffix mat-icon-button aria-label="Clear" (click)="value=''">
<mat-icon>close</mat-icon>
</button>
</mat-form-field>

</div>
<app-field label="Current licensee or holding company">
<input placeholder="Company Name" class="form-control" style="width: 350px;" type="text"
formControlName="description2" id="description2">
</app-field>
<app-field label="Name changed to (in full)" [valid]=" !showValidationMessages || form.get('description3').valid"
errorMessage="The following characters are not allowed in a Company Name: ~ # % & * { } \ : < > ? / + | &quot;">
<input placeholder="New Copmany Name" class="form-control" style="width: 350px;" type="text"
formControlName="description3" id="description3">
</app-field>
<h4>
Copy of the Certificate of Change of Name Form from BC Registrar of Companies
</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from "@angular/core";
import { FormBuilder, FormGroup } from "@angular/forms";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { MatSnackBar } from "@angular/material/snack-bar";
import { ActivatedRoute, Router } from "@angular/router";
import { AppState } from "@app/app-state/models/app-state";
Expand All @@ -16,6 +16,7 @@ import { ContactComponent, ContactData } from "@shared/components/contact/contac
import { faIdCard } from "@fortawesome/free-regular-svg-icons";
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";

export const SharepointNameRegex = /^[^~#%&*{}\\:<>?/+|""]*$/;
@Component({
selector: "app-permanent-change-to-a-licensee",
templateUrl: "./permanent-change-to-a-licensee.component.html",
Expand Down Expand Up @@ -113,7 +114,7 @@ export class PermanentChangeToALicenseeComponent extends FormBase implements OnI
lastNameOld: [""],
lastNameNew: [""],
description2: [""],
description3: [""],
description3: ["", Validators.pattern(SharepointNameRegex)],
authorizedToSubmit: ["", [this.customRequiredCheckboxValidator()]],
signatureAgreement: ["", [this.customRequiredCheckboxValidator()]],
});
Expand Down Expand Up @@ -170,7 +171,6 @@ export class PermanentChangeToALicenseeComponent extends FormBase implements OnI
this.appContactDisabled = true;
}
this.form.patchValue(application);

this.dataLoaded = true;
}
}
Expand Down Expand Up @@ -344,11 +344,11 @@ export class PermanentChangeToALicenseeComponent extends FormBase implements OnI
}));
}

showLiquorCostColumn(item: any){
showLiquorCostColumn(item: any) {
//const show = this.form.get(item.formControlName).value === true
const show = true
&& (item.name !== 'Internal Transfer of Shares')
&& !(item.name === 'Change of Directors or Officers' && this.account.businessType === 'PrivateCorporation');
&& (item.name !== 'Internal Transfer of Shares')
&& !(item.name === 'Change of Directors or Officers' && this.account.businessType === 'PrivateCorporation');
return show;
}

Expand All @@ -361,7 +361,8 @@ export class PermanentChangeToALicenseeComponent extends FormBase implements OnI
contactPersonFirstName: "Please enter the business contact's first name",
contactPersonLastName: "Please enter the business contact's last name",
contactPersonPhone: "Please enter the business contact's 10-digit phone number",
contactPersonRole: "Please enter the contact person role"
contactPersonRole: "Please enter the contact person role",
description3: "The following characters are not allowed in a Company Name: ~ # % & * { } \\ : < > ? / + | \"",
};
return errorMap;
}
Expand Down Expand Up @@ -403,7 +404,7 @@ const masterChangeList = [
{
name: "Change of Directors or Officers",
formControlName: "csChangeOfDirectorsOrOfficers",
availableTo: ["PrivateCorporation", "PublicCorporation", "Society", "Coop", "MilitaryMess","LocalGovernment", "University"],
availableTo: ["PrivateCorporation", "PublicCorporation", "Society", "Coop", "MilitaryMess", "LocalGovernment", "University"],
CannabisFee: 500,
LiquorFee: 220,
RequiresPHS: false,
Expand All @@ -418,7 +419,7 @@ const masterChangeList = [
name: "Name Change, Licensee -- Corporation",
otherName: "Name Change, Licensee -- Organization",
formControlName: "csNameChangeLicenseeCorporation",
availableTo: ["PrivateCorporation", "PublicCorporation", "SoleProprietorship", "Coop", "MilitaryMess","University"],
availableTo: ["PrivateCorporation", "PublicCorporation", "SoleProprietorship", "Coop", "MilitaryMess", "University"],
CannabisFee: 220,
LiquorFee: 220,
RequiresPHS: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class PoliceSummaryComponent extends FormBase implements OnInit {
if (loc.eventDates?.length > 0) {
const formatterdDates = [];
loc.eventDates.forEach(ed => {
ed = Object.assign(new SepSchedule(null), ed);
ed = Object.assign(new SepSchedule(null, null), ed);
formatterdDates.push({ ed, ...ed.toEventFormValue() });
});
loc.eventDates = formatterdDates;
Expand Down
Loading

0 comments on commit d4272da

Please sign in to comment.