@dhyasama/totem-models 1.7.1 → 1.8.1
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/CapTable.js +11 -0
- package/lib/Organization.js +1 -1
- package/package.json +1 -1
package/lib/CapTable.js
CHANGED
|
@@ -254,6 +254,17 @@ module.exports = function(mongoose, config) {
|
|
|
254
254
|
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
+
CapTable.statics.getByFunds = function getByFunds(fundIds, cb) {
|
|
258
|
+
|
|
259
|
+
var self = this;
|
|
260
|
+
|
|
261
|
+
self
|
|
262
|
+
.find({ 'stakeholders.fund': { $in: fundIds } })
|
|
263
|
+
.populate('organization', 'name logoUrl')
|
|
264
|
+
.exec(cb);
|
|
265
|
+
|
|
266
|
+
};
|
|
267
|
+
|
|
257
268
|
CapTable.statics.getForCustomer = function getForCustomer(orgId, customerId, cb) {
|
|
258
269
|
|
|
259
270
|
var self = this;
|
package/lib/Organization.js
CHANGED
|
@@ -1001,7 +1001,7 @@ module.exports = function(mongoose, config) {
|
|
|
1001
1001
|
|
|
1002
1002
|
// if not public, keep it in if org is in the current customer's portfolio. otherwise remove it.
|
|
1003
1003
|
// todo
|
|
1004
|
-
console.log(customerPortfolio);
|
|
1004
|
+
//console.log(customerPortfolio);
|
|
1005
1005
|
|
|
1006
1006
|
});
|
|
1007
1007
|
|