Skip to content

Commit 8eb001f

Browse files
committed
BE updated to remove isDevelopedInBC from types and validation
Signed-off-by: Sanjay Babu <sanjaytkbabu@gmail.com>
1 parent eb608f3 commit 8eb001f

File tree

7 files changed

+1
-36
lines changed

7 files changed

+1
-36
lines changed

app/src/controllers/housingProject.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ const generateHousingProjectData = async (
114114
basic = {
115115
consentToFeedback: data.basic.consentToFeedback ?? false,
116116
projectApplicantType: data.basic.projectApplicantType,
117-
isDevelopedInBc: data.basic.isDevelopedInBc,
118117
companyIdRegistered: data.basic.registeredId,
119118
companyNameRegistered: data.basic.registeredName
120119
};

app/src/db/prisma/schema.prisma

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ model housing_project {
586586
hasRentalUnits String? @map("has_rental_units")
587587
projectDescription String? @map("project_description")
588588
projectApplicantType String? @map("project_applicant_type")
589-
isDevelopedInBc String? @map("is_developed_in_bc")
590589
multiFamilyUnits String? @map("multi_family_units")
591590
otherUnits String? @map("other_units")
592591
otherUnitsDescription String? @map("other_units_description")

app/src/docs/v1.api-spec.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,10 +2812,6 @@ components:
28122812
enum: [Business, Individual]
28132813
description: Are you applying as an individual or as a business?
28142814
example: 'Business'
2815-
isDevelopedInBc:
2816-
type: string
2817-
description: Is the project developed in BC?
2818-
example: 'Yes'
28192815
multiFamilyUnits:
28202816
type: string
28212817
description: Range of multi-family units in the project
@@ -3547,12 +3543,6 @@ components:
35473543
enum: [Business, Individual]
35483544
description: Are you applying as an individual or as a business?
35493545
example: 'Business'
3550-
isDevelopedInBc:
3551-
type: boolean
3552-
description: >-
3553-
Indicates if the project is being developed in British Columbia
3554-
(BC)
3555-
example: true
35563546
companyNameRegistered:
35573547
type: string
35583548
description: Name of the company associated with the project
@@ -3816,10 +3806,6 @@ components:
38163806
type: string
38173807
description: Name of the company connected to the project
38183808
example: QW URBAN FOOD LTD.
3819-
isDevelopedInBc:
3820-
type: string
3821-
description: Is the project developed in BC?
3822-
example: 'Yes'
38233809
projectName:
38243810
type: string
38253811
description: Name of the Project

app/src/types/stuff.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ export type HousingProjectIntake = {
278278
basic: {
279279
consentToFeedback: boolean;
280280
projectApplicantType: string | null;
281-
isDevelopedInBc: string | null;
282281
registeredId: string | null;
283282
registeredName: string | null;
284283
};

app/src/validators/basic.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Joi from 'joi';
22

3-
import { YES_NO_LIST } from '../utils/constants/application';
43
import { PROJECT_APPLICANT_LIST } from '../utils/constants/housing';
54
import { ENQUIRY_TYPE_LIST } from '../utils/constants/projectCommon';
65
import { ProjectApplicant } from '../utils/enums/housing';
@@ -10,13 +9,6 @@ export const basicIntake = Joi.object({
109
projectApplicantType: Joi.string()
1110
.required()
1211
.valid(...PROJECT_APPLICANT_LIST),
13-
isDevelopedInBc: Joi.when('projectApplicantType', {
14-
is: ProjectApplicant.BUSINESS,
15-
then: Joi.string()
16-
.required()
17-
.valid(...YES_NO_LIST),
18-
otherwise: Joi.string().allow(null)
19-
}),
2012
registeredId: Joi.string().allow(null),
2113
registeredName: Joi.when('projectApplicantType', {
2214
is: ProjectApplicant.BUSINESS,

app/src/validators/housingProject.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { contactSchema } from './contact';
99
import { housing } from './housing';
1010
import { permits } from './permits';
1111
import { validate } from '../middleware/validation';
12-
import { YES_NO_LIST, YES_NO_UNSURE_LIST } from '../utils/constants/application';
12+
import { YES_NO_UNSURE_LIST } from '../utils/constants/application';
1313
import { NUM_RESIDENTIAL_UNITS_LIST } from '../utils/constants/housing';
1414
import { APPLICATION_STATUS_LIST, INTAKE_STATUS_LIST, SUBMISSION_TYPE_LIST } from '../utils/constants/projectCommon';
1515
import { BasicResponse } from '../utils/enums/application';
@@ -87,13 +87,6 @@ const schema = {
8787
submittedAt: Joi.string().required(),
8888
companyNameRegistered: Joi.string().allow(null),
8989
companyIdRegistered: Joi.string().allow(null),
90-
isDevelopedInBc: Joi.when('companyNameRegistered', {
91-
is: Joi.string().required(),
92-
then: Joi.string()
93-
.required()
94-
.valid(...YES_NO_LIST),
95-
otherwise: Joi.string().allow(null)
96-
}),
9790
projectName: Joi.string().required(),
9891
projectDescription: Joi.string().allow(null),
9992
singleFamilyUnits: Joi.string()

app/tests/unit/data/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ export const TEST_HOUSING_PROJECT_1: HousingProject = {
345345
hasRentalUnits: BasicResponse.NO,
346346
housingCoopDescription: null,
347347
indigenousDescription: null,
348-
isDevelopedInBc: BasicResponse.YES,
349348
locality: 'Place',
350349
multiFamilyUnits: BasicResponse.NO,
351350
nonProfitDescription: null,
@@ -407,7 +406,6 @@ export const TEST_HOUSING_PROJECT_CREATE: HousingProject = {
407406
hasRentalUnits: BasicResponse.NO,
408407
housingCoopDescription: null,
409408
indigenousDescription: null,
410-
isDevelopedInBc: BasicResponse.YES,
411409
locality: 'Place',
412410
multiFamilyUnits: BasicResponse.NO,
413411
nonProfitDescription: null,
@@ -434,7 +432,6 @@ export const TEST_HOUSING_PROJECT_INTAKE: HousingProjectIntake = {
434432
appliedPermits: [],
435433
basic: {
436434
consentToFeedback: false,
437-
isDevelopedInBc: BasicResponse.YES,
438435
projectApplicantType: null,
439436
registeredId: 'FM0281610',
440437
registeredName: 'COMPANY'

0 commit comments

Comments
 (0)