image chekin
This commit is contained in:
@ -53,12 +53,12 @@ class CameraPage extends StatelessWidget {
|
||||
if(value['status'] == 'OK'){
|
||||
Get.back();
|
||||
destinationController.skip_gps = false;
|
||||
Get.snackbar("goal_saved", "goal_added_successfuly");
|
||||
Get.snackbar("目標が保存されました", "目標が正常に追加されました");
|
||||
destinationController.resetRogaining();
|
||||
}
|
||||
else{
|
||||
print("---- status ${value['status']} ---- ");
|
||||
Get.snackbar("goal_not_added", "please_try_again");
|
||||
Get.snackbar("目標が追加されていません", "please_try_again");
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -77,7 +77,7 @@ class CameraPage extends StatelessWidget {
|
||||
onPressed: (){
|
||||
destinationController.openCamera(context);
|
||||
},
|
||||
child: Text("take checkin photo".tr)
|
||||
child: Text("再撮影")
|
||||
),
|
||||
Obx(() =>
|
||||
destinationController.photos.isNotEmpty ?
|
||||
@ -86,18 +86,13 @@ class CameraPage extends StatelessWidget {
|
||||
primary: Colors.red
|
||||
),
|
||||
onPressed: (){
|
||||
int user_id = indexController.currentUser[0]["user"]["id"];
|
||||
//print("--- Pressed -----");
|
||||
String _team = indexController.currentUser[0]["user"]['team_name'];
|
||||
//print("--- _team : ${_team}-----");
|
||||
String _event_code = indexController.currentUser[0]["user"]["event_code"];
|
||||
//print("--- _event_code : ${_event_code}-----");
|
||||
String _token = indexController.currentUser[0]["token"];
|
||||
//print("--- _token : ${_token}-----");
|
||||
DateTime now = DateTime.now();
|
||||
String formattedDate = DateFormat('yyyy-MM-dd HH:mm:ss').format(now);
|
||||
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], true);
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], true, destinationController.photos[0].path);
|
||||
Get.back();
|
||||
destinationController.rogaining_counted.value = true;
|
||||
destinationController.skip_gps = false;
|
||||
destinationController.is_photo_shoot.value = false;
|
||||
Get.snackbar("チェックインした", "正常にチェックインしました");
|
||||
|
||||
// ExternalService().makeGoal(user_id, _token, _team, destinationController.photos[0].path, formattedDate, _event_code).then((value){
|
||||
// print("---called ext api ${value['status']} ------");
|
||||
@ -112,7 +107,7 @@ class CameraPage extends StatelessWidget {
|
||||
// }
|
||||
// });
|
||||
},
|
||||
child: Text("Check In".tr)
|
||||
child: Text("チェックイン")
|
||||
):
|
||||
Container()
|
||||
)
|
||||
@ -129,8 +124,15 @@ class CameraPage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
if(destinationController.is_in_rog.value){
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("finishing_rogaining".tr),
|
||||
appBar:
|
||||
destinationController.is_in_rog.value && destinationController.rogaining_counted.value == true ?
|
||||
AppBar(
|
||||
title: Text("finishing_rogaining".tr)
|
||||
,
|
||||
)
|
||||
:
|
||||
AppBar(
|
||||
title: Text("チェックポイント"),
|
||||
),
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
|
||||
Reference in New Issue
Block a user