Skip to content

Commit f8e3bf5

Browse files
authored
status changes for DERA (#1007)
1 parent 887ccdf commit f8e3bf5

File tree

6 files changed

+52015
-49510
lines changed

6 files changed

+52015
-49510
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
enum ApplicationType {
22
SIR = 'IR',
3+
DERA = 'DERA',
34
}
45

56
export default ApplicationType;

backend/applications/src/app/services/cats.service.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ApplicationType from '../constants/applicationType';
77

88
@Injectable()
99
export class CatsService {
10-
constructor() {}
10+
constructor() { }
1111

1212
getSiteIdsFromFormData = (formData: any) => {
1313
switch (formData.hdnAppType) {
@@ -21,6 +21,15 @@ export class CatsService {
2121
.map((id: string) => id.trim())
2222
.filter((id: string) => id !== '')
2323
.map(Number);
24+
case ApplicationType.DERA:
25+
return (
26+
formData.siteIdNumber
27+
?.toString()
28+
.split(',')
29+
.map((id: string) => id.trim())
30+
.filter((id: string) => id !== '')
31+
.map(Number) || []
32+
);
2433
default:
2534
return (
2635
formData.siteId

backend/cats/src/app/services/application/application.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class ApplicationService {
4444
const newApplication = this.applicationRepository.create({
4545
siteId: createApplication.siteIds[0],// in case the application has mutliple site, we store the first site id for consistency
4646
appTypeId: appType?.id,
47-
isMultiSite: siteIds.length == 0 ? false : true,
47+
isMultiSite: siteIds.length > 1 ? true : false,
4848
rowVersionCount: 1,
4949
createdBy: 'SYSTEM',
5050
updatedBy: 'SYSTEM',

0 commit comments

Comments
 (0)