@dhyasama/totem-models 6.3.2 → 6.3.4

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.
Files changed (2) hide show
  1. package/lib/Organization.js +32 -31
  2. package/package.json +1 -1
@@ -216,43 +216,43 @@ module.exports = function(mongoose, config) {
216
216
  standardFields: {
217
217
 
218
218
  // active set to false will keep the field out of system for customer, i.e., off list page, org page deal section and deal edit form
219
- // showOnList controls if the field will be on deal list page
220
219
  // if a field is active, it will show up on the org page deal section and deal edit form. there is no way to hide it in those places.
221
220
  // order for standard fields only sets the order on the list page. their position is fixed on the org page deal section and edit form.
222
221
  // order is co-mingled with order for custom fields
223
- // filter controls whether values are extracted and used in filtering options on list page
224
- // colSpan is for table on list page
222
+ // colspan is for the number of columns the field should take up on the list page
223
+ // showFilter controls whether values are extracted and used in filtering options on list page
224
+ // showList controls if the field will be on deal list page
225
225
 
226
226
  fundraise: {
227
227
  active: { type: Boolean, default: true },
228
- showOnList: { type: Boolean, default: true },
229
- order: { type: Number, default: 1 },
230
- filter: { type: Boolean, default: false },
231
- colSpan: { type: Number, default: 1 }
228
+ order: { type: Number, default: 99 },
229
+ colspan: { type: Number, default: 1 },
230
+ showFilter: { type: Boolean, default: true },
231
+ showList: { type: Boolean, default: true }
232
232
  },
233
233
 
234
234
  sources: {
235
235
  active: { type: Boolean, default: true },
236
- showOnList: { type: Boolean, default: false },
237
236
  order: { type: Number, default: 99 },
238
- filter: { type: Boolean, default: false },
239
- colSpan: { type: Number, default: 1 }
237
+ colspan: { type: Number, default: 1 },
238
+ showFilter: { type: Boolean, default: true },
239
+ showList: { type: Boolean, default: true }
240
240
  },
241
241
 
242
242
  referrers: {
243
243
  active: { type: Boolean, default: true },
244
- showOnList: { type: Boolean, default: false },
245
244
  order: { type: Number, default: 99 },
246
- filter: { type: Boolean, default: false },
247
- colSpan: { type: Number, default: 1 }
245
+ colspan: { type: Number, default: 1 },
246
+ showFilter: { type: Boolean, default: true },
247
+ showList: { type: Boolean, default: true }
248
248
  },
249
249
 
250
250
  resources: {
251
251
  active: { type: Boolean, default: true },
252
- showOnList: { type: Boolean, default: false },
253
252
  order: { type: Number, default: 99 },
254
- filter: { type: Boolean, default: false },
255
- colSpan: { type: Number, default: 1 }
253
+ colspan: { type: Number, default: 1 },
254
+ showFilter: { type: Boolean, default: true },
255
+ showList: { type: Boolean, default: true }
256
256
  },
257
257
 
258
258
  },
@@ -290,18 +290,19 @@ module.exports = function(mongoose, config) {
290
290
  // For controlling display on web pages
291
291
  display: {
292
292
 
293
- // Sets the order to render fields on list, org page deal section and deal edit form
293
+ // sets the order to render fields on list, org page deal section and deal edit form
294
+ // order is co-mingled with order for standard fields
294
295
  order: { type: Number },
295
296
 
296
- // Optionally include as an option on the deal
297
- filter: { type: Boolean, default: false },
298
-
299
- // Sets the number of columns for this property to span on the deals list
297
+ // colspan is for the number of columns the field should take up on the list page
300
298
  colspan: { type: Number, default: 1 },
301
299
 
302
- // Optionally show or hide fields on deals list
303
- // Fields are always shown on org pages and in edit forms
304
- showOnList: { type: Boolean }
300
+ // showFilter controls whether values are extracted and used in filtering options on list page
301
+ showFilter: { type: Boolean, default: true },
302
+
303
+ // showList controls if the field will be on deal list page
304
+ // fields are always shown on org pages and in edit forms
305
+ showList: { type: Boolean, default: true }
305
306
 
306
307
  }
307
308
 
@@ -514,15 +515,15 @@ module.exports = function(mongoose, config) {
514
515
  standardFields = standardFields || {
515
516
  fundraise: {
516
517
  active: false,
517
- showOnList: false
518
+ showList: false
518
519
  },
519
520
  sources: {
520
521
  active: false,
521
- showOnList: false
522
+ showList: false
522
523
  },
523
524
  referrers: {
524
525
  active: false,
525
- showOnList: false
526
+ showList: false
526
527
  }
527
528
  };
528
529
 
@@ -530,7 +531,7 @@ module.exports = function(mongoose, config) {
530
531
  var result = [];
531
532
 
532
533
  // Add the standard fields that are active
533
- if (standardFields.fundraise.active && standardFields.fundraise.showOnList) {
534
+ if (standardFields.fundraise.active && standardFields.fundraise.showList) {
534
535
  result.push({
535
536
  name: 'Fundraise Amount',
536
537
  order: standardFields.fundraise.order * 10
@@ -540,14 +541,14 @@ module.exports = function(mongoose, config) {
540
541
  });
541
542
  }
542
543
 
543
- if (standardFields.sources.active && standardFields.sources.showOnList) {
544
+ if (standardFields.sources.active && standardFields.sources.showList) {
544
545
  result.push({
545
546
  name: 'Source',
546
547
  order: standardFields.sources.order * 10
547
548
  });
548
549
  }
549
550
 
550
- if (standardFields.referrers.active && standardFields.referrers.showOnList) {
551
+ if (standardFields.referrers.active && standardFields.referrers.showList) {
551
552
  result.push({
552
553
  name: 'Referrers',
553
554
  order: standardFields.referrers.order * 10
@@ -556,7 +557,7 @@ module.exports = function(mongoose, config) {
556
557
 
557
558
  // Add the custom fields
558
559
  _.each(customFields, function(field) {
559
- if (field.display.showOnList) {
560
+ if (field.display.showList) {
560
561
  result.push({
561
562
  name: field.label,
562
563
  order: field.display.order * 10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "6.3.2",
3
+ "version": "6.3.4",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",