@dhyasama/totem-models 11.69.0 → 11.70.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 +3 -0
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -102,6 +102,7 @@ module.exports = function(mongoose, config) {
|
|
|
102
102
|
name: { type: String, trim: true },
|
|
103
103
|
actual: { type: Number },
|
|
104
104
|
budget: { type: Number },
|
|
105
|
+
forecast: { type: Number },
|
|
105
106
|
breakdown: { type: Schema.Types.Mixed }
|
|
106
107
|
}],
|
|
107
108
|
|
|
@@ -337,6 +338,7 @@ module.exports = function(mongoose, config) {
|
|
|
337
338
|
console.log('Upserting metric name:', metric.name);
|
|
338
339
|
console.log('Upserting metric actual:', metric.actual);
|
|
339
340
|
console.log('Upserting metric budget:', metric.budget);
|
|
341
|
+
console.log('Upserting metric forecast:', metric.forecast);
|
|
340
342
|
console.log('Upserting metric breakdown:', metric.breakdown);
|
|
341
343
|
|
|
342
344
|
// Check if the metric exists and update it
|
|
@@ -350,6 +352,7 @@ module.exports = function(mongoose, config) {
|
|
|
350
352
|
$set: {
|
|
351
353
|
'snapshots.$.metrics.$[metric].actual': metric.actual,
|
|
352
354
|
'snapshots.$.metrics.$[metric].budget': metric.budget,
|
|
355
|
+
'snapshots.$.metrics.$[metric].forecast': metric.forecast,
|
|
353
356
|
'snapshots.$.metrics.$[metric].breakdown': metric.breakdown,
|
|
354
357
|
}
|
|
355
358
|
},
|