diff --git a/registrants/src/UI/embc-registrant/.eslintrc.json b/registrants/src/UI/embc-registrant/.eslintrc.json index 20f837bf9..24e20fcaa 100644 --- a/registrants/src/UI/embc-registrant/.eslintrc.json +++ b/registrants/src/UI/embc-registrant/.eslintrc.json @@ -28,9 +28,6 @@ "no-shadow": "off", "deprecation/deprecation": "error", "@typescript-eslint/member-ordering": "off", - "@typescript-eslint/no-shadow": [ - "error" - ], "@angular-eslint/component-selector": [ "error", { @@ -46,7 +43,8 @@ "prefix": "app", "style": "camelCase" } - ] + ], + "max-len": "off" } }, { @@ -79,4 +77,4 @@ } } ] -} \ No newline at end of file +} diff --git a/registrants/src/UI/embc-registrant/.prettierrc.json b/registrants/src/UI/embc-registrant/.prettierrc.json index 734486f12..3d81d8714 100644 --- a/registrants/src/UI/embc-registrant/.prettierrc.json +++ b/registrants/src/UI/embc-registrant/.prettierrc.json @@ -1,5 +1,6 @@ { - "singleQuote": true, - "trailingComma": "none", - "endOfLine": "auto" - } \ No newline at end of file + "singleQuote": true, + "trailingComma": "none", + "endOfLine": "auto", + "printWidth": 180 +} diff --git a/registrants/src/UI/embc-registrant/package.json b/registrants/src/UI/embc-registrant/package.json index 6f2bbf067..66ee92ade 100644 --- a/registrants/src/UI/embc-registrant/package.json +++ b/registrants/src/UI/embc-registrant/package.json @@ -9,7 +9,7 @@ "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", - "gen-api": "ng-openapi-gen -i https://era-evacuees-dev.apps.silver.devops.gov.bc.ca/api/openapi/v1/openapi.json -o ./src/app/core/api --ignoreUnusedModels false", + "gen-api": "ng-openapi-gen -i https://dev-era-evacuees.apps.silver.devops.gov.bc.ca/api/openapi/v1/openapi.json -o ./src/app/core/api --ignoreUnusedModels false", "gen-api-local": "ng-openapi-gen -i http://localhost:5020/api/openapi/v1/openapi.json -o ./src/app/core/api --ignoreUnusedModels false" }, "private": true, @@ -67,4 +67,4 @@ "ts-node": "~8.3.0", "typescript": "~4.7.4" } -} \ No newline at end of file +} diff --git a/registrants/src/UI/embc-registrant/src/app/core/api/api-configuration.ts b/registrants/src/UI/embc-registrant/src/app/core/api/api-configuration.ts index f31f15e6b..b477ad38e 100644 --- a/registrants/src/UI/embc-registrant/src/app/core/api/api-configuration.ts +++ b/registrants/src/UI/embc-registrant/src/app/core/api/api-configuration.ts @@ -9,7 +9,7 @@ import { Injectable } from '@angular/core'; providedIn: 'root', }) export class ApiConfiguration { - rootUrl: string = 'https://era-evacuees-dev.apps.silver.devops.gov.bc.ca'; + rootUrl: string = 'https://dev-era-evacuees.apps.silver.devops.gov.bc.ca'; } /** diff --git a/registrants/src/UI/embc-registrant/src/app/core/api/models.ts b/registrants/src/UI/embc-registrant/src/app/core/api/models.ts index c799ccdf5..dcfe8142a 100644 --- a/registrants/src/UI/embc-registrant/src/app/core/api/models.ts +++ b/registrants/src/UI/embc-registrant/src/app/core/api/models.ts @@ -21,6 +21,7 @@ export { InsuranceOption } from './models/insurance-option'; export { HouseholdMember } from './models/household-member'; export { Pet } from './models/pet'; export { NeedsAssessmentType } from './models/needs-assessment-type'; +export { IdentifiedNeed } from './models/identified-need'; export { Support } from './models/support'; export { SupportStatus } from './models/support-status'; export { SupportCategory } from './models/support-category'; diff --git a/registrants/src/UI/embc-registrant/src/app/core/api/models/identified-need.ts b/registrants/src/UI/embc-registrant/src/app/core/api/models/identified-need.ts new file mode 100644 index 000000000..19be62cbd --- /dev/null +++ b/registrants/src/UI/embc-registrant/src/app/core/api/models/identified-need.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/* eslint-disable */ +export enum IdentifiedNeed { + ShelterReferral = 'ShelterReferral', + ShelterAllowance = 'ShelterAllowance', + Tranportation = 'Tranportation', + Food = 'Food', + Incidentals = 'Incidentals', + Clothing = 'Clothing' +} diff --git a/registrants/src/UI/embc-registrant/src/app/core/api/models/needs-assessment.ts b/registrants/src/UI/embc-registrant/src/app/core/api/models/needs-assessment.ts index 691b777f9..47948c7ba 100644 --- a/registrants/src/UI/embc-registrant/src/app/core/api/models/needs-assessment.ts +++ b/registrants/src/UI/embc-registrant/src/app/core/api/models/needs-assessment.ts @@ -1,6 +1,7 @@ /* tslint:disable */ /* eslint-disable */ import { HouseholdMember } from './household-member'; +import { IdentifiedNeed } from './identified-need'; import { InsuranceOption } from './insurance-option'; import { NeedsAssessmentType } from './needs-assessment-type'; import { Pet } from './pet'; @@ -9,14 +10,10 @@ import { Pet } from './pet'; * Needs assessment form */ export interface NeedsAssessment { - canEvacueeProvideClothing?: null | boolean; - canEvacueeProvideFood?: null | boolean; - canEvacueeProvideIncidentals?: null | boolean; - canEvacueeProvideLodging?: null | boolean; - canEvacueeProvideTransportation?: null | boolean; householdMembers?: Array; id?: null | string; insurance: InsuranceOption; + needs?: Array; pets?: Array; type?: NeedsAssessmentType; } diff --git a/registrants/src/UI/embc-registrant/src/app/core/api/models/support-sub-category.ts b/registrants/src/UI/embc-registrant/src/app/core/api/models/support-sub-category.ts index cd6573544..ce725a1f5 100644 --- a/registrants/src/UI/embc-registrant/src/app/core/api/models/support-sub-category.ts +++ b/registrants/src/UI/embc-registrant/src/app/core/api/models/support-sub-category.ts @@ -5,6 +5,7 @@ export enum SupportSubCategory { Lodging_Hotel = 'Lodging_Hotel', Lodging_Billeting = 'Lodging_Billeting', Lodging_Group = 'Lodging_Group', + Lodging_Allowance = 'Lodging_Allowance', Food_Groceries = 'Food_Groceries', Food_Restaurant = 'Food_Restaurant', Transportation_Taxi = 'Transportation_Taxi', diff --git a/registrants/src/UI/embc-registrant/src/app/core/components/dialog/dialog.component.html b/registrants/src/UI/embc-registrant/src/app/core/components/dialog/dialog.component.html index 264bcb075..d98677577 100644 --- a/registrants/src/UI/embc-registrant/src/app/core/components/dialog/dialog.component.html +++ b/registrants/src/UI/embc-registrant/src/app/core/components/dialog/dialog.component.html @@ -42,7 +42,7 @@ -->
-
+

-
+
@@ -34,18 +29,9 @@
Restriction
-
@@ -53,37 +39,15 @@
- - + + - - + +
-

- You have given your consent to have your location and contact - information shared with concerned family or friends who enquire - about your wellbeing. -

+

You have given your consent to have your location and contact information shared with concerned family or friends who enquire about your wellbeing.

@@ -92,18 +56,9 @@
Personal Details
-
@@ -112,54 +67,37 @@
Last Name:
- {{ - (formCreationService.personalDetailsForm$ | async)?.value - ?.lastName - }} + {{ (formCreationService.personalDetailsForm$ | async)?.value?.lastName }}
First Name:
- {{ - (formCreationService.personalDetailsForm$ | async)?.value - ?.firstName - }} + {{ (formCreationService.personalDetailsForm$ | async)?.value?.firstName }}
Preferred Name:
- {{ - (formCreationService.personalDetailsForm$ | async)?.value - ?.preferredName - }} + {{ (formCreationService.personalDetailsForm$ | async)?.value?.preferredName }}
Initials:
- {{ - (formCreationService.personalDetailsForm$ | async)?.value - ?.initials - }} + {{ (formCreationService.personalDetailsForm$ | async)?.value?.initials }}
Date of Birth:
- {{ - (formCreationService.personalDetailsForm$ | async)?.value - ?.dateOfBirth | customDate - }} + {{ (formCreationService.personalDetailsForm$ | async)?.value?.dateOfBirth | customDate }}
Gender:
- {{ - (formCreationService.personalDetailsForm$ | async)?.value?.gender - }} + {{ (formCreationService.personalDetailsForm$ | async)?.value?.gender }}
@@ -168,18 +106,9 @@
Primary Address
-
@@ -187,29 +116,21 @@
Address line 1:
- {{ - (formCreationService.addressForm$ | async)?.value?.address - ?.addressLine1 - }} + {{ (formCreationService.addressForm$ | async)?.value?.address?.addressLine1 }}
Address line 2:
- {{ - (formCreationService.addressForm$ | async)?.value?.address - ?.addressLine2 - }} + {{ (formCreationService.addressForm$ | async)?.value?.address?.addressLine2 }}
City: @@ -217,110 +138,47 @@
City/ Jurisdiction:
-
- {{ - (formCreationService.addressForm$ | async)?.value?.address - ?.community?.name - }} +
+ {{ (formCreationService.addressForm$ | async)?.value?.address?.community?.name }}
-
- {{ - (formCreationService.addressForm$ | async)?.value?.address - ?.community - }} +
+ {{ (formCreationService.addressForm$ | async)?.value?.address?.community }}
+
Postal Code:
+
Zip Code:
- Postal Code: -
-
- Zip Code: -
-
Postal/ Zip Code:
- {{ - (formCreationService.addressForm$ | async)?.value?.address - ?.postalCode - }} + {{ (formCreationService.addressForm$ | async)?.value?.address?.postalCode }}
-
- Province: -
-
- State: -
+
Province:
+
State:
- {{ - (formCreationService.addressForm$ | async)?.value?.address - ?.stateProvince?.name - }} + {{ (formCreationService.addressForm$ | async)?.value?.address?.stateProvince?.name }}
Country:
- {{ - (formCreationService.addressForm$ | async)?.value?.address - ?.country?.name - }} + {{ (formCreationService.addressForm$ | async)?.value?.address?.country?.name }}
@@ -329,18 +187,9 @@
Mailing Address
-
@@ -348,29 +197,21 @@
Address line 1:
- {{ - (formCreationService.addressForm$ | async)?.value?.mailingAddress - ?.addressLine1 - }} + {{ (formCreationService.addressForm$ | async)?.value?.mailingAddress?.addressLine1 }}
Address line 2:
- {{ - (formCreationService.addressForm$ | async)?.value?.mailingAddress - ?.addressLine2 - }} + {{ (formCreationService.addressForm$ | async)?.value?.mailingAddress?.addressLine2 }}
City: @@ -378,109 +219,46 @@
City/ Jurisdiction:
-
- {{ - (formCreationService.addressForm$ | async)?.value?.mailingAddress - ?.community?.name - }} +
+ {{ (formCreationService.addressForm$ | async)?.value?.mailingAddress?.community?.name }}
-
- {{ - (formCreationService.addressForm$ | async)?.value?.mailingAddress - ?.community - }} +
+ {{ (formCreationService.addressForm$ | async)?.value?.mailingAddress?.community }}
+
Postal Code:
+
Zip Code:
- Postal Code: -
-
- Zip Code: -
-
Postal/ Zip Code:
- {{ - (formCreationService.addressForm$ | async)?.value?.mailingAddress - ?.postalCode - }} + {{ (formCreationService.addressForm$ | async)?.value?.mailingAddress?.postalCode }}
-
- Province: -
-
- State: -
+
Province:
+
State:
- {{ - (formCreationService.addressForm$ | async)?.value?.mailingAddress - ?.stateProvince?.name - }} + {{ (formCreationService.addressForm$ | async)?.value?.mailingAddress?.stateProvince?.name }}
Country:
- {{ - (formCreationService.addressForm$ | async)?.value?.mailingAddress - ?.country?.name - }} + {{ (formCreationService.addressForm$ | async)?.value?.mailingAddress?.country?.name }}
@@ -489,71 +267,39 @@
Contact Details
-

- - + + - - + +

- You have given your consent for Emergency Management British - Columbia and your Local Emergency Program to communicate with you - by email or phone regarding your emergency situation. + You have given your consent for Emergency Management British Columbia and your Local Emergency Program to communicate with you by email or phone regarding your + emergency situation.

Telephone/Mobile:
- {{ - (formCreationService.contactDetailsForm$ | async)?.value?.phone - }} + {{ (formCreationService.contactDetailsForm$ | async)?.value?.phone }}
Email Address:
- {{ - (formCreationService.contactDetailsForm$ | async)?.value?.email - }} + {{ (formCreationService.contactDetailsForm$ | async)?.value?.email }}
@@ -562,64 +308,37 @@
Security Questions
-

- {{ - (formCreationService.securityQuestionsForm$ | async)?.value - .questions.question1 - }} + {{ (formCreationService.securityQuestionsForm$ | async)?.value.questions.question1 }}
- {{ - (formCreationService.securityQuestionsForm$ | async)?.value - .questions.answer1 - }} + {{ (formCreationService.securityQuestionsForm$ | async)?.value.questions.answer1 }}
- {{ - (formCreationService.securityQuestionsForm$ | async)?.value - .questions.question2 - }} + {{ (formCreationService.securityQuestionsForm$ | async)?.value.questions.question2 }}
- {{ - (formCreationService.securityQuestionsForm$ | async)?.value - .questions.answer2 - }} + {{ (formCreationService.securityQuestionsForm$ | async)?.value.questions.answer2 }}
- {{ - (formCreationService.securityQuestionsForm$ | async)?.value - .questions.question3 - }} + {{ (formCreationService.securityQuestionsForm$ | async)?.value.questions.question3 }}
- {{ - (formCreationService.securityQuestionsForm$ | async)?.value - .questions.answer3 - }} + {{ (formCreationService.securityQuestionsForm$ | async)?.value.questions.answer3 }}
@@ -634,18 +353,9 @@
Restriction
-
@@ -653,37 +363,15 @@
- - + + - - + +
-

- You have given your consent to have your location and contact - information shared with concerned family or friends who enquire - about your wellbeing. -

+

You have given your consent to have your location and contact information shared with concerned family or friends who enquire about your wellbeing.

@@ -692,18 +380,9 @@
Location
-
@@ -712,43 +391,20 @@
Evacuated From:

- {{ - (formCreationService.evacuatedForm$ | async)?.value - ?.evacuatedFromAddress?.addressLine1 - }}, -  {{ - (formCreationService.evacuatedForm$ | async)?.value - ?.evacuatedFromAddress?.addressLine2 - }} + {{ (formCreationService.evacuatedForm$ | async)?.value?.evacuatedFromAddress?.addressLine1 }}, +  {{ (formCreationService.evacuatedForm$ | async)?.value?.evacuatedFromAddress?.addressLine2 }}

- {{ - (formCreationService.evacuatedForm$ | async)?.value - ?.evacuatedFromAddress?.community?.name - }}, - - {{ - (formCreationService.evacuatedForm$ | async)?.value - ?.evacuatedFromAddress?.stateProvince?.name - }} + {{ (formCreationService.evacuatedForm$ | async)?.value?.evacuatedFromAddress?.community?.name }}, + {{ (formCreationService.evacuatedForm$ | async)?.value?.evacuatedFromAddress?.stateProvince?.name }} - {{ - (formCreationService.evacuatedForm$ | async).value - ?.evacuatedFromAddress?.postalCode - }} + {{ (formCreationService.evacuatedForm$ | async).value?.evacuatedFromAddress?.postalCode }}

@@ -758,18 +414,9 @@
Insurance
-
@@ -778,14 +425,11 @@
Insurance:
{{ - (formCreationService.evacuatedForm$ | async)?.value.insurance === - 'Unknown' + (formCreationService.evacuatedForm$ | async)?.value.insurance === 'Unknown' ? "I don't know" - : (formCreationService.evacuatedForm$ | async)?.value - .insurance === 'Unsure' + : (formCreationService.evacuatedForm$ | async)?.value.insurance === 'Unsure' ? 'Yes, but I am unsure if I have coverage for this event.' - : (formCreationService.evacuatedForm$ | async)?.value - .insurance === 'Yes' + : (formCreationService.evacuatedForm$ | async)?.value.insurance === 'Yes' ? 'Yes' : 'No' }} @@ -797,28 +441,14 @@
Household Members
-

-
+
First Name:
@@ -850,27 +480,14 @@
Pets
-

-
+
Pet Type:
{{ pet.type }}
@@ -885,93 +502,17 @@
-
Self-Provided Needs
+
Needs
-

-
-
Food:
-
- {{ - (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideFood === 'Unsure' - ? "I'm not sure" - : (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideFood === 'Yes' - ? 'Yes' - : 'No' - }} -
-
-
-
Lodging:
-
- {{ - (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideLodging === 'Unsure' - ? "I'm not sure" - : (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideLodging === 'Yes' - ? 'Yes' - : 'No' - }} -
-
-
-
Clothing:
-
- {{ - (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideClothing === 'Unsure' - ? "I'm not sure" - : (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideClothing === 'Yes' - ? 'Yes' - : 'No' - }} -
-
-
-
Transportation:
-
- {{ - (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideTransportation === 'Unsure' - ? "I'm not sure" - : (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideTransportation === 'Yes' - ? 'Yes' - : 'No' - }} -
-
-
-
Incidentals:
-
- {{ - (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideIncidentals === 'Unsure' - ? "I'm not sure" - : (formCreationService.identifyNeedsForm$ | async)?.value - .canEvacueeProvideIncidentals === 'Yes' - ? 'Yes' - : 'No' - }} -
+
+
{{ item }}
@@ -979,18 +520,9 @@
Security Phrase
-
diff --git a/registrants/src/UI/embc-registrant/src/app/feature-components/review/review.component.ts b/registrants/src/UI/embc-registrant/src/app/feature-components/review/review.component.ts index 081193b15..abd2765a6 100644 --- a/registrants/src/UI/embc-registrant/src/app/feature-components/review/review.component.ts +++ b/registrants/src/UI/embc-registrant/src/app/feature-components/review/review.component.ts @@ -7,6 +7,9 @@ import { CaptchaResponseType } from 'src/app/core/components/captcha-v2/captcha-v2.component'; import { ConfigService } from 'src/app/core/services/config.service'; +import { IdentifyNeedsForm } from 'src/app/core/model/needs.model'; +import { UntypedFormGroup } from '@angular/forms'; +import { ShelterType } from 'src/app/core/services/globalConstants'; @Component({ selector: 'app-review', @@ -30,7 +33,7 @@ export class ReviewComponent implements OnInit { constructor( private router: Router, public formCreationService: FormCreationService - ) {} + ) { } ngOnInit(): void { this.navigationExtras = { state: { parentPageName: this.parentPageName } }; @@ -58,4 +61,23 @@ export class ReviewComponent implements OnInit { onTokenResponse($event: CaptchaResponse) { this.captchaPassed.emit($event); } + + public getNeedsIdentifiedCaptions(form: UntypedFormGroup): string[] { + const needs: string[] = []; + if (form.controls.requiresClothing?.value) { + needs.push('Clothing'); + } + if (form.controls.requiresFood?.value) { + needs.push('Food'); + } + if (form.controls.requiresIncidentals?.value) { + needs.push('Incidentals'); + } + if (form.controls.requiresShelterType?.value === ShelterType.referral) { + needs.push('Shelter referral'); + } else if (form.controls.requiresShelterType?.value === ShelterType.allowance) { + needs.push('Shelter allowance'); + } + return needs; + } } diff --git a/registrants/src/UI/embc-registrant/src/app/sharedModules/components/evacuation-file/evacuation-file-mapping.service.ts b/registrants/src/UI/embc-registrant/src/app/sharedModules/components/evacuation-file/evacuation-file-mapping.service.ts index 75a5d865e..ccb66f204 100644 --- a/registrants/src/UI/embc-registrant/src/app/sharedModules/components/evacuation-file/evacuation-file-mapping.service.ts +++ b/registrants/src/UI/embc-registrant/src/app/sharedModules/components/evacuation-file/evacuation-file-mapping.service.ts @@ -17,30 +17,18 @@ export class EvacuationFileMappingService { public mapEvacuationFile(evacuationFile: EvacuationFileModel): void { this.evacuationFileDataService.essFileId = evacuationFile.fileId; - this.evacuationFileDataService.externalReferenceId = - evacuationFile.manualFileId; + this.evacuationFileDataService.externalReferenceId = evacuationFile.manualFileId; this.evacuationFileDataService.isPaper = evacuationFile.isPaper; - this.evacuationFileDataService.evacuatedAddress = - evacuationFile.evacuatedAddress; - this.evacuationFileDataService.evacuationFileDate = - evacuationFile.evacuationFileDate; + this.evacuationFileDataService.evacuatedAddress = evacuationFile.evacuatedAddress; + this.evacuationFileDataService.evacuationFileDate = evacuationFile.evacuationFileDate; this.evacuationFileDataService.evacuationFileStatus = evacuationFile.status; - this.needsAssessmentMapService.setNeedsAssessment( - evacuationFile.evacuatedAddress, - evacuationFile.needsAssessment - ); - this.mapSecretPhrase( - evacuationFile.secretPhrase, - evacuationFile.secretPhraseEdited - ); + this.needsAssessmentMapService.setNeedsAssessment(evacuationFile.evacuatedAddress, evacuationFile.needsAssessment); + this.mapSecretPhrase(evacuationFile.secretPhrase, evacuationFile.secretPhraseEdited); this.restrictionService.restrictedAccess = evacuationFile.isRestricted; this.evacuationFileDataService.supports = evacuationFile.supports; } - private mapSecretPhrase( - secretPhrase: string, - secretPhraseEdited: boolean - ): void { + private mapSecretPhrase(secretPhrase: string, secretPhraseEdited: boolean): void { this.evacuationFileDataService.secretPhrase = secretPhrase; this.evacuationFileDataService.secretPhraseEdited = secretPhraseEdited; diff --git a/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.html b/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.html index 7b7975f06..4c31a7b9b 100644 --- a/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.html +++ b/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.html @@ -1,171 +1,83 @@ +
-

- Please identify what your household's needs will be while evacuated? -

-

- Please identify what you can provide for yourself and your household - while evacuated. Emergency Support Services is intended for those - without supports such as insurance coverage or friends and family who - can assist during the evacuation. -

+

If you require supports while evacuated, please let us know about your household’s needs. *

+
-

Food

- -
- - - {{ option.name }} - - - Food is required - + +
+

+ There are several ways to meet your shelter needs.
+ You can receive a shelter allowance and use that money to find your own shelter or be provided with a referral to shelter (like a cot in a gym or a hotel/motel). +

+ + + + +
-
-
+
-

Lodging

- -
- - - {{ option.name }} - - - Lodging is required - +
+
-

Clothing

- -
- - - {{ option.name }} - - - Clothing is required - +
-
+ +
-

Transportation

-
+
-

Incidentals

- -
- - - {{ option.name }} - - - Incidentals is required - +
diff --git a/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.scss b/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.scss index d8a864b25..515192883 100644 --- a/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.scss +++ b/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.scss @@ -1,25 +1,24 @@ -.row-tile-style { - padding-top: 30px; - padding-bottom: 30px; -} .row-tile { - @extend .row-tile-style; - background-color: rgba(242, 242, 242, 0.682352941176471); + padding-top: 10px; + padding-bottom: 10px; } -mat-form-field { + +.mat-form-field { width: 100%; } -.mat-radio-button ~ .mat-radio-button { - margin-left: 90px; +.shelter { + margin-left: 28px; } -@media(max-width: 600px) { - .mat-radio-button ~ .mat-radio-button { - margin-left: 16px; - } +.mat-radio-group { + display: flex; + flex-direction: column; + margin: 10px 0; } -.question { - color: #606060; -} \ No newline at end of file +.tab-subtitle { + font-size: 150%; + color: #234075; + margin-bottom: 5px; +} diff --git a/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.ts b/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.ts index 6c5fbaae4..3362654d9 100644 --- a/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.ts +++ b/registrants/src/UI/embc-registrant/src/app/sharedModules/forms/needs-assessment-forms/identify-needs/identify-needs.component.ts @@ -5,15 +5,16 @@ import { MatButtonModule } from '@angular/material/button'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; import { AbstractControl, ReactiveFormsModule } from '@angular/forms'; -import { - UntypedFormBuilder, - UntypedFormGroup, - Validators -} from '@angular/forms'; +import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { FormCreationService } from '../../../../core/services/formCreation.service'; import { Subscription } from 'rxjs'; import { MatRadioModule } from '@angular/material/radio'; import * as globalConst from '../../../../core/services/globalConstants'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { DialogComponent } from 'src/app/core/components/dialog/dialog.component'; +import { InformationDialogComponent } from 'src/app/core/components/dialog-components/information-dialog/information-dialog.component'; +import { MatDialog } from '@angular/material/dialog'; +import { DialogContent } from 'src/app/core/model/dialog-content.model'; @Component({ selector: 'app-identify-needs', @@ -22,42 +23,45 @@ import * as globalConst from '../../../../core/services/globalConstants'; }) export default class IdentifyNeedsComponent implements OnInit { identifyNeedsForm: UntypedFormGroup; - formBuilder: UntypedFormBuilder; identifyNeedsForm$: Subscription; - formCreationService: FormCreationService; - radioOption = globalConst.needsOptions; - - constructor( - @Inject('formBuilder') formBuilder: UntypedFormBuilder, - @Inject('formCreationService') formCreationService: FormCreationService - ) { - this.formBuilder = formBuilder; - this.formCreationService = formCreationService; - } + + constructor(private formCreationService: FormCreationService, private dialog: MatDialog) {} ngOnInit(): void { - this.identifyNeedsForm$ = this.formCreationService - .getIndentifyNeedsForm() - .subscribe((identifyNeedsForm) => { - this.identifyNeedsForm = identifyNeedsForm; - }); + this.identifyNeedsForm$ = this.formCreationService.getIndentifyNeedsForm().subscribe((identifyNeedsForm) => { + this.identifyNeedsForm = identifyNeedsForm; + }); + } + + public openShelterAllowanceDialog() { + this.openInfoDialog(globalConst.shelterAllowanceNeedDialog); + } + + public openShelterReferralDialog() { + this.openInfoDialog(globalConst.shelterReferralNeedDialog); + } + + public openIncidentalsDialog() { + this.openInfoDialog(globalConst.incidentalsNeedDialog); + } + + private openInfoDialog(dialog: DialogContent) { + return this.dialog.open(DialogComponent, { + data: { + component: InformationDialogComponent, + content: dialog + }, + maxWidth: '400px' + }); } - get needsFormControl(): { [key: string]: AbstractControl } { + public get needsFormControl(): { [key: string]: AbstractControl } { return this.identifyNeedsForm.controls; } } @NgModule({ - imports: [ - CommonModule, - MatCardModule, - MatButtonModule, - MatFormFieldModule, - MatInputModule, - ReactiveFormsModule, - MatRadioModule - ], + imports: [CommonModule, MatCardModule, MatButtonModule, MatFormFieldModule, MatInputModule, ReactiveFormsModule, MatRadioModule, MatCheckboxModule], declarations: [IdentifyNeedsComponent] }) -class IdentifyNeedsModule {} +class IdentifyNeedsModule { } diff --git a/registrants/src/UI/embc-registrant/src/assets/images/info.svg b/registrants/src/UI/embc-registrant/src/assets/images/info.svg new file mode 100644 index 000000000..851eaaa6a --- /dev/null +++ b/registrants/src/UI/embc-registrant/src/assets/images/info.svg @@ -0,0 +1 @@ +icon-01 \ No newline at end of file diff --git a/registrants/src/UI/embc-registrant/src/assets/images/needs-clothing.svg b/registrants/src/UI/embc-registrant/src/assets/images/needs-clothing.svg new file mode 100644 index 000000000..0b9666a28 --- /dev/null +++ b/registrants/src/UI/embc-registrant/src/assets/images/needs-clothing.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/registrants/src/UI/embc-registrant/src/assets/images/needs-food.svg b/registrants/src/UI/embc-registrant/src/assets/images/needs-food.svg new file mode 100644 index 000000000..aac22ebf7 --- /dev/null +++ b/registrants/src/UI/embc-registrant/src/assets/images/needs-food.svg @@ -0,0 +1,22 @@ + + + + + + diff --git a/registrants/src/UI/embc-registrant/src/assets/images/needs-incidentals.svg b/registrants/src/UI/embc-registrant/src/assets/images/needs-incidentals.svg new file mode 100644 index 000000000..19f758fb9 --- /dev/null +++ b/registrants/src/UI/embc-registrant/src/assets/images/needs-incidentals.svg @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/registrants/src/UI/embc-registrant/src/assets/images/needs-lodging.svg b/registrants/src/UI/embc-registrant/src/assets/images/needs-lodging.svg new file mode 100644 index 000000000..82563f3cc --- /dev/null +++ b/registrants/src/UI/embc-registrant/src/assets/images/needs-lodging.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/registrants/src/UI/embc-registrant/src/assets/images/needs-transport.svg b/registrants/src/UI/embc-registrant/src/assets/images/needs-transport.svg new file mode 100644 index 000000000..16906c2aa --- /dev/null +++ b/registrants/src/UI/embc-registrant/src/assets/images/needs-transport.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/registrants/src/UI/embc-registrant/src/assets/images/no-needs.svg b/registrants/src/UI/embc-registrant/src/assets/images/no-needs.svg new file mode 100644 index 000000000..208d1a8dc --- /dev/null +++ b/registrants/src/UI/embc-registrant/src/assets/images/no-needs.svg @@ -0,0 +1,7 @@ + + + + + + +