Web: Values updated in accordance with the response from the method API.
This commit is contained in:
parent
659b06e9a3
commit
704db21ed4
@ -30,19 +30,20 @@ type TRoomContent = {
|
||||
|
||||
export const RoomContent = ({ item, isCurrentPortal }: TRoomContent) => {
|
||||
const { t } = useTranslation(["Management", "Common", "Settings"]);
|
||||
|
||||
const { roomAdminCount, usersCount, roomsCount, usedSize } =
|
||||
item?.quotaUsage || {
|
||||
roomAdminCount: null,
|
||||
usersCount: null,
|
||||
roomsCount: null,
|
||||
};
|
||||
const { customQuota } = item;
|
||||
|
||||
const { roomAdminCount, usersCount, roomsCount } = item?.quotaUsage || {
|
||||
roomAdminCount: null,
|
||||
usersCount: null,
|
||||
roomsCount: null,
|
||||
};
|
||||
const { quota, usedSize } = item;
|
||||
|
||||
const maxStorage = quota && getConvertedSize(t, quota);
|
||||
const maxStorage = customQuota && getConvertedSize(t, customQuota);
|
||||
const usedStorage = getConvertedSize(t, usedSize);
|
||||
|
||||
const storageSpace =
|
||||
quota >= 0 ? `${usedStorage}/${maxStorage}` : `${usedStorage}`;
|
||||
customQuota >= 0 ? `${usedStorage}/${maxStorage}` : `${usedStorage}`;
|
||||
|
||||
return (
|
||||
<StyledRowContent
|
||||
|
@ -33,7 +33,7 @@ export type TPortals = {
|
||||
owner: TOwner;
|
||||
timeZoneName: string;
|
||||
quotaUsage: TQuotaUsage;
|
||||
quota: number;
|
||||
customQuota: number;
|
||||
usedSize: number;
|
||||
};
|
||||
|
||||
@ -44,4 +44,4 @@ export type TNewPortalData = {
|
||||
portalName: string;
|
||||
};
|
||||
|
||||
export type TranslationType = (key: string, opt?: object) => string;
|
||||
export type TranslationType = (key: string, opt?: object) => string;
|
||||
|
Loading…
Reference in New Issue
Block a user