fixed details screen checkin

This commit is contained in:
2023-11-22 12:58:29 +05:30
parent 8a1e5b1ca8
commit 4e4cfda40b
2 changed files with 59 additions and 45 deletions

View File

@ -485,6 +485,7 @@ class DestinationController extends GetxController {
rogainingCounted.value = true; rogainingCounted.value = true;
chekcs = 0; chekcs = 0;
isInCheckin.value = false; isInCheckin.value = false;
Get.back();
}); });
} else { } else {
skipGps = false; skipGps = false;

View File

@ -600,14 +600,10 @@ class BottomSheetNew extends GetView<BottomSheetController> {
), ),
// forced start / checkin // forced start / checkin
distanceToDest <= Obx(
() => distanceToDest <=
destinationController destinationController
.getForcedChckinDistance(destination) && .getForcedChckinDistance(destination)
destinationController.isInRog.value == false &&
// destinationController.isInCheckin.value ==
// true &&
destinationController.rogainingCounted.value ==
false
? ElevatedButton( ? ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context) backgroundColor: Theme.of(context)
@ -615,8 +611,14 @@ class BottomSheetNew extends GetView<BottomSheetController> {
.secondary), .secondary),
onPressed: () async { onPressed: () async {
//print("~~~~ manual checkin button ~~~~"); //print("~~~~ manual checkin button ~~~~");
if (destination.cp == -1) { if (destination.cp == -1 &&
destinationController.isInRog.value = true; destinationController.isInRog.value ==
false &&
destinationController
.rogainingCounted.value ==
false) {
destinationController.isInRog.value =
true;
destinationController.addToRogaining( destinationController.addToRogaining(
destinationController.currentLat, destinationController.currentLat,
destinationController.currentLon, destinationController.currentLon,
@ -626,25 +628,36 @@ class BottomSheetNew extends GetView<BottomSheetController> {
.startRogaining() .startRogaining()
.then((value) => Get.back()); .then((value) => Get.back());
} else { } else {
Get.back();
await destinationController await destinationController
.callforCheckin(destination); .callforCheckin(destination);
} }
}, },
child: Text( child: Text(
destination.cp == -1 &&
destinationController destinationController
.festuretoDestination( .isInRog.value ==
indexController false &&
.currentFeature[0]) destinationController
.cp == .rogainingCounted.value ==
-1 false
? "ロゲ開始" ? "ロゲ開始"
: destinationController
.isInRog.value ==
true &&
destination.cp == -1
? "ゲーム中"
: isAlreadyCheckedIn == true
? "ゲーム中"
: "チェックイン", : "チェックイン",
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.onSecondary))) .onSecondary)))
: ElevatedButton( : Container(),
onPressed: () {}, child: const Text("ゲーム中")), )
// ElevatedButton(
// onPressed: () {}, child: const Text("ゲーム中")),
], ],
), ),
Row( Row(