Fix Bug 69189 - The Storage/Quota line is missing on Info/History called inside the room.
This commit is contained in:
parent
f06322abad
commit
8985155907
@ -138,14 +138,13 @@ export default inject(
|
||||
usersStore;
|
||||
const { setCustomRoomQuota, needResetFilesSelection } = filesStore;
|
||||
|
||||
const { defaultUsersQuota, defaultRoomsQuota } = currentQuotaStore;
|
||||
const {
|
||||
selection: infoPanelSelection,
|
||||
infoPanelSelection,
|
||||
setNewInfoPanelSelection,
|
||||
setInfoPanelSelection,
|
||||
} = infoPanelStore;
|
||||
|
||||
const inRoom = infoPanelSelection?.inRoom;
|
||||
const inRoom = !!infoPanelSelection?.navigationPath;
|
||||
const needResetSelection =
|
||||
type === "user" ? needResetUserSelection : needResetFilesSelection;
|
||||
|
||||
|
@ -87,6 +87,7 @@ const SpaceQuota = (props) => {
|
||||
|
||||
needResetSelection,
|
||||
setSelected,
|
||||
inRoom,
|
||||
} = props;
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
@ -123,7 +124,7 @@ const SpaceQuota = (props) => {
|
||||
|
||||
if (action === "no-quota") {
|
||||
try {
|
||||
const items = await updateQuota(-1, [item.id]);
|
||||
const items = await updateQuota(-1, [item.id], inRoom);
|
||||
|
||||
options.map((item) => {
|
||||
if (item.key === "no-quota") item.label = t("Common:Unlimited");
|
||||
@ -140,7 +141,7 @@ const SpaceQuota = (props) => {
|
||||
}
|
||||
|
||||
try {
|
||||
const items = await resetQuota([item.id]);
|
||||
const items = await resetQuota([item.id], inRoom);
|
||||
|
||||
options.map((item) => {
|
||||
if (item.key === "default-quota") item.label = defaultQuotaSize;
|
||||
@ -204,7 +205,13 @@ const SpaceQuota = (props) => {
|
||||
|
||||
export default inject(
|
||||
(
|
||||
{ peopleStore, filesActionsStore, filesStore, currentQuotaStore },
|
||||
{
|
||||
peopleStore,
|
||||
filesActionsStore,
|
||||
filesStore,
|
||||
currentQuotaStore,
|
||||
infoPanelStore,
|
||||
},
|
||||
{ type },
|
||||
) => {
|
||||
const { changeUserQuota, usersStore, selectionStore } = peopleStore;
|
||||
@ -225,6 +232,9 @@ export default inject(
|
||||
defaultRoomsQuota,
|
||||
} = currentQuotaStore;
|
||||
|
||||
const { infoPanelSelection } = infoPanelStore;
|
||||
const inRoom = !!infoPanelSelection?.navigationPath;
|
||||
|
||||
const { setSelected: setUsersSelected } = selectionStore;
|
||||
|
||||
const changeQuota = type === "user" ? changeUserQuota : changeRoomQuota;
|
||||
@ -251,6 +261,7 @@ export default inject(
|
||||
resetQuota,
|
||||
defaultSize,
|
||||
needResetSelection,
|
||||
inRoom,
|
||||
};
|
||||
},
|
||||
)(observer(SpaceQuota));
|
||||
|
@ -1938,10 +1938,10 @@ class FilesStore {
|
||||
return rooms;
|
||||
};
|
||||
|
||||
resetRoomQuota = async (itemsIDs, filter) => {
|
||||
resetRoomQuota = async (itemsIDs, inRoom = false, filter) => {
|
||||
const rooms = await api.rooms.resetRoomQuota(itemsIDs);
|
||||
|
||||
await this.fetchRooms(null, filter, false, false, false);
|
||||
if (!inRoom) await this.fetchRooms(null, filter, false, false, false);
|
||||
|
||||
return rooms;
|
||||
};
|
||||
|
@ -140,6 +140,12 @@ class SelectedFolderStore {
|
||||
|
||||
parentRoomType: Nullable<FolderType> = null;
|
||||
|
||||
usedSpace: number | undefined;
|
||||
|
||||
quotaLimit: number | undefined;
|
||||
|
||||
isCustomQuota: boolean | undefined;
|
||||
|
||||
constructor(settingsStore: SettingsStore) {
|
||||
makeAutoObservable(this);
|
||||
this.settingsStore = settingsStore;
|
||||
@ -183,6 +189,9 @@ class SelectedFolderStore {
|
||||
type: this.type,
|
||||
isRootFolder: this.isRootFolder,
|
||||
parentRoomType: this.parentRoomType,
|
||||
usedSpace: this.usedSpace,
|
||||
quotaLimit: this.quotaLimit,
|
||||
isCustomQuota: this.isCustomQuota,
|
||||
};
|
||||
};
|
||||
|
||||
@ -221,6 +230,9 @@ class SelectedFolderStore {
|
||||
this.type = null;
|
||||
this.inRoom = false;
|
||||
this.parentRoomType = null;
|
||||
this.usedSpace = undefined;
|
||||
this.quotaLimit = undefined;
|
||||
this.isCustomQuota = undefined;
|
||||
};
|
||||
|
||||
setParentId = (parentId: number) => {
|
||||
|
Loading…
Reference in New Issue
Block a user