Projects
This commit is contained in:
parent
ff896f491f
commit
4a4a3ea74b
|
|
@ -10,7 +10,6 @@ import 'package:invoiceninja_flutter/ui/project/project_list_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/project/project_actions.dart';
|
import 'package:invoiceninja_flutter/redux/project/project_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/app_drawer_vm.dart';
|
import 'package:invoiceninja_flutter/ui/app/app_drawer_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/keys.dart';
|
|
||||||
|
|
||||||
class ProjectScreen extends StatelessWidget {
|
class ProjectScreen extends StatelessWidget {
|
||||||
static const String route = '/project';
|
static const String route = '/project';
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,13 @@ import 'package:invoiceninja_flutter/ui/project/view/project_view_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
||||||
|
|
||||||
class ProjectView extends StatefulWidget {
|
class ProjectView extends StatefulWidget {
|
||||||
final ProjectViewVM viewModel;
|
|
||||||
|
|
||||||
const ProjectView({
|
const ProjectView({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.viewModel,
|
@required this.viewModel,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final ProjectViewVM viewModel;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ProjectViewState createState() => new _ProjectViewState();
|
_ProjectViewState createState() => new _ProjectViewState();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ import 'package:invoiceninja_flutter/ui/project/view/project_view.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
|
|
||||||
class ProjectViewScreen extends StatelessWidget {
|
class ProjectViewScreen extends StatelessWidget {
|
||||||
static const String route = '/project/view';
|
|
||||||
const ProjectViewScreen({Key key}) : super(key: key);
|
const ProjectViewScreen({Key key}) : super(key: key);
|
||||||
|
static const String route = '/project/view';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -30,13 +30,6 @@ class ProjectViewScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ProjectViewVM {
|
class ProjectViewVM {
|
||||||
final ProjectEntity project;
|
|
||||||
final CompanyEntity company;
|
|
||||||
final Function(BuildContext, EntityAction) onActionSelected;
|
|
||||||
final Function(BuildContext) onEditPressed;
|
|
||||||
final bool isSaving;
|
|
||||||
final bool isLoading;
|
|
||||||
final bool isDirty;
|
|
||||||
|
|
||||||
ProjectViewVM({
|
ProjectViewVM({
|
||||||
@required this.project,
|
@required this.project,
|
||||||
|
|
@ -82,4 +75,13 @@ class ProjectViewVM {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final ProjectEntity project;
|
||||||
|
final CompanyEntity company;
|
||||||
|
final Function(BuildContext, EntityAction) onActionSelected;
|
||||||
|
final Function(BuildContext) onEditPressed;
|
||||||
|
final bool isSaving;
|
||||||
|
final bool isLoading;
|
||||||
|
final bool isDirty;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,14 @@ import 'package:invoiceninja_flutter/ui/stub/view/stub_view_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
||||||
|
|
||||||
class StubView extends StatefulWidget {
|
class StubView extends StatefulWidget {
|
||||||
final StubViewVM viewModel;
|
|
||||||
|
|
||||||
const StubView({
|
const StubView({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.viewModel,
|
@required this.viewModel,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final StubViewVM viewModel;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_StubViewState createState() => new _StubViewState();
|
_StubViewState createState() => new _StubViewState();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ import 'package:invoiceninja_flutter/ui/stub/view/stub_view.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
|
|
||||||
class StubViewScreen extends StatelessWidget {
|
class StubViewScreen extends StatelessWidget {
|
||||||
static const String route = '/stub/view';
|
|
||||||
const StubViewScreen({Key key}) : super(key: key);
|
const StubViewScreen({Key key}) : super(key: key);
|
||||||
|
static const String route = '/stub/view';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -30,13 +30,6 @@ class StubViewScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class StubViewVM {
|
class StubViewVM {
|
||||||
final StubEntity stub;
|
|
||||||
final CompanyEntity company;
|
|
||||||
final Function(BuildContext, EntityAction) onActionSelected;
|
|
||||||
final Function(BuildContext) onEditPressed;
|
|
||||||
final bool isSaving;
|
|
||||||
final bool isLoading;
|
|
||||||
final bool isDirty;
|
|
||||||
|
|
||||||
StubViewVM({
|
StubViewVM({
|
||||||
@required this.stub,
|
@required this.stub,
|
||||||
|
|
@ -82,4 +75,12 @@ class StubViewVM {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final StubEntity stub;
|
||||||
|
final CompanyEntity company;
|
||||||
|
final Function(BuildContext, EntityAction) onActionSelected;
|
||||||
|
final Function(BuildContext) onEditPressed;
|
||||||
|
final bool isSaving;
|
||||||
|
final bool isLoading;
|
||||||
|
final bool isDirty;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue