From 280bfb53ef249a4f096c534bb3ba1e434cedaf11 Mon Sep 17 00:00:00 2001 From: TimaQT <158625845+TimaQT@users.noreply.github.com> Date: Fri, 12 Apr 2024 07:50:47 -0700 Subject: [PATCH] EMBCESSMOD-4989: Enable shelter allowance support (#2009) --- .../DynamicsTestData.cs | 2 +- .../RegistrationsController.Supports.cs | 1 + .../embc-responder/src/app/core/api/models.ts | 1 + .../api/models/lodging-allowance-support.ts | 13 + .../app/core/models/support-details.model.ts | 11 +- .../src/app/core/services/global-constants.ts | 26 ++ .../ess-file-supports.component.html | 138 +++--- .../ess-file-supports.component.ts | 4 + .../referral-creation.service.ts | 38 +- .../step-supports/step-supports.service.ts | 21 +- .../clone-support-details.service.ts | 12 + .../existing-support-details.component.html | 43 +- .../existing-support-details.component.ts | 7 +- .../existing-support-details.service.ts | 15 +- .../review-support.component.html | 285 +++++-------- .../review-support.component.ts | 13 +- .../review-support/review-support.service.ts | 3 +- .../shelter-allowance-delivery.component.html | 108 +++++ .../shelter-allowance-delivery.component.scss | 4 + .../shelter-allowance-delivery.component.ts | 55 +++ .../support-delivery.component.ts | 59 ++- .../support-delivery.module.ts | 2 + .../support-referral.component.html | 29 +- .../shelter-allowance.component.html | 77 ++++ .../shelter-allowance.component.scss | 9 + .../shelter-allowance.component.ts | 112 +++++ .../support-details.component.html | 398 ++++++------------ .../support-details/support-details.module.ts | 4 +- .../support-details.service.ts | 31 +- .../supports-table.component.ts | 9 +- .../view-supports/view-supports.component.ts | 1 + .../app/unit-tests/mockEvacueeList.service.ts | 6 + 32 files changed, 1002 insertions(+), 535 deletions(-) create mode 100644 responders/src/UI/embc-responder/src/app/core/api/models/lodging-allowance-support.ts create mode 100644 responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-delivery/delivery-types/shelter-allowance-delivery/shelter-allowance-delivery.component.html create mode 100644 responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-delivery/delivery-types/shelter-allowance-delivery/shelter-allowance-delivery.component.scss create mode 100644 responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-delivery/delivery-types/shelter-allowance-delivery/shelter-allowance-delivery.component.ts create mode 100644 responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/details-type/shelter-allowance/shelter-allowance.component.html create mode 100644 responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/details-type/shelter-allowance/shelter-allowance.component.scss create mode 100644 responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/details-type/shelter-allowance/shelter-allowance.component.ts diff --git a/ess/src/API/EMBC.Tests.Integration.ESS/DynamicsTestData.cs b/ess/src/API/EMBC.Tests.Integration.ESS/DynamicsTestData.cs index da7dd43ba..724659c06 100644 --- a/ess/src/API/EMBC.Tests.Integration.ESS/DynamicsTestData.cs +++ b/ess/src/API/EMBC.Tests.Integration.ESS/DynamicsTestData.cs @@ -453,4 +453,4 @@ private void AssignSupplierToTeam(EssContext essContext, era_supplier supplier, essContext.SetLink(ts, nameof(era_essteamsupplier.era_ESSTeamID), team); } } -} \ No newline at end of file +} diff --git a/responders/src/API/EMBC.Responders.API/Controllers/RegistrationsController.Supports.cs b/responders/src/API/EMBC.Responders.API/Controllers/RegistrationsController.Supports.cs index 78d578993..118cf8232 100644 --- a/responders/src/API/EMBC.Responders.API/Controllers/RegistrationsController.Supports.cs +++ b/responders/src/API/EMBC.Responders.API/Controllers/RegistrationsController.Supports.cs @@ -253,6 +253,7 @@ public class ProcessPaperReferralsRequest [KnownType(typeof(LodgingBilletingSupport))] [KnownType(typeof(LodgingGroupSupport))] [KnownType(typeof(LodgingHotelSupport))] + [KnownType(typeof(LodgingAllowanceSupport))] [KnownType(typeof(TransportationOtherSupport))] [KnownType(typeof(TransportationTaxiSupport))] public abstract class Support diff --git a/responders/src/UI/embc-responder/src/app/core/api/models.ts b/responders/src/UI/embc-responder/src/app/core/api/models.ts index 3670d0118..92a87f091 100644 --- a/responders/src/UI/embc-responder/src/app/core/api/models.ts +++ b/responders/src/UI/embc-responder/src/app/core/api/models.ts @@ -43,6 +43,7 @@ export { FoodRestaurantSupport } from './models/food-restaurant-support'; export { LodgingBilletingSupport } from './models/lodging-billeting-support'; export { LodgingGroupSupport } from './models/lodging-group-support'; export { LodgingHotelSupport } from './models/lodging-hotel-support'; +export { LodgingAllowanceSupport } from './models/lodging-allowance-support'; export { TransportationOtherSupport } from './models/transportation-other-support'; export { TransportationTaxiSupport } from './models/transportation-taxi-support'; export { EvacuationFileStatus } from './models/evacuation-file-status'; diff --git a/responders/src/UI/embc-responder/src/app/core/api/models/lodging-allowance-support.ts b/responders/src/UI/embc-responder/src/app/core/api/models/lodging-allowance-support.ts new file mode 100644 index 000000000..b6fe8dc1f --- /dev/null +++ b/responders/src/UI/embc-responder/src/app/core/api/models/lodging-allowance-support.ts @@ -0,0 +1,13 @@ +/* tslint:disable */ +/* eslint-disable */ +import { Support } from './support'; +import { SupportCategory } from './support-category'; +import { SupportSubCategory } from './support-sub-category'; +export type LodgingAllowanceSupport = Support & { +'category': SupportCategory; +'subCategory': SupportSubCategory; +'numberOfNights': number; +'contactEmail'?: string; +'contactPhone'?: string; +'totalAmount': number; +}; diff --git a/responders/src/UI/embc-responder/src/app/core/models/support-details.model.ts b/responders/src/UI/embc-responder/src/app/core/models/support-details.model.ts index cf7a6c306..953cd9ad4 100644 --- a/responders/src/UI/embc-responder/src/app/core/models/support-details.model.ts +++ b/responders/src/UI/embc-responder/src/app/core/models/support-details.model.ts @@ -21,7 +21,8 @@ export class SupportDetailsModel { | GroupLodging | HotelMotel | Incidentals - | Clothing; + | Clothing + | ShelterAllowance; } export class SupportDeliveryModel { @@ -81,6 +82,14 @@ export class GroupLodging { noOfNights: number; } +export class ShelterAllowance { + noOfNights: number; + totalAmount: number; + contactEmail: string; + contactPhone: string; + fullName: string; +} + export class Incidentals { approvedItems: string; totalAmount: number; diff --git a/responders/src/UI/embc-responder/src/app/core/services/global-constants.ts b/responders/src/UI/embc-responder/src/app/core/services/global-constants.ts index 2722fee7e..c910b14ab 100644 --- a/responders/src/UI/embc-responder/src/app/core/services/global-constants.ts +++ b/responders/src/UI/embc-responder/src/app/core/services/global-constants.ts @@ -59,6 +59,12 @@ export const billeting = { child: 5 }; +export const shelterAllowanceRate = { + rate: 30, + adult: 10, + child: 5 +}; + export const noOfRooms = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; export const supportNoOfDays = [ @@ -142,6 +148,11 @@ export const hotelRateSheet: DialogContent = { cancelButton: 'Close' }; +export const needsShelterAllowanceRateSheet: DialogContent = { + title: 'ESS Rate Sheet - Shelter Allowance', + text: '
To be issued when evacuees want to source their own shelter whilst evacuated.
$30 per night (single occupancy)
+ $10 for each additional adult
+ $5 for each additional child
', +}; + export const billetingRateSheet: DialogContent = { title: 'ESS Rate Sheet - Lodging', text: `Billeting in Private Homes
The referral form for billeting is issued to the billeting host (supplier). Billeting rate does not include meals.
\$${billeting.rate.toFixed( @@ -180,6 +191,21 @@ export const duplicateSupportMessage: DialogContent = { cancelButton: 'No, Cancel' }; +export const needsShelterAllowanceMessage: DialogContent = { + title: 'Shelter', + text: '
A shelter allowance of $30 per night based on single occupancy ($10 for each additional adult and youth, and $5 for each child).
The shelter allowance can be provided to eligible evacuees via e-Transfer.
', +}; + +export const needsShelterReferralMessage: DialogContent = { + title: 'Referral', + text: 'A paper form provided by an ESS responder, directing evacuated individuals to specific suppliers or facilities for essential needs like food, shelter, clothing, or other necessary items during the evacuation.
', +}; + +export const needsIncidentalMessage: DialogContent = { + title: 'Incidentals', + text: 'Incidentals could include miscellaneous items such as personal hygiene products such as toothpaste, laundry soap and/or pet food.
', +}; + export const saveMessage: DialogContent = { text: 'Support successfully saved.
', cancelButton: 'Close' diff --git a/responders/src/UI/embc-responder/src/app/feature-components/search/essfile-dashboard/ess-file-supports/ess-file-supports.component.html b/responders/src/UI/embc-responder/src/app/feature-components/search/essfile-dashboard/ess-file-supports/ess-file-supports.component.html index 8684d8a4b..6c6a12a6d 100644 --- a/responders/src/UI/embc-responder/src/app/feature-components/search/essfile-dashboard/ess-file-supports/ess-file-supports.component.html +++ b/responders/src/UI/embc-responder/src/app/feature-components/search/essfile-dashboard/ess-file-supports/ess-file-supports.component.html @@ -12,17 +12,10 @@ added for this ESS File.+ }"> {{ getStatusDescription(support?.status) }}
+ " class="bold supplier-align"> {{ - getReferral(support)?.method === supportMethod.Referral - ? getReferral(support)?.supplierName - : getReferral(support)?.method === supportMethod.ETransfer - ? 'e-Transfer' - : '' + getReferral(support)?.method === supportMethod.Referral + ? getReferral(support)?.supplierName + : getReferral(support)?.method === supportMethod.ETransfer + ? 'e-Transfer' + : '' }}
-+
{{ getBilletingReferral(support)?.hostName }}
-+
{{ getGroupReferral(support)?.facilityName }}
Up to a Total of:
Up to a Total of:
+# Breakfasts:
# Breakfasts:
+# Lunches:
# Lunches:
+# Dinners:
# Dinners:
+Up to a Total of:
Up to a Total of:
+# Nights:
# Nights:
+# Rooms:
# Rooms:
+# Nights
# Nights
+# Nights
# Nights
+# Nights
+Total Amount
+From (address):
From (address):
+To (address):
To (address):
+Mode of Transport:
Mode of Transport:
+Up to a total of:
Up to a total of:
+Approved Items:
Approved Items:
+Up to a total of:
Up to a total of:
+Winter Conditions:
Winter Conditions:
+Up to a total of:
Up to a total of:
+@@ -426,13 +355,10 @@
@@ -446,14 +372,28 @@
{{ getReferral(support)?.supplierNotes }}
+ {{ getReferral(support)?.issuedToPersonName }} +
++ {{ getShelterAllowanceReferral(support)?.contactEmail }} +
+{{ getShelterAllowanceReferral(support)?.contactPhone }}
+@@ -470,23 +410,18 @@
e-Transfer Recipient
{{ - appBaseService?.appModel?.selectedProfile?.selectedEvacueeInContext?.personalDetails?.lastName?.toUpperCase() + appBaseService?.appModel?.selectedProfile?.selectedEvacueeInContext?.personalDetails?.lastName?.toUpperCase() }}, {{ - appBaseService?.appModel?.selectedProfile - ?.selectedEvacueeInContext?.personalDetails?.firstName + appBaseService?.appModel?.selectedProfile + ?.selectedEvacueeInContext?.personalDetails?.firstName }}
@@ -510,10 +445,8 @@Payee Details
+Full Name (including middle name if applicable)
++ Please provide the name and address of the individual to whom reimbursement should be issued for the shelter expenses incurred. +
+Contact Information
++ Please provide at least 1 point of contact for the individual to whom reimbursement should be issued. +
+Which people in your household require - {{ - stepSupportsService?.supportTypeToAdd?.description + {{ + stepSupportsService?.supportTypeToAdd?.description }} - ? + ?