@dhyasama/totem-models 9.33.2 → 9.35.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.
@@ -24,10 +24,13 @@ module.exports = function(mongoose, config) {
24
24
  type: String,
25
25
  required: true,
26
26
  enum: [
27
+ 'added',
27
28
  'invited',
28
- 'rsvp_yes',
29
+ 'waitlisted',
29
30
  'rsvp_no',
30
- 'checkin_yes'
31
+ 'rsvp_yes',
32
+ 'checkin_yes',
33
+ 'checkin_no'
31
34
  ]
32
35
  }
33
36
 
package/lib/Financials.js CHANGED
@@ -735,8 +735,12 @@ module.exports = function(mongoose, config) {
735
735
  const self = this;
736
736
 
737
737
  const query = self.find({
738
- 'snapshots.status': { $nin: ['Completed', 'Archived', 'Overdue'] },
739
- 'snapshots.dueOn': { $lte: new Date() }
738
+ 'snapshots': {
739
+ $elemMatch: {
740
+ 'status': { $nin: ['Completed', 'Archived', 'Overdue'] },
741
+ 'dueOn': { $lte: new Date() }
742
+ }
743
+ }
740
744
  });
741
745
 
742
746
  query.exec(cb);
@@ -844,8 +848,8 @@ module.exports = function(mongoose, config) {
844
848
  Financials.pre('init', function(next) {
845
849
 
846
850
  var self = this;
851
+
847
852
  updateStatus(self);
848
-
849
853
  return next();
850
854
 
851
855
  });
@@ -855,7 +859,6 @@ module.exports = function(mongoose, config) {
855
859
  const self = this;
856
860
 
857
861
  updateStatus(self);
858
-
859
862
  return next();
860
863
 
861
864
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "9.33.2",
3
+ "version": "9.35.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",