@dhyasama/totem-models 6.3.3 → 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.
- package/lib/Organization.js +21 -21
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -220,39 +220,39 @@ module.exports = function(mongoose, config) {
|
|
|
220
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.
|
|
221
221
|
// order is co-mingled with order for custom fields
|
|
222
222
|
// colspan is for the number of columns the field should take up on the list page
|
|
223
|
-
//
|
|
224
|
-
//
|
|
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
228
|
order: { type: Number, default: 99 },
|
|
229
229
|
colspan: { type: Number, default: 1 },
|
|
230
|
-
|
|
231
|
-
|
|
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
236
|
order: { type: Number, default: 99 },
|
|
237
237
|
colspan: { type: Number, default: 1 },
|
|
238
|
-
|
|
239
|
-
|
|
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
244
|
order: { type: Number, default: 99 },
|
|
245
245
|
colspan: { type: Number, default: 1 },
|
|
246
|
-
|
|
247
|
-
|
|
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
252
|
order: { type: Number, default: 99 },
|
|
253
253
|
colspan: { type: Number, default: 1 },
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
showFilter: { type: Boolean, default: true },
|
|
255
|
+
showList: { type: Boolean, default: true }
|
|
256
256
|
},
|
|
257
257
|
|
|
258
258
|
},
|
|
@@ -297,12 +297,12 @@ module.exports = function(mongoose, config) {
|
|
|
297
297
|
// colspan is for the number of columns the field should take up on the list page
|
|
298
298
|
colspan: { type: Number, default: 1 },
|
|
299
299
|
|
|
300
|
-
//
|
|
301
|
-
|
|
300
|
+
// showFilter controls whether values are extracted and used in filtering options on list page
|
|
301
|
+
showFilter: { type: Boolean, default: true },
|
|
302
302
|
|
|
303
|
-
//
|
|
303
|
+
// showList controls if the field will be on deal list page
|
|
304
304
|
// fields are always shown on org pages and in edit forms
|
|
305
|
-
|
|
305
|
+
showList: { type: Boolean, default: true }
|
|
306
306
|
|
|
307
307
|
}
|
|
308
308
|
|
|
@@ -515,15 +515,15 @@ module.exports = function(mongoose, config) {
|
|
|
515
515
|
standardFields = standardFields || {
|
|
516
516
|
fundraise: {
|
|
517
517
|
active: false,
|
|
518
|
-
|
|
518
|
+
showList: false
|
|
519
519
|
},
|
|
520
520
|
sources: {
|
|
521
521
|
active: false,
|
|
522
|
-
|
|
522
|
+
showList: false
|
|
523
523
|
},
|
|
524
524
|
referrers: {
|
|
525
525
|
active: false,
|
|
526
|
-
|
|
526
|
+
showList: false
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
|
|
@@ -531,7 +531,7 @@ module.exports = function(mongoose, config) {
|
|
|
531
531
|
var result = [];
|
|
532
532
|
|
|
533
533
|
// Add the standard fields that are active
|
|
534
|
-
if (standardFields.fundraise.active && standardFields.fundraise.
|
|
534
|
+
if (standardFields.fundraise.active && standardFields.fundraise.showList) {
|
|
535
535
|
result.push({
|
|
536
536
|
name: 'Fundraise Amount',
|
|
537
537
|
order: standardFields.fundraise.order * 10
|
|
@@ -541,14 +541,14 @@ module.exports = function(mongoose, config) {
|
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
if (standardFields.sources.active && standardFields.sources.
|
|
544
|
+
if (standardFields.sources.active && standardFields.sources.showList) {
|
|
545
545
|
result.push({
|
|
546
546
|
name: 'Source',
|
|
547
547
|
order: standardFields.sources.order * 10
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
550
|
|
|
551
|
-
if (standardFields.referrers.active && standardFields.referrers.
|
|
551
|
+
if (standardFields.referrers.active && standardFields.referrers.showList) {
|
|
552
552
|
result.push({
|
|
553
553
|
name: 'Referrers',
|
|
554
554
|
order: standardFields.referrers.order * 10
|
|
@@ -557,7 +557,7 @@ module.exports = function(mongoose, config) {
|
|
|
557
557
|
|
|
558
558
|
// Add the custom fields
|
|
559
559
|
_.each(customFields, function(field) {
|
|
560
|
-
if (field.display.
|
|
560
|
+
if (field.display.showList) {
|
|
561
561
|
result.push({
|
|
562
562
|
name: field.label,
|
|
563
563
|
order: field.display.order * 10
|