@@ -378,9 +378,9 @@ export class ApplicationService {
378
378
isAmendment ( application : Application ) : boolean {
379
379
return (
380
380
application &&
381
- application . status === StatusCodes . ABANDONED . code &&
382
- ( application . reason === ReasonCodes . AMENDMENT_APPROVED . code ||
383
- application . reason === ReasonCodes . AMENDMENT_NOT_APPROVED . code )
381
+ ConstantUtils . getCode ( CodeType . STATUS , application . status ) === StatusCodes . ABANDONED . code &&
382
+ ( ConstantUtils . getCode ( CodeType . REASON , application . reason ) === ReasonCodes . AMENDMENT_APPROVED . code ||
383
+ ConstantUtils . getCode ( CodeType . REASON , application . reason ) === ReasonCodes . AMENDMENT_NOT_APPROVED . code )
384
384
) ;
385
385
}
386
386
@@ -395,9 +395,9 @@ export class ApplicationService {
395
395
isAbandoned ( application : Application ) : boolean {
396
396
return (
397
397
application &&
398
- application . status === StatusCodes . ABANDONED . code &&
399
- application . reason !== ReasonCodes . AMENDMENT_APPROVED . code &&
400
- application . reason !== ReasonCodes . AMENDMENT_NOT_APPROVED . code
398
+ ConstantUtils . getCode ( CodeType . STATUS , application . status ) === StatusCodes . ABANDONED . code &&
399
+ ConstantUtils . getCode ( CodeType . REASON , application . reason ) !== ReasonCodes . AMENDMENT_APPROVED . code &&
400
+ ConstantUtils . getCode ( CodeType . REASON , application . reason ) !== ReasonCodes . AMENDMENT_NOT_APPROVED . code
401
401
) ;
402
402
}
403
403
@@ -409,7 +409,10 @@ export class ApplicationService {
409
409
* @memberof ApplicationService
410
410
*/
411
411
isApplicationUnderReview ( application : Application ) : boolean {
412
- return application && application . status === StatusCodes . APPLICATION_UNDER_REVIEW . code ;
412
+ return (
413
+ application &&
414
+ ConstantUtils . getCode ( CodeType . STATUS , application . status ) === StatusCodes . APPLICATION_UNDER_REVIEW . code
415
+ ) ;
413
416
}
414
417
415
418
/**
@@ -420,7 +423,10 @@ export class ApplicationService {
420
423
* @memberof ApplicationService
421
424
*/
422
425
isApplicationReviewComplete ( application : Application ) : boolean {
423
- return application && application . status === StatusCodes . APPLICATION_REVIEW_COMPLETE . code ;
426
+ return (
427
+ application &&
428
+ ConstantUtils . getCode ( CodeType . STATUS , application . status ) === StatusCodes . APPLICATION_REVIEW_COMPLETE . code
429
+ ) ;
424
430
}
425
431
426
432
/**
@@ -431,7 +437,9 @@ export class ApplicationService {
431
437
* @memberof ApplicationService
432
438
*/
433
439
isDecisionApproved ( application : Application ) : boolean {
434
- return application && application . status === StatusCodes . DECISION_APPROVED . code ;
440
+ return (
441
+ application && ConstantUtils . getCode ( CodeType . STATUS , application . status ) === StatusCodes . DECISION_APPROVED . code
442
+ ) ;
435
443
}
436
444
437
445
/**
@@ -442,7 +450,10 @@ export class ApplicationService {
442
450
* @memberof ApplicationService
443
451
*/
444
452
isDecisionNotApproved ( application : Application ) : boolean {
445
- return application && application . status === StatusCodes . DECISION_NOT_APPROVED . code ;
453
+ return (
454
+ application &&
455
+ ConstantUtils . getCode ( CodeType . STATUS , application . status ) === StatusCodes . DECISION_NOT_APPROVED . code
456
+ ) ;
446
457
}
447
458
448
459
/**
@@ -453,7 +464,7 @@ export class ApplicationService {
453
464
* @memberof ApplicationService
454
465
*/
455
466
isUnknown ( application : Application ) : boolean {
456
- return application && application . status === StatusCodes . UNKNOWN . code ;
467
+ return application && ConstantUtils . getCode ( CodeType . STATUS , application . status ) === StatusCodes . UNKNOWN . code ;
457
468
}
458
469
459
470
/**
0 commit comments