History fixes
This commit is contained in:
parent
1553f4a64e
commit
32b32d5a68
|
|
@ -5,6 +5,9 @@ import 'package:invoiceninja_flutter/data/models/entities.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/client/client_actions.dart';
|
import 'package:invoiceninja_flutter/redux/client/client_actions.dart';
|
||||||
|
import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart';
|
||||||
|
import 'package:invoiceninja_flutter/redux/reports/reports_actions.dart';
|
||||||
|
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/history_drawer_vm.dart';
|
import 'package:invoiceninja_flutter/ui/app/history_drawer_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/menu_drawer_vm.dart';
|
import 'package:invoiceninja_flutter/ui/app/menu_drawer_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/help_text.dart';
|
import 'package:invoiceninja_flutter/ui/app/help_text.dart';
|
||||||
|
|
@ -176,11 +179,24 @@ class MainScreen extends StatelessWidget {
|
||||||
store.dispatch(PopLastHistory());
|
store.dispatch(PopLastHistory());
|
||||||
}
|
}
|
||||||
|
|
||||||
viewEntityById(
|
switch (history.entityType) {
|
||||||
entityType: history.entityType,
|
case EntityType.dashboard:
|
||||||
entityId: history.id,
|
store.dispatch(
|
||||||
context: context,
|
ViewDashboard(navigator: Navigator.of(context)));
|
||||||
);
|
break;
|
||||||
|
case EntityType.reports:
|
||||||
|
store.dispatch(ViewReports(navigator: Navigator.of(context)));
|
||||||
|
break;
|
||||||
|
case EntityType.settings:
|
||||||
|
store
|
||||||
|
.dispatch(ViewSettings(navigator: Navigator.of(context)));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
viewEntityById(
|
||||||
|
context: context,
|
||||||
|
entityId: history.id,
|
||||||
|
entityType: history.entityType);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue