|
|
@@ -1,8 +1,7 @@
|
|
|
-import 'package:app_business/service/abase.dart';
|
|
|
import 'package:app_business/service/api.dart';
|
|
|
-import 'package:fixnum/fixnum.dart';
|
|
|
import 'package:track_common/service/map_watch.dart';
|
|
|
import 'package:track_common/track_common.dart';
|
|
|
+import 'package:track_common/widget.dart';
|
|
|
|
|
|
class EventInManage {
|
|
|
int id = 0;
|
|
|
@@ -94,10 +93,38 @@ class EventManagerController extends GetxController {
|
|
|
}
|
|
|
|
|
|
Future<void> deleteEvent(EventInManage event) async {
|
|
|
- await _api.stub.toMatchRegusterDel(IdRequest()..id = Int64(event.id));
|
|
|
+ Get.dialog(AppDialog(
|
|
|
+ title: const Text('删除比赛'),
|
|
|
+ content: const Text('确认删除?'),
|
|
|
+ onCancel: () => Get.back(),
|
|
|
+ onConfirm: () async {
|
|
|
+ _api.stub
|
|
|
+ .toMatchRegusterDel(IdRequest()..id = Int64(event.id))
|
|
|
+ .then((p0) {}, onError: (e) {
|
|
|
+ Get.snackbar('删除失败', '$e');
|
|
|
+ });
|
|
|
+ Get.back();
|
|
|
+ }));
|
|
|
}
|
|
|
|
|
|
Future<void> eventEdit(int id, EventRegisterInfo event) {
|
|
|
return _api.eventEdit(id, event);
|
|
|
}
|
|
|
+
|
|
|
+ Future<void> deleteSignIn(UserInManage user) async {
|
|
|
+ Get.dialog(AppDialog(
|
|
|
+ title: const Text('删除签到'),
|
|
|
+ content: const Text('确认删除?'),
|
|
|
+ onCancel: () => Get.back(),
|
|
|
+ onConfirm: () async {
|
|
|
+ _api.stub
|
|
|
+ .matchChackInsDel(IdRequest()..id = Int64(user.checkId))
|
|
|
+ .then((p0) {
|
|
|
+ debug('删除签到:${user.checkId}');
|
|
|
+ }, onError: (e) {
|
|
|
+ Get.snackbar('删除失败', '$e');
|
|
|
+ });
|
|
|
+ Get.back();
|
|
|
+ }));
|
|
|
+ }
|
|
|
}
|