Web: Fixed bugs.

This commit is contained in:
Tatiana Lopaeva 2022-09-26 11:19:10 +03:00
parent fffdc56a80
commit 46370b588c
4 changed files with 10 additions and 9 deletions

View File

@ -302,7 +302,7 @@ const PaymentsPage = ({
</Text>
)}
{isPaidPeriod && !isFreeAfterPaidPeriod && (
{isPaidPeriod && !isFreeTariff && (
<Text
noSelect
fontSize={"14px"}

View File

@ -126,12 +126,12 @@ class PaymentStore {
}
initializeInfo = () => {
this.initializeTotalPrice();
this.initializeManagersCount();
};
initializeTotalPrice = () => {
const currentTotalPrice = authStore.currentQuotaStore.currentPlanCost.value;
this.initializeTotalPrice(currentTotalPrice);
this.initializeManagersCount(currentTotalPrice);
};
initializeTotalPrice = (currentTotalPrice) => {
if (currentTotalPrice !== 0) {
this.totalPrice = currentTotalPrice;
} else {
@ -141,11 +141,11 @@ class PaymentStore {
}
};
initializeManagersCount = () => {
initializeManagersCount = (currentTotalPrice) => {
const maxCountManagersByQuota =
authStore.currentQuotaStore.maxCountManagersByQuota;
if (maxCountManagersByQuota !== 0) {
if (maxCountManagersByQuota !== 0 && currentTotalPrice !== 0) {
this.managersCount =
maxCountManagersByQuota > this.maxAvailableManagersCount
? this.maxAvailableManagersCount + 1

View File

@ -176,7 +176,8 @@ Article.Body = () => {
Article.Body.displayName = "Body";
export default inject(({ auth, bannerStore }) => {
const { settingsStore, isFreeTariff, currentTariffStatusStore } = auth;
const { settingsStore, currentQuotaStore, currentTariffStatusStore } = auth;
const { isFreeTariff } = currentQuotaStore;
const { isGracePeriod } = currentTariffStatusStore;
const { isBannerVisible } = bannerStore;

View File

@ -32,7 +32,7 @@ class QuotasStore {
};
get isFreeTariff() {
return this.currentPortalQuota.trial || this.currentPortalQuota.free;
return this.currentPortalQuota.free;
}
get currentPlanCost() {