Client: fix open report in same tab
This commit is contained in:
parent
1cd82dc5a4
commit
9a924aa30e
@ -46,6 +46,7 @@ class SettingsSetupStore {
|
||||
settingsStore = null;
|
||||
tfaStore = null;
|
||||
thirdPartyStore = null;
|
||||
filesSettingsStore = null;
|
||||
isInit = false;
|
||||
logoutDialogVisible = false;
|
||||
logoutAllDialogVisible = false;
|
||||
@ -111,12 +112,19 @@ class SettingsSetupStore {
|
||||
currentSession = [];
|
||||
platformModalData = {};
|
||||
|
||||
constructor(tfaStore, authStore, settingsStore, thirdPartyStore) {
|
||||
constructor(
|
||||
tfaStore,
|
||||
authStore,
|
||||
settingsStore,
|
||||
thirdPartyStore,
|
||||
filesSettingsStore,
|
||||
) {
|
||||
this.selectionStore = new SelectionStore(this);
|
||||
this.authStore = authStore;
|
||||
this.tfaStore = tfaStore;
|
||||
this.settingsStore = settingsStore;
|
||||
this.thirdPartyStore = thirdPartyStore;
|
||||
this.filesSettingsStore = filesSettingsStore;
|
||||
makeAutoObservable(this);
|
||||
}
|
||||
|
||||
@ -433,16 +441,21 @@ class SettingsSetupStore {
|
||||
};
|
||||
|
||||
getLoginHistoryReport = async () => {
|
||||
const { openOnNewPage } = this.filesSettingsStore;
|
||||
const res = await api.settings.getLoginHistoryReport();
|
||||
setTimeout(() => window.open(res), 100); //hack for ios
|
||||
setTimeout(() => window.open(res, openOnNewPage ? "_blank" : "_self"), 100); //hack for ios
|
||||
return this.setAuditTrailReport(res);
|
||||
};
|
||||
|
||||
getAuditTrailReport = async () => {
|
||||
const { openOnNewPage } = this.filesSettingsStore;
|
||||
try {
|
||||
this.setIsLoadingDownloadReport(true);
|
||||
const res = await api.settings.getAuditTrailReport();
|
||||
setTimeout(() => window.open(res), 100); //hack for ios
|
||||
setTimeout(
|
||||
() => window.open(res, openOnNewPage ? "_blank" : "_self"),
|
||||
100,
|
||||
); //hack for ios
|
||||
return this.setAuditTrailReport(res);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
@ -96,12 +96,6 @@ const paymentStore = new PaymentStore(
|
||||
paymentQuotasStore,
|
||||
);
|
||||
const wizardStore = new WizardStore();
|
||||
const setupStore = new SettingsSetupStore(
|
||||
tfaStore,
|
||||
authStore,
|
||||
settingsStore,
|
||||
thirdPartyStore,
|
||||
);
|
||||
const confirmStore = new ConfirmStore();
|
||||
const backupStore = new BackupStore();
|
||||
const commonStore = new CommonStore(settingsStore);
|
||||
@ -131,6 +125,14 @@ const filesSettingsStore = new FilesSettingsStore(
|
||||
settingsStore,
|
||||
);
|
||||
|
||||
const setupStore = new SettingsSetupStore(
|
||||
tfaStore,
|
||||
authStore,
|
||||
settingsStore,
|
||||
thirdPartyStore,
|
||||
filesSettingsStore,
|
||||
);
|
||||
|
||||
const accessRightsStore = new AccessRightsStore(
|
||||
authStore,
|
||||
selectedFolderStore,
|
||||
|
Loading…
Reference in New Issue
Block a user