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) => {
|
export const RoomContent = ({ item, isCurrentPortal }: TRoomContent) => {
|
||||||
const { t } = useTranslation(["Management", "Common", "Settings"]);
|
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 || {
|
const maxStorage = customQuota && getConvertedSize(t, customQuota);
|
||||||
roomAdminCount: null,
|
|
||||||
usersCount: null,
|
|
||||||
roomsCount: null,
|
|
||||||
};
|
|
||||||
const { quota, usedSize } = item;
|
|
||||||
|
|
||||||
const maxStorage = quota && getConvertedSize(t, quota);
|
|
||||||
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
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -44,4 +44,4 @@ export type TNewPortalData = {
|
|||||||
portalName: string;
|
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