gemcap-be-common 1.4.35 → 1.4.37
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.
- package/models/Prospect.model.d.ts +1 -0
- package/models/Prospect.model.js +101 -12
- package/models/Prospect.model.ts +117 -11
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -30,6 +30,7 @@ import { TDictionary } from '../helpers/main.helper';
|
|
|
30
30
|
import { ICRMProspectInfoNote } from './ProspectInfoNote.model';
|
|
31
31
|
import { IProspectFile } from './ProspectFile.model';
|
|
32
32
|
export declare const prospectFieldsDictionary: TDictionary;
|
|
33
|
+
export declare const sharepointFoldersDictionary: Record<string, string>;
|
|
33
34
|
declare enum EProspectPriority {
|
|
34
35
|
LOW = "LOW",
|
|
35
36
|
MEDIUM = "MEDIUM",
|
package/models/Prospect.model.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Prospect = exports.ProspectSchema = exports.ProspectValidationSchema = exports.ProspectInfoValidationSchema = exports.ProspectInfoExternalValidationSchema = exports.baseFields = exports.externalProspectInitialInfo = exports.initialFileGroups = exports.NO_ROW_ID = exports.prospectFileGroupsMap = exports.prospectFileGroups = exports.EProspectFileGroups = exports.EProspectDeclineReason = exports.EProspectStatusDict = exports.EProspectStatus = exports.prospectFieldsDictionary = void 0;
|
|
6
|
+
exports.Prospect = exports.ProspectSchema = exports.ProspectValidationSchema = exports.ProspectInfoValidationSchema = exports.ProspectInfoExternalValidationSchema = exports.baseFields = exports.externalProspectInitialInfo = exports.initialFileGroups = exports.NO_ROW_ID = exports.prospectFileGroupsMap = exports.prospectFileGroups = exports.EProspectFileGroups = exports.EProspectDeclineReason = exports.EProspectStatusDict = exports.EProspectStatus = exports.sharepointFoldersDictionary = exports.prospectFieldsDictionary = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
const joi_1 = __importDefault(require("joi"));
|
|
9
9
|
const _models_1 = require("./_models");
|
|
@@ -39,6 +39,95 @@ exports.prospectFieldsDictionary = {
|
|
|
39
39
|
closingPoints: 'Closing Points',
|
|
40
40
|
comments: 'Comments',
|
|
41
41
|
};
|
|
42
|
+
exports.sharepointFoldersDictionary = {
|
|
43
|
+
// TOP
|
|
44
|
+
legal: 'Legal',
|
|
45
|
+
portfolio: 'Portfolio',
|
|
46
|
+
underwriting: 'Underwriting',
|
|
47
|
+
// > Legal
|
|
48
|
+
drafts: 'Drafts',
|
|
49
|
+
finalDocuments: 'Final Documents',
|
|
50
|
+
// > Portfolio
|
|
51
|
+
APReports: '01. AP Reports',
|
|
52
|
+
ARReports: '02. AR Reports',
|
|
53
|
+
borrowingBaseCertificatesAndBackup: '03. Borrowing Base Certificates and Backup',
|
|
54
|
+
financials: '04. Financials',
|
|
55
|
+
inventory: '05. Inventory',
|
|
56
|
+
machineryEquipment: '06. Machinery & Equipment',
|
|
57
|
+
taxes: '07. Taxes',
|
|
58
|
+
insurance: '08. Insurance',
|
|
59
|
+
fieldExams: '09. Field Exams',
|
|
60
|
+
payments: '10. Payments',
|
|
61
|
+
interestStatements: '11. Interest Statements',
|
|
62
|
+
leasesRealEstate: '12. Leases & Real Estate',
|
|
63
|
+
agreementsContracts: '13. Agreements & Contracts',
|
|
64
|
+
liensLitigation: '14. Liens & Litigation',
|
|
65
|
+
verifications: '15. Verifications',
|
|
66
|
+
onlineBankingInstructions: '16. Online Banking Instructions',
|
|
67
|
+
compliance: '17. Compliance',
|
|
68
|
+
portfolio_other: '18. Other',
|
|
69
|
+
// > Underwriting
|
|
70
|
+
dueDiligence: '01. Due Diligence',
|
|
71
|
+
loi: '02. LOI',
|
|
72
|
+
loanMemoApprovals: '03. Loan Memo & Approvals',
|
|
73
|
+
// > Underwriting > 02. LOI
|
|
74
|
+
loiTemplates: 'zz Templates',
|
|
75
|
+
// > Underwriting > 03. Loan Memo & Approvals
|
|
76
|
+
loanMemo: '01. Loan Memo',
|
|
77
|
+
dataTablesWorkings: '02. Data, Tables & Workings',
|
|
78
|
+
approvalEmails: '03. Approval Emails',
|
|
79
|
+
templatesSamples: 'zz Templates and Samples',
|
|
80
|
+
// > Underwriting > 01. Due Diligence
|
|
81
|
+
corporateDocuments: '01. Corporate Documents',
|
|
82
|
+
// > Underwriting > 01. Due Diligence > 01. Corporate Documents
|
|
83
|
+
organizationDocumentsGoodStandings: 'a. Organization Documents and Good Standings',
|
|
84
|
+
disclosureSchedule: 'b. Disclosure Schedule',
|
|
85
|
+
corporateDocuments_insurance: 'c. Insurance',
|
|
86
|
+
ownership: 'd. Ownership',
|
|
87
|
+
officersManagersStaff: 'e. Officers, Managers, Staff',
|
|
88
|
+
// > Underwriting > 01. Due Diligence
|
|
89
|
+
lienLitigationSearchesTaxes: '02. Lien & Litigation Searches and Taxes',
|
|
90
|
+
// > Underwriting > 01. Due Diligence > 02. Lien & Litigation Searches and Taxes
|
|
91
|
+
lienLitigationSearch: 'a. Lien & Litigation Search',
|
|
92
|
+
disclosedLitigations: 'b. Disclosed Litigations',
|
|
93
|
+
payrollTaxStatementsProofOfPayment: 'c. Payroll Tax Statements & Proof of Payment',
|
|
94
|
+
incomeTaxReturns: 'd. Income Tax Returns',
|
|
95
|
+
personalPropertyTaxStatementsProofOfPayment: 'e. Personal Property Tax Statements and Proof of Payment',
|
|
96
|
+
// > Underwriting > 01. Due Diligence
|
|
97
|
+
KYC: '03. KYC',
|
|
98
|
+
// > Underwriting > 01. Due Diligence
|
|
99
|
+
collateral: '04. Collateral',
|
|
100
|
+
// > Underwriting > 01. Due Diligence > 04. Collateral
|
|
101
|
+
collateral_inventory: 'a. Inventory',
|
|
102
|
+
receivables: 'b. Receivables',
|
|
103
|
+
equipment: 'c. Equipment',
|
|
104
|
+
fieldExamAppraisals: 'd. Field Exam & Appraisals',
|
|
105
|
+
borrowingBases: 'e. Borrowing Bases',
|
|
106
|
+
// > Underwriting > 01. Due Diligence
|
|
107
|
+
financialsBankStatements: '05. Financials and Bank Statements',
|
|
108
|
+
// > Underwriting > 01. Due Diligence > 05. Financials and Bank Statements
|
|
109
|
+
historicalFinancials: 'a. Historical Financials',
|
|
110
|
+
projections: 'b. Projections',
|
|
111
|
+
accountsPayables: 'd. Accounts Payables',
|
|
112
|
+
currentDebt: 'e. Current Debt',
|
|
113
|
+
// > Underwriting > 01. Due Diligence
|
|
114
|
+
majorContracts: '06. Major Contracts',
|
|
115
|
+
// > Underwriting > 01. Due Diligence > 06. Major Contracts
|
|
116
|
+
leases: 'a. Leases',
|
|
117
|
+
it: 'b. IT',
|
|
118
|
+
majorContracts_other: 'c. Other',
|
|
119
|
+
// > Underwriting > 01. Due Diligence
|
|
120
|
+
intellectualProperty: '07. Intellectual Property',
|
|
121
|
+
// > Underwriting > 01. Due Diligence
|
|
122
|
+
fieldExamRequests: '08. Field Exam Requests',
|
|
123
|
+
// > Underwriting > 01. Due Diligence
|
|
124
|
+
customerVendorLists: '09. Customer & Vendor Lists',
|
|
125
|
+
// > Underwriting > 01. Due Diligence
|
|
126
|
+
other: '10. Other',
|
|
127
|
+
// > Underwriting > 01. Due Diligence
|
|
128
|
+
standardEmailAttachments: 'zz Standard Email Attachments',
|
|
129
|
+
underwriting_templates: 'zz Templates',
|
|
130
|
+
};
|
|
42
131
|
var EProspectPriority;
|
|
43
132
|
(function (EProspectPriority) {
|
|
44
133
|
EProspectPriority["LOW"] = "LOW";
|
|
@@ -218,51 +307,51 @@ const externalProspectInitialInfo = () => ({
|
|
|
218
307
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.financialInformation]: [
|
|
219
308
|
{
|
|
220
309
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
310
|
+
_sharepointFolder: exports.sharepointFoldersDictionary.historicalFinancials,
|
|
221
311
|
title: 'Prior 2 years and YTD Income Statement & Balance Sheet in Excel Format',
|
|
222
312
|
},
|
|
223
313
|
{
|
|
224
314
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
315
|
+
_sharepointFolder: exports.sharepointFoldersDictionary.projections,
|
|
225
316
|
title: 'Currently Monthly Projections',
|
|
226
317
|
},
|
|
227
318
|
{
|
|
228
319
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
320
|
+
_sharepointFolder: exports.sharepointFoldersDictionary.accountsPayables,
|
|
229
321
|
title: 'Last 3 Month Bank Statements',
|
|
230
322
|
},
|
|
231
|
-
{
|
|
232
|
-
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
233
|
-
title: 'Prior 2 year Tax Returns',
|
|
234
|
-
},
|
|
235
323
|
],
|
|
236
324
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivables]: [
|
|
237
325
|
{
|
|
238
326
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
239
|
-
|
|
327
|
+
_sharepointFolder: exports.sharepointFoldersDictionary.accountsPayables,
|
|
328
|
+
title: 'Excel Format: Current and past 12 months A/P aging report by invoice date',
|
|
240
329
|
},
|
|
241
330
|
{
|
|
242
331
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
243
|
-
title: 'Excel Format: Current and past 12 months
|
|
332
|
+
title: 'Excel Format: Current and past 12 months A/R aging report by invoice date',
|
|
244
333
|
},
|
|
245
334
|
{
|
|
246
335
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
247
|
-
title: 'Excel Format:
|
|
336
|
+
title: 'Excel Format: A/R dilution (write-offs) for the trailing 3 months and 12 months',
|
|
248
337
|
},
|
|
249
338
|
{
|
|
250
339
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
251
|
-
title: 'Excel Format:
|
|
340
|
+
title: 'Excel Format: Outstanding / held checks list',
|
|
252
341
|
},
|
|
253
342
|
{
|
|
254
343
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
255
|
-
title: 'Excel Format:
|
|
344
|
+
title: 'Excel Format: Average A/R and A/P turnover in days for the trailing 3 months and 12 months',
|
|
256
345
|
},
|
|
257
346
|
],
|
|
258
347
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivablesLists]: [
|
|
259
348
|
{
|
|
260
349
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
261
|
-
title: 'Excel Format:
|
|
350
|
+
title: 'Excel Format: Customer list with name, contact name, phone, email and address',
|
|
262
351
|
},
|
|
263
352
|
{
|
|
264
353
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
265
|
-
title: 'Excel Format:
|
|
354
|
+
title: 'Excel Format: Vendor list with name, contact name, phone, email and address',
|
|
266
355
|
},
|
|
267
356
|
],
|
|
268
357
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivablesExtra]: [
|
package/models/Prospect.model.ts
CHANGED
|
@@ -39,6 +39,112 @@ export const prospectFieldsDictionary: TDictionary = {
|
|
|
39
39
|
comments: 'Comments',
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
export const sharepointFoldersDictionary: Record<string, string> = {
|
|
43
|
+
// TOP
|
|
44
|
+
legal: 'Legal',
|
|
45
|
+
portfolio: 'Portfolio',
|
|
46
|
+
underwriting: 'Underwriting',
|
|
47
|
+
|
|
48
|
+
// > Legal
|
|
49
|
+
drafts: 'Drafts',
|
|
50
|
+
finalDocuments: 'Final Documents',
|
|
51
|
+
|
|
52
|
+
// > Portfolio
|
|
53
|
+
APReports: '01. AP Reports',
|
|
54
|
+
ARReports: '02. AR Reports',
|
|
55
|
+
borrowingBaseCertificatesAndBackup: '03. Borrowing Base Certificates and Backup',
|
|
56
|
+
financials: '04. Financials',
|
|
57
|
+
inventory: '05. Inventory',
|
|
58
|
+
machineryEquipment: '06. Machinery & Equipment',
|
|
59
|
+
taxes: '07. Taxes',
|
|
60
|
+
insurance: '08. Insurance',
|
|
61
|
+
fieldExams: '09. Field Exams',
|
|
62
|
+
payments: '10. Payments',
|
|
63
|
+
interestStatements: '11. Interest Statements',
|
|
64
|
+
leasesRealEstate: '12. Leases & Real Estate',
|
|
65
|
+
agreementsContracts: '13. Agreements & Contracts',
|
|
66
|
+
liensLitigation: '14. Liens & Litigation',
|
|
67
|
+
verifications: '15. Verifications',
|
|
68
|
+
onlineBankingInstructions: '16. Online Banking Instructions',
|
|
69
|
+
compliance: '17. Compliance',
|
|
70
|
+
portfolio_other: '18. Other',
|
|
71
|
+
|
|
72
|
+
// > Underwriting
|
|
73
|
+
dueDiligence: '01. Due Diligence',
|
|
74
|
+
loi: '02. LOI',
|
|
75
|
+
loanMemoApprovals: '03. Loan Memo & Approvals',
|
|
76
|
+
|
|
77
|
+
// > Underwriting > 02. LOI
|
|
78
|
+
loiTemplates: 'zz Templates',
|
|
79
|
+
|
|
80
|
+
// > Underwriting > 03. Loan Memo & Approvals
|
|
81
|
+
loanMemo: '01. Loan Memo',
|
|
82
|
+
dataTablesWorkings: '02. Data, Tables & Workings',
|
|
83
|
+
approvalEmails: '03. Approval Emails',
|
|
84
|
+
templatesSamples: 'zz Templates and Samples',
|
|
85
|
+
|
|
86
|
+
// > Underwriting > 01. Due Diligence
|
|
87
|
+
corporateDocuments: '01. Corporate Documents',
|
|
88
|
+
// > Underwriting > 01. Due Diligence > 01. Corporate Documents
|
|
89
|
+
organizationDocumentsGoodStandings: 'a. Organization Documents and Good Standings',
|
|
90
|
+
disclosureSchedule: 'b. Disclosure Schedule',
|
|
91
|
+
corporateDocuments_insurance: 'c. Insurance',
|
|
92
|
+
ownership: 'd. Ownership',
|
|
93
|
+
officersManagersStaff: 'e. Officers, Managers, Staff',
|
|
94
|
+
|
|
95
|
+
// > Underwriting > 01. Due Diligence
|
|
96
|
+
lienLitigationSearchesTaxes: '02. Lien & Litigation Searches and Taxes',
|
|
97
|
+
// > Underwriting > 01. Due Diligence > 02. Lien & Litigation Searches and Taxes
|
|
98
|
+
lienLitigationSearch: 'a. Lien & Litigation Search',
|
|
99
|
+
disclosedLitigations: 'b. Disclosed Litigations',
|
|
100
|
+
payrollTaxStatementsProofOfPayment: 'c. Payroll Tax Statements & Proof of Payment',
|
|
101
|
+
incomeTaxReturns: 'd. Income Tax Returns',
|
|
102
|
+
personalPropertyTaxStatementsProofOfPayment: 'e. Personal Property Tax Statements and Proof of Payment',
|
|
103
|
+
|
|
104
|
+
// > Underwriting > 01. Due Diligence
|
|
105
|
+
KYC: '03. KYC',
|
|
106
|
+
|
|
107
|
+
// > Underwriting > 01. Due Diligence
|
|
108
|
+
collateral: '04. Collateral',
|
|
109
|
+
// > Underwriting > 01. Due Diligence > 04. Collateral
|
|
110
|
+
collateral_inventory: 'a. Inventory',
|
|
111
|
+
receivables: 'b. Receivables',
|
|
112
|
+
equipment: 'c. Equipment',
|
|
113
|
+
fieldExamAppraisals: 'd. Field Exam & Appraisals',
|
|
114
|
+
borrowingBases: 'e. Borrowing Bases',
|
|
115
|
+
|
|
116
|
+
// > Underwriting > 01. Due Diligence
|
|
117
|
+
financialsBankStatements: '05. Financials and Bank Statements',
|
|
118
|
+
// > Underwriting > 01. Due Diligence > 05. Financials and Bank Statements
|
|
119
|
+
historicalFinancials: 'a. Historical Financials',
|
|
120
|
+
projections: 'b. Projections',
|
|
121
|
+
accountsPayables: 'd. Accounts Payables',
|
|
122
|
+
currentDebt: 'e. Current Debt',
|
|
123
|
+
|
|
124
|
+
// > Underwriting > 01. Due Diligence
|
|
125
|
+
majorContracts: '06. Major Contracts',
|
|
126
|
+
// > Underwriting > 01. Due Diligence > 06. Major Contracts
|
|
127
|
+
leases: 'a. Leases',
|
|
128
|
+
it: 'b. IT',
|
|
129
|
+
majorContracts_other: 'c. Other',
|
|
130
|
+
|
|
131
|
+
// > Underwriting > 01. Due Diligence
|
|
132
|
+
intellectualProperty: '07. Intellectual Property',
|
|
133
|
+
|
|
134
|
+
// > Underwriting > 01. Due Diligence
|
|
135
|
+
fieldExamRequests: '08. Field Exam Requests',
|
|
136
|
+
|
|
137
|
+
// > Underwriting > 01. Due Diligence
|
|
138
|
+
customerVendorLists: '09. Customer & Vendor Lists',
|
|
139
|
+
|
|
140
|
+
// > Underwriting > 01. Due Diligence
|
|
141
|
+
other: '10. Other',
|
|
142
|
+
|
|
143
|
+
// > Underwriting > 01. Due Diligence
|
|
144
|
+
standardEmailAttachments: 'zz Standard Email Attachments',
|
|
145
|
+
underwriting_templates: 'zz Templates',
|
|
146
|
+
};
|
|
147
|
+
|
|
42
148
|
enum EProspectPriority {
|
|
43
149
|
LOW = 'LOW',
|
|
44
150
|
MEDIUM = 'MEDIUM',
|
|
@@ -293,51 +399,51 @@ export const externalProspectInitialInfo = (): IProspectExternalNew => ({
|
|
|
293
399
|
[ExternalProspectStageTwoTables.financialInformation]: [
|
|
294
400
|
{
|
|
295
401
|
_id: `new_${getUUID()}`,
|
|
402
|
+
_sharepointFolder: sharepointFoldersDictionary.historicalFinancials,
|
|
296
403
|
title: 'Prior 2 years and YTD Income Statement & Balance Sheet in Excel Format',
|
|
297
404
|
},
|
|
298
405
|
{
|
|
299
406
|
_id: `new_${getUUID()}`,
|
|
407
|
+
_sharepointFolder: sharepointFoldersDictionary.projections,
|
|
300
408
|
title: 'Currently Monthly Projections',
|
|
301
409
|
},
|
|
302
410
|
{
|
|
303
411
|
_id: `new_${getUUID()}`,
|
|
412
|
+
_sharepointFolder: sharepointFoldersDictionary.accountsPayables,
|
|
304
413
|
title: 'Last 3 Month Bank Statements',
|
|
305
414
|
},
|
|
306
|
-
{
|
|
307
|
-
_id: `new_${getUUID()}`,
|
|
308
|
-
title: 'Prior 2 year Tax Returns',
|
|
309
|
-
},
|
|
310
415
|
],
|
|
311
416
|
[ExternalProspectStageTwoTables.accountsReceivables]: [
|
|
312
417
|
{
|
|
313
418
|
_id: `new_${getUUID()}`,
|
|
314
|
-
|
|
419
|
+
_sharepointFolder: sharepointFoldersDictionary.accountsPayables,
|
|
420
|
+
title: 'Excel Format: Current and past 12 months A/P aging report by invoice date',
|
|
315
421
|
},
|
|
316
422
|
{
|
|
317
423
|
_id: `new_${getUUID()}`,
|
|
318
|
-
title: 'Excel Format: Current and past 12 months
|
|
424
|
+
title: 'Excel Format: Current and past 12 months A/R aging report by invoice date',
|
|
319
425
|
},
|
|
320
426
|
{
|
|
321
427
|
_id: `new_${getUUID()}`,
|
|
322
|
-
title: 'Excel Format:
|
|
428
|
+
title: 'Excel Format: A/R dilution (write-offs) for the trailing 3 months and 12 months',
|
|
323
429
|
},
|
|
324
430
|
{
|
|
325
431
|
_id: `new_${getUUID()}`,
|
|
326
|
-
title: 'Excel Format:
|
|
432
|
+
title: 'Excel Format: Outstanding / held checks list',
|
|
327
433
|
},
|
|
328
434
|
{
|
|
329
435
|
_id: `new_${getUUID()}`,
|
|
330
|
-
title: 'Excel Format:
|
|
436
|
+
title: 'Excel Format: Average A/R and A/P turnover in days for the trailing 3 months and 12 months',
|
|
331
437
|
},
|
|
332
438
|
],
|
|
333
439
|
[ExternalProspectStageTwoTables.accountsReceivablesLists]: [
|
|
334
440
|
{
|
|
335
441
|
_id: `new_${getUUID()}`,
|
|
336
|
-
title: 'Excel Format:
|
|
442
|
+
title: 'Excel Format: Customer list with name, contact name, phone, email and address',
|
|
337
443
|
},
|
|
338
444
|
{
|
|
339
445
|
_id: `new_${getUUID()}`,
|
|
340
|
-
title: 'Excel Format:
|
|
446
|
+
title: 'Excel Format: Vendor list with name, contact name, phone, email and address',
|
|
341
447
|
},
|
|
342
448
|
],
|
|
343
449
|
[ExternalProspectStageTwoTables.accountsReceivablesExtra]: [
|