gemcap-be-common 1.3.49 → 1.3.51
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 +25 -13
- package/models/Prospect.model.js +47 -44
- package/models/Prospect.model.ts +55 -55
- package/models/ProspectInfoStageOne.model.d.ts +3 -25
- package/models/ProspectInfoStageOne.model.js +2 -24
- package/models/ProspectInfoStageOne.model.ts +3 -24
- package/models/ProspectInfoStageTwo.model.d.ts +13 -3
- package/models/ProspectInfoStageTwo.model.js +12 -2
- package/models/ProspectInfoStageTwo.model.ts +12 -2
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -74,20 +74,16 @@ export interface ICRMProspectInfoStageOne {
|
|
|
74
74
|
DBANames: string;
|
|
75
75
|
websiteAddress: string;
|
|
76
76
|
businessDescription: string;
|
|
77
|
-
numberOfEmployees: string;
|
|
78
|
-
last12MonthsSales: string;
|
|
79
|
-
amountRequest: string;
|
|
80
|
-
descriptionOfCollateral: string;
|
|
81
|
-
[ExternalProspectStageOneTables.listOfShareholders]: unknown[];
|
|
82
|
-
[ExternalProspectStageOneTables.listOfOfficers]: unknown[];
|
|
83
|
-
[ExternalProspectStageOneTables.listOfManagers]: unknown[];
|
|
84
|
-
[ExternalProspectStageOneTables.addressesOfOffices]: unknown[];
|
|
85
|
-
[ExternalProspectStageOneTables.addressesOfWarehouses]: unknown[];
|
|
86
|
-
[ExternalProspectStageOneTables.top5Customers]: unknown[];
|
|
87
77
|
[ExternalProspectStageOneTables.litigation]: unknown[];
|
|
78
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: unknown[];
|
|
88
79
|
}
|
|
89
80
|
export interface ICRMProspectInfoStageTwo {
|
|
90
|
-
[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[];
|
|
91
87
|
[ExternalProspectStageTwoTables.itSystems]: unknown[];
|
|
92
88
|
[ExternalProspectStageTwoTables.insuranceBrokers]: unknown[];
|
|
93
89
|
[ExternalProspectStageTwoTables.insurancePolicies]: unknown[];
|
|
@@ -109,15 +105,31 @@ export interface ICRMProspectExternalNew {
|
|
|
109
105
|
lastSentDate: Date;
|
|
110
106
|
info: ICRMProspectExternalInfo;
|
|
111
107
|
}
|
|
108
|
+
export declare enum EProspectFileGroups {
|
|
109
|
+
borrowingBase = "borrowingBase",
|
|
110
|
+
corporateDocuments = "corporateDocuments",
|
|
111
|
+
financialsBankInformation = "financialsBankInformation",
|
|
112
|
+
collateralSales = "collateralSales",
|
|
113
|
+
taxes = "taxes",
|
|
114
|
+
majorContracts = "majorContracts",
|
|
115
|
+
liensLitigations = "liensLitigations",
|
|
116
|
+
insurance = "insurance"
|
|
117
|
+
}
|
|
112
118
|
export declare const prospectFileGroups: string[];
|
|
113
119
|
export declare const prospectFileGroupsMap: {
|
|
114
120
|
corporateDocuments: string;
|
|
115
121
|
financialsBankInformation: string;
|
|
116
122
|
collateralSales: string;
|
|
123
|
+
taxes: string;
|
|
124
|
+
borrowingBase: string;
|
|
125
|
+
majorContracts: string;
|
|
117
126
|
liensLitigations: string;
|
|
118
127
|
insurance: string;
|
|
119
|
-
|
|
120
|
-
|
|
128
|
+
detailsOfCurrentDebt: string;
|
|
129
|
+
financialInformation: string;
|
|
130
|
+
accountsReceivables: string;
|
|
131
|
+
inventoryInformation: string;
|
|
132
|
+
equipment: string;
|
|
121
133
|
};
|
|
122
134
|
export declare const NO_ROW_ID = "__no_row__";
|
|
123
135
|
export declare const initialFileGroups: () => {};
|
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.CRMProspect = exports.CRMProspectValidationSchema = exports.CRMProspectInfoValidationSchema = exports.CRMProspectInfoExternalValidationSchema = exports.baseFields = exports.externalProspectInitialInfo = exports.initialFileGroups = exports.NO_ROW_ID = exports.prospectFileGroupsMap = exports.prospectFileGroups = exports.EProspectDeclineReason = exports.EProspectStatus = exports.prospectFieldsDictionary = void 0;
|
|
6
|
+
exports.CRMProspect = exports.CRMProspectValidationSchema = exports.CRMProspectInfoValidationSchema = exports.CRMProspectInfoExternalValidationSchema = exports.baseFields = exports.externalProspectInitialInfo = exports.initialFileGroups = exports.NO_ROW_ID = exports.prospectFileGroupsMap = exports.prospectFileGroups = exports.EProspectFileGroups = exports.EProspectDeclineReason = exports.EProspectStatus = 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");
|
|
@@ -59,35 +59,46 @@ var EProspectDeclineReason;
|
|
|
59
59
|
EProspectDeclineReason["DOES_NOT_FIT_LENDING_CRITERIA"] = "DOES_NOT_FIT_LENDING_CRITERIA";
|
|
60
60
|
EProspectDeclineReason["DATA_QUALITY"] = "DATA_QUALITY";
|
|
61
61
|
})(EProspectDeclineReason || (exports.EProspectDeclineReason = EProspectDeclineReason = {}));
|
|
62
|
+
var EProspectFileGroups;
|
|
63
|
+
(function (EProspectFileGroups) {
|
|
64
|
+
EProspectFileGroups["borrowingBase"] = "borrowingBase";
|
|
65
|
+
EProspectFileGroups["corporateDocuments"] = "corporateDocuments";
|
|
66
|
+
EProspectFileGroups["financialsBankInformation"] = "financialsBankInformation";
|
|
67
|
+
EProspectFileGroups["collateralSales"] = "collateralSales";
|
|
68
|
+
EProspectFileGroups["taxes"] = "taxes";
|
|
69
|
+
EProspectFileGroups["majorContracts"] = "majorContracts";
|
|
70
|
+
EProspectFileGroups["liensLitigations"] = "liensLitigations";
|
|
71
|
+
EProspectFileGroups["insurance"] = "insurance";
|
|
72
|
+
})(EProspectFileGroups || (exports.EProspectFileGroups = EProspectFileGroups = {}));
|
|
62
73
|
exports.prospectFileGroups = [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.insuranceBrokers,
|
|
73
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.insurancePolicies,
|
|
74
|
+
EProspectFileGroups.corporateDocuments,
|
|
75
|
+
EProspectFileGroups.financialsBankInformation,
|
|
76
|
+
EProspectFileGroups.collateralSales,
|
|
77
|
+
EProspectFileGroups.taxes,
|
|
78
|
+
EProspectFileGroups.borrowingBase,
|
|
79
|
+
EProspectFileGroups.majorContracts,
|
|
80
|
+
EProspectFileGroups.liensLitigations,
|
|
81
|
+
EProspectFileGroups.insurance,
|
|
82
|
+
ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.detailsOfCurrentDebt,
|
|
74
83
|
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.financialInformation,
|
|
75
84
|
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivables,
|
|
76
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivablesExtra,
|
|
77
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivablesContacts,
|
|
78
85
|
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.inventoryInformation,
|
|
79
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.inventoryInformationFiles,
|
|
80
|
-
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.inventoryInformationDetails,
|
|
81
86
|
ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.equipment,
|
|
82
87
|
];
|
|
83
88
|
exports.prospectFileGroupsMap = {
|
|
84
|
-
corporateDocuments: 'Corporate Documents',
|
|
85
|
-
financialsBankInformation: 'Financials & Bank Information',
|
|
86
|
-
collateralSales: 'Collateral & Sales',
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
majorContracts: 'Major Contracts',
|
|
90
|
-
|
|
89
|
+
[EProspectFileGroups.corporateDocuments]: 'Corporate Documents',
|
|
90
|
+
[EProspectFileGroups.financialsBankInformation]: 'Financials & Bank Information',
|
|
91
|
+
[EProspectFileGroups.collateralSales]: 'Collateral & Sales',
|
|
92
|
+
[EProspectFileGroups.taxes]: 'Taxes',
|
|
93
|
+
[EProspectFileGroups.borrowingBase]: 'Borrowing Base',
|
|
94
|
+
[EProspectFileGroups.majorContracts]: 'Major Contracts',
|
|
95
|
+
[EProspectFileGroups.liensLitigations]: 'liensLitigations',
|
|
96
|
+
[EProspectFileGroups.insurance]: 'insurance',
|
|
97
|
+
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.detailsOfCurrentDebt]: 'detailsOfCurrentDebt',
|
|
98
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.financialInformation]: 'financialInformation',
|
|
99
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.accountsReceivables]: 'accountsReceivables',
|
|
100
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.inventoryInformation]: 'inventoryInformation',
|
|
101
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.equipment]: 'equipment',
|
|
91
102
|
};
|
|
92
103
|
exports.NO_ROW_ID = '__no_row__';
|
|
93
104
|
const initialFileGroups = () => exports.prospectFileGroups.reduce((acc, g) => {
|
|
@@ -105,22 +116,6 @@ const externalProspectInitialInfo = () => ({
|
|
|
105
116
|
DBANames: '',
|
|
106
117
|
websiteAddress: '',
|
|
107
118
|
businessDescription: '',
|
|
108
|
-
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.listOfShareholders]: [],
|
|
109
|
-
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.listOfOfficers]: [],
|
|
110
|
-
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.listOfManagers]: [],
|
|
111
|
-
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.addressesOfOffices]: [],
|
|
112
|
-
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.addressesOfWarehouses]: [],
|
|
113
|
-
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.top5Customers]: [
|
|
114
|
-
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
115
|
-
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
116
|
-
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
117
|
-
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
118
|
-
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
119
|
-
],
|
|
120
|
-
numberOfEmployees: '',
|
|
121
|
-
last12MonthsSales: '',
|
|
122
|
-
amountRequest: '',
|
|
123
|
-
descriptionOfCollateral: '',
|
|
124
119
|
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.litigation]: [
|
|
125
120
|
{
|
|
126
121
|
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
@@ -128,9 +123,21 @@ const externalProspectInitialInfo = () => ({
|
|
|
128
123
|
comment: '',
|
|
129
124
|
},
|
|
130
125
|
],
|
|
126
|
+
[ProspectInfoStageOne_model_1.ExternalProspectStageOneTables.detailsOfCurrentDebt]: [],
|
|
131
127
|
},
|
|
132
128
|
stageTwo: {
|
|
133
|
-
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.
|
|
129
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.listOfShareholders]: [],
|
|
130
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.listOfOfficers]: [],
|
|
131
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.listOfManagers]: [],
|
|
132
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.addressesOfOffices]: [],
|
|
133
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.addressesOfWarehouses]: [],
|
|
134
|
+
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.topCustomers]: [
|
|
135
|
+
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
136
|
+
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
137
|
+
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
138
|
+
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
139
|
+
{ _id: `new_${(0, main_helper_1.getUUID)()}`, name: '', value: '' },
|
|
140
|
+
],
|
|
134
141
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.itSystems]: [],
|
|
135
142
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.insuranceBrokers]: [],
|
|
136
143
|
[ProspectInfoStageTwo_model_1.ExternalProspectStageTwoTables.insurancePolicies]: [],
|
|
@@ -252,10 +259,6 @@ exports.CRMProspectInfoExternalValidationSchema = joi_1.default.object({
|
|
|
252
259
|
addressesOfOffices: joi_1.default.array().items(CRMProspectInfoRowValidationSchema),
|
|
253
260
|
addressesOfWarehouses: joi_1.default.array().items(CRMProspectInfoRowValidationSchema),
|
|
254
261
|
top5Customers: joi_1.default.array().items(CRMProspectInfoRowValidationSchema),
|
|
255
|
-
numberOfEmployees: joi_1.default.string().allow('', null),
|
|
256
|
-
last12MonthsSales: joi_1.default.string().allow('', null),
|
|
257
|
-
amountRequest: joi_1.default.string().allow('', null),
|
|
258
|
-
descriptionOfCollateral: joi_1.default.string().allow('', null),
|
|
259
262
|
});
|
|
260
263
|
exports.CRMProspectInfoValidationSchema = joi_1.default.object({
|
|
261
264
|
isLocked: joi_1.default.boolean().allow(null),
|
package/models/Prospect.model.ts
CHANGED
|
@@ -86,21 +86,17 @@ export interface ICRMProspectInfoStageOne {
|
|
|
86
86
|
DBANames: string;
|
|
87
87
|
websiteAddress: string;
|
|
88
88
|
businessDescription: string;
|
|
89
|
-
numberOfEmployees: string;
|
|
90
|
-
last12MonthsSales: string;
|
|
91
|
-
amountRequest: string;
|
|
92
|
-
descriptionOfCollateral: string;
|
|
93
|
-
[ExternalProspectStageOneTables.listOfShareholders]: unknown[];
|
|
94
|
-
[ExternalProspectStageOneTables.listOfOfficers]: unknown[];
|
|
95
|
-
[ExternalProspectStageOneTables.listOfManagers]: unknown[];
|
|
96
|
-
[ExternalProspectStageOneTables.addressesOfOffices]: unknown[];
|
|
97
|
-
[ExternalProspectStageOneTables.addressesOfWarehouses]: unknown[];
|
|
98
|
-
[ExternalProspectStageOneTables.top5Customers]: unknown[];
|
|
99
89
|
[ExternalProspectStageOneTables.litigation]: unknown[],
|
|
90
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: unknown[],
|
|
100
91
|
}
|
|
101
92
|
|
|
102
93
|
export interface ICRMProspectInfoStageTwo {
|
|
103
|
-
[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[];
|
|
104
100
|
[ExternalProspectStageTwoTables.itSystems]: unknown[],
|
|
105
101
|
[ExternalProspectStageTwoTables.insuranceBrokers]: unknown[],
|
|
106
102
|
[ExternalProspectStageTwoTables.insurancePolicies]: unknown[],
|
|
@@ -125,37 +121,49 @@ export interface ICRMProspectExternalNew {
|
|
|
125
121
|
info: ICRMProspectExternalInfo;
|
|
126
122
|
}
|
|
127
123
|
|
|
124
|
+
export enum EProspectFileGroups {
|
|
125
|
+
borrowingBase = 'borrowingBase',
|
|
126
|
+
corporateDocuments = 'corporateDocuments',
|
|
127
|
+
financialsBankInformation = 'financialsBankInformation',
|
|
128
|
+
collateralSales = 'collateralSales',
|
|
129
|
+
taxes = 'taxes',
|
|
130
|
+
majorContracts = 'majorContracts',
|
|
131
|
+
liensLitigations = 'liensLitigations',
|
|
132
|
+
insurance = 'insurance',
|
|
133
|
+
}
|
|
134
|
+
|
|
128
135
|
export const prospectFileGroups: string[] = [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
ExternalProspectStageTwoTables.insuranceBrokers,
|
|
140
|
-
ExternalProspectStageTwoTables.insurancePolicies,
|
|
136
|
+
EProspectFileGroups.corporateDocuments,
|
|
137
|
+
EProspectFileGroups.financialsBankInformation,
|
|
138
|
+
EProspectFileGroups.collateralSales,
|
|
139
|
+
EProspectFileGroups.taxes,
|
|
140
|
+
EProspectFileGroups.borrowingBase,
|
|
141
|
+
EProspectFileGroups.majorContracts,
|
|
142
|
+
EProspectFileGroups.liensLitigations,
|
|
143
|
+
EProspectFileGroups.insurance,
|
|
144
|
+
|
|
145
|
+
ExternalProspectStageOneTables.detailsOfCurrentDebt,
|
|
141
146
|
ExternalProspectStageTwoTables.financialInformation,
|
|
142
147
|
ExternalProspectStageTwoTables.accountsReceivables,
|
|
143
|
-
ExternalProspectStageTwoTables.accountsReceivablesExtra,
|
|
144
|
-
ExternalProspectStageTwoTables.accountsReceivablesContacts,
|
|
145
148
|
ExternalProspectStageTwoTables.inventoryInformation,
|
|
146
|
-
ExternalProspectStageTwoTables.inventoryInformationFiles,
|
|
147
|
-
ExternalProspectStageTwoTables.inventoryInformationDetails,
|
|
148
149
|
ExternalProspectStageTwoTables.equipment,
|
|
149
150
|
];
|
|
150
151
|
|
|
151
152
|
export const prospectFileGroupsMap = {
|
|
152
|
-
corporateDocuments: 'Corporate Documents',
|
|
153
|
-
financialsBankInformation: 'Financials & Bank Information',
|
|
154
|
-
collateralSales: 'Collateral & Sales',
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
majorContracts: 'Major Contracts',
|
|
158
|
-
|
|
153
|
+
[EProspectFileGroups.corporateDocuments]: 'Corporate Documents',
|
|
154
|
+
[EProspectFileGroups.financialsBankInformation]: 'Financials & Bank Information',
|
|
155
|
+
[EProspectFileGroups.collateralSales]: 'Collateral & Sales',
|
|
156
|
+
[EProspectFileGroups.taxes]: 'Taxes',
|
|
157
|
+
[EProspectFileGroups.borrowingBase]: 'Borrowing Base',
|
|
158
|
+
[EProspectFileGroups.majorContracts]: 'Major Contracts',
|
|
159
|
+
[EProspectFileGroups.liensLitigations]: 'liensLitigations',
|
|
160
|
+
[EProspectFileGroups.insurance]: 'insurance',
|
|
161
|
+
|
|
162
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: 'detailsOfCurrentDebt',
|
|
163
|
+
[ExternalProspectStageTwoTables.financialInformation]: 'financialInformation',
|
|
164
|
+
[ExternalProspectStageTwoTables.accountsReceivables]: 'accountsReceivables',
|
|
165
|
+
[ExternalProspectStageTwoTables.inventoryInformation]: 'inventoryInformation',
|
|
166
|
+
[ExternalProspectStageTwoTables.equipment]: 'equipment',
|
|
159
167
|
};
|
|
160
168
|
|
|
161
169
|
export const NO_ROW_ID = '__no_row__';
|
|
@@ -175,22 +183,6 @@ export const externalProspectInitialInfo = (): ICRMProspectExternalNew => ({
|
|
|
175
183
|
DBANames: '',
|
|
176
184
|
websiteAddress: '',
|
|
177
185
|
businessDescription: '',
|
|
178
|
-
[ExternalProspectStageOneTables.listOfShareholders]: [],
|
|
179
|
-
[ExternalProspectStageOneTables.listOfOfficers]: [],
|
|
180
|
-
[ExternalProspectStageOneTables.listOfManagers]: [],
|
|
181
|
-
[ExternalProspectStageOneTables.addressesOfOffices]: [],
|
|
182
|
-
[ExternalProspectStageOneTables.addressesOfWarehouses]: [],
|
|
183
|
-
[ExternalProspectStageOneTables.top5Customers]: [
|
|
184
|
-
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
185
|
-
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
186
|
-
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
187
|
-
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
188
|
-
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
189
|
-
],
|
|
190
|
-
numberOfEmployees: '',
|
|
191
|
-
last12MonthsSales: '',
|
|
192
|
-
amountRequest: '',
|
|
193
|
-
descriptionOfCollateral: '',
|
|
194
186
|
[ExternalProspectStageOneTables.litigation]: [
|
|
195
187
|
{
|
|
196
188
|
_id: `new_${getUUID()}`,
|
|
@@ -198,9 +190,21 @@ export const externalProspectInitialInfo = (): ICRMProspectExternalNew => ({
|
|
|
198
190
|
comment: '',
|
|
199
191
|
},
|
|
200
192
|
],
|
|
193
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: [],
|
|
201
194
|
},
|
|
202
195
|
stageTwo: {
|
|
203
|
-
[ExternalProspectStageTwoTables.
|
|
196
|
+
[ExternalProspectStageTwoTables.listOfShareholders]: [],
|
|
197
|
+
[ExternalProspectStageTwoTables.listOfOfficers]: [],
|
|
198
|
+
[ExternalProspectStageTwoTables.listOfManagers]: [],
|
|
199
|
+
[ExternalProspectStageTwoTables.addressesOfOffices]: [],
|
|
200
|
+
[ExternalProspectStageTwoTables.addressesOfWarehouses]: [],
|
|
201
|
+
[ExternalProspectStageTwoTables.topCustomers]: [
|
|
202
|
+
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
203
|
+
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
204
|
+
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
205
|
+
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
206
|
+
{ _id: `new_${getUUID()}`, name: '', value: '' },
|
|
207
|
+
],
|
|
204
208
|
[ExternalProspectStageTwoTables.itSystems]: [],
|
|
205
209
|
[ExternalProspectStageTwoTables.insuranceBrokers]: [],
|
|
206
210
|
[ExternalProspectStageTwoTables.insurancePolicies]: [],
|
|
@@ -397,10 +401,6 @@ export const CRMProspectInfoExternalValidationSchema = Joi.object({
|
|
|
397
401
|
addressesOfOffices: Joi.array().items(CRMProspectInfoRowValidationSchema),
|
|
398
402
|
addressesOfWarehouses: Joi.array().items(CRMProspectInfoRowValidationSchema),
|
|
399
403
|
top5Customers: Joi.array().items(CRMProspectInfoRowValidationSchema),
|
|
400
|
-
numberOfEmployees: Joi.string().allow('', null),
|
|
401
|
-
last12MonthsSales: Joi.string().allow('', null),
|
|
402
|
-
amountRequest: Joi.string().allow('', null),
|
|
403
|
-
descriptionOfCollateral: Joi.string().allow('', null),
|
|
404
404
|
});
|
|
405
405
|
|
|
406
406
|
export const CRMProspectInfoValidationSchema = Joi.object({
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export declare enum ExternalProspectStageOneTables {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
listOfManagers = "listOfManagers",
|
|
5
|
-
addressesOfOffices = "addressesOfOffices",
|
|
6
|
-
addressesOfWarehouses = "addressesOfWarehouses",
|
|
7
|
-
top5Customers = "top5Customers",
|
|
8
|
-
litigation = "litigation"
|
|
2
|
+
litigation = "litigation",
|
|
3
|
+
detailsOfCurrentDebt = "detailsOfCurrentDebt"
|
|
9
4
|
}
|
|
10
5
|
export declare const ProspectInfoStageOne: {
|
|
11
6
|
companyLegalName: {
|
|
@@ -26,23 +21,6 @@ export declare const ProspectInfoStageOne: {
|
|
|
26
21
|
businessDescription: {
|
|
27
22
|
type: StringConstructor;
|
|
28
23
|
};
|
|
29
|
-
numberOfEmployees: {
|
|
30
|
-
type: StringConstructor;
|
|
31
|
-
};
|
|
32
|
-
last12MonthsSales: {
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
};
|
|
35
|
-
amountRequest: {
|
|
36
|
-
type: StringConstructor;
|
|
37
|
-
};
|
|
38
|
-
descriptionOfCollateral: {
|
|
39
|
-
type: StringConstructor;
|
|
40
|
-
};
|
|
41
|
-
listOfShareholders: {};
|
|
42
|
-
listOfOfficers: {};
|
|
43
|
-
listOfManagers: {};
|
|
44
|
-
addressesOfOffices: {};
|
|
45
|
-
addressesOfWarehouses: {};
|
|
46
|
-
top5Customers: {};
|
|
47
24
|
litigation: {};
|
|
25
|
+
detailsOfCurrentDebt: {};
|
|
48
26
|
};
|
|
@@ -7,13 +7,8 @@ exports.ProspectInfoStageOne = exports.ExternalProspectStageOneTables = void 0;
|
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
var ExternalProspectStageOneTables;
|
|
9
9
|
(function (ExternalProspectStageOneTables) {
|
|
10
|
-
ExternalProspectStageOneTables["listOfShareholders"] = "listOfShareholders";
|
|
11
|
-
ExternalProspectStageOneTables["listOfOfficers"] = "listOfOfficers";
|
|
12
|
-
ExternalProspectStageOneTables["listOfManagers"] = "listOfManagers";
|
|
13
|
-
ExternalProspectStageOneTables["addressesOfOffices"] = "addressesOfOffices";
|
|
14
|
-
ExternalProspectStageOneTables["addressesOfWarehouses"] = "addressesOfWarehouses";
|
|
15
|
-
ExternalProspectStageOneTables["top5Customers"] = "top5Customers";
|
|
16
10
|
ExternalProspectStageOneTables["litigation"] = "litigation";
|
|
11
|
+
ExternalProspectStageOneTables["detailsOfCurrentDebt"] = "detailsOfCurrentDebt";
|
|
17
12
|
})(ExternalProspectStageOneTables || (exports.ExternalProspectStageOneTables = ExternalProspectStageOneTables = {}));
|
|
18
13
|
const InfoRowSchema = new mongoose_1.default.Schema({
|
|
19
14
|
name: {
|
|
@@ -45,23 +40,6 @@ exports.ProspectInfoStageOne = {
|
|
|
45
40
|
businessDescription: {
|
|
46
41
|
type: String,
|
|
47
42
|
},
|
|
48
|
-
numberOfEmployees: {
|
|
49
|
-
type: String,
|
|
50
|
-
},
|
|
51
|
-
last12MonthsSales: {
|
|
52
|
-
type: String,
|
|
53
|
-
},
|
|
54
|
-
amountRequest: {
|
|
55
|
-
type: String,
|
|
56
|
-
},
|
|
57
|
-
descriptionOfCollateral: {
|
|
58
|
-
type: String,
|
|
59
|
-
},
|
|
60
|
-
[ExternalProspectStageOneTables.listOfShareholders]: {},
|
|
61
|
-
[ExternalProspectStageOneTables.listOfOfficers]: {},
|
|
62
|
-
[ExternalProspectStageOneTables.listOfManagers]: {},
|
|
63
|
-
[ExternalProspectStageOneTables.addressesOfOffices]: {},
|
|
64
|
-
[ExternalProspectStageOneTables.addressesOfWarehouses]: {},
|
|
65
|
-
[ExternalProspectStageOneTables.top5Customers]: {},
|
|
66
43
|
[ExternalProspectStageOneTables.litigation]: {},
|
|
44
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: {},
|
|
67
45
|
};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
|
+
import { ExternalProspectStageTwoTables } from './ProspectInfoStageTwo.model';
|
|
2
3
|
|
|
3
4
|
export enum ExternalProspectStageOneTables {
|
|
4
|
-
listOfShareholders = 'listOfShareholders',
|
|
5
|
-
listOfOfficers = 'listOfOfficers',
|
|
6
|
-
listOfManagers = 'listOfManagers',
|
|
7
|
-
addressesOfOffices = 'addressesOfOffices',
|
|
8
|
-
addressesOfWarehouses = 'addressesOfWarehouses',
|
|
9
|
-
top5Customers = 'top5Customers',
|
|
10
5
|
litigation = 'litigation',
|
|
6
|
+
detailsOfCurrentDebt = 'detailsOfCurrentDebt',
|
|
11
7
|
}
|
|
12
8
|
|
|
13
9
|
const InfoRowSchema = new mongoose.Schema({
|
|
@@ -41,23 +37,6 @@ export const ProspectInfoStageOne = {
|
|
|
41
37
|
businessDescription: {
|
|
42
38
|
type: String,
|
|
43
39
|
},
|
|
44
|
-
numberOfEmployees: {
|
|
45
|
-
type: String,
|
|
46
|
-
},
|
|
47
|
-
last12MonthsSales: {
|
|
48
|
-
type: String,
|
|
49
|
-
},
|
|
50
|
-
amountRequest: {
|
|
51
|
-
type: String,
|
|
52
|
-
},
|
|
53
|
-
descriptionOfCollateral: {
|
|
54
|
-
type: String,
|
|
55
|
-
},
|
|
56
|
-
[ExternalProspectStageOneTables.listOfShareholders]: {},
|
|
57
|
-
[ExternalProspectStageOneTables.listOfOfficers]: {},
|
|
58
|
-
[ExternalProspectStageOneTables.listOfManagers]: {},
|
|
59
|
-
[ExternalProspectStageOneTables.addressesOfOffices]: {},
|
|
60
|
-
[ExternalProspectStageOneTables.addressesOfWarehouses]: {},
|
|
61
|
-
[ExternalProspectStageOneTables.top5Customers]: {},
|
|
62
40
|
[ExternalProspectStageOneTables.litigation]: {},
|
|
41
|
+
[ExternalProspectStageOneTables.detailsOfCurrentDebt]: {},
|
|
63
42
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare enum ExternalProspectStageTwoTables {
|
|
2
|
-
detailsOfCurrentDebt = "detailsOfCurrentDebt",
|
|
3
2
|
itSystems = "itSystems",
|
|
4
3
|
insuranceBrokers = "insuranceBrokers",
|
|
5
4
|
insurancePolicies = "insurancePolicies",
|
|
@@ -10,10 +9,21 @@ export declare enum ExternalProspectStageTwoTables {
|
|
|
10
9
|
inventoryInformation = "inventoryInformation",
|
|
11
10
|
inventoryInformationFiles = "inventoryInformationFiles",
|
|
12
11
|
inventoryInformationDetails = "inventoryInformationDetails",
|
|
13
|
-
equipment = "equipment"
|
|
12
|
+
equipment = "equipment",
|
|
13
|
+
listOfShareholders = "listOfShareholders",
|
|
14
|
+
listOfOfficers = "listOfOfficers",
|
|
15
|
+
listOfManagers = "listOfManagers",
|
|
16
|
+
addressesOfOffices = "addressesOfOffices",
|
|
17
|
+
addressesOfWarehouses = "addressesOfWarehouses",
|
|
18
|
+
topCustomers = "topCustomers"
|
|
14
19
|
}
|
|
15
20
|
export declare const ProspectInfoStageTwo: {
|
|
16
|
-
|
|
21
|
+
listOfShareholders: {};
|
|
22
|
+
listOfOfficers: {};
|
|
23
|
+
listOfManagers: {};
|
|
24
|
+
addressesOfOffices: {};
|
|
25
|
+
addressesOfWarehouses: {};
|
|
26
|
+
topCustomers: {};
|
|
17
27
|
itSystems: {};
|
|
18
28
|
insuranceBrokers: {};
|
|
19
29
|
insurancePolicies: {};
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ProspectInfoStageTwo = exports.ExternalProspectStageTwoTables = void 0;
|
|
4
4
|
var ExternalProspectStageTwoTables;
|
|
5
5
|
(function (ExternalProspectStageTwoTables) {
|
|
6
|
-
ExternalProspectStageTwoTables["detailsOfCurrentDebt"] = "detailsOfCurrentDebt";
|
|
7
6
|
ExternalProspectStageTwoTables["itSystems"] = "itSystems";
|
|
8
7
|
ExternalProspectStageTwoTables["insuranceBrokers"] = "insuranceBrokers";
|
|
9
8
|
ExternalProspectStageTwoTables["insurancePolicies"] = "insurancePolicies";
|
|
@@ -15,9 +14,20 @@ var ExternalProspectStageTwoTables;
|
|
|
15
14
|
ExternalProspectStageTwoTables["inventoryInformationFiles"] = "inventoryInformationFiles";
|
|
16
15
|
ExternalProspectStageTwoTables["inventoryInformationDetails"] = "inventoryInformationDetails";
|
|
17
16
|
ExternalProspectStageTwoTables["equipment"] = "equipment";
|
|
17
|
+
ExternalProspectStageTwoTables["listOfShareholders"] = "listOfShareholders";
|
|
18
|
+
ExternalProspectStageTwoTables["listOfOfficers"] = "listOfOfficers";
|
|
19
|
+
ExternalProspectStageTwoTables["listOfManagers"] = "listOfManagers";
|
|
20
|
+
ExternalProspectStageTwoTables["addressesOfOffices"] = "addressesOfOffices";
|
|
21
|
+
ExternalProspectStageTwoTables["addressesOfWarehouses"] = "addressesOfWarehouses";
|
|
22
|
+
ExternalProspectStageTwoTables["topCustomers"] = "topCustomers";
|
|
18
23
|
})(ExternalProspectStageTwoTables || (exports.ExternalProspectStageTwoTables = ExternalProspectStageTwoTables = {}));
|
|
19
24
|
exports.ProspectInfoStageTwo = {
|
|
20
|
-
[ExternalProspectStageTwoTables.
|
|
25
|
+
[ExternalProspectStageTwoTables.listOfShareholders]: {},
|
|
26
|
+
[ExternalProspectStageTwoTables.listOfOfficers]: {},
|
|
27
|
+
[ExternalProspectStageTwoTables.listOfManagers]: {},
|
|
28
|
+
[ExternalProspectStageTwoTables.addressesOfOffices]: {},
|
|
29
|
+
[ExternalProspectStageTwoTables.addressesOfWarehouses]: {},
|
|
30
|
+
[ExternalProspectStageTwoTables.topCustomers]: {},
|
|
21
31
|
[ExternalProspectStageTwoTables.itSystems]: {},
|
|
22
32
|
[ExternalProspectStageTwoTables.insuranceBrokers]: {},
|
|
23
33
|
[ExternalProspectStageTwoTables.insurancePolicies]: {},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export enum ExternalProspectStageTwoTables {
|
|
2
|
-
detailsOfCurrentDebt = 'detailsOfCurrentDebt',
|
|
3
2
|
itSystems = 'itSystems',
|
|
4
3
|
insuranceBrokers = 'insuranceBrokers',
|
|
5
4
|
insurancePolicies = 'insurancePolicies',
|
|
@@ -11,10 +10,21 @@ export enum ExternalProspectStageTwoTables {
|
|
|
11
10
|
inventoryInformationFiles = 'inventoryInformationFiles',
|
|
12
11
|
inventoryInformationDetails = 'inventoryInformationDetails',
|
|
13
12
|
equipment = 'equipment',
|
|
13
|
+
listOfShareholders = 'listOfShareholders',
|
|
14
|
+
listOfOfficers = 'listOfOfficers',
|
|
15
|
+
listOfManagers = 'listOfManagers',
|
|
16
|
+
addressesOfOffices = 'addressesOfOffices',
|
|
17
|
+
addressesOfWarehouses = 'addressesOfWarehouses',
|
|
18
|
+
topCustomers = 'topCustomers',
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
export const ProspectInfoStageTwo = {
|
|
17
|
-
[ExternalProspectStageTwoTables.
|
|
22
|
+
[ExternalProspectStageTwoTables.listOfShareholders]: {},
|
|
23
|
+
[ExternalProspectStageTwoTables.listOfOfficers]: {},
|
|
24
|
+
[ExternalProspectStageTwoTables.listOfManagers]: {},
|
|
25
|
+
[ExternalProspectStageTwoTables.addressesOfOffices]: {},
|
|
26
|
+
[ExternalProspectStageTwoTables.addressesOfWarehouses]: {},
|
|
27
|
+
[ExternalProspectStageTwoTables.topCustomers]: {},
|
|
18
28
|
[ExternalProspectStageTwoTables.itSystems]: {},
|
|
19
29
|
[ExternalProspectStageTwoTables.insuranceBrokers]: {},
|
|
20
30
|
[ExternalProspectStageTwoTables.insurancePolicies]: {},
|