@dhyasama/totem-models 5.1.5 → 5.1.7
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 +2 -0
- package/lib/Organization.js +1 -1
- package/package.json +1 -1
package/lib/Deal.js
CHANGED
|
@@ -181,6 +181,8 @@ module.exports = function(mongoose, config) {
|
|
|
181
181
|
else if (lastStage != deal.stage) description += 'The deal was updated from ' + lastStage + ' to ' + deal.stage;
|
|
182
182
|
else description = 'The deal was updated';
|
|
183
183
|
|
|
184
|
+
deal.history = deal.history || [];
|
|
185
|
+
|
|
184
186
|
deal.history.push({
|
|
185
187
|
timestamp: new Date(),
|
|
186
188
|
account: user,
|
package/lib/Organization.js
CHANGED
|
@@ -65,7 +65,7 @@ module.exports = function(mongoose, config) {
|
|
|
65
65
|
people: [{
|
|
66
66
|
person: { type: Schema.ObjectId, ref: 'Person', required: true, index: true },
|
|
67
67
|
title: { type: String, default: null, trim: true },
|
|
68
|
-
current: { type: Boolean, default:
|
|
68
|
+
current: { type: Boolean, default: true, index: true },
|
|
69
69
|
leader: { type: Boolean, default: false, index: true },
|
|
70
70
|
public: { type: Boolean, default: true },
|
|
71
71
|
board: { type: String, enum: ['chairman', 'director', 'observer', 'none'], default: 'none', index: true }
|