@dhyasama/totem-models 6.3.9 → 6.4.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/.npmignore +14 -0
- package/lib/Organization.js +13 -7
- package/package-lock.json +1829 -0
- package/package.json +1 -1
- package/test/Organization.js +25 -0
package/.npmignore
ADDED
package/lib/Organization.js
CHANGED
|
@@ -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
|
|
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.
|
|
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.
|
|
557
|
+
colspan: standardFields.referrers.colspan || 1,
|
|
558
|
+
showOnFilter: standardFields.referrers.showOnFilter === true ? true : false
|
|
555
559
|
});
|
|
556
560
|
}
|
|
557
561
|
|
|
558
|
-
// Add
|
|
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
|
});
|