Skip to content

Commit

Permalink
Fixed 72105 - Automatic backup displays the same options for backup i…
Browse files Browse the repository at this point in the history
…n settings and spaces.
  • Loading branch information
TatianaLopaeva committed Dec 25, 2024
1 parent 6df54c0 commit d5e6024
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class AutomaticBackup extends React.PureComponent {
storageRegions,
] = await Promise.all([
//getThirdPartyCommonFolderTree(),
getSettingsThirdParty(),
getSettingsThirdParty(isManagement()),
getBackupSchedule(isManagement()),
getBackupStorage(),
getStorageRegions(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class ManualBackup extends React.Component {
getProgress(t);

const [account, backupStorage, storageRegions] = await Promise.all([
getSettingsThirdParty(),
getSettingsThirdParty(isManagement()),
getBackupStorage(),
getStorageRegions(),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { RadioButtonGroup } from "@docspace/shared/components/radio-button-group
import { BackupStorageType, DeviceType } from "@docspace/shared/enums";
import { Checkbox } from "@docspace/shared/components/checkbox";
import { Text } from "@docspace/shared/components/text";
import { isManagement } from "@docspace/shared/utils/common";

import LocalFileModule from "./sub-components/LocalFileModule";
import ThirdPartyStoragesModule from "./sub-components/ThirdPartyStoragesModule";
Expand Down Expand Up @@ -93,7 +94,7 @@ const RestoreBackup = (props) => {
getProgress(t);

const [account, backupStorage, storageRegions] = await Promise.all([
getSettingsThirdParty(),
getSettingsThirdParty(isManagement()),
getBackupStorage(),
getStorageRegions(),
]);
Expand Down
4 changes: 3 additions & 1 deletion packages/client/src/store/BackupStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ import {
getSettingsThirdParty,
uploadBackup,
} from "@docspace/shared/api/files";
import { isManagement } from "@docspace/shared/utils/common";

import { connectedCloudsTypeTitleTranslation } from "../helpers/filesUtils.js";

const { EveryDayType, EveryWeekType } = AutoBackupPeriod;
Expand Down Expand Up @@ -202,7 +204,7 @@ class BackupStore {

setThirdPartyAccountsInfo = async (t) => {
const [connectedAccount, providers] = await Promise.all([
getSettingsThirdParty(),
getSettingsThirdParty(isManagement()),
this.thirdPartyStore.fetchConnectingStorages(),
]);

Expand Down
10 changes: 8 additions & 2 deletions packages/shared/api/files/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1054,8 +1054,14 @@ export function saveSettingsThirdParty(
}

// TODO: Need update res type
export function getSettingsThirdParty() {
return request({ method: "get", url: "files/thirdparty/backup" });
export function getSettingsThirdParty(dump: boolean = false) {
return request({
method: "get",
url: "files/thirdparty/backup",
params: {
dump,
},
});
}

export function deleteThirdParty(providerId: string) {
Expand Down

0 comments on commit d5e6024

Please sign in to comment.