@dhyasama/totem-models 8.62.0 → 8.64.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/Organization.js +12 -27
- package/package.json +1 -1
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
|
},
|
|
@@ -213,7 +201,7 @@ module.exports = function(mongoose, config) {
|
|
|
213
201
|
_id: false,
|
|
214
202
|
key: { type: String, trim: true },
|
|
215
203
|
condition: { type: String, enum: [null, 'equals', 'doesNotEqual', 'contains', 'doesNotContain', 'lessThan', 'greaterThan']},
|
|
216
|
-
|
|
204
|
+
values: [{ type: String, trim: true }],
|
|
217
205
|
}],
|
|
218
206
|
sort: {
|
|
219
207
|
by: { type: String, trim: true },
|
|
@@ -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; });
|