Client: Renaming.

This commit is contained in:
Tatiana Lopaeva 2024-08-13 12:09:40 +03:00
parent 961ae16adc
commit ce448f9dda
4 changed files with 22 additions and 9 deletions

View File

@ -86,7 +86,7 @@ const Bar = (props) => {
roomQuota: false,
storageQuota: false,
tenantCustomQuota: false,
userQuota: false,
almostTariffLimitPerUser: false,
storageAndUserQuota: false,
storageAndRoomQuota: false,
confirmEmail: false,
@ -132,7 +132,10 @@ const Bar = (props) => {
if (isAdmin || isRoomAdmin) {
setBarVisible((value) => ({
...value,
userQuota: !closed.includes(QuotaBarTypes.UserQuota),
almostTariffLimitPerUser: !closed.includes(
QuotaBarTypes.AlmostTariffLimitPerUser,
),
}));
}
if (isAdmin || isPowerUser || isRoomAdmin) {
@ -154,7 +157,7 @@ const Bar = (props) => {
roomQuota: isAdmin,
storageQuota: isAdmin || isPowerUser || isRoomAdmin,
tenantCustomQuota: isAdmin || isPowerUser || isRoomAdmin,
userQuota: isAdmin | isRoomAdmin,
almostTariffLimitPerUser: isAdmin | isRoomAdmin,
storageAndUserQuota: isAdmin,
storageAndRoomQuota: isAdmin,
confirmEmail: true,
@ -240,8 +243,11 @@ const Bar = (props) => {
case QuotaBarTypes.TenantCustomQuota:
setBarVisible((value) => ({ ...value, tenantCustomQuota: false }));
break;
case QuotaBarTypes.UserQuota:
setBarVisible((value) => ({ ...value, userQuota: false }));
case QuotaBarTypes.AlmostTariffLimitPerUser:
setBarVisible((value) => ({
...value,
almostTariffLimitPerUser: false,
}));
break;
case QuotaBarTypes.UserAndStorageQuota:
setBarVisible((value) => ({ ...value, storageAndUserQuota: false }));
@ -316,9 +322,12 @@ const Bar = (props) => {
};
}
if (showAlmostReachedUserTariffLimit && barVisible.userQuota) {
if (
showAlmostReachedUserTariffLimit &&
barVisible.almostTariffLimitPerUser
) {
return {
type: QuotaBarTypes.UserQuota,
type: QuotaBarTypes.AlmostTariffLimitPerUser,
maxValue: maxCountManagersByQuota,
currentValue: addedManagersCount,
};

View File

@ -151,7 +151,7 @@ const QuotasBar = ({
header: t("StorageQuotaHeader", { currentValue, maxValue }),
description: getTenantCustomQuota(),
};
case QuotaBarTypes.UserQuota:
case QuotaBarTypes.AlmostTariffLimitPerUser:
return {
header: t("UserQuotaHeader", { currentValue, maxValue }),
description: getUserQuotaDescription(),

View File

@ -98,7 +98,7 @@ export const QuotaBarTypes = Object.freeze({
ConfirmEmail: "confirm-email",
RoomQuota: "room-quota",
StorageQuota: "storage-quota",
UserQuota: "user-quota",
AlmostTariffLimitPerUser: "user-quota",
UserAndStorageQuota: "user-storage-quota",
RoomAndStorageQuota: "room-storage-quota",
PersonalUserQuota: "personal-user-quota",

View File

@ -280,6 +280,10 @@ class CurrentQuotasStore {
);
}
get showReachedUserTariffLimit() {
return null;
}
get isPaidUserLimit() {
return this.addedManagersCount >= this.maxCountManagersByQuota;
}