@dhyasama/totem-models 2.2.1 → 2.2.2
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/Person.js +3 -19
- package/package.json +1 -1
package/lib/Person.js
CHANGED
|
@@ -191,6 +191,9 @@ module.exports = function(mongoose, config) {
|
|
|
191
191
|
|
|
192
192
|
Person.virtual('allNotes').get(function () {
|
|
193
193
|
|
|
194
|
+
// todo - calendarEventNotes are now stored in the Interactions collection
|
|
195
|
+
// todo - should this be deprecated? research where it's used.
|
|
196
|
+
|
|
194
197
|
// combine direct person notes and notes from events this person attended
|
|
195
198
|
// sort reverse chronologically
|
|
196
199
|
|
|
@@ -746,19 +749,6 @@ module.exports = function(mongoose, config) {
|
|
|
746
749
|
|
|
747
750
|
};
|
|
748
751
|
|
|
749
|
-
// Person.statics.getInteractedWith = function getInteractedWith(personId, cb) {
|
|
750
|
-
//
|
|
751
|
-
// var self = this;
|
|
752
|
-
// var query = self.find({
|
|
753
|
-
// $or: [
|
|
754
|
-
// { 'calendarEventSummaries.attendees.internal': personId },
|
|
755
|
-
// { 'calendarEventSummaries.attendees.external': personId }
|
|
756
|
-
// ]
|
|
757
|
-
// });
|
|
758
|
-
// query.exec(cb);
|
|
759
|
-
//
|
|
760
|
-
// };
|
|
761
|
-
|
|
762
752
|
Person.statics.getNotes = function getNotes(personId, cb) {
|
|
763
753
|
|
|
764
754
|
var self = this;
|
|
@@ -802,12 +792,6 @@ module.exports = function(mongoose, config) {
|
|
|
802
792
|
.exec(cb);
|
|
803
793
|
};
|
|
804
794
|
|
|
805
|
-
// Person.statics.findByProviderEventId = function (id, cb) {
|
|
806
|
-
// this
|
|
807
|
-
// .find({ 'calendarEventSummaries.providerEventId': id })
|
|
808
|
-
// .exec(cb);
|
|
809
|
-
// };
|
|
810
|
-
|
|
811
795
|
Person.statics.findBySlug = function (slug, cb) {
|
|
812
796
|
this
|
|
813
797
|
.find({ slug: new RegExp(slug, 'i'), 'deleted': {$ne: true} })
|