@dynamatix/gb-schemas 2.3.265 → 2.3.267
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicant-welcome-call.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-welcome-call.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"applicant-welcome-call.model.d.ts","sourceRoot":"","sources":["../../applicants/applicant-welcome-call.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAymBhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
|
|
@@ -247,41 +247,70 @@ welcomeCallSchema.virtual('customerCurrentResidentialAddress').get(function () {
|
|
|
247
247
|
});
|
|
248
248
|
// Virtual property for applicant employer/business name based on income settings
|
|
249
249
|
welcomeCallSchema.virtual('applicantEmployerBusinessName').get(function () {
|
|
250
|
+
console.log(this.applicantId, 'testing');
|
|
250
251
|
if (this.applicantId && typeof this.applicantId === 'object') {
|
|
251
252
|
const applicant = this.applicantId;
|
|
253
|
+
console.log(applicant, 'applicant data');
|
|
252
254
|
// Check if applicant has income settings
|
|
253
255
|
if (applicant.incomeSourceId && typeof applicant.incomeSourceId === 'object') {
|
|
254
256
|
const incomeSettings = applicant.incomeSourceId;
|
|
257
|
+
// Debug logging
|
|
258
|
+
console.log('Income Settings:', {
|
|
259
|
+
incomeFromEmployment: incomeSettings.incomeFromEmployment,
|
|
260
|
+
employmentStatusLid: incomeSettings.employmentStatusLid
|
|
261
|
+
});
|
|
255
262
|
// If incomeFromEmployment is false, return N/A
|
|
256
263
|
if (!incomeSettings.incomeFromEmployment) {
|
|
264
|
+
console.log('Returning N/A: incomeFromEmployment is false');
|
|
257
265
|
return 'N/A';
|
|
258
266
|
}
|
|
259
267
|
// Check employment status to determine if employed or self-employed
|
|
260
268
|
if (incomeSettings.employmentStatusLid && typeof incomeSettings.employmentStatusLid === 'object') {
|
|
261
269
|
const employmentStatus = incomeSettings.employmentStatusLid;
|
|
262
270
|
const statusValue = employmentStatus.value || employmentStatus.name;
|
|
271
|
+
console.log('Employment Status:', {
|
|
272
|
+
statusValue,
|
|
273
|
+
name: employmentStatus.name,
|
|
274
|
+
value: employmentStatus.value
|
|
275
|
+
});
|
|
263
276
|
// Check if it's employed status (options 1, 3, 5)
|
|
264
|
-
if (statusValue === '
|
|
277
|
+
if (statusValue === '1' || statusValue === '3' || statusValue === '5') {
|
|
278
|
+
console.log('Matched employed status, checking employment info');
|
|
265
279
|
// Check employment information
|
|
266
280
|
if (applicant.employmentInformationId && typeof applicant.employmentInformationId === 'object') {
|
|
267
281
|
const employment = applicant.employmentInformationId;
|
|
282
|
+
console.log('Employment Info:', { employerName: employment.employerName });
|
|
268
283
|
if (employment.employerName && employment.employerName.trim() !== '') {
|
|
269
284
|
return employment.employerName;
|
|
270
285
|
}
|
|
271
286
|
}
|
|
272
287
|
}
|
|
273
288
|
// Check if it's self-employed or solo trader status (options 2, 4)
|
|
274
|
-
else if (statusValue === '
|
|
289
|
+
else if (statusValue === '2' || statusValue === '4' || statusValue === '6') {
|
|
290
|
+
console.log('Matched self-employed status, checking self-employment info');
|
|
275
291
|
// Check self-employment information
|
|
276
292
|
if (applicant.selfEmployedInformationId && typeof applicant.selfEmployedInformationId === 'object') {
|
|
277
293
|
const selfEmployment = applicant.selfEmployedInformationId;
|
|
294
|
+
console.log('Self-Employment Info:', { nameOfBusiness: selfEmployment.nameOfBusiness });
|
|
278
295
|
if (selfEmployment.nameOfBusiness && selfEmployment.nameOfBusiness.trim() !== '') {
|
|
279
296
|
return selfEmployment.nameOfBusiness;
|
|
280
297
|
}
|
|
281
298
|
}
|
|
282
299
|
}
|
|
300
|
+
else {
|
|
301
|
+
console.log('No matching employment status found for:', statusValue);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
console.log('No employment status found');
|
|
283
306
|
}
|
|
284
307
|
}
|
|
308
|
+
else {
|
|
309
|
+
console.log('No income settings found');
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
console.log('No applicant found');
|
|
285
314
|
}
|
|
286
315
|
return 'N/A';
|
|
287
316
|
});
|