@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.
- package/lib/Organization.js +1 -1
- package/lib/Round.js +14 -1
- package/package.json +1 -1
- package/.npmignore +0 -14
- package/package-lock.json +0 -1829
package/lib/Organization.js
CHANGED
|
@@ -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