@dhyasama/totem-models 8.13.0 → 8.18.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/helpers.js CHANGED
@@ -84,6 +84,7 @@ const getPeopleSources = module.exports.getPeopleSources = function getPeopleSou
84
84
  people = _.reject(people, function(p) { return !p || !p.sources; });
85
85
 
86
86
  let result = _.compact(_.pluck(people, 'sources'));
87
+
87
88
  if (result.length === 0) { return []; }
88
89
 
89
90
  result = _.flatten(result);
@@ -229,10 +229,12 @@ module.exports = function(mongoose, config) {
229
229
  name: { type: String, trim: true },
230
230
  description: { type: String, trim: true },
231
231
  format: { type: String, enum: [null, 'number', 'money', 'percentage', 'variance']},
232
+ required: { type: Boolean, default: false },
232
233
  }],
233
234
  questions: [{
234
235
  _id: false,
235
- prompt: { type: String, trim: true }
236
+ prompt: { type: String, trim: true },
237
+ required: { type: Boolean, default: false },
236
238
  }]
237
239
  },
238
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.13.0",
3
+ "version": "8.18.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",