web-manager 3.2.41 → 3.2.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/lib/account.js +6 -5
  2. package/package.json +1 -1
package/lib/account.js CHANGED
@@ -450,6 +450,7 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
450
450
 
451
451
  var updateURL = new URL(cancelURL);
452
452
  var referralURL = new URL(window.location.origin || window.location.host);
453
+ var accountCreationDate = new Date(+self.utilities.get(firebaseUser, 'metadata.createdAt', '0'));
453
454
 
454
455
  function _setAuthItem(selector, value) {
455
456
  self.dom.select(selector).each(function(e, i) {
@@ -465,9 +466,9 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
465
466
  referralURL.searchParams.set('aff', account.affiliate.code)
466
467
 
467
468
  authCreatedEl.setInnerHTML(
468
- new Date(+self.utilities.get(firebaseUser, 'metadata.createdAt', '0'))
469
+ new Date(accountCreationDate)
469
470
  .toLocaleString(undefined, {
470
- weekday: 'long', year: 'numeric', month: 'long', day: 'numeric',
471
+ year: 'numeric', month: 'long', day: 'numeric',
471
472
  })
472
473
  )
473
474
  authPhoneInput.setInnerHTML(firebaseUser.phoneNumber).setValue(firebaseUser.phoneNumber)
@@ -509,9 +510,9 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
509
510
  var visibleStatus = uppercase(account.plan.status === 'suspended' ? 'failed payment' : account.plan.status);
510
511
  // If user is on trial, start date is trial exp date
511
512
  var visibleStartDate = account.plan.trial.activated ? account.plan.trial.expires.timestamp : account.plan.payment.startDate.timestamp;
513
+ // If basic, just show account creation date
512
514
  if (isBasicPlan) {
513
- // Set as start of this month
514
- visibleStartDate = new Date(now.getFullYear(), now.getMonth(), 1).toISOString();
515
+ visibleStartDate = accountCreationDate;
515
516
  }
516
517
  var visibleFrequency = account.plan.payment.frequency === 'unknown' ? 'monthly' : account.plan.payment.frequency;
517
518
 
@@ -528,7 +529,7 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
528
529
  billingStatusColorEl.addClass('bg-soft-danger').addClass('text-danger');
529
530
  }
530
531
  billingStartDateEl.setInnerHTML(new Date(visibleStartDate).toLocaleString(undefined, {
531
- weekday: 'long', year: 'numeric', month: 'long', day: 'numeric',
532
+ year: 'numeric', month: 'long', day: 'numeric',
532
533
  }));
533
534
  billingExpirationDateEl.setInnerHTML(isBasicPlan && daysTillExpire < 366
534
535
  ? '<i class="fas fa-exclamation-triangle mr-1"></i> Expires in ' + daysTillExpire + ' days '
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.2.41",
3
+ "version": "3.2.42",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {