From 15c70acf7b29eb575604b71b7aca5beb0608fc19 Mon Sep 17 00:00:00 2001 From: Mohamed Nouffer Date: Fri, 15 Sep 2023 01:06:21 +0530 Subject: [PATCH] updated messages --- lib/pages/camera/camera_page.dart | 30 ++++++++++--------- .../destination/destination_controller.dart | 6 ++-- lib/pages/history/history_page.dart | 15 +++++----- lib/routes/app_pages.dart | 4 --- pubspec.yaml | 2 +- 5 files changed, 27 insertions(+), 30 deletions(-) diff --git a/lib/pages/camera/camera_page.dart b/lib/pages/camera/camera_page.dart index bbed3d0..4c14f5f 100644 --- a/lib/pages/camera/camera_page.dart +++ b/lib/pages/camera/camera_page.dart @@ -21,9 +21,9 @@ ImageProvider getFinishImage() { class CameraPage extends StatelessWidget { bool? manulaCheckin = false; bool? buyPointPhoto = false; - Destination? destination; + Destination destination; Destination? dbDest; - CameraPage({Key? key, this.destination, this.dbDest, this.manulaCheckin, this.buyPointPhoto}) + CameraPage({Key? key,required this.destination, this.dbDest, this.manulaCheckin, this.buyPointPhoto}) : super(key: key); DestinationController destinationController = Get.find(); @@ -44,23 +44,21 @@ class CameraPage extends StatelessWidget { destinationController.openCamera(context, destination); }, child: destinationController.photos.isNotEmpty - ? const Text("再撮影") + ? const Text("買い物なし") : const Text("撮影"))), Obx(() => destinationController.photos.isNotEmpty ? ElevatedButton( style: ElevatedButton.styleFrom(backgroundColor: Colors.red), onPressed: () async { - print( - "##### current destination ${indexController.currentDestinationFeature[0].sub_loc_id} #######"); await destinationController.makeCheckin( - destination!, + destination, true, destinationController.photos[0].path); Get.back(); destinationController.rogaining_counted.value = true; destinationController.skip_gps = false; destinationController.is_photo_shoot.value = false; - Get.snackbar("チェックインした", "正常にチェックインしました"); + Get.snackbar("チェックインしました。", "${destination!.sub_loc_id} : ${destination!.name}"); }, child: const Text("チェックイン")) : Container()) @@ -169,7 +167,7 @@ class CameraPage extends StatelessWidget { destinationController.rogaining_counted.value = true; destinationController.skip_gps = false; destinationController.is_photo_shoot.value = false; - Get.snackbar("追加した", "領収書の写真を追加しました"); + Get.snackbar("お買い物加点を行いました。", "${destination!.sub_loc_id} : ${destination!.name}"); }, child: const Text("レシートの写真を撮る")) : Container()) @@ -227,7 +225,7 @@ class CameraPage extends StatelessWidget { ? AppBar( title: destination!.cp == -1 ? Text("finishing_rogaining".tr) - : Text("cp_pls_take_photo".tr), + : Text("${destination!.sub_loc_id} : ${destination!.name}".tr), leading: IconButton( icon: Text("cancel".tr), onPressed: () { @@ -261,6 +259,10 @@ class CameraPage extends StatelessWidget { ), ), ), + Padding( + padding:const EdgeInsets.symmetric(vertical:8.0), + child: destinationController.photos.isEmpty == true ? Text("撮影してチェックインしてください。") : Text("チェックインをタップしてください。") , + ), getAction(context), ], ), @@ -363,7 +365,7 @@ class BuyPointCamera extends StatelessWidget { return Scaffold( appBar: AppBar( title: Text( - "CPです。撮影してください。\n ${destination.sub_loc_id} : ${destination.location_id}", + "${destination.sub_loc_id} : ${destination.name}", ), ), body: Column( @@ -383,9 +385,9 @@ class BuyPointCamera extends StatelessWidget { ), ), ), - Padding( - padding: const EdgeInsets.all(8.0), - child: const Text("チェックインしました。"), + const Padding( + padding: EdgeInsets.all(8.0), + child: Text("チェックインをタップしてください。"), ), Row( mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -407,7 +409,7 @@ class BuyPointCamera extends StatelessWidget { destinationController.rogaining_counted.value = true; destinationController.skip_gps = false; destinationController.is_photo_shoot.value = false; - Get.snackbar("追加した", "領収書の写真を追加しました"); + Get.snackbar("チェックインしました。", "${destination.sub_loc_id} : ${destination.name}"); }, child: const Text("チェックイン")) : Container()) diff --git a/lib/pages/destination/destination_controller.dart b/lib/pages/destination/destination_controller.dart index fa2364d..87c6117 100644 --- a/lib/pages/destination/destination_controller.dart +++ b/lib/pages/destination/destination_controller.dart @@ -174,7 +174,7 @@ class DestinationController extends GetxController { context: Get.context!, isScrollControlled: true, builder: ((context) => - CameraPage(destination: dss))).whenComplete(() { + CameraPage(destination: d))).whenComplete(() { skip_gps = false; chekcs = 0; is_in_checkin.value = false; @@ -307,7 +307,7 @@ class DestinationController extends GetxController { isScrollControlled: true, builder: ((context) => CameraPage( buyPointPhoto: true, - destination: dss, + destination: d, dbDest: ds.first, ))).whenComplete(() { skip_gps = false; @@ -340,7 +340,7 @@ class DestinationController extends GetxController { context: Get.context!, isScrollControlled: true, builder: ((context) => CameraPage( - destination: dss, + destination: d, ))).whenComplete(() { skip_gps = false; chekcs = 0; diff --git a/lib/pages/history/history_page.dart b/lib/pages/history/history_page.dart index 1dc5f77..efaab4a 100644 --- a/lib/pages/history/history_page.dart +++ b/lib/pages/history/history_page.dart @@ -49,16 +49,15 @@ class _HistoryPageState extends State { return ListTile( title: Text(dests[index].name ?? ""), subtitle: - Text(dests[index].address ?? ""), + Text("${dests[index].sub_loc_id} : ${dests[index].name}"), leading: dests[index].checkin_image != null - ? Container(width: 100, height: 100, child: Image.file(File(dests[index].checkin_image!))) + ? Row( + children: [ + Container(width: 100, height: 100, child: Image.file(File(dests[index].checkin_image!))), + Container(width: 100, height: 100, child: Image.file(File(dests[index].buypoint_image!))) + ], + ) : Container(), - trailing: ElevatedButton( - child: Text(dests[index].cp.toString()), - style: ElevatedButton.styleFrom(shape: CircleBorder()), - onPressed: () { - - },), ); })); } else { diff --git a/lib/routes/app_pages.dart b/lib/routes/app_pages.dart index 562ef86..2a86fe4 100644 --- a/lib/routes/app_pages.dart +++ b/lib/routes/app_pages.dart @@ -136,10 +136,6 @@ class AppPages { name: Routes.CHANGE_PASSWORD, page: () => ChangePasswordPage(), ), - GetPage( - name: Routes.CAMERA_PAGE, - page: () => CameraPage(), - ), GetPage( name: Routes.PROGRESS, page: () => const ProgressPage(), diff --git a/pubspec.yaml b/pubspec.yaml index 42c2006..d84fd04 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.16+16 +version: 1.0.18+18 environment: sdk: '>=3.1.0 <4.0.0'