updated messages

This commit is contained in:
Mohamed Nouffer
2023-09-15 01:06:21 +05:30
parent b54c29eb4b
commit 15c70acf7b
5 changed files with 27 additions and 30 deletions

View File

@ -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<DestinationController>();
@ -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())