@dhyasama/totem-models 5.10.6 → 5.10.8

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/Deal.js CHANGED
@@ -60,7 +60,9 @@ module.exports = function(mongoose, config) {
60
60
  timestamp: { type: Date, required: true, default: Date.now },
61
61
  person: { type: Schema.ObjectId, ref: 'Person', required: true },
62
62
  value: { type: Number }
63
- }]
63
+ }],
64
+
65
+ sectors: [{ type: String, trim: true }]
64
66
 
65
67
  });
66
68
 
@@ -249,22 +251,6 @@ module.exports = function(mongoose, config) {
249
251
  });
250
252
  };
251
253
 
252
- Deal.statics.addVote = function(dealId, personId, vote, cb) {
253
-
254
- var self = this;
255
-
256
- self.findByIdAndUpdate(dealId, {$push:
257
- {
258
- votes: {
259
- timestamp: new Date(),
260
- person: personId,
261
- value: vote
262
- }
263
- }
264
- }, cb);
265
-
266
- };
267
-
268
254
  Deal.statics.upsert = function upsert(deal, user, cb) {
269
255
 
270
256
  // Deal is dumb and doesn't validate customer stages or duplicate deals. That responsibility is with the org.
@@ -207,7 +207,8 @@ module.exports = function(mongoose, config) {
207
207
  statuses: [{
208
208
  name: { type: String, trim: true },
209
209
  order: { type: Number },
210
- active: { type: Boolean, default: true }
210
+ active: { type: Boolean, default: true },
211
+ color: { type: String, default: '#eeeeee', trim: true }
211
212
  }],
212
213
  voting: {
213
214
  active: { type: Boolean, default: false },
@@ -215,6 +216,9 @@ module.exports = function(mongoose, config) {
215
216
  name: { type: String, trim: true },
216
217
  value: { type: Number }
217
218
  }]
219
+ },
220
+ sectors: {
221
+ active: { type: Boolean, default: false }
218
222
  }
219
223
  }
220
224
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "5.10.6",
3
+ "version": "5.10.8",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",