@dhyasama/totem-models 7.22.1 → 7.24.0
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/lib/Financials.js +6 -6
- package/lib/Round.js +2 -2
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -122,10 +122,10 @@ module.exports = function(mongoose, config) {
|
|
|
122
122
|
|
|
123
123
|
company: {
|
|
124
124
|
|
|
125
|
-
sendTo: {
|
|
125
|
+
sendTo: [{
|
|
126
126
|
email: { type: String, trim: true },
|
|
127
127
|
name: { type: String, trim: true }
|
|
128
|
-
},
|
|
128
|
+
}],
|
|
129
129
|
|
|
130
130
|
initial: {
|
|
131
131
|
sendOn: { type: Date, required: false },
|
|
@@ -332,7 +332,7 @@ module.exports = function(mongoose, config) {
|
|
|
332
332
|
var query = self.find({
|
|
333
333
|
'snapshots': {
|
|
334
334
|
$elemMatch: {
|
|
335
|
-
'notifications.company.sendTo
|
|
335
|
+
'notifications.company.sendTo': { $gt: [] },
|
|
336
336
|
'notifications.company.initial.sendOn': { $lte: now },
|
|
337
337
|
'notifications.company.initial.sentOn': null,
|
|
338
338
|
'submittedOn': null
|
|
@@ -350,7 +350,7 @@ module.exports = function(mongoose, config) {
|
|
|
350
350
|
|
|
351
351
|
snapshots = _.filter(snapshots, function(snapshot) {
|
|
352
352
|
|
|
353
|
-
var bool = !!snapshot.notifications.company.sendTo.
|
|
353
|
+
var bool = !!snapshot.notifications.company.sendTo.length > 0;
|
|
354
354
|
bool = bool && snapshot.notifications.company.initial.sendOn < now;
|
|
355
355
|
bool = bool && !snapshot.notifications.company.initial.sentOn;
|
|
356
356
|
|
|
@@ -372,7 +372,7 @@ module.exports = function(mongoose, config) {
|
|
|
372
372
|
var query = self.find({
|
|
373
373
|
'snapshots': {
|
|
374
374
|
$elemMatch: {
|
|
375
|
-
'notifications.company.sendTo
|
|
375
|
+
'notifications.company.sendTo': { $gt: [] },
|
|
376
376
|
'notifications.company.reminder.sendOn': { $lte: now },
|
|
377
377
|
'notifications.company.reminder.sentOn': null,
|
|
378
378
|
'submittedOn': null
|
|
@@ -390,7 +390,7 @@ module.exports = function(mongoose, config) {
|
|
|
390
390
|
|
|
391
391
|
snapshots = _.filter(snapshots, function(snapshot) {
|
|
392
392
|
|
|
393
|
-
var bool = !!snapshot.notifications.company.sendTo.
|
|
393
|
+
var bool = !!snapshot.notifications.company.sendTo.length > 0;
|
|
394
394
|
bool = bool && snapshot.notifications.company.reminder.sendOn < now;
|
|
395
395
|
bool = bool && !snapshot.notifications.company.reminder.sentOn;
|
|
396
396
|
|
package/lib/Round.js
CHANGED
|
@@ -609,7 +609,7 @@ module.exports = function(mongoose, config) {
|
|
|
609
609
|
|
|
610
610
|
var query = self.find({ 'vehicles.fund': fundId });
|
|
611
611
|
query.select('organization vehicles preMoneyValuation');
|
|
612
|
-
query.populate('organization', 'name logoUrl description contact filters status ipo closed acquired operating website websiteAliases');
|
|
612
|
+
query.populate('organization', 'name slug logoUrl description contact filters status ipo closed acquired operating website websiteAliases');
|
|
613
613
|
query.populate('vehicles.fund');
|
|
614
614
|
|
|
615
615
|
if (config.CUSTOMER_ID == 'GLOBAL_PROCESS') {
|
|
@@ -645,7 +645,7 @@ module.exports = function(mongoose, config) {
|
|
|
645
645
|
|
|
646
646
|
var query = self.find({ 'vehicles.fund': { $in: fundIds } });
|
|
647
647
|
query.select('organization vehicles preMoneyValuation');
|
|
648
|
-
query.populate('organization', 'name logoUrl description contact chairs filters status ipo closed acquired operating website websiteAliases');
|
|
648
|
+
query.populate('organization', 'name slug logoUrl description contact chairs filters status ipo closed acquired operating website websiteAliases');
|
|
649
649
|
query.deepPopulate([
|
|
650
650
|
'organization.chairs.first',
|
|
651
651
|
'organization.chairs.second',
|