@dhyasama/totem-models 8.84.0 → 8.86.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.
Files changed (2) hide show
  1. package/helpers.js +7 -8
  2. package/package.json +1 -1
package/helpers.js CHANGED
@@ -16,14 +16,13 @@ const cleanOrg = module.exports.cleanOrg = function cleanOrg(doc, customerId) {
16
16
  // remove customer details if not viewing self
17
17
  if (doc._id.toString() !== customerId.toString()) { doc.customer = {}; }
18
18
 
19
- doc.chairs = _.reject(doc.chairs, function(item) { return !item.customer || item.customer.toString() !== customerId.toString(); });
20
- doc.customFields = _.reject(doc.customFields, function(item) { return !item.customer || item.customer.toString() !== customerId.toString(); });
21
- doc.filters = _.reject(doc.filters, function(item) { return !item.customer || item.customer.toString() !== customerId.toString(); });
22
- doc.lps = _.reject(doc.lps, function(item) { return !item.customer || item.customer.toString() !== customerId.toString(); });
23
- doc.valuations = _.reject(doc.valuations, function(item) { return !item.customer || item.customer.toString() !== customerId.toString(); });
24
- doc.operating.acquired.private = _.find(doc.operating.acquired.private, function(item) { return !item.customer || item.customer.toString() === customerId.toString(); });
25
- doc.operating.closed.private = _.find(doc.operating.closed.private, function(item) { return !item.customer || item.customer.toString() === customerId.toString(); });
26
-
19
+ doc.chairs = _.reject(doc.chairs, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
20
+ doc.customFields = _.reject(doc.customFields, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
21
+ doc.filters = _.reject(doc.filters, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
22
+ doc.lps = _.reject(doc.lps, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
23
+ doc.operating.acquired.private = _.reject(doc.operating.acquired.private, function(item) { return !item || return !item.customer || item.customer.toString() === customerId.toString(); });
24
+ doc.operating.closed.private = _.reject(doc.operating.closed.private, function(item) { return !item || !item.customer || item.customer.toString() === customerId.toString(); });
25
+ doc.valuations = _.reject(doc.valuations, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
27
26
  return doc;
28
27
 
29
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.84.0",
3
+ "version": "8.86.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",