web-manager 3.2.41 → 3.2.42
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/account.js +6 -5
- 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(
|
469
|
+
new Date(accountCreationDate)
|
469
470
|
.toLocaleString(undefined, {
|
470
|
-
|
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
|
-
|
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
|
-
|
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