@dhyasama/totem-models 6.19.0 → 6.19.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/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
@@ -1312,6 +1312,7 @@ module.exports = function(mongoose, config) {
1312
1312
 
1313
1313
  if (result.indexOf('/') === 0) { result = result.replace('/', ''); }
1314
1314
  if (result.indexOf('in/') === 0) { result = result.replace('in/', ''); }
1315
+ if (result.indexOf('organization/') === 0) { result = result.replace('organization/', ''); }
1315
1316
  if (result.indexOf('/') >= 0) { result = result.split('/')[0]; }
1316
1317
 
1317
1318
  console.log(val, '-->', result);
@@ -1322,8 +1323,9 @@ module.exports = function(mongoose, config) {
1322
1323
 
1323
1324
  var domains = {
1324
1325
  facebook: 'https://facebook.com',
1325
- linkedin: 'https://linkedin.com',
1326
- twitter: 'https://twitter.com'
1326
+ linkedin: 'https://linkedin.com/company',
1327
+ twitter: 'https://twitter.com',
1328
+ crunchbase: 'https://crunchbase.com/organization'
1327
1329
  };
1328
1330
 
1329
1331
  var username = getUsername(value);
@@ -1344,7 +1346,8 @@ module.exports = function(mongoose, config) {
1344
1346
  [
1345
1347
  { 'social.facebook': domains.facebook + '/' + username },
1346
1348
  { 'social.linkedin': domains.linkedin + '/in/' + username },
1347
- { 'social.twitter': domains.twitter + '/' + username }
1349
+ { 'social.twitter': domains.twitter + '/' + username },
1350
+ { 'crunchbase.url': domains.crunchbase + '/' + username }
1348
1351
  ],
1349
1352
  'deleted': { $ne: true }
1350
1353
  })
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.2",
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