gemcap-be-common 1.3.48 → 1.3.50
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 +24 -27
- package/models/Prospect.model.js +24 -44
- package/models/Prospect.model.ts +46 -69
- package/models/ProspectInfoStageOne.model.d.ts +11 -126
- package/models/ProspectInfoStageOne.model.js +13 -18
- package/models/ProspectInfoStageOne.model.ts +13 -17
- package/models/ProspectInfoStageTwo.model.d.ts +13 -5
- package/models/ProspectInfoStageTwo.model.js +12 -4
- package/models/ProspectInfoStageTwo.model.ts +12 -4
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
import mongoose, { Document, Model } from 'mongoose';
|
|
26
26
|
import Joi from 'joi';
|
|
27
27
|
import { ExternalProspectStageTwoTables } from './ProspectInfoStageTwo.model';
|
|
28
|
+
import { ExternalProspectStageOneTables } from './ProspectInfoStageOne.model';
|
|
28
29
|
import { TDictionary } from '../helpers/main.helper';
|
|
29
30
|
export declare const prospectFieldsDictionary: TDictionary;
|
|
30
31
|
declare enum EProspectPriority {
|
|
@@ -36,7 +37,6 @@ export declare enum EProspectStatus {
|
|
|
36
37
|
PROSPECT = "PROSPECT",
|
|
37
38
|
TERM_SHEET = "TERM_SHEET",
|
|
38
39
|
DUE_DILIGENCE = "DUE_DILIGENCE",
|
|
39
|
-
PHASE_2 = "PHASE_2",
|
|
40
40
|
LOAN_DOCUMENTS = "LOAN_DOCUMENTS",
|
|
41
41
|
FUNDED = "FUNDED"
|
|
42
42
|
}
|
|
@@ -69,34 +69,32 @@ export interface ICRMProspectInfoRow {
|
|
|
69
69
|
}
|
|
70
70
|
export interface ICRMProspectInfoStageOne {
|
|
71
71
|
companyLegalName: string;
|
|
72
|
+
companyLegalAddress: string;
|
|
73
|
+
companyCorrespondenceAddress: string;
|
|
72
74
|
DBANames: string;
|
|
73
75
|
websiteAddress: string;
|
|
74
76
|
businessDescription: string;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
listOfManagers: ICRMProspectInfoRow[];
|
|
78
|
-
addressesOfOffices: ICRMProspectInfoRow[];
|
|
79
|
-
addressesOfWarehouses: ICRMProspectInfoRow[];
|
|
80
|
-
top5Customers: ICRMProspectInfoRow[];
|
|
81
|
-
numberOfEmployees: string;
|
|
82
|
-
last12MonthsSales: string;
|
|
83
|
-
amountRequest: string;
|
|
84
|
-
descriptionOfCollateral: string;
|
|
77
|
+
[ExternalProspectStageOneTables.litigation]: unknown[];
|
|
78
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: unknown[];
|
|
85
79
|
}
|
|
86
80
|
export interface ICRMProspectInfoStageTwo {
|
|
87
|
-
[ExternalProspectStageTwoTables.
|
|
88
|
-
[ExternalProspectStageTwoTables.
|
|
89
|
-
[ExternalProspectStageTwoTables.
|
|
90
|
-
[ExternalProspectStageTwoTables.
|
|
91
|
-
[ExternalProspectStageTwoTables.
|
|
92
|
-
[ExternalProspectStageTwoTables.
|
|
93
|
-
[ExternalProspectStageTwoTables.
|
|
94
|
-
[ExternalProspectStageTwoTables.
|
|
95
|
-
[ExternalProspectStageTwoTables.
|
|
96
|
-
[ExternalProspectStageTwoTables.
|
|
97
|
-
[ExternalProspectStageTwoTables.
|
|
98
|
-
[ExternalProspectStageTwoTables.
|
|
99
|
-
[ExternalProspectStageTwoTables.
|
|
81
|
+
[ExternalProspectStageTwoTables.listOfShareholders]: unknown[];
|
|
82
|
+
[ExternalProspectStageTwoTables.listOfOfficers]: unknown[];
|
|
83
|
+
[ExternalProspectStageTwoTables.listOfManagers]: unknown[];
|
|
84
|
+
[ExternalProspectStageTwoTables.addressesOfOffices]: unknown[];
|
|
85
|
+
[ExternalProspectStageTwoTables.addressesOfWarehouses]: unknown[];
|
|
86
|
+
[ExternalProspectStageTwoTables.topCustomers]: unknown[];
|
|
87
|
+
[ExternalProspectStageTwoTables.itSystems]: unknown[];
|
|
88
|
+
[ExternalProspectStageTwoTables.insuranceBrokers]: unknown[];
|
|
89
|
+
[ExternalProspectStageTwoTables.insurancePolicies]: unknown[];
|
|
90
|
+
[ExternalProspectStageTwoTables.financialInformation]: unknown[];
|
|
91
|
+
[ExternalProspectStageTwoTables.accountsReceivables]: unknown[];
|
|
92
|
+
[ExternalProspectStageTwoTables.accountsReceivablesExtra]: unknown[];
|
|
93
|
+
[ExternalProspectStageTwoTables.accountsReceivablesContacts]: unknown[];
|
|
94
|
+
[ExternalProspectStageTwoTables.inventoryInformationFiles]: unknown[];
|
|
95
|
+
[ExternalProspectStageTwoTables.inventoryInformationDetails]: unknown[];
|
|
96
|
+
[ExternalProspectStageTwoTables.inventoryInformation]: unknown[];
|
|
97
|
+
[ExternalProspectStageTwoTables.equipment]: unknown[];
|
|
100
98
|
}
|
|
101
99
|
export interface ICRMProspectExternalInfo {
|
|
102
100
|
stageOne: ICRMProspectInfoStageOne;
|
|
@@ -112,10 +110,9 @@ export declare const prospectFileGroupsMap: {
|
|
|
112
110
|
corporateDocuments: string;
|
|
113
111
|
financialsBankInformation: string;
|
|
114
112
|
collateralSales: string;
|
|
115
|
-
liensLitigations: string;
|
|
116
|
-
insurance: string;
|
|
117
|
-
majorContracts: string;
|
|
118
113
|
taxes: string;
|
|
114
|
+
borrowingBase: string;
|
|
115
|
+
majorContracts: string;
|
|
119
116
|
};
|
|
120
117
|
export declare const NO_ROW_ID = "__no_row__";
|
|
121
118
|
export declare const initialFileGroups: () => {};
|
package/models/Prospect.model.js
CHANGED
|
@@ -47,7 +47,6 @@ var EProspectStatus;
|
|
|
47
47
|
EProspectStatus["PROSPECT"] = "PROSPECT";
|
|
48
48
|
EProspectStatus["TERM_SHEET"] = "TERM_SHEET";
|
|
49
49
|
EProspectStatus["DUE_DILIGENCE"] = "DUE_DILIGENCE";
|
|
50
|
-
EProspectStatus["PHASE_2"] = "PHASE_2";
|
|
51
50
|
EProspectStatus["LOAN_DOCUMENTS"] = "LOAN_DOCUMENTS";
|
|
52
51
|
EProspectStatus["FUNDED"] = "FUNDED";
|
|
53
52
|
})(EProspectStatus || (exports.EProspectStatus = EProspectStatus = {}));
|
|
@@ -64,32 +63,17 @@ exports.prospectFileGroups = [
|
|
|
64
63
|
'corporateDocuments',
|
|
65
64
|
'financialsBankInformation',
|
|
66
65
|
'collateralSales',
|
|
67
|
-
'liensLitigations',
|
|
68
|
-
'insurance',
|
|
69
|
-
'majorContracts',
|
|
70
66
|
'taxes',
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.insuranceBrokers,
|
|
74
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.insurancePolicies,
|
|
75
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.litigation,
|
|
76
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.financialInformation,
|
|
77
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivables,
|
|
78
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivablesExtra,
|
|
79
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivablesContacts,
|
|
80
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.inventoryInformation,
|
|
81
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.inventoryInformationFiles,
|
|
82
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.inventoryInformationDetails,
|
|
83
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.equipment,
|
|
67
|
+
'borrowingBase',
|
|
68
|
+
'majorContracts',
|
|
84
69
|
];
|
|
85
70
|
exports.prospectFileGroupsMap = {
|
|
86
71
|
corporateDocuments: 'Corporate Documents',
|
|
87
72
|
financialsBankInformation: 'Financials & Bank Information',
|
|
88
73
|
collateralSales: 'Collateral & Sales',
|
|
89
|
-
liensLitigations: 'Liens & Litigations',
|
|
90
|
-
insurance: 'Insurance',
|
|
91
|
-
majorContracts: 'Major Contracts',
|
|
92
74
|
taxes: 'Taxes',
|
|
75
|
+
borrowingBase: 'Borrowing Base',
|
|
76
|
+
majorContracts: 'Major Contracts',
|
|
93
77
|
};
|
|
94
78
|
exports.NO_ROW_ID = '__no_row__';
|
|
95
79
|
const initialFileGroups = () => exports.prospectFileGroups.reduce((acc, g) => {
|
|
@@ -102,38 +86,36 @@ const externalProspectInitialInfo = () => ({
|
|
|
102
86
|
info: {
|
|
103
87
|
stageOne: {
|
|
104
88
|
companyLegalName: '',
|
|
89
|
+
companyLegalAddress: '',
|
|
90
|
+
companyCorrespondenceAddress: '',
|
|
105
91
|
DBANames: '',
|
|
106
92
|
websiteAddress: '',
|
|
107
93
|
businessDescription: '',
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
94
|
+
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.litigation]: [
|
|
95
|
+
{
|
|
96
|
+
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
97
|
+
title: 'Describe any previous, current or threatened litigation. If no litigation, please state “No previous, current or threatened litigation".',
|
|
98
|
+
comment: '',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.detailsOfCurrentDebt]: [],
|
|
102
|
+
},
|
|
103
|
+
stageTwo: {
|
|
104
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.listOfShareholders]: [],
|
|
105
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.listOfOfficers]: [],
|
|
106
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.listOfManagers]: [],
|
|
107
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.addressesOfOffices]: [],
|
|
108
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.addressesOfWarehouses]: [],
|
|
109
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.topCustomers]: [
|
|
114
110
|
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
115
111
|
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
116
112
|
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
117
113
|
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
118
114
|
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
119
115
|
],
|
|
120
|
-
numberOfEmployees: '',
|
|
121
|
-
last12MonthsSales: '',
|
|
122
|
-
amountRequest: '',
|
|
123
|
-
descriptionOfCollateral: '',
|
|
124
|
-
},
|
|
125
|
-
stageTwo: {
|
|
126
|
-
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.detailsOfCurrentDebt]: [],
|
|
127
116
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.itSystems]: [],
|
|
128
117
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.insuranceBrokers]: [],
|
|
129
118
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.insurancePolicies]: [],
|
|
130
|
-
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.litigation]: [
|
|
131
|
-
{
|
|
132
|
-
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
133
|
-
title: 'Describe any current or threatened litigation. If no litigation, please state “No current or threatened litigation”.',
|
|
134
|
-
comment: '',
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
119
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.financialInformation]: [
|
|
138
120
|
{
|
|
139
121
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
@@ -241,6 +223,8 @@ const CRMProspectInfoRowValidationSchema = joi_1.default.object({
|
|
|
241
223
|
});
|
|
242
224
|
exports.CRMProspectInfoExternalValidationSchema = joi_1.default.object({
|
|
243
225
|
companyLegalName: joi_1.default.string().allow('', null),
|
|
226
|
+
companyLegalAddress: joi_1.default.string().allow('', null),
|
|
227
|
+
companyCorrespondenceAddress: joi_1.default.string().allow('', null),
|
|
244
228
|
DBANames: joi_1.default.string().allow('', null),
|
|
245
229
|
websiteAddress: joi_1.default.string().allow('', null),
|
|
246
230
|
businessDescription: joi_1.default.string().allow('', null),
|
|
@@ -250,10 +234,6 @@ exports.CRMProspectInfoExternalValidationSchema = joi_1.default.object({
|
|
|
250
234
|
addressesOfOffices: joi_1.default.array().items(CRMProspectInfoRowValidationSchema),
|
|
251
235
|
addressesOfWarehouses: joi_1.default.array().items(CRMProspectInfoRowValidationSchema),
|
|
252
236
|
top5Customers: joi_1.default.array().items(CRMProspectInfoRowValidationSchema),
|
|
253
|
-
numberOfEmployees: joi_1.default.string().allow('', null),
|
|
254
|
-
last12MonthsSales: joi_1.default.string().allow('', null),
|
|
255
|
-
amountRequest: joi_1.default.string().allow('', null),
|
|
256
|
-
descriptionOfCollateral: joi_1.default.string().allow('', null),
|
|
257
237
|
});
|
|
258
238
|
exports.CRMProspectInfoValidationSchema = joi_1.default.object({
|
|
259
239
|
isLocked: joi_1.default.boolean().allow(null),
|
package/models/Prospect.model.ts
CHANGED
|
@@ -4,7 +4,7 @@ import Joi from 'joi';
|
|
|
4
4
|
import { MODEL_NAMES } from './_models';
|
|
5
5
|
|
|
6
6
|
import { ExternalProspectStageTwoTables, ProspectInfoStageTwo } from './ProspectInfoStageTwo.model';
|
|
7
|
-
import { ProspectInfoStageOne } from './ProspectInfoStageOne.model';
|
|
7
|
+
import { ExternalProspectStageOneTables, ProspectInfoStageOne } from './ProspectInfoStageOne.model';
|
|
8
8
|
import { getUUID, TDictionary } from '../helpers/main.helper';
|
|
9
9
|
|
|
10
10
|
export const prospectFieldsDictionary: TDictionary = {
|
|
@@ -44,7 +44,6 @@ export enum EProspectStatus {
|
|
|
44
44
|
PROSPECT = 'PROSPECT',
|
|
45
45
|
TERM_SHEET = 'TERM_SHEET',
|
|
46
46
|
DUE_DILIGENCE = 'DUE_DILIGENCE',
|
|
47
|
-
PHASE_2 = 'PHASE_2',
|
|
48
47
|
LOAN_DOCUMENTS = 'LOAN_DOCUMENTS',
|
|
49
48
|
FUNDED = 'FUNDED',
|
|
50
49
|
}
|
|
@@ -82,35 +81,33 @@ export interface ICRMProspectInfoRow {
|
|
|
82
81
|
|
|
83
82
|
export interface ICRMProspectInfoStageOne {
|
|
84
83
|
companyLegalName: string;
|
|
84
|
+
companyLegalAddress: string;
|
|
85
|
+
companyCorrespondenceAddress: string;
|
|
85
86
|
DBANames: string;
|
|
86
87
|
websiteAddress: string;
|
|
87
88
|
businessDescription: string;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
listOfManagers: ICRMProspectInfoRow[];
|
|
91
|
-
addressesOfOffices: ICRMProspectInfoRow[];
|
|
92
|
-
addressesOfWarehouses: ICRMProspectInfoRow[];
|
|
93
|
-
top5Customers: ICRMProspectInfoRow[];
|
|
94
|
-
numberOfEmployees: string;
|
|
95
|
-
last12MonthsSales: string;
|
|
96
|
-
amountRequest: string;
|
|
97
|
-
descriptionOfCollateral: string;
|
|
89
|
+
[ExternalProspectStageOneTables.litigation]: unknown[],
|
|
90
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: unknown[],
|
|
98
91
|
}
|
|
99
92
|
|
|
100
93
|
export interface ICRMProspectInfoStageTwo {
|
|
101
|
-
[ExternalProspectStageTwoTables.
|
|
102
|
-
[ExternalProspectStageTwoTables.
|
|
103
|
-
[ExternalProspectStageTwoTables.
|
|
104
|
-
[ExternalProspectStageTwoTables.
|
|
105
|
-
[ExternalProspectStageTwoTables.
|
|
106
|
-
[ExternalProspectStageTwoTables.
|
|
107
|
-
[ExternalProspectStageTwoTables.
|
|
108
|
-
[ExternalProspectStageTwoTables.
|
|
109
|
-
[ExternalProspectStageTwoTables.
|
|
110
|
-
[ExternalProspectStageTwoTables.
|
|
111
|
-
[ExternalProspectStageTwoTables.
|
|
112
|
-
[ExternalProspectStageTwoTables.
|
|
113
|
-
[ExternalProspectStageTwoTables.
|
|
94
|
+
[ExternalProspectStageTwoTables.listOfShareholders]: unknown[];
|
|
95
|
+
[ExternalProspectStageTwoTables.listOfOfficers]: unknown[];
|
|
96
|
+
[ExternalProspectStageTwoTables.listOfManagers]: unknown[];
|
|
97
|
+
[ExternalProspectStageTwoTables.addressesOfOffices]: unknown[];
|
|
98
|
+
[ExternalProspectStageTwoTables.addressesOfWarehouses]: unknown[];
|
|
99
|
+
[ExternalProspectStageTwoTables.topCustomers]: unknown[];
|
|
100
|
+
[ExternalProspectStageTwoTables.itSystems]: unknown[],
|
|
101
|
+
[ExternalProspectStageTwoTables.insuranceBrokers]: unknown[],
|
|
102
|
+
[ExternalProspectStageTwoTables.insurancePolicies]: unknown[],
|
|
103
|
+
[ExternalProspectStageTwoTables.financialInformation]: unknown[],
|
|
104
|
+
[ExternalProspectStageTwoTables.accountsReceivables]: unknown[],
|
|
105
|
+
[ExternalProspectStageTwoTables.accountsReceivablesExtra]: unknown[],
|
|
106
|
+
[ExternalProspectStageTwoTables.accountsReceivablesContacts]: unknown[],
|
|
107
|
+
[ExternalProspectStageTwoTables.inventoryInformationFiles]: unknown[],
|
|
108
|
+
[ExternalProspectStageTwoTables.inventoryInformationDetails]: unknown[],
|
|
109
|
+
[ExternalProspectStageTwoTables.inventoryInformation]: unknown[],
|
|
110
|
+
[ExternalProspectStageTwoTables.equipment]: unknown[],
|
|
114
111
|
}
|
|
115
112
|
|
|
116
113
|
export interface ICRMProspectExternalInfo {
|
|
@@ -128,34 +125,18 @@ export const prospectFileGroups: string[] = [
|
|
|
128
125
|
'corporateDocuments',
|
|
129
126
|
'financialsBankInformation',
|
|
130
127
|
'collateralSales',
|
|
131
|
-
'liensLitigations',
|
|
132
|
-
'insurance',
|
|
133
|
-
'majorContracts',
|
|
134
128
|
'taxes',
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
ExternalProspectStageTwoTables.itSystems,
|
|
138
|
-
ExternalProspectStageTwoTables.insuranceBrokers,
|
|
139
|
-
ExternalProspectStageTwoTables.insurancePolicies,
|
|
140
|
-
ExternalProspectStageTwoTables.litigation,
|
|
141
|
-
ExternalProspectStageTwoTables.financialInformation,
|
|
142
|
-
ExternalProspectStageTwoTables.accountsReceivables,
|
|
143
|
-
ExternalProspectStageTwoTables.accountsReceivablesExtra,
|
|
144
|
-
ExternalProspectStageTwoTables.accountsReceivablesContacts,
|
|
145
|
-
ExternalProspectStageTwoTables.inventoryInformation,
|
|
146
|
-
ExternalProspectStageTwoTables.inventoryInformationFiles,
|
|
147
|
-
ExternalProspectStageTwoTables.inventoryInformationDetails,
|
|
148
|
-
ExternalProspectStageTwoTables.equipment,
|
|
129
|
+
'borrowingBase',
|
|
130
|
+
'majorContracts',
|
|
149
131
|
];
|
|
150
132
|
|
|
151
133
|
export const prospectFileGroupsMap = {
|
|
152
134
|
corporateDocuments: 'Corporate Documents',
|
|
153
135
|
financialsBankInformation: 'Financials & Bank Information',
|
|
154
136
|
collateralSales: 'Collateral & Sales',
|
|
155
|
-
liensLitigations: 'Liens & Litigations',
|
|
156
|
-
insurance: 'Insurance',
|
|
157
|
-
majorContracts: 'Major Contracts',
|
|
158
137
|
taxes: 'Taxes',
|
|
138
|
+
borrowingBase: 'Borrowing Base',
|
|
139
|
+
majorContracts: 'Major Contracts',
|
|
159
140
|
};
|
|
160
141
|
|
|
161
142
|
export const NO_ROW_ID = '__no_row__';
|
|
@@ -170,38 +151,36 @@ export const externalProspectInitialInfo = (): ICRMProspectExternalNew => ({
|
|
|
170
151
|
info: {
|
|
171
152
|
stageOne: {
|
|
172
153
|
companyLegalName: '',
|
|
154
|
+
companyLegalAddress: '',
|
|
155
|
+
companyCorrespondenceAddress: '',
|
|
173
156
|
DBANames: '',
|
|
174
157
|
websiteAddress: '',
|
|
175
158
|
businessDescription: '',
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
159
|
+
[ExternalProspectStageOneTables.litigation]: [
|
|
160
|
+
{
|
|
161
|
+
_id: `new_${getUUID()}`,
|
|
162
|
+
title: 'Describe any previous, current or threatened litigation. If no litigation, please state “No previous, current or threatened litigation".',
|
|
163
|
+
comment: '',
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: [],
|
|
167
|
+
},
|
|
168
|
+
stageTwo: {
|
|
169
|
+
[ExternalProspectStageTwoTables.listOfShareholders]: [],
|
|
170
|
+
[ExternalProspectStageTwoTables.listOfOfficers]: [],
|
|
171
|
+
[ExternalProspectStageTwoTables.listOfManagers]: [],
|
|
172
|
+
[ExternalProspectStageTwoTables.addressesOfOffices]: [],
|
|
173
|
+
[ExternalProspectStageTwoTables.addressesOfWarehouses]: [],
|
|
174
|
+
[ExternalProspectStageTwoTables.topCustomers]: [
|
|
182
175
|
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
183
176
|
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
184
177
|
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
185
178
|
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
186
179
|
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
187
180
|
],
|
|
188
|
-
numberOfEmployees: '',
|
|
189
|
-
last12MonthsSales: '',
|
|
190
|
-
amountRequest: '',
|
|
191
|
-
descriptionOfCollateral: '',
|
|
192
|
-
},
|
|
193
|
-
stageTwo: {
|
|
194
|
-
[ExternalProspectStageTwoTables.detailsOfCurrentDebt]: [],
|
|
195
181
|
[ExternalProspectStageTwoTables.itSystems]: [],
|
|
196
182
|
[ExternalProspectStageTwoTables.insuranceBrokers]: [],
|
|
197
183
|
[ExternalProspectStageTwoTables.insurancePolicies]: [],
|
|
198
|
-
[ExternalProspectStageTwoTables.litigation]: [
|
|
199
|
-
{
|
|
200
|
-
_id: `new_${getUUID()}`,
|
|
201
|
-
title: 'Describe any current or threatened litigation. If no litigation, please state “No current or threatened litigation”.',
|
|
202
|
-
comment: '',
|
|
203
|
-
},
|
|
204
|
-
],
|
|
205
184
|
[ExternalProspectStageTwoTables.financialInformation]: [
|
|
206
185
|
{
|
|
207
186
|
_id: `new_${getUUID()}`,
|
|
@@ -384,6 +363,8 @@ const CRMProspectInfoRowValidationSchema = Joi.object({
|
|
|
384
363
|
|
|
385
364
|
export const CRMProspectInfoExternalValidationSchema = Joi.object({
|
|
386
365
|
companyLegalName: Joi.string().allow('', null),
|
|
366
|
+
companyLegalAddress: Joi.string().allow('', null),
|
|
367
|
+
companyCorrespondenceAddress: Joi.string().allow('', null),
|
|
387
368
|
DBANames: Joi.string().allow('', null),
|
|
388
369
|
websiteAddress: Joi.string().allow('', null),
|
|
389
370
|
businessDescription: Joi.string().allow('', null),
|
|
@@ -393,10 +374,6 @@ export const CRMProspectInfoExternalValidationSchema = Joi.object({
|
|
|
393
374
|
addressesOfOffices: Joi.array().items(CRMProspectInfoRowValidationSchema),
|
|
394
375
|
addressesOfWarehouses: Joi.array().items(CRMProspectInfoRowValidationSchema),
|
|
395
376
|
top5Customers: Joi.array().items(CRMProspectInfoRowValidationSchema),
|
|
396
|
-
numberOfEmployees: Joi.string().allow('', null),
|
|
397
|
-
last12MonthsSales: Joi.string().allow('', null),
|
|
398
|
-
amountRequest: Joi.string().allow('', null),
|
|
399
|
-
descriptionOfCollateral: Joi.string().allow('', null),
|
|
400
377
|
});
|
|
401
378
|
|
|
402
379
|
export const CRMProspectInfoValidationSchema = Joi.object({
|
|
@@ -1,141 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
import mongoose from 'mongoose';
|
|
1
|
+
export declare enum ExternalProspectStageOneTables {
|
|
2
|
+
litigation = "litigation",
|
|
3
|
+
detailsOfCurrentDebt = "detailsOfCurrentDebt"
|
|
4
|
+
}
|
|
26
5
|
export declare const ProspectInfoStageOne: {
|
|
27
6
|
companyLegalName: {
|
|
28
7
|
type: StringConstructor;
|
|
29
8
|
};
|
|
30
|
-
|
|
31
|
-
type: StringConstructor;
|
|
32
|
-
};
|
|
33
|
-
websiteAddress: {
|
|
34
|
-
type: StringConstructor;
|
|
35
|
-
};
|
|
36
|
-
businessDescription: {
|
|
9
|
+
companyLegalAddress: {
|
|
37
10
|
type: StringConstructor;
|
|
38
11
|
};
|
|
39
|
-
|
|
40
|
-
name?: string;
|
|
41
|
-
value?: string;
|
|
42
|
-
extraValue?: string;
|
|
43
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
44
|
-
name?: string;
|
|
45
|
-
value?: string;
|
|
46
|
-
extraValue?: string;
|
|
47
|
-
}>> & mongoose.FlatRecord<{
|
|
48
|
-
name?: string;
|
|
49
|
-
value?: string;
|
|
50
|
-
extraValue?: string;
|
|
51
|
-
}> & {
|
|
52
|
-
_id: mongoose.Types.ObjectId;
|
|
53
|
-
}>[];
|
|
54
|
-
listOfOfficers: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
55
|
-
name?: string;
|
|
56
|
-
value?: string;
|
|
57
|
-
extraValue?: string;
|
|
58
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
59
|
-
name?: string;
|
|
60
|
-
value?: string;
|
|
61
|
-
extraValue?: string;
|
|
62
|
-
}>> & mongoose.FlatRecord<{
|
|
63
|
-
name?: string;
|
|
64
|
-
value?: string;
|
|
65
|
-
extraValue?: string;
|
|
66
|
-
}> & {
|
|
67
|
-
_id: mongoose.Types.ObjectId;
|
|
68
|
-
}>[];
|
|
69
|
-
listOfManagers: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
70
|
-
name?: string;
|
|
71
|
-
value?: string;
|
|
72
|
-
extraValue?: string;
|
|
73
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
74
|
-
name?: string;
|
|
75
|
-
value?: string;
|
|
76
|
-
extraValue?: string;
|
|
77
|
-
}>> & mongoose.FlatRecord<{
|
|
78
|
-
name?: string;
|
|
79
|
-
value?: string;
|
|
80
|
-
extraValue?: string;
|
|
81
|
-
}> & {
|
|
82
|
-
_id: mongoose.Types.ObjectId;
|
|
83
|
-
}>[];
|
|
84
|
-
addressesOfOffices: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
85
|
-
name?: string;
|
|
86
|
-
value?: string;
|
|
87
|
-
extraValue?: string;
|
|
88
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
89
|
-
name?: string;
|
|
90
|
-
value?: string;
|
|
91
|
-
extraValue?: string;
|
|
92
|
-
}>> & mongoose.FlatRecord<{
|
|
93
|
-
name?: string;
|
|
94
|
-
value?: string;
|
|
95
|
-
extraValue?: string;
|
|
96
|
-
}> & {
|
|
97
|
-
_id: mongoose.Types.ObjectId;
|
|
98
|
-
}>[];
|
|
99
|
-
addressesOfWarehouses: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
100
|
-
name?: string;
|
|
101
|
-
value?: string;
|
|
102
|
-
extraValue?: string;
|
|
103
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
104
|
-
name?: string;
|
|
105
|
-
value?: string;
|
|
106
|
-
extraValue?: string;
|
|
107
|
-
}>> & mongoose.FlatRecord<{
|
|
108
|
-
name?: string;
|
|
109
|
-
value?: string;
|
|
110
|
-
extraValue?: string;
|
|
111
|
-
}> & {
|
|
112
|
-
_id: mongoose.Types.ObjectId;
|
|
113
|
-
}>[];
|
|
114
|
-
top5Customers: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
115
|
-
name?: string;
|
|
116
|
-
value?: string;
|
|
117
|
-
extraValue?: string;
|
|
118
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
119
|
-
name?: string;
|
|
120
|
-
value?: string;
|
|
121
|
-
extraValue?: string;
|
|
122
|
-
}>> & mongoose.FlatRecord<{
|
|
123
|
-
name?: string;
|
|
124
|
-
value?: string;
|
|
125
|
-
extraValue?: string;
|
|
126
|
-
}> & {
|
|
127
|
-
_id: mongoose.Types.ObjectId;
|
|
128
|
-
}>[];
|
|
129
|
-
numberOfEmployees: {
|
|
12
|
+
companyCorrespondenceAddress: {
|
|
130
13
|
type: StringConstructor;
|
|
131
14
|
};
|
|
132
|
-
|
|
15
|
+
DBANames: {
|
|
133
16
|
type: StringConstructor;
|
|
134
17
|
};
|
|
135
|
-
|
|
18
|
+
websiteAddress: {
|
|
136
19
|
type: StringConstructor;
|
|
137
20
|
};
|
|
138
|
-
|
|
21
|
+
businessDescription: {
|
|
139
22
|
type: StringConstructor;
|
|
140
23
|
};
|
|
24
|
+
litigation: {};
|
|
25
|
+
detailsOfCurrentDebt: {};
|
|
141
26
|
};
|
|
@@ -3,8 +3,13 @@ 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.ProspectInfoStageOne = void 0;
|
|
6
|
+
exports.ProspectInfoStageOne = exports.ExternalProspectStageOneTables = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
+
var ExternalProspectStageOneTables;
|
|
9
|
+
(function (ExternalProspectStageOneTables) {
|
|
10
|
+
ExternalProspectStageOneTables["litigation"] = "litigation";
|
|
11
|
+
ExternalProspectStageOneTables["detailsOfCurrentDebt"] = "detailsOfCurrentDebt";
|
|
12
|
+
})(ExternalProspectStageOneTables || (exports.ExternalProspectStageOneTables = ExternalProspectStageOneTables = {}));
|
|
8
13
|
const InfoRowSchema = new mongoose_1.default.Schema({
|
|
9
14
|
name: {
|
|
10
15
|
type: String,
|
|
@@ -20,31 +25,21 @@ exports.ProspectInfoStageOne = {
|
|
|
20
25
|
companyLegalName: {
|
|
21
26
|
type: String,
|
|
22
27
|
},
|
|
23
|
-
|
|
24
|
-
type: String,
|
|
25
|
-
},
|
|
26
|
-
websiteAddress: {
|
|
27
|
-
type: String,
|
|
28
|
-
},
|
|
29
|
-
businessDescription: {
|
|
28
|
+
companyLegalAddress: {
|
|
30
29
|
type: String,
|
|
31
30
|
},
|
|
32
|
-
|
|
33
|
-
listOfOfficers: [InfoRowSchema],
|
|
34
|
-
listOfManagers: [InfoRowSchema],
|
|
35
|
-
addressesOfOffices: [InfoRowSchema],
|
|
36
|
-
addressesOfWarehouses: [InfoRowSchema],
|
|
37
|
-
top5Customers: [InfoRowSchema],
|
|
38
|
-
numberOfEmployees: {
|
|
31
|
+
companyCorrespondenceAddress: {
|
|
39
32
|
type: String,
|
|
40
33
|
},
|
|
41
|
-
|
|
34
|
+
DBANames: {
|
|
42
35
|
type: String,
|
|
43
36
|
},
|
|
44
|
-
|
|
37
|
+
websiteAddress: {
|
|
45
38
|
type: String,
|
|
46
39
|
},
|
|
47
|
-
|
|
40
|
+
businessDescription: {
|
|
48
41
|
type: String,
|
|
49
42
|
},
|
|
43
|
+
[ExternalProspectStageOneTables.litigation]: {},
|
|
44
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: {},
|
|
50
45
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
|
+
import { ExternalProspectStageTwoTables } from './ProspectInfoStageTwo.model';
|
|
3
|
+
|
|
4
|
+
export enum ExternalProspectStageOneTables {
|
|
5
|
+
litigation = 'litigation',
|
|
6
|
+
detailsOfCurrentDebt = 'detailsOfCurrentDebt',
|
|
7
|
+
}
|
|
2
8
|
|
|
3
9
|
const InfoRowSchema = new mongoose.Schema({
|
|
4
10
|
name: {
|
|
@@ -16,31 +22,21 @@ export const ProspectInfoStageOne = {
|
|
|
16
22
|
companyLegalName: {
|
|
17
23
|
type: String,
|
|
18
24
|
},
|
|
19
|
-
|
|
20
|
-
type: String,
|
|
21
|
-
},
|
|
22
|
-
websiteAddress: {
|
|
25
|
+
companyLegalAddress: {
|
|
23
26
|
type: String,
|
|
24
27
|
},
|
|
25
|
-
|
|
28
|
+
companyCorrespondenceAddress: {
|
|
26
29
|
type: String,
|
|
27
30
|
},
|
|
28
|
-
|
|
29
|
-
listOfOfficers: [InfoRowSchema],
|
|
30
|
-
listOfManagers: [InfoRowSchema],
|
|
31
|
-
addressesOfOffices: [InfoRowSchema],
|
|
32
|
-
addressesOfWarehouses: [InfoRowSchema],
|
|
33
|
-
top5Customers: [InfoRowSchema],
|
|
34
|
-
numberOfEmployees: {
|
|
35
|
-
type: String,
|
|
36
|
-
},
|
|
37
|
-
last12MonthsSales: {
|
|
31
|
+
DBANames: {
|
|
38
32
|
type: String,
|
|
39
33
|
},
|
|
40
|
-
|
|
34
|
+
websiteAddress: {
|
|
41
35
|
type: String,
|
|
42
36
|
},
|
|
43
|
-
|
|
37
|
+
businessDescription: {
|
|
44
38
|
type: String,
|
|
45
39
|
},
|
|
40
|
+
[ExternalProspectStageOneTables.litigation]: {},
|
|
41
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: {},
|
|
46
42
|
};
|