@dhyasama/totem-models 8.103.0 → 8.104.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 +4 -0
  2. package/package.json +1 -1
package/helpers.js CHANGED
@@ -21,8 +21,10 @@ const cleanOrg = module.exports.cleanOrg = function cleanOrg(doc, customerId) {
21
21
  doc.filters = _.reject(doc.filters, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
22
22
  doc.lps = _.reject(doc.lps, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
23
23
  doc.valuations = _.reject(doc.valuations, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
24
+ doc.documents = _.reject(doc.documents, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
24
25
  doc.operating.acquired.private = _.find(doc.operating.acquired.private, function(item) { return item && item.customer && item.customer.toString() === customerId.toString(); });
25
26
  doc.operating.closed.private = _.find(doc.operating.closed.private, function(item) { return item && item.customer && item.customer.toString() === customerId.toString(); });
27
+
26
28
  return doc;
27
29
 
28
30
  };
@@ -39,6 +41,8 @@ const cleanPerson = module.exports.cleanPerson = function cleanPerson(doc, custo
39
41
  return sourceCustomerId.toString() !== customerId.toString();
40
42
  });
41
43
 
44
+ doc.documents = _.reject(doc.documents, function(item) { return !item || !item.customer || item.customer.toString() !== customerId.toString(); });
45
+
42
46
  return doc;
43
47
 
44
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.103.0",
3
+ "version": "8.104.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",