@dhyasama/totem-models 8.81.0 → 8.82.1

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 CHANGED
@@ -321,8 +321,8 @@ module.exports = function(mongoose, config) {
321
321
 
322
322
  _.each(financial.snapshots, function(snapshot) {
323
323
 
324
- var hasSendTo = snapshot.notifications.company.sendTo.length > 0;
325
- var hasSendOnLessThanNow = snapshot.notifications.company.initial.sendOn < now;
324
+ var hasSendTo = snapshot.notifications.company.sendTo && snapshot.notifications.company.sendTo.length > 0;
325
+ var hasSendOnLessThanNow = snapshot.notifications.company.initial.sendOn && snapshot.notifications.company.initial.sendOn < now;
326
326
  var hasSentOn = snapshot.notifications.company.initial.sentOn;
327
327
  var hasSentToQueue = snapshot.notifications.company.initial.sentToQueue;
328
328
 
@@ -388,8 +388,8 @@ module.exports = function(mongoose, config) {
388
388
  _.each(financial.snapshots, function(snapshot) {
389
389
 
390
390
  var conditions = _.some(snapshot.notifications.company.reminders, function(reminder) {
391
- var hasSendTo = snapshot.notifications.company.sendTo.length > 0;
392
- var hasSendOnLessThanNow = reminder.sendOn < now;
391
+ var hasSendTo = snapshot.notifications.company.sendTo && snapshot.notifications.company.sendTo.length > 0;
392
+ var hasSendOnLessThanNow = reminder.sendOn && reminder.sendOn < now;
393
393
  var hasSentOn = reminder.sentOn;
394
394
  var hasSentToQueue = reminder.sentToQueue;
395
395
  var hasBeenSubmitted = snapshot.submittedOn;
@@ -450,8 +450,8 @@ module.exports = function(mongoose, config) {
450
450
  _.each(financial.snapshots, function(snapshot) {
451
451
 
452
452
  var conditions = _.some(snapshot.notifications.company.rejections, function(rejection) {
453
- var hasSendTo = snapshot.notifications.company.sendTo.length > 0;
454
- var hasSendOnLessThanNow = rejection.sendOn < now;
453
+ var hasSendTo = snapshot.notifications.company.sendTo && snapshot.notifications.company.sendTo.length > 0;
454
+ var hasSendOnLessThanNow = rejection.sendOn && rejection.sendOn < now;
455
455
  var hasSentOn = rejection.sentOn;
456
456
  var hasSentToQueue = rejection.sentToQueue;
457
457
  var hasBeenSubmitted = snapshot.submittedOn;
@@ -302,9 +302,7 @@ module.exports = function(mongoose, config) {
302
302
 
303
303
  statuses: [{
304
304
  name: { type: String, trim: true },
305
- order: { type: Number },
306
- active: { type: Boolean, default: true },
307
- color: { type: String, trim: true }
305
+ active: { type: Boolean, default: true }
308
306
  }],
309
307
 
310
308
  sourceTypes: { type: Array, default: ['Cold Inbound', 'Cold Outbound', 'Met at Event', 'Was Referred', 'Other'] },
@@ -324,7 +322,10 @@ module.exports = function(mongoose, config) {
324
322
 
325
323
  // Dictates the type of control rendered on form
326
324
  // Also impacts data validation
327
- type: { type: String, enum: ['Text', 'Number', 'Money', 'Tags', 'Poll', 'Checkbox', 'Single Select', 'Multiple Select'] },
325
+ type: { type: String, enum: ['Text', 'Number', 'Checkbox', 'Single Select', 'Timestamp', 'Tags', 'Person', 'Org', 'Poll'] },
326
+
327
+ // This is the format for numbers
328
+ format: { type: String, enum: ['number', 'abbreviated', 'decimal', 'financials', 'currency', 'ownership', 'multiple', 'variance'] },
328
329
 
329
330
  // These will be the choices in polls, single-selects and multi-selects
330
331
  options: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.81.0",
3
+ "version": "8.82.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",