From 18a681a0735b3cb7e95cab6aa09d12fe2c5f93d5 Mon Sep 17 00:00:00 2001 From: carolcarpenter <47428671+carolcarpenter@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:00:18 -0800 Subject: [PATCH] Metal dealers (#2069) # Description This PR includes the following proposed change(s): - start work on metal dealers --- .../ClientApp/src/app/app-routes.ts | 2 + .../ClientApp/src/app/app-routing.module.ts | 7 + .../metal-dealers-application.helper.ts | 165 +++++++++++++ .../metal-dealers-application.service.ts | 34 +++ .../business-bc-branches.component.ts | 25 +- .../metal-dealers-base.component.ts | 25 ++ .../metal-dealers-main.component.ts | 55 +++++ .../metal-dealers-register.component.ts | 166 +++++++++++++ ...dealers-registration-received.component.ts | 83 +++++++ .../modal-metal-dealers-branch.component.ts | 147 ++++++++++++ .../step-metal-dealers-branches.component.ts | 224 ++++++++++++++++++ ...etal-dealers-business-address.component.ts | 71 ++++++ ...-dealers-business-information.component.ts | 150 ++++++++++++ .../step-metal-dealers-checklist.component.ts | 53 +++++ .../step-metal-dealers-consent.component.ts | 119 ++++++++++ .../step-metal-dealers-summary.component.ts | 205 ++++++++++++++++ .../metal-dealers-and-recyclers-routes.ts | 13 + ...al-dealers-and-recyclers-routing.module.ts | 39 +++ .../metal-dealers-and-recyclers.module.ts | 33 +++ .../components/wizard-footer.component.ts | 15 +- .../ClientApp/src/app/shared/shared.module.ts | 2 +- 21 files changed, 1609 insertions(+), 24 deletions(-) create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/metal-dealers-application.helper.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/metal-dealers-application.service.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-base.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-main.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-register.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-registration-received.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/modal-metal-dealers-branch.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-branches.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-business-address.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-business-information.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-checklist.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-consent.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-summary.component.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routes.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routing.module.ts create mode 100644 src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers.module.ts diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routes.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routes.ts index e7c007c9a..374200d61 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routes.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routes.ts @@ -1,5 +1,6 @@ import { BusinessLicenceApplicationRoutes } from './modules/business-licence-application/business-license-application-routes'; import { ControllingMemberCrcRoutes } from './modules/controlling-member-crc/controlling-member-crc-routes'; +import { MetalDealersAndRecyclersRoutes } from './modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routes'; import { PersonalLicenceApplicationRoutes } from './modules/personal-licence-application/personal-licence-application-routes'; import { SecurityLicenceStatusVerificationRoutes } from './modules/security-licence-status-verification/security-licence-status-verification-routes'; @@ -8,6 +9,7 @@ export class AppRoutes { public static readonly BUSINESS_LICENCE_APPLICATION = BusinessLicenceApplicationRoutes.MODULE_PATH; public static readonly CONTROLLING_MEMBERS_CRC = ControllingMemberCrcRoutes.MODULE_PATH; public static readonly SECURITY_LICENCE_STATUS_VERIFICATION = SecurityLicenceStatusVerificationRoutes.MODULE_PATH; + public static readonly METAL_DEALERS_AND_RECYCLERS = MetalDealersAndRecyclersRoutes.MODULE_PATH; public static readonly LANDING = ''; public static readonly ACCESS_DENIED = 'access-denied'; public static readonly INVITATION_DENIED = 'invitation-denied'; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routing.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routing.module.ts index fbf53e455..bb4e12ea9 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routing.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routing.module.ts @@ -33,6 +33,13 @@ const routes: Routes = [ (m) => m.SecurityLicenceStatusVerificationModule ), }, + { + path: AppRoutes.METAL_DEALERS_AND_RECYCLERS, + loadChildren: () => + import('./modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers.module').then( + (m) => m.MetalDealersAndRecyclersModule + ), + }, { path: AppRoutes.ACCESS_DENIED, component: AccessDeniedComponent, diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/metal-dealers-application.helper.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/metal-dealers-application.helper.ts new file mode 100644 index 000000000..3bebfaaf1 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/metal-dealers-application.helper.ts @@ -0,0 +1,165 @@ +import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import { CommonApplicationHelper } from '@app/core/services/common-application.helper'; +import { ConfigService } from '@app/core/services/config.service'; +import { FileUtilService } from '@app/core/services/file-util.service'; +import { UtilService } from '@app/core/services/util.service'; +import { FormControlValidators } from '@app/core/validators/form-control.validators'; +import { FormGroupValidators } from '@app/core/validators/form-group.validators'; +import { FormatDatePipe } from '@app/shared/pipes/format-date.pipe'; +import { SPD_CONSTANTS } from '../constants/constants'; + +export abstract class MetalDealersApplicationHelper extends CommonApplicationHelper { + businessOwnerFormGroup: FormGroup = this.formBuilder.group({ + legalBusinessName: new FormControl('', [FormControlValidators.required]), + tradeName: new FormControl('', [FormControlValidators.required]), + givenName: new FormControl(''), + middleName: new FormControl(''), + surname: new FormControl('', [FormControlValidators.required]), + }); + + businessManagerFormGroup: FormGroup = this.formBuilder.group({ + givenName: new FormControl(''), + middleName: new FormControl(''), + surname: new FormControl('', [FormControlValidators.required]), + phoneNumber: new FormControl('', [FormControlValidators.required]), + emailAddress: new FormControl('', [FormControlValidators.email]), + }); + + businessAddressFormGroup: FormGroup = this.formBuilder.group({ + addressSelected: new FormControl(false), + addressLine1: new FormControl(''), + addressLine2: new FormControl(''), + city: new FormControl(''), + postalCode: new FormControl(''), + province: new FormControl(''), + country: new FormControl(''), + }); + + businessMailingAddressFormGroup: FormGroup = this.formBuilder.group( + { + addressSelected: new FormControl(false), + addressLine1: new FormControl(''), + addressLine2: new FormControl(''), + city: new FormControl(''), + postalCode: new FormControl(''), + province: new FormControl(''), + country: new FormControl(''), + isAddressTheSame: new FormControl(false), + }, + { + validators: [ + FormGroupValidators.conditionalDefaultRequiredTrueValidator( + 'addressSelected', + (_form) => _form.get('isAddressTheSame')?.value != true + ), + FormGroupValidators.conditionalRequiredValidator( + 'addressLine1', + (_form) => _form.get('isAddressTheSame')?.value != true + ), + FormGroupValidators.conditionalRequiredValidator( + 'city', + (_form) => _form.get('isAddressTheSame')?.value != true + ), + FormGroupValidators.conditionalRequiredValidator( + 'postalCode', + (_form) => _form.get('isAddressTheSame')?.value != true + ), + FormGroupValidators.conditionalRequiredValidator( + 'province', + (_form) => _form.get('isAddressTheSame')?.value != true + ), + FormGroupValidators.conditionalRequiredValidator( + 'country', + (_form) => _form.get('isAddressTheSame')?.value != true + ), + ], + } + ); + + branchesFormGroup: FormGroup = this.formBuilder.group({ + branches: this.formBuilder.array([]), + }); + + branchFormGroup: FormGroup = this.formBuilder.group({ + addressSelected: new FormControl(false, [Validators.requiredTrue]), + addressLine1: new FormControl('', [FormControlValidators.required]), + addressLine2: new FormControl(''), + city: new FormControl('', [FormControlValidators.required]), + postalCode: new FormControl('', [FormControlValidators.required]), + province: new FormControl('', [FormControlValidators.required]), + country: new FormControl('', [ + FormControlValidators.required, + FormControlValidators.requiredValue(SPD_CONSTANTS.address.countryCA, SPD_CONSTANTS.address.countryCanada), + ]), + givenName: new FormControl(''), + middleName: new FormControl(''), + surname: new FormControl('', [FormControlValidators.required]), + phoneNumber: new FormControl('', [FormControlValidators.required]), + emailAddress: new FormControl('', [FormControlValidators.email]), + }); + + consentAndDeclarationFormGroup: FormGroup = this.formBuilder.group({ + check1: new FormControl(null, [Validators.requiredTrue]), + agreeToCompleteAndAccurate: new FormControl(null, [Validators.requiredTrue]), + dateSigned: new FormControl({ value: null, disabled: true }), + captchaFormGroup: new FormGroup({ + token: new FormControl('', FormControlValidators.required), + }), + }); + + constructor( + formBuilder: FormBuilder, + protected configService: ConfigService, + protected formatDatePipe: FormatDatePipe, + protected utilService: UtilService, + protected fileUtilService: FileUtilService + ) { + super(formBuilder); + } + + getFullNameWithMiddle( + givenName: string | null | undefined, + middleName: string | null | undefined, + surname: string | null | undefined + ): string { + const userNameArray: string[] = []; + if (givenName) { + userNameArray.push(givenName); + } + if (middleName) { + userNameArray.push(middleName); + } + if (surname) { + userNameArray.push(surname); + } + return userNameArray.join(' '); + } + + getSummarybusinessOwnerDataname(modelData: any): string { + return this.getFullNameWithMiddle( + modelData.businessOwnerData.givenName, + modelData.businessOwnerData.middleName, + modelData.businessOwnerData.surname + ); + } + getSummarybusinessOwnerDatalegalBusinessName(modelData: any): string { + return modelData.businessOwnerData.legalBusinessName ?? ''; + } + getSummarybusinessOwnerDatatradeName(modelData: any): string { + return modelData.businessOwnerData.tradeName ?? ''; + } + + getSummarybusinessManagerDataname(modelData: any): string { + return this.getFullNameWithMiddle( + modelData.businessManagerData.givenName, + modelData.businessManagerData.middleName, + modelData.businessManagerData.surname + ); + } + getSummarybusinessManagerDataphoneNumber(modelData: any): string { + return modelData.businessManagerData.phoneNumber ?? ''; + } + getSummarybusinessManagerDataemailAddress(modelData: any): string { + return modelData.businessManagerData.emailAddress ?? ''; + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/metal-dealers-application.service.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/metal-dealers-application.service.ts new file mode 100644 index 000000000..d9b12b528 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/metal-dealers-application.service.ts @@ -0,0 +1,34 @@ +import { Injectable } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { FormatDatePipe } from '@app/shared/pipes/format-date.pipe'; +import { BehaviorSubject } from 'rxjs'; +import { ConfigService } from './config.service'; +import { FileUtilService } from './file-util.service'; +import { MetalDealersApplicationHelper } from './metal-dealers-application.helper'; +import { UtilService } from './util.service'; + +@Injectable({ + providedIn: 'root', +}) +export class MetalDealersApplicationService extends MetalDealersApplicationHelper { + modelValueChanges$: BehaviorSubject = new BehaviorSubject(false); + + modelFormGroup: FormGroup = this.formBuilder.group({ + businessOwnerData: this.businessOwnerFormGroup, + businessManagerData: this.businessManagerFormGroup, + businessAddressData: this.businessAddressFormGroup, + businessMailingAddressData: this.businessMailingAddressFormGroup, + branchesData: this.branchesFormGroup, + consentAndDeclarationData: this.consentAndDeclarationFormGroup, + }); + + constructor( + formBuilder: FormBuilder, + configService: ConfigService, + formatDatePipe: FormatDatePipe, + utilService: UtilService, + fileUtilService: FileUtilService + ) { + super(formBuilder, configService, formatDatePipe, utilService, fileUtilService); + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/business-licence-application/components/business-bc-branches.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/business-licence-application/components/business-bc-branches.component.ts index 3aa906f17..f7ef0a4d9 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/business-licence-application/components/business-bc-branches.component.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/business-licence-application/components/business-bc-branches.component.ts @@ -24,8 +24,8 @@ export interface BranchResponse { } @Component({ - selector: 'app-business-bc-branches', - template: ` + selector: 'app-business-bc-branches', + template: `
Does your business have any branches in B.C.?
@@ -62,9 +62,7 @@ export interface BranchResponse { - City + City City: {{ branch.city | default }} @@ -72,12 +70,7 @@ export interface BranchResponse { - Manager + Manager Manager: {{ branch.branchManager | default }} @@ -128,8 +121,8 @@ export interface BranchResponse {
`, - styles: [ - ` + styles: [ + ` .mat-column-action1 { min-width: 150px; max-width: 150px; @@ -146,9 +139,9 @@ export interface BranchResponse { } } `, - ], - animations: [showHideTriggerSlideAnimation], - standalone: false + ], + animations: [showHideTriggerSlideAnimation], + standalone: false, }) export class BusinessBcBranchesComponent implements OnInit, LicenceChildStepperStepComponent { booleanTypeCodes = BooleanTypeCode; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-base.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-base.component.ts new file mode 100644 index 000000000..32b889cdf --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-base.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonApplicationService } from '@app/core/services/common-application.service'; + +@Component({ + selector: 'app-metal-dealers-base', + template: ` +
+ +
+
+ +
+
+
+ `, + styles: ``, + standalone: false, +}) +export class MetalDealersBaseComponent implements OnInit { + constructor(private commonApplicationService: CommonApplicationService) {} + + ngOnInit(): void { + this.commonApplicationService.setApplicationTitleText('Metal Dealers & Recyclers', 'Metal Dealers & Recyclers'); + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-main.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-main.component.ts new file mode 100644 index 000000000..8c8b516b5 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-main.component.ts @@ -0,0 +1,55 @@ +import { Component } from '@angular/core'; +import { Router } from '@angular/router'; +import { MetalDealersAndRecyclersRoutes } from '@app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routes'; + +@Component({ + selector: 'app-metal-dealers-main', + template: ` +
+
+
+
+
+

Metal Dealers & Recyclers

+
+
+ + +
Registering as a metal recycling dealer
+ +
+
+

+ Metal theft puts public safety at risk because it interferes with telephone services, emergency + communications and transportation systems, and may expose the public to electrocution from live wires. +

+ +

+ The Province passed the Metal Dealers and Recyclers Act and + Metal Dealers Recyclers Regulation. The act and regulation help deter and track metal theft, and + protect the personal information of scrap metal sellers. They also increase the accountability of + dealers and sellers and create consistent, minimum requirements across the province. +

+
+
+ +
+
+
+
+
+ `, + styles: ``, + standalone: false, +}) +export class MetalDealersMainComponent { + constructor(private router: Router) {} + + onRegister(): void { + this.router.navigateByUrl( + MetalDealersAndRecyclersRoutes.path(MetalDealersAndRecyclersRoutes.METAL_DEALERS_AND_RECYCLERS_REGISTER) + ); + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-register.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-register.component.ts new file mode 100644 index 000000000..975e5ccf6 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-register.component.ts @@ -0,0 +1,166 @@ +import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout'; +import { StepperSelectionEvent } from '@angular/cdk/stepper'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { BaseWizardComponent } from '@app/core/components/base-wizard.component'; +import { CommonApplicationService } from '@app/core/services/common-application.service'; +import { distinctUntilChanged } from 'rxjs'; +import { StepMetalDealersSummaryComponent } from './step-metal-dealers-summary.component'; + +@Component({ + selector: 'app-metal-dealers-register', + template: ` + + + Checklist + + + + + + + + Business Information + + + + + + + + Business Addresses + + + + + + + + Branch Offices + + + + + + + + Review + + + + + + + + Consent + + + + + + + `, + styles: ``, + standalone: false, +}) +export class MetalDealersRegisterComponent extends BaseWizardComponent implements OnInit { + step1Complete = true; + + readonly STEP_CHECKLIST = 0; + readonly STEP_LICENCE_CONFIRMATION = 1; + readonly STEP_LICENCE_EXPIRED = 2; + readonly STEP_LICENCE_BRANDING = 3; + readonly STEP_LICENCE_LIABILITY = 4; + + @ViewChild(StepMetalDealersSummaryComponent) stepReview!: StepMetalDealersSummaryComponent; + + constructor( + override breakpointObserver: BreakpointObserver, + private commonApplicationService: CommonApplicationService + ) { + super(breakpointObserver); + } + + ngOnInit(): void { + this.commonApplicationService.setApplicationTitleText( + 'Metal Dealers & Recyclers Business Registration', + 'Registration' + ); + + this.breakpointObserver + .observe([Breakpoints.Large, Breakpoints.Medium, Breakpoints.Small, '(min-width: 500px)']) + .pipe(distinctUntilChanged()) + .subscribe(() => this.breakpointChanged()); + } + + onCancel() {} + + onGoToStep(step: number) { + this.stepper.selectedIndex = step; + } + + onGoToPreviousStep() { + this.stepper.previous(); + } + + onGoToNextStep() { + this.stepper.next(); + } + + onGoToFirstStep() { + this.stepper.selectedIndex = 0; + } + + onGoToLastStep() { + this.stepper.selectedIndex = this.stepper.steps.length - 1; + } + + onFormValidNextStep(_formNumber: number): void { + // const isValid = this.dirtyForm(formNumber); + // if (!isValid) return; + + this.stepper.next(); + } + + override onStepSelectionChange(event: StepperSelectionEvent) { + this.stepReview.onUpdateData(); + + super.onStepSelectionChange(event); + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-registration-received.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-registration-received.component.ts new file mode 100644 index 000000000..0f317f7bb --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/metal-dealers-registration-received.component.ts @@ -0,0 +1,83 @@ +import { Component } from '@angular/core'; +import { SPD_CONSTANTS } from '@app/core/constants/constants'; + +@Component({ + selector: 'app-metal-dealers-registration-received', + template: ` + +
+
+
+
+
+ +

Submission Received

+
+ +

Application Saved

+
+
+
+ + + + +

+ Your consent for a criminal record check has been received, and will be added to the business + application. +

+

We will contact you if we need more information.

+
+
+ + +

Your application for a criminal record check has been saved.

+

Click on the invitation link again to continue working on and submitting your application.

+
+
+
+
+ +
+
+ Close +
+
+
+
+ `, + styles: [], + standalone: false, +}) +export class MetalDealersRegistrationReceivedComponent { + formalDateFormat = SPD_CONSTANTS.date.formalDateFormat; + contactSpdUrl = SPD_CONSTANTS.urls.contactSpdUrl; + + isSubmit: boolean | null = null; + + constructor() // private location: Location // private controllingMembersService: ControllingMemberCrcService, // private router: Router, + {} + + // ngOnInit(): void { + // if (!this.controllingMembersService.initialized) { + // this.router.navigateByUrl( + // ControllingMemberCrcRoutes.path(ControllingMemberCrcRoutes.CONTROLLING_MEMBER_INVITATION) + // ); + // return; + // } + // const isSubmit = (this.location.getState() as any).isSubmit; + // if (!isSubmit) { + // console.debug('ControllingMemberSubmissionReceivedComponent - missing isSubmit'); + // this.router.navigateByUrl( + // ControllingMemberCrcRoutes.path(ControllingMemberCrcRoutes.CONTROLLING_MEMBER_INVITATION) + // ); + // return; + // } + // this.isSubmit = isSubmit === BooleanTypeCode.Yes; + // this.controllingMembersService.reset(); + // } + + onPrint(): void { + window.print(); + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/modal-metal-dealers-branch.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/modal-metal-dealers-branch.component.ts new file mode 100644 index 000000000..8820f3a4b --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/modal-metal-dealers-branch.component.ts @@ -0,0 +1,147 @@ +import { Component, Inject, OnInit } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { SPD_CONSTANTS } from '@app/core/constants/constants'; +import { MetalDealersApplicationService } from '@app/core/services/metal-dealers-application.service'; +import { FormErrorStateMatcher } from '@app/shared/directives/form-error-state-matcher.directive'; + +export interface MetalDealersAndRecyclersBranchResponse { + isCreate?: null | boolean; + branchId?: null | number; + addressSelected?: null | boolean; + addressLine1?: null | string; + addressLine2?: null | string; + city?: null | string; + country?: null | string; + postalCode?: null | string; + province?: null | string; + givenName?: null | string; + middleName?: null | string; + surname?: null | string; + phoneNumber?: null | string; + emailAddress?: null | string; +} + +@Component({ + selector: 'app-modal-metal-dealers-branch', + template: ` +
{{ title }}
+ +
+
Branch Manager
+
+ The Branch Manager is the person responsible for the day to day management of the business +
+
+
+ + Manager's Given Name (optional) + + +
+ +
+ + Manager's Middle Name (optional) + + +
+ +
+ + Manager's Surname + + This is required + +
+ +
+ + Manager's Phone Number + + This is required + This must be 10 digits + +
+ +
+ + Manager's Email (optional) + + Must be a valid email address + +
+
+
+ +
Branch Address
+ +
+ + +
+
+ +
+
+ +
+
+
+ `, + styles: [], + standalone: false, +}) +export class ModalMetalDealersBranchComponent implements OnInit { + title = ''; + isCreate = false; + + phoneMask = SPD_CONSTANTS.phone.displayMask; + + form = this.metalDealersAndRecyclersApplicationService.branchFormGroup; + + matcher = new FormErrorStateMatcher(); + + constructor( + private dialogRef: MatDialogRef, + private metalDealersAndRecyclersApplicationService: MetalDealersApplicationService, + @Inject(MAT_DIALOG_DATA) public dialogData: MetalDealersAndRecyclersBranchResponse + ) {} + + ngOnInit(): void { + this.form.reset(); + this.form.patchValue(this.dialogData); + + this.isCreate = this.dialogData.isCreate ?? false; + + if (this.isCreate) { + this.title = 'Add Branch'; + } else { + this.title = 'Edit Branch'; + this.form.patchValue({ addressSelected: true }); + } + } + + onSave(): void { + this.form.markAllAsTouched(); + if (!this.form.valid) return; + + this.dialogRef.close({ + data: this.form.value, + }); + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-branches.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-branches.component.ts new file mode 100644 index 000000000..f467ce5c2 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-branches.component.ts @@ -0,0 +1,224 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder, FormGroup } from '@angular/forms'; +import { MatDialog } from '@angular/material/dialog'; +import { MatTableDataSource } from '@angular/material/table'; +import { MetalDealersApplicationService } from '@app/core/services/metal-dealers-application.service'; +import { DialogComponent, DialogOptions } from '@app/shared/components/dialog.component'; +import { + MetalDealersAndRecyclersBranchResponse, + ModalMetalDealersBranchComponent, +} from './modal-metal-dealers-branch.component'; + +@Component({ + selector: 'app-step-metal-dealers-branches', + template: ` + +
+
+ + + Address Line 1 + + Address Line 1: + {{ branch.addressLine1 | default }} + + + + + City + + City: + {{ branch.city | default }} + + + + + Manager + + Manager: + {{ branch | fullname | default }} + + + + + + + + + + + + + + + + + + + + + + +
No branches have been entered
+
+ + +
+
+
+ `, + styles: [ + ` + .mat-column-action1 { + min-width: 150px; + max-width: 150px; + .table-button { + min-width: 130px; + } + } + + .mat-column-action2 { + min-width: 150px; + max-width: 150px; + .table-button { + min-width: 130px; + } + } + `, + ], + standalone: false, +}) +export class StepMetalDealersBranchesComponent implements OnInit { + branchesExist = false; + + dataSource!: MatTableDataSource; + columns: string[] = ['addressLine1', 'city', 'branchManager', 'action1', 'action2']; + + form = this.metalDealersApplicationService.branchesFormGroup; + + constructor( + private metalDealersApplicationService: MetalDealersApplicationService, + private formBuilder: FormBuilder, + private dialog: MatDialog + ) {} + + ngOnInit(): void { + this.dataSource = new MatTableDataSource(this.branchesArray.value); + this.branchesExist = this.dataSource.data.length > 0; + } + + onEditBranch(branch: MetalDealersAndRecyclersBranchResponse): void { + this.branchDialog(branch, false); + } + + onRemoveBranch(index: number) { + const data: DialogOptions = { + icon: 'warning', + title: 'Confirmation', + message: 'Are you sure you want to remove this branch?', + actionText: 'Remove', + cancelText: 'Cancel', + }; + + this.dialog + .open(DialogComponent, { data }) + .afterClosed() + .subscribe((response: boolean) => { + if (response) { + this.branchesArray.removeAt(index); + this.dataSource = new MatTableDataSource(this.branchesArray.value); + this.branchesExist = this.dataSource.data.length > 0; + } + }); + } + + onAddBranch(): void { + this.branchDialog({}, true); + } + + private branchDialog(dialogOptions: MetalDealersAndRecyclersBranchResponse, isCreate: boolean): void { + dialogOptions.isCreate = isCreate; + + this.dialog + .open(ModalMetalDealersBranchComponent, { + width: '1000px', + data: dialogOptions, + autoFocus: true, + }) + .afterClosed() + .subscribe((resp) => { + const branchData = resp?.data; + if (branchData) { + if (isCreate) { + this.branchesArray.push(this.newBranchRow(branchData)); + } else { + const branchIndex = this.branchesArray.value.findIndex( + (item: any) => item.branchId == dialogOptions.branchId! + ); + this.patchBranchData(branchIndex, branchData); + } + + this.dataSource.data = this.branchesArray.value; + this.branchesExist = this.dataSource.data.length > 0; + } + }); + } + + private newBranchRow(branchData: any): FormGroup { + return this.formBuilder.group({ + addressLine1: [branchData.addressLine1], + addressLine2: [branchData.addressLine2], + city: [branchData.city], + postalCode: [branchData.postalCode], + province: [branchData.province], + country: [branchData.country], + givenName: [branchData.givenName], + middleName: [branchData.middleName], + surname: [branchData.surname], + phoneNumber: [branchData.phoneNumber], + emailAddress: [branchData.emailAddress], + }); + } + + private patchBranchData(branchIndex: number, branchData: any) { + if (branchIndex < 0) { + return; + } + + this.branchesArray.at(branchIndex).patchValue({ + addressLine1: branchData.addressLine1, + addressLine2: branchData.addressLine2, + city: branchData.city, + postalCode: branchData.postalCode, + province: branchData.province, + country: branchData.country, + givenName: branchData.givenName, + middleName: branchData.middleName, + surname: branchData.surname, + phoneNumber: branchData.phoneNumber, + emailAddress: branchData.emailAddress, + }); + } + + get branchesArray(): FormArray { + return this.form.get('branches'); + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-business-address.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-business-address.component.ts new file mode 100644 index 000000000..60520ea45 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-business-address.component.ts @@ -0,0 +1,71 @@ +import { Component } from '@angular/core'; +import { MetalDealersApplicationService } from '@app/core/services/metal-dealers-application.service'; + +@Component({ + selector: 'app-step-metal-dealers-business-address', + template: ` + +
+
+
+
+
+ + + + Business Address + + +
+
This address is your business address.
+ + +
+
+
+
+
+ +
+
+ + + + Business Mailing Address + + +
+
+ Provide your business mailing address, if different from your business address. +
+ + +
+
+
+
+
+
+
+
+
+ `, + styles: [], + standalone: false, +}) +export class StepMetalDealersBusinessAddressComponent { + businessAddressForm = this.metalDealersApplicationService.businessAddressFormGroup; + businessMailingAddressForm = this.metalDealersApplicationService.businessMailingAddressFormGroup; + + constructor(private metalDealersApplicationService: MetalDealersApplicationService) {} + + isFormValid(): boolean { + this.businessAddressForm.markAllAsTouched(); + this.businessMailingAddressForm.markAllAsTouched(); + return this.businessAddressForm.valid && this.businessMailingAddressForm.valid; + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-business-information.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-business-information.component.ts new file mode 100644 index 000000000..d83bf75fe --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-business-information.component.ts @@ -0,0 +1,150 @@ +import { Component } from '@angular/core'; +import { SPD_CONSTANTS } from '@app/core/constants/constants'; +import { MetalDealersApplicationService } from '@app/core/services/metal-dealers-application.service'; +import { FormErrorStateMatcher } from '@app/shared/directives/form-error-state-matcher.directive'; + +@Component({ + selector: 'app-step-metal-dealers-business-information', + template: ` + +
+
+
+
+
Business Owner
+
+ + Owner's Given Name (optional) + + +
+ +
+ + Owner's Middle Name (optional) + + +
+ +
+ + Owner's Surname + + + This is required + + +
+ +
+ + Legal Business Name + + + This is required + + +
+
+ + Trade Name or "doing business as" Name + + + This is required + + +
+
+
+ + +
+
+
Business Manager
+
+ The Business Manager is the person responsible for the day to day management of the business +
+ +
+ + Manager's Given Name (optional) + + +
+ +
+ + Manager's Middle Name (optional) + + +
+ +
+ + Manager's Surname + + + This is required + + +
+ +
+ + Manager's Phone Number + + This is required + This must be 10 digits + +
+ +
+ + Manager's Email Address (if any) + + + Must be a valid email address + + +
+
+
+
+
+
+ `, + styles: [], + standalone: false, +}) +export class StepMetalDealersBusinessInformationComponent { + matcher = new FormErrorStateMatcher(); + + phoneMask = SPD_CONSTANTS.phone.displayMask; + + businessOwnerFormGroup = this.metalDealersApplicationService.businessOwnerFormGroup; + businessManagerFormGroup = this.metalDealersApplicationService.businessManagerFormGroup; + + constructor(private metalDealersApplicationService: MetalDealersApplicationService) {} + + isFormValid(): boolean { + this.businessOwnerFormGroup.markAllAsTouched(); + this.businessManagerFormGroup.markAllAsTouched(); + return this.businessOwnerFormGroup.valid && this.businessManagerFormGroup.valid; + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-checklist.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-checklist.component.ts new file mode 100644 index 000000000..602d21709 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-checklist.component.ts @@ -0,0 +1,53 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-step-metal-dealers-checklist', + template: ` + +
+
+ + +
Terms and Conditions of Registration:
+
    +
  • No registration fee
  • +
  • Term of registration is 3 years
  • +
  • + Must provide business name, address, telephone number, and email address (if any) +
  • +
  • Must provide address of additional business locations
  • +
  • + Must provide the identity of person(s) responsible for the daily management of the business +
  • +
  • + Must provide copies of business licence registration documents +
  • +
  • + Must display registration certificate in a conspicuous place at each of the business locations +
  • +
  • + Registration must not be transferred unless the Registrar consents in writing to the transfer +
  • +
  • + On the expiry, cancellation, suspension or refusal of a renewal of a registration, the registrant must + immediately surrender the registration and all duplicates to the registrar +
  • +
  • + The registrant must not carry on a business using a name other than the name specified in the registration +
  • +
+
+
+
+ `, + styles: [ + ` + .metal-dealers-checklist-label { + color: var(--color-primary); + line-height: 2em; + } + `, + ], + standalone: false, +}) +export class StepMetalDealersChecklistComponent {} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-consent.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-consent.component.ts new file mode 100644 index 000000000..b89b8844d --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-consent.component.ts @@ -0,0 +1,119 @@ +import { Component } from '@angular/core'; +import { FormGroup } from '@angular/forms'; +import { MetalDealersApplicationService } from '@app/core/services/metal-dealers-application.service'; +import { UtilService } from '@app/core/services/util.service'; + +@Component({ + selector: 'app-step-metal-dealers-consent', + template: ` + +
+
+
+
+
+ + I HEREBY CERTIFY THAT I have read and understand all portions of this application form. The + information set out by me in this application is true and correct to the best of my knowledge and + belief. I have read and understand the Metal Dealers and Recyclers Act and Regulations and I am aware + of and understand the terms and conditions of registration and the conditions that may be placed on me + as a registered business under the Act. + + This is required + +
+
+ +
+
+ + Declaration & Sign Off + + + This is required + +
+
+ +
+
+ + Date Signed + + This is required + +
+
+ +
+
+
+ + This is required + +
+
+
+ + +
+
+
+
+ `, + styles: [], + standalone: false, +}) +export class StepMetalDealersConsentComponent { + collectionNoticeActName = ''; + collectionNoticeActNameWithAbbrev = ''; + check3Name = ''; + check1Name = ''; + + form: FormGroup = this.metalDealersApplicationService.consentAndDeclarationFormGroup; + + constructor( + private utilService: UtilService, + private metalDealersApplicationService: MetalDealersApplicationService + ) {} + + isFormValid(): boolean { + this.form.markAllAsTouched(); + return this.form.valid; + } + + onCheckboxChange(): void { + const data = this.form.value; + if (data.agreeToCompleteAndAccurate) { + this.form.controls['dateSigned'].setValue(this.utilService.getDateString(new Date())); + } else { + this.form.controls['dateSigned'].setValue(''); + } + } + + get captchaFormGroup(): FormGroup { + return this.form.get('captchaFormGroup') as FormGroup; + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-summary.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-summary.component.ts new file mode 100644 index 000000000..7d8491045 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/components/step-metal-dealers-summary.component.ts @@ -0,0 +1,205 @@ +import { Component, EventEmitter, OnInit, Output } from '@angular/core'; +import { MetalDealersApplicationService } from '@app/core/services/metal-dealers-application.service'; + +@Component({ + selector: 'app-step-metal-dealers-summary', + template: ` + +
+
+ + + + + +
Business Information
+ +
+
+
+ +
+
Business Owner
+
+
+
Business Owner Name
+
+ {{ businessOwnerDataname | default }} +
+
+
+
Legal Business Name
+
+ {{ businessOwnerDatalegalBusinessName | default }} +
+
+
+
Trade Name or "doing business as" Name
+
+ {{ businessOwnerDatatradeName | default }} +
+
+
+
Business Manager
+
+
+
Business Manager Name
+
+ {{ businessManagerDataname | default }} +
+
+
+
Phone Number
+
+ {{ businessManagerDataname | default }} +
+
+
+
Email Address
+
+ {{ businessManagerDataname | default }} +
+
+
+
+
+ + + + + +
Business Addresses
+ +
+
+
+ +
+
+ + + + + +
Branch Offices
+ +
+
+
+ +
+
+
+
+
+
+ `, + styles: [ + ` + .mat-expansion-panel { + border-radius: 0; + } + + .mat-expansion-panel-header { + height: unset; + } + + .panel-body { + margin-top: 10px; + margin-bottom: 10px; + } + + .review-panel-title { + width: 100%; + + .mat-toolbar { + background-color: var(--color-primary-lighter) !important; + color: var(--color-primary-dark) !important; + padding: 0; + + .panel-header { + white-space: normal; + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + } + } + + .go-to-step-button { + width: 35px; + height: 35px; + } + `, + ], + standalone: false, +}) +export class StepMetalDealersSummaryComponent implements OnInit { + modelData: any = {}; + + @Output() editStep: EventEmitter = new EventEmitter(); + + constructor(private metalDealersApplicationService: MetalDealersApplicationService) {} + + ngOnInit(): void { + this.modelData = { + ...this.metalDealersApplicationService.modelFormGroup.getRawValue(), + }; + } + + onEditStep(stepNumber: number) { + this.editStep.emit(stepNumber); + } + + onUpdateData(): void { + this.modelData = { + ...this.metalDealersApplicationService.modelFormGroup.getRawValue(), + }; + } + + get businessOwnerDataname(): string { + return this.metalDealersApplicationService.getSummarybusinessOwnerDataname(this.modelData); + } + get businessOwnerDatalegalBusinessName(): string { + return this.metalDealersApplicationService.getSummarybusinessOwnerDatalegalBusinessName(this.modelData); + } + get businessOwnerDatatradeName(): string { + return this.metalDealersApplicationService.getSummarybusinessOwnerDatatradeName(this.modelData); + } + + get businessManagerDataname(): string { + return this.metalDealersApplicationService.getSummarybusinessManagerDataname(this.modelData); + } + get businessManagerDataphoneNumber(): string { + return this.metalDealersApplicationService.getSummarybusinessManagerDataphoneNumber(this.modelData); + } + get businessManagerDataemailAddress(): string { + return this.metalDealersApplicationService.getSummarybusinessManagerDataemailAddress(this.modelData); + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routes.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routes.ts new file mode 100644 index 000000000..b790f8dac --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routes.ts @@ -0,0 +1,13 @@ +export class MetalDealersAndRecyclersRoutes { + public static readonly METAL_DEALERS_AND_RECYCLERS = 'metal-dealers-and-recyclers'; + + public static readonly MODULE_PATH = MetalDealersAndRecyclersRoutes.METAL_DEALERS_AND_RECYCLERS; + public static readonly METAL_DEALERS_AND_RECYCLERS_REGISTER = 'register'; + public static readonly METAL_DEALERS_AND_RECYCLERS_REGISTRATION_RECEIVED = 'received'; + + public static path(route: string | null = null): string { + return route + ? `/${MetalDealersAndRecyclersRoutes.MODULE_PATH}/${route}` + : `/${MetalDealersAndRecyclersRoutes.MODULE_PATH}`; + } +} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routing.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routing.module.ts new file mode 100644 index 000000000..d601cc126 --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routing.module.ts @@ -0,0 +1,39 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { MetalDealersBaseComponent } from './components/metal-dealers-base.component'; +import { MetalDealersMainComponent } from './components/metal-dealers-main.component'; +import { MetalDealersRegisterComponent } from './components/metal-dealers-register.component'; +import { MetalDealersRegistrationReceivedComponent } from './components/metal-dealers-registration-received.component'; +import { MetalDealersAndRecyclersRoutes } from './metal-dealers-and-recyclers-routes'; + +const routes: Routes = [ + { + path: '', + component: MetalDealersBaseComponent, + children: [ + { + path: '', + component: MetalDealersMainComponent, + }, + { + path: MetalDealersAndRecyclersRoutes.METAL_DEALERS_AND_RECYCLERS_REGISTER, + component: MetalDealersRegisterComponent, + }, + { + path: MetalDealersAndRecyclersRoutes.METAL_DEALERS_AND_RECYCLERS_REGISTRATION_RECEIVED, + component: MetalDealersRegistrationReceivedComponent, + }, + ], + }, + { + path: '', + redirectTo: MetalDealersAndRecyclersRoutes.path(), + pathMatch: 'full', + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class MetalDealersAndRecyclersRoutingModule {} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers.module.ts new file mode 100644 index 000000000..e1c77404e --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers.module.ts @@ -0,0 +1,33 @@ +import { NgModule } from '@angular/core'; + +import { SharedModule } from '@app/shared/shared.module'; +import { MetalDealersBaseComponent } from './components/metal-dealers-base.component'; +import { MetalDealersMainComponent } from './components/metal-dealers-main.component'; +import { MetalDealersRegisterComponent } from './components/metal-dealers-register.component'; +import { MetalDealersRegistrationReceivedComponent } from './components/metal-dealers-registration-received.component'; +import { ModalMetalDealersBranchComponent } from './components/modal-metal-dealers-branch.component'; +import { StepMetalDealersBranchesComponent } from './components/step-metal-dealers-branches.component'; +import { StepMetalDealersBusinessAddressComponent } from './components/step-metal-dealers-business-address.component'; +import { StepMetalDealersBusinessInformationComponent } from './components/step-metal-dealers-business-information.component'; +import { StepMetalDealersChecklistComponent } from './components/step-metal-dealers-checklist.component'; +import { StepMetalDealersConsentComponent } from './components/step-metal-dealers-consent.component'; +import { StepMetalDealersSummaryComponent } from './components/step-metal-dealers-summary.component'; +import { MetalDealersAndRecyclersRoutingModule } from './metal-dealers-and-recyclers-routing.module'; + +@NgModule({ + declarations: [ + MetalDealersBaseComponent, + MetalDealersMainComponent, + MetalDealersRegisterComponent, + StepMetalDealersChecklistComponent, + StepMetalDealersBusinessInformationComponent, + StepMetalDealersBusinessAddressComponent, + StepMetalDealersBranchesComponent, + StepMetalDealersSummaryComponent, + StepMetalDealersConsentComponent, + ModalMetalDealersBranchComponent, + MetalDealersRegistrationReceivedComponent, + ], + imports: [SharedModule, MetalDealersAndRecyclersRoutingModule], +}) +export class MetalDealersAndRecyclersModule {} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/shared/components/wizard-footer.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/shared/components/wizard-footer.component.ts index 979373b71..99a5107fd 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/shared/components/wizard-footer.component.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/shared/components/wizard-footer.component.ts @@ -6,8 +6,8 @@ import { DialogComponent, DialogOptions } from './dialog.component'; export type AlertType = 'success' | 'warning' | 'danger' | 'info'; @Component({ - selector: 'app-wizard-footer', - template: ` + selector: 'app-wizard-footer', + template: `
@@ -22,7 +22,7 @@ export type AlertType = 'success' | 'warning' | 'danger' | 'info'; - +
@@ -119,14 +119,14 @@ export type AlertType = 'success' | 'warning' | 'danger' | 'info';
`, - styles: [ - ` + styles: [ + ` .button-small-caps { font-variant: small-caps; } `, - ], - standalone: false + ], + standalone: false, }) export class WizardFooterComponent implements OnInit { isSaveAndExitObserved = false; @@ -138,6 +138,7 @@ export class WizardFooterComponent implements OnInit { @Input() nextButtonLabel = 'Next'; @Input() cancelAndExitLabel = 'Exit'; + @Input() cancelLabel = 'Exit'; @Input() isFormValid = false; @Input() showSaveAndExit = false; @Input() isWideNext = false; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/shared/shared.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/shared/shared.module.ts index bae598e55..937678e5d 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/shared/shared.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/shared/shared.module.ts @@ -13,7 +13,6 @@ import { ContainerComponent } from './components/container.component'; import { DialogOopsComponent } from './components/dialog-oops.component'; import { DialogComponent } from './components/dialog.component'; import { DropdownOverlayComponent } from './components/dropdown-overlay.component'; -import { FormExpiredLicenceComponent } from './components/form-expired-licence.component'; import { FileUploadComponent } from './components/file-upload.component'; import { FormAddressAndIsSameFlagComponent } from './components/form-address-and-is-same-flag.component'; import { FormAddressAutocompleteComponent } from './components/form-address-autocomplete.component'; @@ -24,6 +23,7 @@ import { FormAliasesComponent } from './components/form-aliases.component'; import { FormBcDriverLicenceComponent } from './components/form-bc-driver-licence.component'; import { FormBusinessTermsComponent } from './components/form-business-terms.component'; import { FormContactInformationComponent } from './components/form-contact-information.component'; +import { FormExpiredLicenceComponent } from './components/form-expired-licence.component'; import { FormFingerprintsComponent } from './components/form-fingerprints.component'; import { FormMentalHealthConditionsComponent } from './components/form-mental-health-conditions.component'; import { FormPersonalInformationNewAnonymousComponent } from './components/form-personal-information-new-anonymous.component';