@dhyasama/totem-models 6.3.9 → 6.4.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/.npmignore ADDED
@@ -0,0 +1,14 @@
1
+ lib-cov
2
+ *.seed
3
+ *.log
4
+ *.csv
5
+ *.dat
6
+ *.out
7
+ *.pid
8
+ *.gz
9
+
10
+ npm-debug.log
11
+ node_modules
12
+
13
+ .DS_Store
14
+ .idea
@@ -499,7 +499,7 @@ module.exports = function(mongoose, config) {
499
499
 
500
500
  Organization.virtual('customer.deals.fields').get(function () {
501
501
 
502
- // Combine ever-present fields, standard fields and custom fields into a single list and sort by column order
502
+ // Combine standard fields and custom fields into a single list and sort by column order
503
503
  // Fundraise is actually two fields, so multiply the order by ten to make room for the extra field
504
504
 
505
505
  var self = this;
@@ -522,18 +522,20 @@ module.exports = function(mongoose, config) {
522
522
  var customFields = self.customer.deals.customFields;
523
523
  var result = [];
524
524
 
525
- // Add the standard fields that are active
525
+ // Add standard fields
526
526
  if (standardFields.fundraise.showOnList) {
527
527
  result.push({
528
528
  name: 'Fundraise Amount',
529
529
  type: 'Standard',
530
530
  order: standardFields.fundraise.order * 10,
531
- colspan: standardFields.fundraise.colspan,
531
+ colspan: standardFields.fundraise.colspan || 1,
532
+ showOnFilter: standardFields.fundraise.showOnFilter === true ? true : false
532
533
  }, {
533
534
  name: 'Fundraise Valuation',
534
535
  type: 'Standard',
535
536
  order: standardFields.fundraise.order * 10 + 1,
536
- colspan: standardFields.fundraise.colspan
537
+ colspan: standardFields.fundraise.colspan || 1,
538
+ showOnFilter: standardFields.fundraise.showOnFilter === true ? true : false
537
539
  });
538
540
  }
539
541
 
@@ -542,7 +544,8 @@ module.exports = function(mongoose, config) {
542
544
  name: 'Source',
543
545
  type: 'Standard',
544
546
  order: standardFields.sources.order * 10,
545
- colspan: standardFields.fundraise.colspan
547
+ colspan: standardFields.sources.colspan || 1,
548
+ showOnFilter: standardFields.sources.showOnFilter === true ? true : false
546
549
  });
547
550
  }
548
551
 
@@ -551,11 +554,12 @@ module.exports = function(mongoose, config) {
551
554
  name: 'Referrers',
552
555
  type: 'Standard',
553
556
  order: standardFields.referrers.order * 10,
554
- colspan: standardFields.fundraise.colspan
557
+ colspan: standardFields.referrers.colspan || 1,
558
+ showOnFilter: standardFields.referrers.showOnFilter === true ? true : false
555
559
  });
556
560
  }
557
561
 
558
- // Add the custom fields
562
+ // Add custom fields
559
563
  _.each(customFields, function(field) {
560
564
  if (field.display.showOnList) {
561
565
  result.push({
@@ -564,7 +568,9 @@ module.exports = function(mongoose, config) {
564
568
  key: field.key,
565
569
  options: field.options,
566
570
  order: field.display.order * 10,
567
- colspan: field.display.colspan
571
+ colspan: field.display.colspan || 1,
572
+ showOnFilter: field.display.showOnFilter === true ? true : false,
573
+ options: field.options
568
574
  });
569
575
  }
570
576
  });