@dhyasama/totem-models 6.17.0 → 6.17.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/Organization.js +19 -17
- package/package.json +1 -1
- package/.npmignore +0 -14
- package/package-lock.json +0 -1829
package/lib/Organization.js
CHANGED
|
@@ -282,6 +282,13 @@ module.exports = function(mongoose, config) {
|
|
|
282
282
|
colspan: { type: Number, default: 1 },
|
|
283
283
|
showOnFilter: { type: Boolean, default: true },
|
|
284
284
|
showOnList: { type: Boolean, default: true }
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
location: {
|
|
288
|
+
order: { type: Number, default: 99 },
|
|
289
|
+
colspan: { type: Number, default: 1 },
|
|
290
|
+
showOnFilter: { type: Boolean, default: true },
|
|
291
|
+
showOnList: { type: Boolean, default: true }
|
|
285
292
|
}
|
|
286
293
|
|
|
287
294
|
},
|
|
@@ -652,6 +659,18 @@ module.exports = function(mongoose, config) {
|
|
|
652
659
|
});
|
|
653
660
|
}
|
|
654
661
|
|
|
662
|
+
if (standardFields.location.showOnList) {
|
|
663
|
+
result.push({
|
|
664
|
+
name: 'Location',
|
|
665
|
+
type: 'Location',
|
|
666
|
+
key: 'organization.contact.address',
|
|
667
|
+
isStandard: true,
|
|
668
|
+
order: standardFields.chairs.order * 10,
|
|
669
|
+
colspan: standardFields.chairs.colspan || 1,
|
|
670
|
+
showOnFilter: standardFields.chairs.showOnFilter === true ? true : false
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
|
|
655
674
|
// Add custom fields
|
|
656
675
|
_.each(customFields, function(field) {
|
|
657
676
|
if (field.display.showOnList) {
|
|
@@ -1278,23 +1297,6 @@ module.exports = function(mongoose, config) {
|
|
|
1278
1297
|
this.find({ 'slug': { $in : slugs } }).exec(cb);
|
|
1279
1298
|
};
|
|
1280
1299
|
|
|
1281
|
-
Organization.statics.findBySocial = function findBySocial(handle, cb) {
|
|
1282
|
-
|
|
1283
|
-
var self = this;
|
|
1284
|
-
|
|
1285
|
-
self
|
|
1286
|
-
.find({ $or:
|
|
1287
|
-
[
|
|
1288
|
-
{ 'social.facebook': handle },
|
|
1289
|
-
{ 'social.linkedin': handle },
|
|
1290
|
-
{ 'social.twitter': handle }
|
|
1291
|
-
],
|
|
1292
|
-
'deleted': { $ne: true }
|
|
1293
|
-
})
|
|
1294
|
-
.exec(cb);
|
|
1295
|
-
|
|
1296
|
-
};
|
|
1297
|
-
|
|
1298
1300
|
Organization.statics.findDupes = function findDupes(org, options, cb) {
|
|
1299
1301
|
|
|
1300
1302
|
if (!cb) throw new Error('cb is required');
|
package/package.json
CHANGED