This commit is contained in:
Hillel Coren 2018-12-13 16:31:39 +02:00
parent 6400cdac1c
commit 233f7ea460
2 changed files with 8 additions and 2 deletions

View File

@ -53,7 +53,10 @@ class ProjectViewVM {
final project = state.projectState.map[state.projectUIState.selectedId]; final project = state.projectState.map[state.projectUIState.selectedId];
return ProjectViewVM( return ProjectViewVM(
isLoading: store.state.isLoading, company: state.selectedCompany,
isSaving: state.isSaving,
isLoading: state.isLoading,
isDirty: project.isNew,
project: project, project: project,
onEditPressed: (BuildContext context) { onEditPressed: (BuildContext context) {
store.dispatch(EditProject(project: project, context: context)); store.dispatch(EditProject(project: project, context: context));

View File

@ -53,7 +53,10 @@ class StubViewVM {
final stub = state.stubState.map[state.stubUIState.selectedId]; final stub = state.stubState.map[state.stubUIState.selectedId];
return StubViewVM( return StubViewVM(
isLoading: store.state.isLoading, company: state.selectedCompany,
isSaving: state.isSaving,
isLoading: state.isLoading,
isDirty: stub.isNew,
stub: stub, stub: stub,
onEditPressed: (BuildContext context) { onEditPressed: (BuildContext context) {
store.dispatch(EditStub(stub: stub, context: context)); store.dispatch(EditStub(stub: stub, context: context));