This commit is contained in:
Zeeshaun
2026-03-25 11:54:22 -05:00
parent 4d52ebc209
commit 883009770f
776 changed files with 86726 additions and 0 deletions
@@ -0,0 +1,8 @@
import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router';
export class MockActivatedRoute extends ActivatedRoute {
snapshot = new ActivatedRouteSnapshot();
constructor(options) {
super();
}
}
@@ -0,0 +1,348 @@
import { LoanTypeSet } from '../../shared/loan-type';
import { CreditApplicationValues } from '../../shared/credit-application-values';
import { CreditApplication } from '../../shared/credit-application';
import { LoanPurpose } from 'src/app/shared/loan-type/loan-purpose';
import { ApiStatus } from 'src/app/shared/api-models/api-status';
import { ApiErrorCode } from 'src/app/shared/api-models/api-error';
import { ApiLoanApplication } from 'src/app/shared/api-models/api-loan-application';
import { LoanCode } from 'src/app/shared/loan-type/loan-code';
import { MfgHomeTypeEnum, OccupancyTypeEnum, PhoneTypeEnum } from 'src/app/shared/api-models/api-enums';
import {LoanTitle} from '../../shared/loan-type/loan-title';
export const apiTranslatorPreTranslate: CreditApplication = {
'loanType': LoanTypeSet[8],
'note': 'This is a note!',
'primaryContactMethod': '262-623-8990',
'hasBeenCompleted': false,
'disclosureInformation': {
'truthful': true,
'contact': true,
'date': new Date()
},
'coApplicantLivesInMaritalPropertyState': true,
'fullInfoBorrowers': [
{
'addressInformation': {
'addressLine1': '123 Main St',
'addressLine2': '',
'zipcode': '53202',
'city': 'Milwaukee',
'state': CreditApplicationValues.STATE_REQUIRED_COAPP
},
'residenceInformation': {
'isMailingAddressSame': true,
'residenceMonthlyPayment': 500,
'residenceTimeYears': '8',
'residenceTimeMonths': '5',
'residenceStatus': '0'
},
'personalInformation': {
'firstName': 'Primary',
'middleInitial': 'J',
'lastName': 'Borrower',
'dateOfBirth': '01/01/2010',
'socialSecurityNumber': '666-55-5444',
'primaryPhoneNumberType': PhoneTypeEnum.Home,
'primaryPhoneNumber': '(555) 555-0134',
'secondaryPhoneNumberType': null,
'secondaryPhoneNumber': null,
'email': '[email protected]',
'maritalStatus': CreditApplicationValues.CHOICE_YES
},
'genderInformation': {
'female': null,
'male': true,
'notProvided': null,
},
'ethnicityInformation': {
'hispanicOrLatino': true,
'mexican': null,
'puertoRican': null,
'cuban': null,
'otherHispanicLatino': null,
'otherHispanicLatinoText': null,
'notHispanicOrLatino': null,
'notProvided': null
},
'raceInformation': {
'americanIndianAlaskaNative': null,
'americanIndianAlaskaNativeText': null,
'blackOrAfricanAmerican': null,
'asian': null,
'asianIndian': null,
'chinese': null,
'filipino': null,
'japanese': null,
'korean': null,
'vietnamese': null,
'otherAsian': true,
'otherAsianText': 'Thai',
'hawaiian': null,
'nativeHawaiian': null,
'guamanianChamorro': null,
'samoan': null,
'otherPacificIslander': null,
'otherPacificIslanderText': null,
'white': null,
'notProvided': null
},
'employmentInformation': [{
'employerName': 'Petes Purple Pies',
'employmentType': 'FullTime',
'jobTitle': 'Lead Pie Prepper',
'salary': 100000,
'schedule': 'Annually',
'employmentLengthYears': 10,
'employmentLengthMonths': 0,
'weeklyHours': null,
'workPhoneNumber': ''
}]
}, {
'addressInformation': {
'addressLine1': '123 Main St',
'addressLine2': '',
'zipcode': '53202',
'city': 'Milwaukee',
'state': CreditApplicationValues.STATE_REQUIRED_COAPP
},
'residenceInformation': {
'isMailingAddressSame': true,
'residenceMonthlyPayment': 500,
'residenceTimeYears': '8',
'residenceTimeMonths': '5',
'residenceStatus': '0'
},
'personalInformation': {
'firstName': 'Spouse',
'middleInitial': 'R',
'lastName': 'Borrower',
'dateOfBirth': '01/01/2009',
'socialSecurityNumber': '666-33-3222',
'primaryPhoneNumberType': PhoneTypeEnum.Home,
'primaryPhoneNumber': '(555) 555-0199',
'secondaryPhoneNumberType': null,
'secondaryPhoneNumber': null,
'email': '[email protected]',
'maritalStatus': CreditApplicationValues.CHOICE_YES
},
'genderInformation': {
'female': null,
'male': null,
'notProvided': true
},
'ethnicityInformation': {
'hispanicOrLatino': null,
'mexican': null,
'puertoRican': null,
'cuban': null,
'otherHispanicLatino': null,
'otherHispanicLatinoText': null,
'notHispanicOrLatino': null,
'notProvided': null
},
'raceInformation': {
'americanIndianAlaskaNative': null,
'americanIndianAlaskaNativeText': null,
'blackOrAfricanAmerican': null,
'asian': null,
'asianIndian': null,
'chinese': null,
'filipino': null,
'japanese': null,
'korean': null,
'vietnamese': null,
'otherAsian': null,
'otherAsianText': null,
'hawaiian': null,
'nativeHawaiian': null,
'guamanianChamorro': null,
'samoan': null,
'otherPacificIslander': null,
'otherPacificIslanderText': null,
'white': null,
'notProvided': null
},
'otherIncomeInformation': [{
'amount': 100000,
'incomeName': 'Bingo',
'frequency': ''
},
{
'amount': 2000,
'incomeName': 'Federal Check',
'frequency': ''
},
{
'amount': 1000,
'incomeName': 'Financial Aid',
'frequency': ''
}]
}
],
'purposeOfLoan': LoanPurpose.Home_Purchase,
'purposeOfLoanSignature': 'Other',
'termOfLoan': '120',
'hasCoApplicant': CreditApplicationValues.CHOICE_YES,
'limitRequested': 25000,
'confirmJointCredit': CreditApplicationValues.CHOICE_YES,
'hasCoApplicantSpouse': CreditApplicationValues.CHOICE_YES,
'collateralInformation': {
'isAddressSame': CreditApplicationValues.CHOICE_NO,
'estimatedValue': 25000,
'propertyType': 'Quad',
'hasFirstMortgage' : CreditApplicationValues.CHOICE_NO,
'hasSecondMortgage' : CreditApplicationValues.CHOICE_NO,
'payoffFirstMortgage' : false,
'payoffSecondMortgage' : false,
'isBeingImproved': CreditApplicationValues.CHOICE_NO,
'isListedForSale': CreditApplicationValues.CHOICE_NO,
'occupancyType': 'SecondHome',
'onRentedLot': CreditApplicationValues.CHOICE_YES,
'rentPaid': '250',
'addressLine1': '987 N 1st St',
'addressLine2': '',
'zipcode': '53151',
'city': 'New Berlin',
'state': CreditApplicationValues.STATE_REQUIRED_COAPP
},
'status': ApiStatus.IN_PROGRESS,
'page': {
'hasAddress': true,
'hasEmployment': true,
'hasPersonal': true,
'hasMemberInfo': true,
'hasSpouseInfo': true,
'hasTattleSpouseInfo': true,
'hasResidenceInfo': true,
'hasVehicleCollateral': true,
'hasHMDA': true,
'hasDisclosure': true,
'hasCollateralInfo': true,
'hasNote': true
},
'error': {
'code': ApiErrorCode.No_Error,
'message': 'No Error'
}
};
export const apiTranslatorPostTranslate: ApiLoanApplication = {
'id': 'some-hashed-cosmos-id',
'date': 'some-hashed-timestamp',
'purpose': LoanPurpose.Home_Refinance,
'purposeOfLoanSignature' : 'Other',
'loanType': LoanCode.MANUFACTURED_HOME_LOAN,
'loanTitle': LoanTitle.ManufacturedHome,
'primaryContactMethod': '262-623-8990',
'requestedAmount': 25000,
'termLengthInMonths': 120,
'manufacturedHome': {
'type': MfgHomeTypeEnum.Quad,
'use': OccupancyTypeEnum.SecondHome,
'currentlyListedForSale': false,
'currentlyBeingRemodeledOrImproved': false,
'estimatedHomeValuation': 25000,
'lot': {
'address1': '123 Main St',
'address2': '',
'city': 'Milwaukee',
'state': CreditApplicationValues.STATE_REQUIRED_COAPP,
'postalCode': '53202',
'postalCodeExt': null,
'country': 'UnitedStates',
'isRented': true,
'rentalAmt': 250
}
},
'primaryBorrower': {
'firstName': 'Primary',
'middleInitial': 'J',
'lastName': 'Borrower',
'dob': '2010-01-01T00:00:00',
'ssn': '666555444',
'phone': '5555550134',
'phoneType': 'Home',
'email': '[email protected]',
'isMarried': true,
'address': {
'address1': '123 Main St',
'address2': '',
'city': 'Milwaukee',
'state': CreditApplicationValues.STATE_REQUIRED_COAPP,
'postalCode': '53202',
'postalCodeExt': null,
'country': 'UnitedStates',
'residenceType': 'Own',
'monthsResided': 101,
'monthlyPayment': 500
},
'previousAddresses': [],
'hmdaValues': {
'sexes': ['notProvided'],
'races': ['OtherAsian'],
'ethnicities': ['HispanicOrLatino'],
'otherAsianRace': 'Thai'
},
'employers': [{
'name': 'Petes Purple Pies',
'currentEmployer': true,
'employmentType': 'FullTime',
'title': 'Lead Pie Prepper',
'income': {
'sourceName': 'Petes Purple Pies',
'frequency': 'Annually',
'amountPerPeriod': 100000,
'incomeTypeCD': 'Salary',
'incomeStatus': 'IncomeStatus_Included'
},
'monthsEmployed': 120,
'language': 'English',
'workPhone': null
}
],
'language': 'English',
'otherIncomes': [],
'hasOptedOutTCPA': false
},
'coApplicant': {
'firstName': 'Spouse',
'middleInitial': 'R',
'lastName': 'Borrower',
'dob': '01/01/2009',
'ssn': '666333222',
'phone': '5555550199',
'phoneType': 'Home',
'email': '[email protected]',
'isMarried': true,
'address': {
'address1': '123 Main St',
'address2': '',
'city': 'Milwaukee',
'state': CreditApplicationValues.STATE_REQUIRED_COAPP,
'postalCode': '53202',
'postalCodeExt': null,
'country': 'UnitedStates',
'residenceType': 'Own',
'monthsResided': 101,
'monthlyPayment': 0
},
'previousAddresses': [],
'hmdaValues': {
'sexes': ['notProvided'],
'races': ['notProvided'],
'ethnicities': ['notProvided']
},
'employers': [],
'otherIncomes': [{
'incomeTypeCD': 'Other',
'sourceName': 'Bingo',
'frequency': 'Annually',
'amountPerPeriod': 100000,
'incomeStatus': 'IncomeStatus_Included'
}
],
'language': 'English',
'isMarriedToPrimaryBorrower': true,
'hasOptedOutTCPA': false
}
};
@@ -0,0 +1,216 @@
/**
* The first credit application here is when there is a co-applicant spouse and the spouse answered yes as having same address.
* The second credit application here siw hen the application goes back and changes to not applying with spouse. The has same address
* flag remains true, but coApplicantSpouse = "no"
*/
import { LoanType, LoanTypeSet } from '../../shared/loan-type';
export const primaryAndCoApplicationAddressSameApplication = {
'loanType': LoanTypeSet[0],
'hasBeenCompleted': false,
'disclosureInformation': {'contact': true, 'truthful': false},
'fullInfoBorrowers': [{
'addressInformation': {
'addressLine1': '526 E LINCOLN AVE',
'addressLine2': null,
'city': 'MILWAUKEE',
'state': 'WI',
'zipcode': '53207',
'zipcodeExt': '1721',
'residenceStatus': '0',
'residenceTimeYears': '',
'residenceTimeMonths': '0',
'residenceMonthlyPayment': null,
'isMailingAddressSame': true
},
'residenceInformation': {
'residenceStatus': '0',
'residenceTimeYears': '7',
'residenceTimeMonths': '0',
'residenceMonthlyPayment': '500',
'isMailingAddressSame': true
},
'personalInformation': {
'firstName': 'George',
'middleInitial': 'J',
'lastName': 'Frick',
'suffix': null,
'dateOfBirth': '12/02/2000',
'socialSecurityNumber': '123-12-3123',
'primaryPhoneNumberType': 0,
'primaryPhoneNumber': '(414) 732-9928',
'secondaryPhoneNumberType': null,
'secondaryPhoneNumber': null,
'email': '[email protected]',
'maritalStatus': 'yes',
'coApplicantSpouse': 'yes'
},
'spouseType': null,
'fullInfoSpouse': null,
'tattleSpouse': null,
'priorResidenceInformation': [],
'priorAddressInformation': [],
'employmentInformation': [],
'otherIncomeInformation': []
}, {
'addressInformation': {'addressLine1': '', 'addressLine2': '', 'city': '', 'state': 'WI', 'zipcode': ''},
'residenceInformation': {
'isMailingAddressSame': true,
'residenceMonthlyPayment': null,
'residenceTimeYears': '',
'residenceTimeMonths': '0',
'residenceStatus': '0'
},
'personalInformation': {
'firstName': 'Nicole',
'middleInitial': 'J',
'lastName': 'Frick',
'suffix': null,
'dateOfBirth': '12/02/2000',
'socialSecurityNumber': '123-12-3123',
'primaryPhoneNumberType': 0,
'primaryPhoneNumber': '(919) 672-3828',
'secondaryPhoneNumberType': null,
'secondaryPhoneNumber': null,
'email': '[email protected]',
'maritalStatus': 'yes'
},
'hasSameAddressAsSpouse': 'yes',
'employmentInformation': [],
'otherIncomeInformation': []
}],
'status': 'In_Progress',
'error': null,
'page': {
'hasAddress': true,
'hasEmployment': true,
'hasPersonal': true,
'hasMemberInfo': true,
'hasSpouseInfo': false,
'hasTattleSpouseInfo': false,
'hasResidenceInfo': true,
'hasVehicleCollateral': false,
'hasHMDA': false,
'hasDisclosure': false,
'hasCollateralInfo': false,
'hasNote': false
},
'hasCoApplicant': 'yes',
'limitRequested': 5000,
'confirmJointCredit': 'yes',
'coApplicantLivesInMaritalPropertyState': true,
'hasCoApplicantSpouse': 'yes',
'loanId': '964bc4-ff-4dea-c-69f9b0dbb214',
'primaryContactMethod': 'email'
};
export const sameAddressFlagBroken2 = {
'loanType': {
'id': 'cb',
'category': 'Credit Card',
'title': 'Cash Back',
'apiCode': 'CC_CashBack',
'icon': 'credit-card',
'imagePath': 'assets/cc-images/LCU_cashback.png',
'message': 'COPY.TYPE_MESSAGE.CREDITCARD_CASHBACK',
'headerMessageKey': 'HEADER.LOAN_MESSAGE.CREDITCARD_CASHBACK',
'shouldDecision': true,
'pages': [],
'defaultPurpose': 'Other',
'requiresCollateral': false
},
'hasBeenCompleted': false,
'disclosureInformation': {'contact': true, 'truthful': false},
'fullInfoBorrowers': [{
'addressInformation': {
'addressLine1': '526 E LINCOLN AVE',
'addressLine2': null,
'city': 'MILWAUKEE',
'state': 'WI',
'zipcode': '53207',
'zipcodeExt': '1721',
'residenceStatus': '0',
'residenceTimeYears': '7',
'residenceTimeMonths': '0',
'residenceMonthlyPayment': '500',
'isMailingAddressSame': true
},
'residenceInformation': {
'residenceStatus': '0',
'residenceTimeYears': '7',
'residenceTimeMonths': '0',
'residenceMonthlyPayment': '500',
'isMailingAddressSame': true
},
'personalInformation': {
'firstName': 'George',
'middleInitial': 'J',
'lastName': 'Frick',
'suffix': '',
'dateOfBirth': '12/02/2000',
'socialSecurityNumber': '123-12-3123',
'primaryPhoneNumberType': 0,
'primaryPhoneNumber': '(414) 732-9928',
'secondaryPhoneNumberType': null,
'secondaryPhoneNumber': null,
'email': '[email protected]',
'maritalStatus': 'yes',
'coApplicantSpouse': 'no'
},
'spouseType': null,
'fullInfoSpouse': null,
'tattleSpouse': null,
'priorResidenceInformation': [],
'priorAddressInformation': [],
'employmentInformation': [],
'otherIncomeInformation': []
}, {
'addressInformation': {'addressLine1': '', 'addressLine2': '', 'city': '', 'state': 'WI', 'zipcode': ''},
'residenceInformation': {
'isMailingAddressSame': true,
'residenceMonthlyPayment': null,
'residenceTimeYears': '',
'residenceTimeMonths': '0',
'residenceStatus': '0'
},
'personalInformation': {
'firstName': 'Nicole',
'middleInitial': 'J',
'lastName': 'Frick',
'suffix': '',
'dateOfBirth': '12/02/2000',
'socialSecurityNumber': '123-12-3123',
'primaryPhoneNumberType': 0,
'primaryPhoneNumber': '(919) 672-3828',
'secondaryPhoneNumberType': null,
'secondaryPhoneNumber': null,
'email': '[email protected]',
'maritalStatus': 'yes'
},
'hasSameAddressAsSpouse': 'yes',
'employmentInformation': [],
'otherIncomeInformation': []
}],
'status': 'In_Progress',
'error': null,
'page': {
'hasAddress': true,
'hasEmployment': true,
'hasPersonal': true,
'hasMemberInfo': true,
'hasSpouseInfo': false,
'hasTattleSpouseInfo': false,
'hasResidenceInfo': true,
'hasVehicleCollateral': false,
'hasHMDA': false,
'hasDisclosure': false,
'hasCollateralInfo': false,
'hasNote': false
},
'hasCoApplicant': 'yes',
'limitRequested': '5000',
'confirmJointCredit': 'yes',
'coApplicantLivesInMaritalPropertyState': true,
'hasCoApplicantSpouse': 'no',
'loanId': '964bca44-ffd8-4dea-8e5c-69f9b0dbb214'
};
@@ -0,0 +1,40 @@
import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
import { environment } from '../../../environments/environment';
import { UiSettings } from '../../shared/configuration/ui-settings';
@Injectable({
providedIn: 'root'
})
export class MockConfigurationService {
private uiSettings: UiSettings;
// This is a mock so we don't use HttpClient.
constructor() { }
public buildPingURL(): string {
return environment.urlBase + '/UiSettings/';
}
public reloadConfiguration(): Observable<any> {
return of({});
}
public saveConfiguration(config: UiSettings): void {
this.uiSettings = config;
}
public getConfigurationByField(field: string): any {
if (!this.uiSettings) {
throw new Error('UI Settings not loaded');
}
return this.uiSettings[field];
}
public getAllConfiguration(): UiSettings {
if (this.uiSettings) {
return this.uiSettings;
}
throw new Error('UI Settings not loaded');
}
}
@@ -0,0 +1,38 @@
import { Injectable } from '@angular/core';
import { CreditApplication } from '../../shared/credit-application';
import { Observable, of } from 'rxjs';
import { DecisionStatus } from '../../shared/decision/decision-status';
import { ICreditApplicationDaoService } from '../../shared/credit-application-dao.service';
@Injectable({
providedIn: 'root'
})
export class MockCreditApplicationDaoService implements ICreditApplicationDaoService {
// This is a mock so we don't use HttpClient.
constructor() { }
public saveApplication(creditApplication: CreditApplication): Observable<any> {
return of(null);
}
createApplication(creditApplication: CreditApplication): Observable<any> {
return of(null);
}
decideApplication(creditApplication: CreditApplication): Observable<Object> {
return of(null);
}
getApplicationDecision(creditApplication: CreditApplication): Observable<DecisionStatus> {
return of(null);
}
submitApplication(creditApplication: CreditApplication): Observable<any> {
return of(null);
}
updateApplication(creditApplication: CreditApplication): Observable<any> {
return of(null);
}
}
@@ -0,0 +1,81 @@
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
import { HttpHeaders } from '@angular/common/http';
import { Observable, of, BehaviorSubject } from 'rxjs';
import { ApiLoanApplication } from 'src/app/shared/api-models/api-loan-application';
import { TestApiCreditApplication } from './test-api-credit-application';
export class MockLoanTableService {
public loanApp: ApiLoanApplication = TestApiCreditApplication;
public loanApps: ApiLoanApplication[] = [this.loanApp];
private applicationSet: BehaviorSubject<Array<ApiLoanApplication>> = new BehaviorSubject<Array<ApiLoanApplication>>(this.loanApps);
public applicationSet$ = this.applicationSet.asObservable();
constructor() {}
public buildApiURL(): string {
return environment.urlBase + '/Storage';
}
public buildHeader(): HttpHeaders {
return new HttpHeaders().set('Authorization', 'Bearer ' + localStorage.getItem('adal.idtoken'));
}
public hasApplications(): boolean {
return !!(this.applicationSet.value.length);
}
public loadApplications(): Observable<any> {
return of({});
}
public reloadApplications() {
this.loadApplications().subscribe(
(success: ApiLoanApplication[]) => {
this.setApplications(success);
}
);
}
public deleteApplication(loanId: string): Observable<any> {
return of({});
}
public deleteAndLoad(loanId: string) {
this.deleteApplication(loanId).subscribe(
() => {
this.reloadApplications();
}
);
}
public submitAndLoad(loanId: string) {
this.submitApplication(loanId).subscribe(
() => {
this.reloadApplications();
}
);
}
public setApplications(applications: ApiLoanApplication[]): void {
this.applicationSet.next(applications);
}
public submitApplication(loanId: string): Observable<any> {
return of({});
}
public getApplicationById(loanId: string): ApiLoanApplication {
if (!this.applicationSet.value.length) {
throw new Error('Applications are not loaded');
}
const single = this.applicationSet.value.find(x => x.id === loanId);
if (!single) {
throw new Error('Application not found');
}
return single;
}
}
@@ -0,0 +1,168 @@
import { ApiLoanApplication } from '../../shared/api-models/api-loan-application';
import { LoanCode } from 'src/app/shared/loan-type/loan-code';
import {LoanTitle} from '../../shared/loan-type/loan-title';
export const TestApiCreditApplication: ApiLoanApplication = {
'id': '0',
'loanType': LoanCode.CC_CashBack,
'loanTitle': LoanTitle.CashBack,
'note': 'This is a note!',
'primaryContactMethod': '262-623-8990',
'requestedAmount': 1000,
'date': '2018-07-23',
'primaryBorrower': {
'hasOptedOutTCPA': false,
'firstName': 'Dennis',
'middleInitial': 'J',
'lastName': 'Reynolds',
'dob': '2000-07-23',
'ssn': 'string',
'phone': 'string',
'phoneType': 'Mobile',
'email': 'string',
'address': {
'address1': 'string',
'address2': 'string',
'city': 'string',
'state': 'AA',
'postalCode': 'string',
'country': 'string',
'monthsResided': 0,
'residenceType': 'Own',
'id': 'string'
},
'previousAddresses': [
{
'address1': 'string',
'address2': 'string',
'city': 'string',
'state': 'AA',
'postalCode': 'string',
'country': 'string',
'monthsResided': 0,
'residenceType': 'Own',
'id': 'string'
}
],
'employers': [
{
'id': 'string',
'name': 'string',
'currentEmployer': true,
'employmentType': 'NoneSelected',
'title': 'string',
'income': {
'incomeTypeCD': 'Alimony',
'sourceName': 'string',
'alimonyStatus': 'CourtOrdered',
'amountPerPeriod': 0,
'frequency': 'Annually',
'hoursPerWeek': '0',
'incomeAdjustmentPercentage': 0,
'adjustedIncome': 0,
'incomeStatus': 'IncomeStatus_Excluded'
},
'monthsEmployed': 0,
'startDate': '2018-07-23T19:29:57.744Z',
'endDate': '2018-07-23T19:29:57.744Z',
'workPhone': 'string',
'language': 'string'
}
],
'otherIncomes': [
{
'incomeTypeCD': 'Alimony',
'sourceName': 'string',
'alimonyStatus': 'CourtOrdered',
'amountPerPeriod': 0,
'frequency': 'Annually',
'hoursPerWeek': '0',
'incomeAdjustmentPercentage': 0,
'adjustedIncome': 0,
'incomeStatus': 'IncomeStatus_Excluded'
}
],
'isMarried': true,
'language': 'string',
'customerNumber': 'string',
'id': 'string'
},
'coApplicant':
{
'hasOptedOutTCPA': false,
'firstName': 'string',
'middleInitial': 'string',
'lastName': 'string',
'dob': '2018-07-23T19:29:57.744Z',
'ssn': 'string',
'phone': 'string',
'phoneType': 'Mobile',
'email': 'string',
'address': {
'address1': 'string',
'address2': 'string',
'city': 'string',
'state': 'AA',
'postalCode': 'string',
'country': 'string',
'monthsResided': 0,
'residenceType': 'Own',
'id': 'string'
},
'previousAddresses': [
{
'address1': 'string',
'address2': 'string',
'city': 'string',
'state': 'AA',
'postalCode': 'string',
'country': 'string',
'monthsResided': 0,
'residenceType': 'Own',
'id': 'string'
}
],
'employers': [
{
'id': 'string',
'name': 'string',
'currentEmployer': true,
'employmentType': 'NoneSelected',
'title': 'string',
'income': {
'incomeTypeCD': 'Alimony',
'sourceName': 'string',
'alimonyStatus': 'CourtOrdered',
'amountPerPeriod': 0,
'frequency': 'Annually',
'hoursPerWeek': '0',
'incomeAdjustmentPercentage': 0,
'adjustedIncome': 0,
'incomeStatus': 'IncomeStatus_Excluded'
},
'monthsEmployed': 0,
'startDate': '2018-07-23T19:29:57.744Z',
'endDate': '2018-07-23T19:29:57.744Z',
'workPhone': 'string',
'language': 'string'
}
],
'otherIncomes': [
{
'incomeTypeCD': 'Alimony',
'sourceName': 'string',
'alimonyStatus': 'CourtOrdered',
'amountPerPeriod': 0,
'frequency': 'Annually',
'hoursPerWeek': '0',
'incomeAdjustmentPercentage': 0,
'adjustedIncome': 0,
'incomeStatus': 'IncomeStatus_Excluded'
}
],
'isMarried': true,
'language': 'string',
'customerNumber': 'string',
'id': 'string'
}
};
@@ -0,0 +1,156 @@
import { LoanCode } from 'src/app/shared/loan-type/loan-code';
import { ApiLoanContainer } from 'src/app/shared/api-models/api-loan-container';
import { ApiStatus } from 'src/app/shared/api-models/api-status';
import { ApiError, ApiErrorCode } from 'src/app/shared/api-models/api-error';
import { CreditApplication } from '../../shared/credit-application';
import { LoanTypeSet } from '../../shared/loan-type';
export const TestTranslateCreditApplication: any = {
'loanType': LoanTypeSet[13],
'hasBeenCompleted': false,
'fullInfoBorrowers': [{
'priorAddressInformation': [],
'priorResidenceInformation': [],
'addressInformation': {
'addressLine1': '5445 S Westridge Dr',
'addressLine2': '',
'city': 'New Berlin',
'state': 'WI',
'zipcode': '53151'
},
'residenceInformation': {
'residenceMonthlyPayment': 750,
'residenceStatus': 0,
'residenceTimeMonths': '0',
'residenceTimeYears': '6',
'isMailingAddressSame': true
},
'personalInformation': {
'firstName': 'JOHN',
'middleInitial': 'P',
'lastName': 'DOE',
'dateOfBirth': '01/01/1970',
'socialSecurityNumber': '999-99-9990',
'primaryPhoneNumberType': 1,
'primaryPhoneNumber': '262-796-1100',
'secondaryPhoneNumberType': 1,
'secondaryPhoneNumber': '262-796-6370',
'email': '[email protected]'
},
'ethnicityInformation': {'otherHispanicLatinoText': null},
'genderInformation': {},
'raceInformation': {'americanIndianAlaskaNativeText': null, 'otherAsianText': null, 'otherPacificIslanderText': null}
}],
'hasCoApplicant': 'no',
'hasCoApplicantSpouse': null,
'primaryContactMethod': null,
// 'applicantType': 'no',
'limitRequested': 5555,
// 'livesInMaritalPropertyState': 'yes',
'coApplicantLivesInMaritalPropertyState': 'no',
'purposeOfLoan': 'Other',
'termOfLoan': 12,
'page': null,
'status': null,
'error': null
};
export const TestApiLoanContainer: ApiLoanContainer = {
'memberId': '1231',
'individualId': '1231',
'loanApplication': {
'id': '0',
'loanType': LoanCode.CC_CashBack,
'note': 'This is a note!',
'primaryContactMethod': '262-623-8990',
'requestedAmount': 1000,
'date': '2018-07-23',
'primaryBorrower': {
'hasOptedOutTCPA': false,
'firstName': 'Dennis',
'middleInitial': 'J',
'lastName': 'Reynolds',
'dob': '2018-07-23T19:29:57.744Z',
'ssn': '123123123',
'phone': '2622221215',
'phoneType': 'Mobile',
'email': '[email protected]',
'address': {
'address1': '12123 Apple Lane',
'address2': null,
'city': 'Milwaukee',
'state': 'WI',
'postalCode': '53033',
'country': 'UnitedStates',
'monthlyPayment': 2222,
'monthsResided': 84,
'residenceType': 'Own',
'id': '9e178efa'
},
'previousAddresses': [],
'employers': null,
'otherIncomes': null,
'isMarried': false,
'language': 'English',
'customerNumber': '0',
'id': 'a60d'
},
'coApplicant':
{
'hasOptedOutTCPA': false,
'firstName': 'John',
'middleInitial': 'M',
'lastName': 'Wick',
'dob': '2018-07-23T19:29:57.744Z',
'ssn': '355096548',
'phone': '2316454567',
'phoneType': 'Mobile',
'email': '[email protected]',
'address': {
'address1': '1243 Sugar Road',
'address2': null,
'city': 'Sussex',
'state': 'WI',
'postalCode': '53211',
'country': 'UnitedStates',
'monthlyPayment': 800,
'monthsResided': 24,
'residenceType': 'Own',
'id': 'fja23s'
},
'previousAddresses': null,
'employers': null,
'otherIncomes': null,
'isMarried': false,
'language': 'English',
'customerNumber': '0',
'id': '12sd41'
}
},
'page': {
'hasAddress': true,
'hasEmployment': true,
'hasPersonal': true,
'hasMemberInfo': true,
'hasSpouseInfo': true,
'hasTattleSpouseInfo': true,
'hasResidenceInfo': true,
'hasVehicleCollateral': true,
'hasHMDA': true,
'hasDisclosure': true,
'hasCollateralInfo': true,
'hasNote': true
},
'status': ApiStatus.IN_PROGRESS,
'error': {
code: ApiErrorCode.No_Error,
message: 'No Errors'
},
'date': new Date(),
'id': '12341234',
'loanId': '12341234',
'loanType': LoanCode.CC_CashBack,
'branch': 'milwaukee',
'firstName': 'john',
'lastName': 'sanders'
};
@@ -0,0 +1,357 @@
import { CoreIndividual } from '../../member/models/core-individual';
import { PersonalInformation } from '../../loan-wizard/field-groups/personal/personal-information';
import { PhoneTypeEnum } from '../../shared/api-models/api-enums';
import { AddressInformation } from '../../loan-wizard/field-groups/address/address-information';
export const convertedPrimaryAddress = <AddressInformation>{
addressLine1: '9515 W National Ave',
addressLine2: '',
city: 'West Allis',
state: 'WI',
zipcode: '53227'
};
export const convertedPersonalInformation = <PersonalInformation>{
firstName: 'TIMMY',
middleInitial: '',
lastName: 'TESTER',
dateOfBirth: '01/01/1990',
socialSecurityNumber: '395-76-1111',
primaryPhoneNumberType: PhoneTypeEnum.Mobile,
primaryPhoneNumber: '262-796-4501',
secondaryPhoneNumberType: PhoneTypeEnum.Mobile,
secondaryPhoneNumber: '262-796-4500',
email: '[email protected]'
};
export const testCoreIndividual = <CoreIndividual>{
'individualId': 731085,
'individualType': 'Individual',
'title': '',
'firstName': 'TIMMY',
'middleName': '',
'lastName': 'TESTER',
'nameSuffix': '',
'taxId': '395-76-1111',
'gender': '',
'birthDate': '1990-01-01T00:00:00',
'branch': 2,
'driversLicense': '',
'driversLicenseState': '',
'ident': '',
'preferredContact': 'No Preference',
'maritalStatus': 'Unknown',
'isUSCitizen': false,
'primaryAddressId': 3644887,
'isEmployee': false,
'employeeNumber': 0,
'companyName': '',
'employerName': '',
'applicationCountLast90Days': 0,
'applicationsDeclinedLast90Days': 0,
'applicationsApprovedLast90Days': 0,
'address': [
{
'addressId': 1326362,
'line1': '8035 W LORRAINE PL',
'line2': '',
'line3': '',
'city': 'MILWAUKEE',
'state': 'WI',
'zipCode': '53222-4933',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 8035,
'occupancy': 'None',
'startDate': '0001-01-01T00:00:00',
'endDate': '0001-01-01T00:00:00',
'uspsVerified': true
}, {
'addressId': 1531702,
'line1': '5445 S WESTRIDGE DR',
'line2': 'Att: Jeff Knaub',
'line3': '',
'city': 'NEW BERLIN',
'state': 'WI',
'zipCode': '53151-7948',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 5445,
'occupancy': 'None',
'startDate': '0001-01-01T00:00:00',
'endDate': '0001-01-01T00:00:00',
'uspsVerified': false
}, {
'addressId': 1596633,
'line1': '106 E MAIN ST',
'line2': '',
'line3': '',
'city': 'BEAVER DAM',
'state': 'WI',
'zipCode': '53916-1837',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 106,
'occupancy': 'None',
'startDate': '0001-01-01T00:00:00',
'endDate': '0001-01-01T00:00:00',
'uspsVerified': true
}, {
'addressId': 2661829,
'line1': '123 Test St',
'line2': '',
'line3': '',
'city': 'New Berlin',
'state': 'WI',
'zipCode': '53151',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 123,
'occupancy': 'None',
'startDate': '0001-01-01T00:00:00',
'endDate': '2016-01-07T00:00:00',
'uspsVerified': false
}, {
'addressId': 2661878,
'line1': '5445 S Westridge Dr',
'line2': '',
'line3': '',
'city': 'New Berlin',
'state': 'WI',
'zipCode': '53151',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 5445,
'occupancy': 'None',
'startDate': '2016-01-07T00:00:00',
'endDate': '2016-02-08T00:00:00',
'uspsVerified': false
}, {
'addressId': 2675139,
'line1': '110 E CLAYTON ST',
'line2': '',
'line3': '',
'city': 'ATHENS',
'state': 'GA',
'zipCode': '30601',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 110,
'occupancy': 'None',
'startDate': '2016-02-08T00:00:00',
'endDate': '2016-02-08T00:00:00',
'uspsVerified': false
}, {
'addressId': 2675278,
'line1': '110 TEST ST',
'line2': '',
'line3': '',
'city': 'ATHENS',
'state': 'GA',
'zipCode': '30605',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 110,
'occupancy': 'None',
'startDate': '2016-02-08T00:00:00',
'endDate': '2016-02-08T00:00:00',
'uspsVerified': false
}, {
'addressId': 2675312,
'line1': '5445 S WESTRIDGE DR',
'line2': '',
'line3': '',
'city': 'NEW BERLIN',
'state': 'WI',
'zipCode': '53151',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 5445,
'occupancy': 'None',
'startDate': '2016-02-08T00:00:00',
'endDate': '2016-02-09T00:00:00',
'uspsVerified': false
}, {
'addressId': 2675535,
'line1': 'P.O. BOX 510868',
'line2': '',
'line3': '',
'city': 'NEW BERLIN',
'state': 'WI',
'zipCode': '53151',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 0,
'occupancy': 'None',
'startDate': '2016-02-09T00:00:00',
'endDate': '2016-02-11T00:00:00',
'uspsVerified': false
}, {
'addressId': 2676405,
'line1': '5445 S WESTRIDGE DR',
'line2': '',
'line3': '',
'city': 'NEW BERLIN',
'state': 'WI',
'zipCode': '53151',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 5445,
'occupancy': 'None',
'startDate': '2016-02-11T00:00:00',
'endDate': '2016-02-11T00:00:00',
'uspsVerified': false
}, {
'addressId': 2676427,
'line1': 'P.O. BOX 510868',
'line2': '',
'line3': '',
'city': 'NEW BERLIN',
'state': 'WI',
'zipCode': '53151',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 0,
'occupancy': 'None',
'startDate': '2016-02-11T00:00:00',
'endDate': '2016-02-11T00:00:00',
'uspsVerified': false
}, {
'addressId': 2676618,
'line1': '1234 MAPLE ST',
'line2': '',
'line3': '',
'city': 'MILWAUKEE',
'state': 'WI',
'zipCode': '53222',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 1234,
'occupancy': 'None',
'startDate': '2016-02-11T00:00:00',
'endDate': '2016-12-14T00:00:00',
'uspsVerified': false
}, {
'addressId': 3280018,
'line1': '1234 TEST ST',
'line2': '',
'line3': '',
'city': 'MILWAUKEE',
'state': 'WI',
'zipCode': '53222',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 1234,
'occupancy': 'None',
'startDate': '2016-12-14T00:00:00',
'endDate': '0001-01-01T00:00:00',
'uspsVerified': false
}, {
'addressId': 3644885,
'line1': '5445 S Westrdige Dr',
'line2': '',
'line3': '',
'city': 'New Berlin',
'state': 'WI',
'zipCode': '53151',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': false,
'isInternational': false,
'addressVerification': 5445,
'occupancy': 'Other',
'startDate': '0001-01-01T00:00:00',
'endDate': '0001-01-01T00:00:00',
'uspsVerified': false
}, {
'addressId': 3644887,
'line1': '9515 W National Ave',
'line2': '',
'line3': '',
'city': 'West Allis',
'state': 'WI',
'zipCode': '53227',
'country': 'US',
'countyName': '',
'addressType': 'Home',
'isPrimary': true,
'isInternational': false,
'addressVerification': 9515,
'occupancy': 'None',
'startDate': '0001-01-01T00:00:00',
'endDate': '0001-01-01T00:00:00',
'uspsVerified': false
}],
'email1': '[email protected]',
'email2': '',
'phone': [
{
'phoneKey': 'ApexApiWrapper.Apex.MemberServices.PhoneKey',
'isPrimaryForType': false,
'isInternational': false,
'countryCode': '',
'areaCode': '262',
'phoneNumber': '796-4502',
'extension': '0'
}, {
'phoneKey': 'ApexApiWrapper.Apex.MemberServices.PhoneKey',
'isPrimaryForType': false,
'isInternational': false,
'countryCode': '',
'areaCode': '262',
'phoneNumber': '796-4500',
'extension': '0'
}, {
'phoneKey': 'ApexApiWrapper.Apex.MemberServices.PhoneKey',
'isPrimaryForType': true,
'isInternational': false,
'countryCode': '',
'areaCode': '262',
'phoneNumber': '796-4501',
'extension': '0'
}],
'status': 'Active',
'isHomeOwner': false,
'isHeadOfHouseHold': false,
'language': ''
};
@@ -0,0 +1,218 @@
import { LoanTypeSet, LoanType } from '../../shared/loan-type';
import { CreditApplicationValues } from '../../shared/credit-application-values';
import { CreditApplication } from '../../shared/credit-application';
import { LoanPurpose } from 'src/app/shared/loan-type/loan-purpose';
import { ApiStatus } from 'src/app/shared/api-models/api-status';
import { ApiErrorCode } from 'src/app/shared/api-models/api-error';
import { PhoneTypeEnum } from 'src/app/shared/api-models/api-enums';
import { VehicleType } from 'src/app/shared/vehicle-type/vehicle-type';
export const vehicleCreditApplication: CreditApplication = {
'loanType': LoanTypeSet[7],
'note': 'This is a note!',
'primaryContactMethod': '262-623-8990',
'hasBeenCompleted': false,
'disclosureInformation': {
'truthful': true,
'contact': true,
'date': new Date()
},
'coApplicantLivesInMaritalPropertyState': true,
'fullInfoBorrowers': [
{
'addressInformation': {
'addressLine1': '123 Main St',
'addressLine2': '',
'zipcode': '53202',
'city': 'Milwaukee',
'state': CreditApplicationValues.STATE_REQUIRED_COAPP
},
'residenceInformation': {
'isMailingAddressSame': true,
'residenceMonthlyPayment': 500,
'residenceTimeYears': '8',
'residenceTimeMonths': '5',
'residenceStatus': '0'
},
'personalInformation': {
'firstName': 'Primary',
'middleInitial': 'J',
'lastName': 'Borrower',
'dateOfBirth': '01/01/2010',
'socialSecurityNumber': '666-55-5444',
'primaryPhoneNumberType': PhoneTypeEnum.Home,
'primaryPhoneNumber': '(555) 555-0134',
'secondaryPhoneNumberType': null,
'secondaryPhoneNumber': null,
'email': '[email protected]',
'maritalStatus': CreditApplicationValues.CHOICE_YES
},
'genderInformation': {
'female': null,
'male': true,
'notProvided': null,
},
'ethnicityInformation': {
'hispanicOrLatino': true,
'mexican': null,
'puertoRican': null,
'cuban': null,
'otherHispanicLatino': null,
'otherHispanicLatinoText': null,
'notHispanicOrLatino': null,
'notProvided': null
},
'raceInformation': {
'americanIndianAlaskaNative': null,
'americanIndianAlaskaNativeText': null,
'blackOrAfricanAmerican': null,
'asian': null,
'asianIndian': null,
'chinese': null,
'filipino': null,
'japanese': null,
'korean': null,
'vietnamese': null,
'otherAsian': true,
'otherAsianText': 'Thai',
'hawaiian': null,
'nativeHawaiian': null,
'guamanianChamorro': null,
'samoan': null,
'otherPacificIslander': null,
'otherPacificIslanderText': null,
'white': null,
'notProvided': null
},
'employmentInformation': [{
'employerName': 'Petes Purple Pies',
'employmentType': 'FullTime',
'jobTitle': 'Lead Pie Prepper',
'salary': 100000,
'schedule': 'Annually',
'employmentLengthYears': 10,
'employmentLengthMonths': 0,
'weeklyHours': null,
'workPhoneNumber': ''
}]
}, {
'addressInformation': {
'addressLine1': '123 Main St',
'addressLine2': '',
'zipcode': '53202',
'city': 'Milwaukee',
'state': CreditApplicationValues.STATE_REQUIRED_COAPP
},
'residenceInformation': {
'isMailingAddressSame': true,
'residenceMonthlyPayment': 500,
'residenceTimeYears': '8',
'residenceTimeMonths': '5',
'residenceStatus': '0'
},
'personalInformation': {
'firstName': 'Spouse',
'middleInitial': 'R',
'lastName': 'Borrower',
'dateOfBirth': '01/01/2009',
'socialSecurityNumber': '666-33-3222',
'primaryPhoneNumberType': PhoneTypeEnum.Home,
'primaryPhoneNumber': '(555) 555-0199',
'secondaryPhoneNumberType': null,
'secondaryPhoneNumber': null,
'email': '[email protected]',
'maritalStatus': CreditApplicationValues.CHOICE_YES
},
'genderInformation': {
'female': null,
'male': null,
'notProvided': true
},
'ethnicityInformation': {
'hispanicOrLatino': null,
'mexican': null,
'puertoRican': null,
'cuban': null,
'otherHispanicLatino': null,
'otherHispanicLatinoText': null,
'notHispanicOrLatino': null,
'notProvided': null
},
'raceInformation': {
'americanIndianAlaskaNative': null,
'americanIndianAlaskaNativeText': null,
'blackOrAfricanAmerican': null,
'asian': null,
'asianIndian': null,
'chinese': null,
'filipino': null,
'japanese': null,
'korean': null,
'vietnamese': null,
'otherAsian': null,
'otherAsianText': null,
'hawaiian': null,
'nativeHawaiian': null,
'guamanianChamorro': null,
'samoan': null,
'otherPacificIslander': null,
'otherPacificIslanderText': null,
'white': null,
'notProvided': null
},
'otherIncomeInformation': [{
'amount': 100000,
'incomeName': 'Bingo',
'frequency': ''
},
{
'amount': 2000,
'incomeName': 'Federal Check',
'frequency': ''
},
{
'amount': 1000,
'incomeName': 'Financial Aid',
'frequency': ''
}]
}
],
'vehicleInformation': {
'value': 1234,
'condition': 'New',
'type': VehicleType.AUTO,
'year': 1999,
'make': 'chevrolet',
'model': 'camaro',
'mileage': 23222,
'term': '24 Months',
'loanPurpose': 'Purchase',
'seller' : 'Private Pary'
},
'purposeOfLoan': LoanPurpose.Purchase,
'termOfLoan': '60',
'hasCoApplicant': CreditApplicationValues.CHOICE_YES,
'limitRequested': 25000,
'confirmJointCredit': CreditApplicationValues.CHOICE_YES,
'hasCoApplicantSpouse': CreditApplicationValues.CHOICE_YES,
'status': ApiStatus.IN_PROGRESS,
'page': {
'hasAddress': true,
'hasEmployment': true,
'hasPersonal': true,
'hasMemberInfo': true,
'hasSpouseInfo': true,
'hasTattleSpouseInfo': true,
'hasResidenceInfo': true,
'hasVehicleCollateral': true,
'hasHMDA': true,
'hasDisclosure': true,
'hasCollateralInfo': true,
'hasNote': true
},
'error': {
'code': ApiErrorCode.No_Error,
'message': 'No Error'
}
};