@dhyasama/totem-models 6.19.0 → 6.19.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/Deal.js CHANGED
@@ -281,7 +281,7 @@ module.exports = function(mongoose, config) {
281
281
 
282
282
  var getLastFundraiseDetails = function () {
283
283
 
284
- if (!deal.history || deal.history.length == 0 || !deal.fundraise.description) return null;
284
+ if (!deal.history || deal.history.length == 0 || !deal.fundraise.details) return null;
285
285
 
286
286
  var history = _.sortBy(deal.history);
287
287
  var last = history[history.length - 1];
@@ -312,7 +312,8 @@ module.exports = function(mongoose, config) {
312
312
  if (lastStage != deal.stage) description += 'The deal was updated from ' + lastStage + ' to ' + deal.stage;
313
313
  if (lastFundraiseAmount != deal.fundraise.amount) description += 'Fundraise amount was updated from $' + formatMoney(lastFundraiseAmount, 0) + ' to $' + formatMoney(deal.fundraise.amount, 0);
314
314
  if (lastFundraiseValuation != deal.fundraise.valuation) description += 'Fundraise valuation was updated from $' + formatMoney(lastFundraiseValuation, 0) + ' to $' + formatMoney(deal.fundraise.valuation, 0);
315
- if (lastFundraiseDetails != deal.fundraise.details) description += 'Fundraise details were updated from $' + lastFundraiseDetails + ' to ' + deal.fundraise.details;
315
+ if (lastFundraiseDetails && lastFundraiseDetails != deal.fundraise.details) description += 'Fundraise details were updated from ' + lastFundraiseDetails + ' to ' + deal.fundraise.details;
316
+ if (!lastFundraiseDetails && deal.fundraise.details) description += 'Fundraise details were added: ' + deal.fundraise.details;
316
317
  }
317
318
 
318
319
  // only add history if the description is set from the above conditions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "6.19.0",
3
+ "version": "6.19.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",
package/.npmignore DELETED
@@ -1,14 +0,0 @@
1
- lib-cov
2
- *.seed
3
- *.log
4
- *.csv
5
- *.dat
6
- *.out
7
- *.pid
8
- *.gz
9
-
10
- npm-debug.log
11
- node_modules
12
-
13
- .DS_Store
14
- .idea