@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 +3 -2
- package/package.json +1 -1
- package/.npmignore +0 -14
- package/package-lock.json +0 -1829
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.
|
|
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
|
|
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