@dhyasama/totem-models 8.61.0 → 8.63.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 +0 -27
- package/lib/Organization.js +11 -26
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -602,18 +602,6 @@ module.exports = function(mongoose, config) {
|
|
|
602
602
|
|
|
603
603
|
};
|
|
604
604
|
|
|
605
|
-
Financials.statics.getForCustomer = function getForCustomer(customerId, cb) {
|
|
606
|
-
|
|
607
|
-
var self = this;
|
|
608
|
-
|
|
609
|
-
var query = self.find({
|
|
610
|
-
'customer': customerId
|
|
611
|
-
});
|
|
612
|
-
|
|
613
|
-
query.exec(cb);
|
|
614
|
-
|
|
615
|
-
};
|
|
616
|
-
|
|
617
605
|
Financials.statics.getManagedServicesForReview = function getManagedServicesForReview(customerId, cb) {
|
|
618
606
|
|
|
619
607
|
var self = this;
|
|
@@ -659,21 +647,6 @@ module.exports = function(mongoose, config) {
|
|
|
659
647
|
|
|
660
648
|
};
|
|
661
649
|
|
|
662
|
-
Financials.statics.getToSend = function getToSend(uuid, cb) {
|
|
663
|
-
|
|
664
|
-
var self = this;
|
|
665
|
-
|
|
666
|
-
var query = self.findOne({
|
|
667
|
-
'snapshots.uuid': uuid
|
|
668
|
-
});
|
|
669
|
-
|
|
670
|
-
query.populate('organization', 'name logoUrl');
|
|
671
|
-
query.populate('customer', 'name logoUrl customer.totemUrl');
|
|
672
|
-
|
|
673
|
-
query.exec(cb);
|
|
674
|
-
|
|
675
|
-
};
|
|
676
|
-
|
|
677
650
|
Financials.statics.removeCustomerFinancials = function removeCustomerFinancials(customerId, cb) {
|
|
678
651
|
|
|
679
652
|
// this is only used to wipe out financials created by the google sheet import process
|
package/lib/Organization.js
CHANGED
|
@@ -174,29 +174,17 @@ module.exports = function(mongoose, config) {
|
|
|
174
174
|
totemUrl: { type: String, trim: true, unique: true, partialFilterExpression : { type :"string" } },
|
|
175
175
|
|
|
176
176
|
auth: {
|
|
177
|
-
|
|
178
177
|
google: { type: Boolean, default: false },
|
|
179
|
-
|
|
180
178
|
microsoft: { type: Boolean, default: false }
|
|
181
|
-
|
|
182
179
|
},
|
|
183
180
|
|
|
184
181
|
locale: { type: String, default: 'en-us', trim: true },
|
|
185
182
|
|
|
186
|
-
beanstalk: {
|
|
187
|
-
environmentName: { type: String, trim: true },
|
|
188
|
-
restartOnPull: { type: Boolean, default: true }
|
|
189
|
-
},
|
|
190
|
-
|
|
191
183
|
style: {
|
|
192
184
|
backgroundColor: { type: String, default: '#666666', trim: true },
|
|
193
185
|
textColor: { type: String, default: '#ffffff', trim: true }
|
|
194
186
|
},
|
|
195
187
|
|
|
196
|
-
carta: {
|
|
197
|
-
firmid: { type: String, unique: true, partialFilterExpression : { type :"string" }, trim: true }
|
|
198
|
-
},
|
|
199
|
-
|
|
200
188
|
calendar: {
|
|
201
189
|
active: { type: Boolean, default: false }
|
|
202
190
|
},
|
|
@@ -260,6 +248,11 @@ module.exports = function(mongoose, config) {
|
|
|
260
248
|
active: { type: Boolean, default: false },
|
|
261
249
|
},
|
|
262
250
|
|
|
251
|
+
carta: {
|
|
252
|
+
active: { type: Boolean, default: false },
|
|
253
|
+
firmid: { type: String, unique: true, partialFilterExpression : { type :"string" }, trim: true }
|
|
254
|
+
},
|
|
255
|
+
|
|
263
256
|
investmentsSheet: {
|
|
264
257
|
sheet: { type: String, trim: true, unique: true, partialFilterExpression : { type :"string" } },
|
|
265
258
|
format: {
|
|
@@ -278,12 +271,6 @@ module.exports = function(mongoose, config) {
|
|
|
278
271
|
|
|
279
272
|
},
|
|
280
273
|
|
|
281
|
-
lps: {
|
|
282
|
-
|
|
283
|
-
active: {type: Boolean, default: false},
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
|
|
287
274
|
deals: {
|
|
288
275
|
|
|
289
276
|
active: { type: Boolean, default: false },
|
|
@@ -425,17 +412,16 @@ module.exports = function(mongoose, config) {
|
|
|
425
412
|
|
|
426
413
|
}]
|
|
427
414
|
|
|
415
|
+
},
|
|
416
|
+
|
|
417
|
+
lps: {
|
|
418
|
+
|
|
419
|
+
active: {type: Boolean, default: false},
|
|
420
|
+
|
|
428
421
|
}
|
|
429
422
|
|
|
430
423
|
},
|
|
431
424
|
|
|
432
|
-
// Link to deeper data on iLevel
|
|
433
|
-
// iLevelUser must be true at the account level
|
|
434
|
-
iLevel: [{
|
|
435
|
-
customer: { type: Schema.ObjectId, ref: 'Organization' },
|
|
436
|
-
url: { type: String, trim: true, unique: true, partialFilterExpression : { type :"string" } }
|
|
437
|
-
}],
|
|
438
|
-
|
|
439
425
|
chairs: [{
|
|
440
426
|
customer: { type: Schema.ObjectId, ref: 'Organization' },
|
|
441
427
|
first: { type: Schema.ObjectId, ref: 'Person' },
|
|
@@ -2067,7 +2053,6 @@ module.exports = function(mongoose, config) {
|
|
|
2067
2053
|
// doc.lps = _.reject(doc.lps, function(item) { return !item.customer || item.customer.toString() !== CUSTOMER_ID; });
|
|
2068
2054
|
// doc.filters = _.reject(doc.filters, function(item) { return !item.customer || item.customer.toString() !== CUSTOMER_ID; });
|
|
2069
2055
|
// doc.valuations = _.reject(doc.valuations, function(item) { return !item.customer || item.customer.toString() !== CUSTOMER_ID; });
|
|
2070
|
-
// doc.iLevel = _.reject(doc.iLevel, function(item) { return !item.customer || item.customer.toString() !== CUSTOMER_ID; });
|
|
2071
2056
|
// doc.chairs = _.reject(doc.chairs, function(item) { return !item.customer || item.customer.toString() !== CUSTOMER_ID; });
|
|
2072
2057
|
// doc.operating.acquired.private = _.find(doc.operating.acquired.private, function(item) { return !item.customer || item.customer.toString() === CUSTOMER_ID; });
|
|
2073
2058
|
// doc.operating.closed.private = _.find(doc.operating.closed.private, function(item) { return !item.customer || item.customer.toString() === CUSTOMER_ID; });
|