買い物ポイントでチェックアウトをキャンセルしたらレシート撮影は抑制する

This commit is contained in:
2024-04-27 18:39:55 +09:00
parent aada6262fe
commit 3be78ab97c
2 changed files with 95 additions and 11 deletions

View File

@ -798,8 +798,76 @@ class DestinationController extends GetxController {
isInRog.value == true &&
d.cp != -1 && d.cp != 0 && d.cp != -2) {
chekcs = 3;
isInCheckin.value = true;
photos.clear();
isInCheckin.value = true;
final result = await showModalBottomSheet(
constraints:
BoxConstraints.loose(Size(Get.width, Get.height * 0.75)),
context: Get.context!,
isScrollControlled: true,
builder: ((context) => CameraPage(
manulaCheckin: true,
destination: d,
)));
if (result ?? false) {
debugPrint("==> Checkin complete....");
if (d.buy_point != null && d.buy_point! > 0) {
skipGps = true;
photos.clear();
DatabaseHelper db = DatabaseHelper.instance;
List<Destination> ds =
await db.getDestinationByLatLon(d.lat!, d.lon!);
Destination? dss;
if (ds.isNotEmpty) {
dss = ds.first;
}
await showModalBottomSheet(
constraints:
BoxConstraints.loose(Size(Get.width, Get.height * 0.75)),
context: Get.context!,
isScrollControlled: true,
builder: ((context) =>
CameraPage(
buyPointPhoto: true,
destination: d,
dbDest: dss,
))).whenComplete(() {
skipGps = false;
rogainingCounted.value = true;
chekcs = 0;
isInCheckin.value = false;
//Get.back();
});
}
} else {
debugPrint("キャンセルされました");
Get.snackbar(
"キャンセルされました",
"チェックインしていません。必要ならもう一度チェックポイントをタップして下さい。",
backgroundColor: Colors.yellow,
colorText: Colors.black,
icon: const Icon(
Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP,
duration: const Duration(seconds: 3),
);
}
} else {
Get.snackbar(
"ロゲが始まっていません",
"ロゲ開始ボタンをタップして、ロゲイニングを始める必要があります",
backgroundColor: Colors.yellow,
colorText: Colors.black,
icon: const Icon(
Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP,
duration: const Duration(seconds: 3),
);
}
/*
await showModalBottomSheet(
constraints:
BoxConstraints.loose(Size(Get.width, Get.height * 0.75)),
@ -814,7 +882,7 @@ class DestinationController extends GetxController {
photos.clear();
DatabaseHelper db = DatabaseHelper.instance;
List<Destination> ds =
await db.getDestinationByLatLon(d.lat!, d.lon!);
await db.getDestinationByLatLon(d.lat!, d.lon!);
Destination? dss;
if (ds.isNotEmpty) {
dss = ds.first;
@ -822,14 +890,14 @@ class DestinationController extends GetxController {
await showModalBottomSheet(
constraints:
BoxConstraints.loose(Size(Get.width, Get.height * 0.75)),
BoxConstraints.loose(Size(Get.width, Get.height * 0.75)),
context: Get.context!,
isScrollControlled: true,
builder: ((context) => CameraPage(
buyPointPhoto: true,
destination: d,
dbDest: dss,
))).whenComplete(() {
buyPointPhoto: true,
destination: d,
dbDest: dss,
))).whenComplete(() {
skipGps = false;
rogainingCounted.value = true;
chekcs = 0;
@ -855,6 +923,8 @@ class DestinationController extends GetxController {
// backgroundColor: Colors.yellow,
);
}
*/
}
}