@dhyasama/totem-models 6.8.8 → 6.8.10

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.
@@ -1331,7 +1331,7 @@ module.exports = function(mongoose, config) {
1331
1331
  query.populate('related', 'name logoUrl');
1332
1332
  query.populate('chairs.first', 'name avatarUrl title');
1333
1333
  query.populate('chairs.second', 'name avatarUrl title');
1334
- query.populate('funds', 'name hexColorCode abbreviation closeDate');
1334
+ query.populate('funds', 'name shortName hexColorCode abbreviation closeDate');
1335
1335
  query.populate('operating.acquired.public.by', 'name logoUrl');
1336
1336
  query.populate('operating.acquired.private.by', 'name logoUrl');
1337
1337
  query.populate(dealPopulateOptions);
package/lib/Round.js CHANGED
@@ -160,6 +160,7 @@ module.exports = function(mongoose, config) {
160
160
  filters: rounds[0].organization.filters,
161
161
  status: rounds[0].organization.status,
162
162
  preMoneyValuation: rounds[0].preMoneyValuation,
163
+ chairs: rounds[0].organization.chairs,
163
164
  funds: funds
164
165
  };
165
166
 
@@ -644,7 +645,16 @@ module.exports = function(mongoose, config) {
644
645
 
645
646
  var query = self.find({ 'vehicles.fund': { $in: fundIds } });
646
647
  query.select('organization vehicles preMoneyValuation');
647
- query.populate('organization', 'name logoUrl description contact filters status ipo closed acquired operating website websiteAliases');
648
+ query.populate('organization', 'name logoUrl description contact chairs filters status ipo closed acquired operating website websiteAliases');
649
+ query.deepPopulate([
650
+ 'organization.chairs.first',
651
+ 'organization.chairs.second',
652
+ ], {
653
+ populate: {
654
+ 'organization.chairs.first': { select: 'name avatarUrl title doNotDisplay' },
655
+ 'organization.chairs.second': { select: 'name avatarUrl title doNotDisplay' },
656
+ }
657
+ });
648
658
  query.populate('vehicles.fund');
649
659
 
650
660
  if (config.CUSTOMER_ID == 'GLOBAL_PROCESS') {
@@ -902,6 +912,9 @@ module.exports = function(mongoose, config) {
902
912
  Round.index({ organization: 1, roundName: 1 }, { unique: true, partialFilterExpression : { type :"string" } });
903
913
  Round.on('index', function(err) { console.log('error building Round indexes: ' + err); });
904
914
 
915
+ var deepPopulate = require('mongoose-deep-populate')(mongoose);
916
+ Round.plugin(deepPopulate);
917
+
905
918
  mongoose.model('Round', Round);
906
919
 
907
920
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "6.8.8",
3
+ "version": "6.8.10",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",
package/.npmignore DELETED
@@ -1,14 +0,0 @@
1
- lib-cov
2
- *.seed
3
- *.log
4
- *.csv
5
- *.dat
6
- *.out
7
- *.pid
8
- *.gz
9
-
10
- npm-debug.log
11
- node_modules
12
-
13
- .DS_Store
14
- .idea