Projects
This commit is contained in:
parent
ee470f6eff
commit
6400cdac1c
|
|
@ -58,8 +58,7 @@ class ProjectScreen extends StatelessWidget {
|
||||||
onSelectedCustom2: (value) =>
|
onSelectedCustom2: (value) =>
|
||||||
store.dispatch(FilterProjectsByCustom2(value)),
|
store.dispatch(FilterProjectsByCustom2(value)),
|
||||||
sortFields: [
|
sortFields: [
|
||||||
ProjectFields.projectKey,
|
ProjectFields.name,
|
||||||
ProjectFields.cost,
|
|
||||||
ProjectFields.updatedAt,
|
ProjectFields.updatedAt,
|
||||||
],
|
],
|
||||||
onSelectedState: (EntityState state, value) {
|
onSelectedState: (EntityState state, value) {
|
||||||
|
|
@ -69,7 +68,7 @@ class ProjectScreen extends StatelessWidget {
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
||||||
floatingActionButton: user.canCreate(EntityType.project)
|
floatingActionButton: user.canCreate(EntityType.project)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
key: Key(ProjectKeys.projectScreenFABKeyString),
|
//key: Key(ProjectKeys.projectScreenFABKeyString),
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ class _ProjectViewState extends State<ProjectView> {
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(project.displayName),
|
title: Text(project.name),
|
||||||
actions: project.isNew
|
actions: project.isNew
|
||||||
? []
|
? []
|
||||||
: [
|
: [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:async';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/completers.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:redux/redux.dart';
|
import 'package:redux/redux.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/project/project_actions.dart';
|
import 'package:invoiceninja_flutter/redux/project/project_actions.dart';
|
||||||
|
|
@ -8,7 +9,6 @@ import 'package:invoiceninja_flutter/data/models/project_model.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/project/view/project_view.dart';
|
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';
|
||||||
import 'package:invoiceninja_flutter/ui/app/icon_message.dart';
|
|
||||||
|
|
||||||
class ProjectViewScreen extends StatelessWidget {
|
class ProjectViewScreen extends StatelessWidget {
|
||||||
static const String route = '/project/view';
|
static const String route = '/project/view';
|
||||||
|
|
@ -50,7 +50,7 @@ class ProjectViewVM {
|
||||||
|
|
||||||
factory ProjectViewVM.fromStore(Store<AppState> store) {
|
factory ProjectViewVM.fromStore(Store<AppState> store) {
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final payment = state.projectState.map[state.projectUIState.selectedId];
|
final project = state.projectState.map[state.projectUIState.selectedId];
|
||||||
|
|
||||||
return ProjectViewVM(
|
return ProjectViewVM(
|
||||||
isLoading: store.state.isLoading,
|
isLoading: store.state.isLoading,
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,11 @@ class AppLocalization {
|
||||||
|
|
||||||
static final Map<String, Map<String, String>> _localizedValues = {
|
static final Map<String, Map<String, String>> _localizedValues = {
|
||||||
'en': {
|
'en': {
|
||||||
|
'created_project': 'Successfully created project',
|
||||||
|
'updated_project': 'Successfully updated project',
|
||||||
|
'archived_project': 'Successfully archived project',
|
||||||
|
'deleted_project': 'Successfully deleted project',
|
||||||
|
'restored_project': 'Successfully restored project',
|
||||||
'new_project': 'New Project',
|
'new_project': 'New Project',
|
||||||
'thank_you_for_using_our_app': 'Thank you for using our app!',
|
'thank_you_for_using_our_app': 'Thank you for using our app!',
|
||||||
'if_you_like_it': 'If you like it please',
|
'if_you_like_it': 'If you like it please',
|
||||||
|
|
@ -9851,6 +9856,21 @@ class AppLocalization {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
String get createdProject =>
|
||||||
|
_localizedValues[locale.toString()]['created_project'];
|
||||||
|
|
||||||
|
String get updatedProject =>
|
||||||
|
_localizedValues[locale.toString()]['updated_project'];
|
||||||
|
|
||||||
|
String get archivedProject =>
|
||||||
|
_localizedValues[locale.toString()]['archived_project'];
|
||||||
|
|
||||||
|
String get deletedProject =>
|
||||||
|
_localizedValues[locale.toString()]['deleted_project'];
|
||||||
|
|
||||||
|
String get restoredProject =>
|
||||||
|
_localizedValues[locale.toString()]['restored_project'];
|
||||||
|
|
||||||
String get newProject => _localizedValues[locale.languageCode]['new_project'];
|
String get newProject => _localizedValues[locale.languageCode]['new_project'];
|
||||||
|
|
||||||
String get thankYouForUsingOurApp =>
|
String get thankYouForUsingOurApp =>
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ class StubScreen extends StatelessWidget {
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
||||||
floatingActionButton: user.canCreate(EntityType.stub)
|
floatingActionButton: user.canCreate(EntityType.stub)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
key: Key(StubKeys.stubScreenFABKeyString),
|
//key: Key(StubKeys.stubScreenFABKeyString),
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ class _StubViewState extends State<StubView> {
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(stub.displayName),
|
title: Text(stub.name),
|
||||||
actions: stub.isNew
|
actions: stub.isNew
|
||||||
? []
|
? []
|
||||||
: [
|
: [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:async';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/completers.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:redux/redux.dart';
|
import 'package:redux/redux.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/stub/stub_actions.dart';
|
import 'package:invoiceninja_flutter/redux/stub/stub_actions.dart';
|
||||||
|
|
@ -8,7 +9,6 @@ import 'package:invoiceninja_flutter/data/models/stub_model.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/stub/view/stub_view.dart';
|
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';
|
||||||
import 'package:invoiceninja_flutter/ui/app/icon_message.dart';
|
|
||||||
|
|
||||||
class StubViewScreen extends StatelessWidget {
|
class StubViewScreen extends StatelessWidget {
|
||||||
static const String route = '/stub/view';
|
static const String route = '/stub/view';
|
||||||
|
|
@ -50,7 +50,7 @@ class StubViewVM {
|
||||||
|
|
||||||
factory StubViewVM.fromStore(Store<AppState> store) {
|
factory StubViewVM.fromStore(Store<AppState> store) {
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final payment = state.stubState.map[state.stubUIState.selectedId];
|
final stub = state.stubState.map[state.stubUIState.selectedId];
|
||||||
|
|
||||||
return StubViewVM(
|
return StubViewVM(
|
||||||
isLoading: store.state.isLoading,
|
isLoading: store.state.isLoading,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue