gemcap-be-common 1.3.129 → 1.3.131
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/helpers/excel.helper.js +1 -1
- package/helpers/excel.helper.ts +1 -1
- package/models/Prospect.model.d.ts +2 -0
- package/models/Prospect.model.js +3 -0
- package/models/Prospect.model.ts +4 -0
- package/models/ProspectInfoNote.model.d.ts +33 -0
- package/models/ProspectInfoNote.model.js +19 -0
- package/models/ProspectInfoNote.model.ts +24 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/helpers/excel.helper.js
CHANGED
|
@@ -53,7 +53,7 @@ const convertDataToFile = async (dataToConvert) => {
|
|
|
53
53
|
};
|
|
54
54
|
XLSX.utils.sheet_add_aoa(wb, []);
|
|
55
55
|
const sheetNames = [];
|
|
56
|
-
const reduceSheetName = (str, maxLength =
|
|
56
|
+
const reduceSheetName = (str, maxLength = 28) => {
|
|
57
57
|
if (str.length > maxLength) {
|
|
58
58
|
return str.substring(0, maxLength) + '...';
|
|
59
59
|
}
|
package/helpers/excel.helper.ts
CHANGED
|
@@ -46,7 +46,7 @@ export const convertDataToFile = async (dataToConvert: { [sheetName: string]: an
|
|
|
46
46
|
XLSX.utils.sheet_add_aoa(wb, []);
|
|
47
47
|
const sheetNames = [];
|
|
48
48
|
|
|
49
|
-
const reduceSheetName = (str: string, maxLength =
|
|
49
|
+
const reduceSheetName = (str: string, maxLength = 28) => {
|
|
50
50
|
if (str.length > maxLength) {
|
|
51
51
|
return str.substring(0, maxLength) + '...';
|
|
52
52
|
} else {
|
|
@@ -27,6 +27,7 @@ import Joi from 'joi';
|
|
|
27
27
|
import { ExternalProspectStageTwoTables } from './ProspectInfoStageTwo.model';
|
|
28
28
|
import { ExternalProspectStageOneTables } from './ProspectInfoStageOne.model';
|
|
29
29
|
import { TDictionary } from '../helpers/main.helper';
|
|
30
|
+
import { ICRMProspectInfoNote } from './ProspectInfoNote.model';
|
|
30
31
|
export declare const prospectFieldsDictionary: TDictionary;
|
|
31
32
|
declare enum EProspectPriority {
|
|
32
33
|
LOW = "LOW",
|
|
@@ -110,6 +111,7 @@ export interface IProspectInfoStageTwo {
|
|
|
110
111
|
export interface IProspectExternalInfo {
|
|
111
112
|
stageOne: IProspectInfoStageOne;
|
|
112
113
|
stageTwo: IProspectInfoStageTwo;
|
|
114
|
+
notes: ICRMProspectInfoNote[];
|
|
113
115
|
}
|
|
114
116
|
export interface IProspectExternalNew {
|
|
115
117
|
isLocked: boolean;
|
package/models/Prospect.model.js
CHANGED
|
@@ -10,6 +10,7 @@ const _models_1 = require("./_models");
|
|
|
10
10
|
const ProspectInfoStageTwo_model_1 = require("./ProspectInfoStageTwo.model");
|
|
11
11
|
const ProspectInfoStageOne_model_1 = require("./ProspectInfoStageOne.model");
|
|
12
12
|
const main_helper_1 = require("../helpers/main.helper");
|
|
13
|
+
const ProspectInfoNote_model_1 = require("./ProspectInfoNote.model");
|
|
13
14
|
const textFieldMaxLength = 600;
|
|
14
15
|
exports.prospectFieldsDictionary = {
|
|
15
16
|
name: 'Name',
|
|
@@ -270,6 +271,7 @@ const externalProspectInitialInfo = () => ({
|
|
|
270
271
|
{ _id: `new_${(0, main_helper_1.getUUID)()}`, title: 'Copy of any prior appraisals' },
|
|
271
272
|
],
|
|
272
273
|
},
|
|
274
|
+
notes: [],
|
|
273
275
|
},
|
|
274
276
|
});
|
|
275
277
|
exports.externalProspectInitialInfo = externalProspectInitialInfo;
|
|
@@ -386,6 +388,7 @@ const ProspectInfoSchema = {
|
|
|
386
388
|
info: {
|
|
387
389
|
stageOne: ProspectInfoStageOne_model_1.ProspectInfoStageOne,
|
|
388
390
|
stageTwo: ProspectInfoStageTwo_model_1.ProspectInfoStageTwo,
|
|
391
|
+
notes: { type: [ProspectInfoNote_model_1.CRMProspectInfoNoteSchema], default: [] },
|
|
389
392
|
},
|
|
390
393
|
};
|
|
391
394
|
const fileDetailsSchema = new mongoose_1.default.Schema({
|
package/models/Prospect.model.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { MODEL_NAMES } from './_models';
|
|
|
6
6
|
import { ExternalProspectStageTwoTables, ProspectInfoStageTwo } from './ProspectInfoStageTwo.model';
|
|
7
7
|
import { ExternalProspectStageOneTables, ProspectInfoStageOne } from './ProspectInfoStageOne.model';
|
|
8
8
|
import { getUUID, TDictionary } from '../helpers/main.helper';
|
|
9
|
+
import { CRMProspectInfoNoteSchema, ICRMProspectInfoNote } from './ProspectInfoNote.model';
|
|
9
10
|
|
|
10
11
|
const textFieldMaxLength = 600;
|
|
11
12
|
|
|
@@ -128,6 +129,7 @@ export interface IProspectInfoStageTwo {
|
|
|
128
129
|
export interface IProspectExternalInfo {
|
|
129
130
|
stageOne: IProspectInfoStageOne;
|
|
130
131
|
stageTwo: IProspectInfoStageTwo;
|
|
132
|
+
notes: ICRMProspectInfoNote[];
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
export interface IProspectExternalNew {
|
|
@@ -339,6 +341,7 @@ export const externalProspectInitialInfo = (): IProspectExternalNew => ({
|
|
|
339
341
|
{ _id: `new_${getUUID()}`, title: 'Copy of any prior appraisals' },
|
|
340
342
|
],
|
|
341
343
|
},
|
|
344
|
+
notes: [],
|
|
342
345
|
},
|
|
343
346
|
});
|
|
344
347
|
|
|
@@ -542,6 +545,7 @@ const ProspectInfoSchema = {
|
|
|
542
545
|
info: {
|
|
543
546
|
stageOne: ProspectInfoStageOne,
|
|
544
547
|
stageTwo: ProspectInfoStageTwo,
|
|
548
|
+
notes: { type: [CRMProspectInfoNoteSchema], default: [] },
|
|
545
549
|
},
|
|
546
550
|
};
|
|
547
551
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
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, { Model } from 'mongoose';
|
|
26
|
+
export interface ICRMProspectInfoNote {
|
|
27
|
+
name: string;
|
|
28
|
+
text: string;
|
|
29
|
+
}
|
|
30
|
+
export type CRMProspectInfoNoteModel = Model<ICRMProspectInfoNote>;
|
|
31
|
+
export declare const CRMProspectInfoNoteSchema: mongoose.Schema<ICRMProspectInfoNote, CRMProspectInfoNoteModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ICRMProspectInfoNote, mongoose.Document<unknown, {}, mongoose.FlatRecord<ICRMProspectInfoNote>> & mongoose.FlatRecord<ICRMProspectInfoNote> & {
|
|
32
|
+
_id: mongoose.Types.ObjectId;
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CRMProspectInfoNoteSchema = void 0;
|
|
7
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
+
exports.CRMProspectInfoNoteSchema = new mongoose_1.default.Schema({
|
|
9
|
+
name: {
|
|
10
|
+
type: String,
|
|
11
|
+
},
|
|
12
|
+
text: {
|
|
13
|
+
type: String,
|
|
14
|
+
},
|
|
15
|
+
}, {
|
|
16
|
+
timestamps: false,
|
|
17
|
+
versionKey: false,
|
|
18
|
+
_id: false,
|
|
19
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import mongoose, { Model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
export interface ICRMProspectInfoNote {
|
|
4
|
+
name: string;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type CRMProspectInfoNoteModel = Model<ICRMProspectInfoNote>;
|
|
9
|
+
|
|
10
|
+
export const CRMProspectInfoNoteSchema = new mongoose.Schema<ICRMProspectInfoNote, CRMProspectInfoNoteModel>(
|
|
11
|
+
{
|
|
12
|
+
name: {
|
|
13
|
+
type: String,
|
|
14
|
+
},
|
|
15
|
+
text: {
|
|
16
|
+
type: String,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
timestamps: false,
|
|
21
|
+
versionKey: false,
|
|
22
|
+
_id: false,
|
|
23
|
+
},
|
|
24
|
+
);
|