Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DashboardManager.js 832B

1234567891011121314151617181920212223242526
  1. // @flow
  2. import type {ServiceItem} from "./ServicesManager";
  3. import ServicesManager from "./ServicesManager";
  4. import {StackNavigationProp} from "@react-navigation/stack";
  5. import {getSublistWithIds} from "../utils/Utils";
  6. import AsyncStorageManager from "./AsyncStorageManager";
  7. export default class DashboardManager extends ServicesManager{
  8. constructor(nav: StackNavigationProp) {
  9. super(nav)
  10. }
  11. getCurrentDashboard(): Array<ServiceItem> {
  12. const dashboardIdList = JSON.parse(AsyncStorageManager.getInstance().preferences.dashboardItems.current);
  13. const allDatasets = [
  14. ...this.amicaleDataset,
  15. ...this.studentsDataset,
  16. ...this.insaDataset,
  17. ...this.specialDataset,
  18. ];
  19. return getSublistWithIds(dashboardIdList, allDatasets);
  20. }
  21. }