MOBILE-4616 reportbuilder: Only show report builder on user menu
parent
cfff5e6217
commit
c6f73af200
|
@ -17,6 +17,7 @@ import {
|
||||||
CoreUserProfileHandlerType,
|
CoreUserProfileHandlerType,
|
||||||
CoreUserProfileHandler,
|
CoreUserProfileHandler,
|
||||||
CoreUserProfileHandlerData,
|
CoreUserProfileHandlerData,
|
||||||
|
CoreUserDelegateContext,
|
||||||
} from '@features/user/services/user-delegate';
|
} from '@features/user/services/user-delegate';
|
||||||
import { CoreNavigator } from '@services/navigator';
|
import { CoreNavigator } from '@services/navigator';
|
||||||
import { makeSingleton } from '@singletons';
|
import { makeSingleton } from '@singletons';
|
||||||
|
@ -42,6 +43,18 @@ export class CoreReportBuilderHandlerService implements CoreUserProfileHandler {
|
||||||
return await CoreReportBuilder.isEnabled();
|
return await CoreReportBuilder.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
async isEnabledForContext(context: CoreUserDelegateContext): Promise<boolean> {
|
||||||
|
// Custom reports only available in user menu.
|
||||||
|
if (context !== CoreUserDelegateContext.USER_MENU) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue