Web: Values ​​updated in accordance with the response from the method API.

This commit is contained in:
Tatiana Lopaeva 2024-02-20 19:18:34 +03:00
parent 659b06e9a3
commit 704db21ed4
2 changed files with 12 additions and 11 deletions

View File

@ -31,18 +31,19 @@ type TRoomContent = {
export const RoomContent = ({ item, isCurrentPortal }: TRoomContent) => { export const RoomContent = ({ item, isCurrentPortal }: TRoomContent) => {
const { t } = useTranslation(["Management", "Common", "Settings"]); const { t } = useTranslation(["Management", "Common", "Settings"]);
const { roomAdminCount, usersCount, roomsCount } = item?.quotaUsage || { const { roomAdminCount, usersCount, roomsCount, usedSize } =
roomAdminCount: null, item?.quotaUsage || {
usersCount: null, roomAdminCount: null,
roomsCount: null, usersCount: null,
}; roomsCount: null,
const { quota, usedSize } = item; };
const { customQuota } = item;
const maxStorage = quota && getConvertedSize(t, quota); const maxStorage = customQuota && getConvertedSize(t, customQuota);
const usedStorage = getConvertedSize(t, usedSize); const usedStorage = getConvertedSize(t, usedSize);
const storageSpace = const storageSpace =
quota >= 0 ? `${usedStorage}/${maxStorage}` : `${usedStorage}`; customQuota >= 0 ? `${usedStorage}/${maxStorage}` : `${usedStorage}`;
return ( return (
<StyledRowContent <StyledRowContent

View File

@ -33,7 +33,7 @@ export type TPortals = {
owner: TOwner; owner: TOwner;
timeZoneName: string; timeZoneName: string;
quotaUsage: TQuotaUsage; quotaUsage: TQuotaUsage;
quota: number; customQuota: number;
usedSize: number; usedSize: number;
}; };