@dynamatix/gb-schemas 2.3.243 → 2.3.245
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;AAwXhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D,CAAC;AAEnF,eAAe,gBAAgB,CAAC"}
|
|
@@ -326,6 +326,24 @@ welcomeCallSchema.virtual('accountHolderAndBank').get(function () {
|
|
|
326
326
|
}
|
|
327
327
|
return null;
|
|
328
328
|
});
|
|
329
|
+
// virtual property for property address
|
|
330
|
+
welcomeCallSchema.virtual('customerPropertyAddress').get(function () {
|
|
331
|
+
if (this.applicantId && typeof this.applicantId === 'object') {
|
|
332
|
+
const applicant = this.applicantId;
|
|
333
|
+
// Use only regular address fields (propertyAddressLine1, propertyAddressLine2, propertyAddressLine3)
|
|
334
|
+
if (applicant.propertyAddressLine1) {
|
|
335
|
+
const addressParts = [
|
|
336
|
+
applicant.propertyAddressLine1,
|
|
337
|
+
applicant.propertyAddressLine2,
|
|
338
|
+
applicant.propertyAddressLine3,
|
|
339
|
+
applicant.propertyAddressCity,
|
|
340
|
+
applicant.propertyAddressPostCode
|
|
341
|
+
].filter(part => part && part.trim() !== '');
|
|
342
|
+
return addressParts.join(', ');
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return null;
|
|
346
|
+
});
|
|
329
347
|
// Apply workflow plugin to the schema
|
|
330
348
|
applyWorkflowPlugin(welcomeCallSchema, 'applicantwelcomecall');
|
|
331
349
|
const WelcomeCallModel = mongoose.model('ApplicantWelcomeCall', welcomeCallSchema);
|