From b16f6ceaa78c29deafa0fe6a324de380d55688f3 Mon Sep 17 00:00:00 2001 From: faris Aljohari <83524184+farisaljohari@users.noreply.github.com> Date: Sun, 6 Oct 2024 14:14:22 -0500 Subject: [PATCH] finish add garage door --- libs/common/src/constants/product-type.enum.ts | 1 + src/schedule/services/schedule.service.ts | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libs/common/src/constants/product-type.enum.ts b/libs/common/src/constants/product-type.enum.ts index 7ef741c..4f72a25 100644 --- a/libs/common/src/constants/product-type.enum.ts +++ b/libs/common/src/constants/product-type.enum.ts @@ -13,4 +13,5 @@ export enum ProductType { TWO_2TG = '2GT', ONE_1TG = '1GT', WL = 'WL', + GD = 'GD', } diff --git a/src/schedule/services/schedule.service.ts b/src/schedule/services/schedule.service.ts index d2bb1f5..6af6a76 100644 --- a/src/schedule/services/schedule.service.ts +++ b/src/schedule/services/schedule.service.ts @@ -56,7 +56,8 @@ export class ScheduleService { deviceDetails.productDevice.prodType !== ProductType.WH && deviceDetails.productDevice.prodType !== ProductType.ONE_1TG && deviceDetails.productDevice.prodType !== ProductType.TWO_2TG && - deviceDetails.productDevice.prodType !== ProductType.THREE_3TG + deviceDetails.productDevice.prodType !== ProductType.THREE_3TG && + deviceDetails.productDevice.prodType !== ProductType.GD ) { throw new HttpException( 'This device is not supported for schedule', @@ -113,7 +114,8 @@ export class ScheduleService { deviceDetails.productDevice.prodType !== ProductType.WH && deviceDetails.productDevice.prodType !== ProductType.ONE_1TG && deviceDetails.productDevice.prodType !== ProductType.TWO_2TG && - deviceDetails.productDevice.prodType !== ProductType.THREE_3TG + deviceDetails.productDevice.prodType !== ProductType.THREE_3TG && + deviceDetails.productDevice.prodType !== ProductType.GD ) { throw new HttpException( 'This device is not supported for schedule', @@ -166,7 +168,8 @@ export class ScheduleService { deviceDetails.productDevice.prodType !== ProductType.WH && deviceDetails.productDevice.prodType !== ProductType.ONE_1TG && deviceDetails.productDevice.prodType !== ProductType.TWO_2TG && - deviceDetails.productDevice.prodType !== ProductType.THREE_3TG + deviceDetails.productDevice.prodType !== ProductType.THREE_3TG && + deviceDetails.productDevice.prodType !== ProductType.GD ) { throw new HttpException( 'This device is not supported for schedule', @@ -233,7 +236,8 @@ export class ScheduleService { deviceDetails.productDevice.prodType !== ProductType.WH && deviceDetails.productDevice.prodType !== ProductType.ONE_1TG && deviceDetails.productDevice.prodType !== ProductType.TWO_2TG && - deviceDetails.productDevice.prodType !== ProductType.THREE_3TG + deviceDetails.productDevice.prodType !== ProductType.THREE_3TG && + deviceDetails.productDevice.prodType !== ProductType.GD ) { throw new HttpException( 'This device is not supported for schedule', @@ -317,7 +321,8 @@ export class ScheduleService { deviceDetails.productDevice.prodType !== ProductType.WH && deviceDetails.productDevice.prodType !== ProductType.ONE_1TG && deviceDetails.productDevice.prodType !== ProductType.TWO_2TG && - deviceDetails.productDevice.prodType !== ProductType.THREE_3TG + deviceDetails.productDevice.prodType !== ProductType.THREE_3TG && + deviceDetails.productDevice.prodType !== ProductType.GD ) { throw new HttpException( 'This device is not supported for schedule',