| @@ -1 +1 @@ | |||
| 440505e9ea1eee7043d2cbfeb318f6bc | |||
| af0eb765f94aecba228edd3e3fe3c4f4 | |||
| @@ -391,7 +391,7 @@ | |||
| "$(inherited)", | |||
| "$(PROJECT_DIR)/Flutter", | |||
| ); | |||
| MARKETING_VERSION = 0.4.0; | |||
| MARKETING_VERSION = 0.7.0; | |||
| PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm; | |||
| PRODUCT_NAME = Runner; | |||
| SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | |||
| @@ -533,7 +533,7 @@ | |||
| "$(inherited)", | |||
| "$(PROJECT_DIR)/Flutter", | |||
| ); | |||
| MARKETING_VERSION = 0.4.0; | |||
| MARKETING_VERSION = 0.7.0; | |||
| PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm; | |||
| PRODUCT_NAME = Runner; | |||
| SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | |||
| @@ -567,7 +567,7 @@ | |||
| "$(inherited)", | |||
| "$(PROJECT_DIR)/Flutter", | |||
| ); | |||
| MARKETING_VERSION = 0.4.0; | |||
| MARKETING_VERSION = 0.7.0; | |||
| PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.tpfarm; | |||
| PRODUCT_NAME = Runner; | |||
| SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | |||
| @@ -32,7 +32,34 @@ class Utils { | |||
| color: Colors.yellow, | |||
| ), | |||
| snackPosition: SnackPosition.BOTTOM, | |||
| duration: Duration(seconds: 30), | |||
| backgroundColor: Colors.yellow[50]); | |||
| } | |||
| static void showDialog( | |||
| {@required String title, | |||
| @required String message, | |||
| @required String textConfirm, | |||
| @required String textCancel, | |||
| @required Function() onConfirm}) { | |||
| if (Get.isDialogOpen) Get.back(); | |||
| Get.defaultDialog( | |||
| title: title, | |||
| middleText: message, | |||
| textConfirm: textConfirm, | |||
| textCancel: textCancel, | |||
| confirmTextColor: Colors.white, | |||
| onConfirm: onConfirm, | |||
| ); | |||
| } | |||
| static void showDialogConfirmSupply({@required Function() onConfirm}) { | |||
| if (Get.isDialogOpen) Get.back(); | |||
| Get.defaultDialog( | |||
| title: "Vật tư chưa được thêm", | |||
| middleText: "Bạn có muốn cập nhật?", | |||
| textConfirm: "Tiếp tục", | |||
| textCancel: "Xem lại", | |||
| confirmTextColor: Colors.white, | |||
| onConfirm: onConfirm); | |||
| } | |||
| } | |||
| @@ -13,6 +13,7 @@ import 'package:farm_tpf/presentation/screens/actions/bloc/action_detail_bloc.da | |||
| import 'package:farm_tpf/presentation/screens/actions/controller/ChangeSupplyUsing.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/dung/widget_dung_supply.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_file_controller.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_supply.dart'; | |||
| import 'package:farm_tpf/utils/const_common.dart'; | |||
| import 'package:farm_tpf/utils/const_string.dart'; | |||
| import 'package:farm_tpf/utils/const_style.dart'; | |||
| @@ -227,7 +228,14 @@ class _EditActionDungScreenState extends State<EditActionDungScreen> { | |||
| if (!currentFocus.hasPrimaryFocus) { | |||
| currentFocus.unfocus(); | |||
| } | |||
| _validateInputs(); | |||
| if (Get.find<ChangeSupply>().selectedSupplyId > 0) { | |||
| Utils.showDialogConfirmSupply(onConfirm: () { | |||
| Get.back(); | |||
| _validateInputs(); | |||
| }); | |||
| } else { | |||
| _validateInputs(); | |||
| } | |||
| }, | |||
| ); | |||
| return <Widget>[iconButton]; | |||
| @@ -14,6 +14,7 @@ import 'package:farm_tpf/presentation/screens/actions/bloc/action_detail_bloc.da | |||
| import 'package:farm_tpf/presentation/screens/actions/controller/ChangeSupplyUsing.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/harvest_process/widget_harvest_process_supply.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_file_controller.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_supply.dart'; | |||
| import 'package:farm_tpf/utils/const_common.dart'; | |||
| import 'package:farm_tpf/utils/const_string.dart'; | |||
| import 'package:farm_tpf/utils/const_style.dart'; | |||
| @@ -298,7 +299,14 @@ class _EditActionHarvestProcessScreenState | |||
| if (!currentFocus.hasPrimaryFocus) { | |||
| currentFocus.unfocus(); | |||
| } | |||
| _validateInputs(); | |||
| if (Get.find<ChangeSupply>().selectedSupplyId > 0) { | |||
| Utils.showDialogConfirmSupply(onConfirm: () { | |||
| Get.back(); | |||
| _validateInputs(); | |||
| }); | |||
| } else { | |||
| _validateInputs(); | |||
| } | |||
| }, | |||
| ); | |||
| return <Widget>[iconButton]; | |||
| @@ -13,6 +13,7 @@ import 'package:farm_tpf/presentation/screens/actions/bloc/action_detail_bloc.da | |||
| import 'package:farm_tpf/presentation/screens/actions/controller/ChangeSupplyUsing.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/plant/widget_plant_supply.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_file_controller.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_supply.dart'; | |||
| import 'package:farm_tpf/utils/const_common.dart'; | |||
| import 'package:farm_tpf/utils/const_string.dart'; | |||
| import 'package:farm_tpf/utils/const_style.dart'; | |||
| @@ -215,7 +216,14 @@ class _EditActionPlantScreenState extends State<EditActionPlantScreen> { | |||
| if (!currentFocus.hasPrimaryFocus) { | |||
| currentFocus.unfocus(); | |||
| } | |||
| _validateInputs(); | |||
| if (Get.find<ChangeSupply>().selectedSupplyId > 0) { | |||
| Utils.showDialogConfirmSupply(onConfirm: () { | |||
| Get.back(); | |||
| _validateInputs(); | |||
| }); | |||
| } else { | |||
| _validateInputs(); | |||
| } | |||
| }, | |||
| ); | |||
| return <Widget>[iconButton]; | |||
| @@ -13,6 +13,7 @@ import 'package:farm_tpf/presentation/screens/actions/bloc/action_detail_bloc.da | |||
| import 'package:farm_tpf/presentation/screens/actions/controller/ChangeSupplyUsing.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/spraying/widget_spraying_supply.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_file_controller.dart'; | |||
| import 'package:farm_tpf/presentation/screens/actions/state_management_helper/change_supply.dart'; | |||
| import 'package:farm_tpf/utils/const_common.dart'; | |||
| import 'package:farm_tpf/utils/const_string.dart'; | |||
| import 'package:farm_tpf/utils/const_style.dart'; | |||
| @@ -265,7 +266,14 @@ class _EditActionSprayingScreenState extends State<EditActionSprayingScreen> { | |||
| if (!currentFocus.hasPrimaryFocus) { | |||
| currentFocus.unfocus(); | |||
| } | |||
| _validateInputs(); | |||
| if (Get.find<ChangeSupply>().selectedSupplyId > 0) { | |||
| Utils.showDialogConfirmSupply(onConfirm: () { | |||
| Get.back(); | |||
| _validateInputs(); | |||
| }); | |||
| } else { | |||
| _validateInputs(); | |||
| } | |||
| }, | |||
| ); | |||
| return <Widget>[iconButton]; | |||
| @@ -2,7 +2,7 @@ name: farm_tpf | |||
| description: A new Flutter project. | |||
| publish_to: 'none' | |||
| version: 0.6.0+1 | |||
| version: 0.7.0+1 | |||
| environment: | |||
| sdk: ">=2.7.0 <3.0.0" | |||