version 4.8.17 -- カレンダーで今日以降しか選べないようにした

This commit is contained in:
2024-08-10 09:11:29 +09:00
parent bdf6dd3c04
commit f9a2bae9a9
7 changed files with 25 additions and 21 deletions

View File

@ -363,7 +363,7 @@ class CameraPage extends StatelessWidget {
],
);
} else if (destinationController.isInRog.value &&
} else if ((destinationController.isInRog.value || (destination.buy_point != null && destination.buy_point! > 0)) &&
dbDest?.checkedin != null &&
destination.cp != -1 &&
dbDest?.checkedin == true) {
@ -403,7 +403,7 @@ class CameraPage extends StatelessWidget {
],
);
} else if (destinationController.isInRog.value &&
} else if ((destinationController.isInRog.value || (destination.buy_point != null && destination.buy_point! > 0)) &&
dbDest?.checkedin != null &&
destination.cp != -1 &&
destination.use_qr_code == true &&
@ -507,7 +507,7 @@ class CameraPage extends StatelessWidget {
//}else if(destination.use_qr_code){
// return QRCodeScannerPage(destination: destination);
} else if (destinationController.isInRog.value) {
} else if (destinationController.isInRog.value || (destination.buy_point != null && destination.buy_point! > 0)) {
// isInRogがtrueの場合は、カメラページのUIを構築します。
// AppBarには、目的地の情報を表示します。
// ボディには、目的地の画像、タグ、アクションボタンを表示します。

View File

@ -825,7 +825,7 @@ class DestinationController extends GetxController {
//print("is rog ---- ${is_in_rog.value} ----");
if (d.hidden_location != null &&
d.hidden_location == 0 &&
isInRog.value == true &&
(isInRog.value == true || (d.buy_point != null && d.buy_point! > 0)) &&
d.cp != -1 && d.cp != 0 && d.cp != -2) {
chekcs = 3;
photos.clear();

View File

@ -89,10 +89,13 @@ class EntryDetailPage extends GetView<EntryController> {
? tz.TZDateTime.from(controller.selectedDate.value!, tz.getLocation('Asia/Tokyo'))
: (now.isAfter(eventStart) ? now : eventStart);
// 選択可能な最初の日付を設定(今日かイベント開始日のうち、より後の日付)
final tz.TZDateTime firstDate = now.isAfter(eventStart) ? now : eventStart;
final DateTime? picked = await showDatePicker(
context: context,
initialDate: initialDate,
firstDate: eventStart,
initialDate: initialDate.isAfter(firstDate) ? initialDate : firstDate,
firstDate: firstDate,
lastDate: eventEnd,
);
if (picked != null) {

View File

@ -102,6 +102,7 @@ class EventEntriesController extends GetxController {
await _apiService.updateUserInfo(userid,entry);
_indexController.currentUser[0]["user"]["event_date"] = entryDate; // 追加2024-8-9
_indexController.currentUser[0]["user"]["event_code"] = entry.event.eventName;
_indexController.currentUser[0]["user"]["team_name"] = entry.team.teamName;
_indexController.currentUser[0]["user"]["group"] = entry.team.category.categoryName;

View File

@ -382,7 +382,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
? "in_game".tr
: isAlreadyCheckedIn == true
? "in_game".tr
: destinationController.isInRog.value == true
: (destinationController.isInRog.value == true || (destination.buy_point != null && destination.buy_point! > 0))
? "checkin".tr
: "rogaining_not_started".tr,
style: TextStyle(color: Theme.of(context).colorScheme.onSecondary),
@ -564,7 +564,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
//checkin or remove checkin
destinationController.isInRog.value == true
(destinationController.isInRog.value == true || (destination.buy_point != null && destination.buy_point! > 0))
&& (distanceToDest <=
destinationController.getForcedChckinDistance(destination) || destination.checkin_radious==-1 )
&& destination.cp != 0 && destination.cp != -1 && destination.cp != -2