@dhyasama/totem-models 8.38.1 → 8.39.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/Financials.js +11 -11
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -101,15 +101,16 @@ module.exports = function(mongoose, config) {
|
|
|
101
101
|
amount: { type: Number, default: 0 },
|
|
102
102
|
breakdown: { type: Schema.Types.Mixed }
|
|
103
103
|
},
|
|
104
|
-
|
|
105
|
-
documents: [{
|
|
106
|
-
_id: false,
|
|
107
|
-
name: { type: String, trim: true },
|
|
108
|
-
document: { type: Schema.ObjectId, ref: 'Document' },
|
|
109
|
-
}],
|
|
110
104
|
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
form: { type: Schema.Types.Mixed },
|
|
106
|
+
|
|
107
|
+
// documents: [{
|
|
108
|
+
// _id: false,
|
|
109
|
+
// name: { type: String, trim: true },
|
|
110
|
+
// document: { type: Schema.ObjectId, ref: 'Document' },
|
|
111
|
+
// }],
|
|
112
|
+
// metrics: { type: Schema.Types.Mixed },
|
|
113
|
+
// questions: { type: Schema.Types.Mixed },
|
|
113
114
|
|
|
114
115
|
comment: { type: String, trim: true },
|
|
115
116
|
|
|
@@ -610,7 +611,7 @@ module.exports = function(mongoose, config) {
|
|
|
610
611
|
});
|
|
611
612
|
|
|
612
613
|
query.populate('organization', 'name logoUrl');
|
|
613
|
-
query.populate('customer', 'name logoUrl customer
|
|
614
|
+
query.populate('customer', 'name logoUrl customer');
|
|
614
615
|
query.populate('snapshots.notifications.stakeholders.sendTo.organization', 'name logoUrl customer.totemUrl');
|
|
615
616
|
|
|
616
617
|
query.exec(cb);
|
|
@@ -638,8 +639,7 @@ module.exports = function(mongoose, config) {
|
|
|
638
639
|
if (!financials) { return cb(new Error('financials is required'), null); }
|
|
639
640
|
|
|
640
641
|
// Required for mixed types
|
|
641
|
-
financials.markModified('
|
|
642
|
-
financials.markModified('questions');
|
|
642
|
+
financials.markModified('form');
|
|
643
643
|
financials.markModified('revenue.breakdown');
|
|
644
644
|
financials.markModified('grossProfit.breakdown');
|
|
645
645
|
financials.markModified('operatingExpenses.breakdown');
|