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())

View File

@ -174,7 +174,7 @@ class DestinationController extends GetxController {
context: Get.context!,
isScrollControlled: true,
builder: ((context) =>
CameraPage(destination: dss))).whenComplete(() {
CameraPage(destination: d))).whenComplete(() {
skip_gps = false;
chekcs = 0;
is_in_checkin.value = false;
@ -307,7 +307,7 @@ class DestinationController extends GetxController {
isScrollControlled: true,
builder: ((context) => CameraPage(
buyPointPhoto: true,
destination: dss,
destination: d,
dbDest: ds.first,
))).whenComplete(() {
skip_gps = false;
@ -340,7 +340,7 @@ class DestinationController extends GetxController {
context: Get.context!,
isScrollControlled: true,
builder: ((context) => CameraPage(
destination: dss,
destination: d,
))).whenComplete(() {
skip_gps = false;
chekcs = 0;

View File

@ -49,16 +49,15 @@ class _HistoryPageState extends State<HistoryPage> {
return ListTile(
title: Text(dests[index].name ?? ""),
subtitle:
Text(dests[index].address ?? ""),
Text("${dests[index].sub_loc_id} : ${dests[index].name}"),
leading: dests[index].checkin_image != null
? Container(width: 100, height: 100, child: Image.file(File(dests[index].checkin_image!)))
? Row(
children: [
Container(width: 100, height: 100, child: Image.file(File(dests[index].checkin_image!))),
Container(width: 100, height: 100, child: Image.file(File(dests[index].buypoint_image!)))
],
)
: Container(),
trailing: ElevatedButton(
child: Text(dests[index].cp.toString()),
style: ElevatedButton.styleFrom(shape: CircleBorder()),
onPressed: () {
},),
);
}));
} else {

View File

@ -136,10 +136,6 @@ class AppPages {
name: Routes.CHANGE_PASSWORD,
page: () => ChangePasswordPage(),
),
GetPage(
name: Routes.CAMERA_PAGE,
page: () => CameraPage(),
),
GetPage(
name: Routes.PROGRESS,
page: () => const ProgressPage(),