9/21/2
This commit is contained in:
@@ -8,12 +8,15 @@ import 'package:sefer_admin1/controller/admin/static_controller.dart';
|
||||
import 'package:sefer_admin1/controller/notification_controller.dart';
|
||||
import 'package:sefer_admin1/views/admin/captain/drivers_cant_registe.dart';
|
||||
import 'package:sefer_admin1/views/admin/captain/register_captain.dart';
|
||||
import 'package:sefer_admin1/views/widgets/elevated_btn.dart';
|
||||
import 'package:sefer_admin1/views/widgets/my_textField.dart';
|
||||
import 'package:sefer_admin1/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../constant/links.dart';
|
||||
import '../../constant/style.dart';
|
||||
import '../../controller/functions/crud.dart';
|
||||
import '../../controller/functions/gemeni.dart';
|
||||
import '../../print.dart';
|
||||
import '../widgets/my_scafold.dart';
|
||||
import 'captain/captain.dart';
|
||||
import 'passenger/passenger.dart';
|
||||
@@ -339,12 +342,63 @@ class AdminHomePage extends StatelessWidget {
|
||||
Get.to(() => const StaticDash());
|
||||
},
|
||||
),
|
||||
AdminWidgetsDashBoard(
|
||||
title: 'send Whatsapp to Drivers',
|
||||
onPressed: () async {
|
||||
Get.defaultDialog(
|
||||
title: 'Are you sure to send by WhatsApp ?',
|
||||
middleText: '',
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok',
|
||||
kolor: AppColor.greenColor,
|
||||
onPressed: () async {
|
||||
Log.print(
|
||||
'CRUD().phoneDriversTest.: ${CRUD().phoneDriversTest}');
|
||||
for (var phoneNumber
|
||||
in CRUD().phoneDrivers) {
|
||||
await CRUD().sendWhatsAppAuth(
|
||||
phoneNumber.toString());
|
||||
}
|
||||
}),
|
||||
cancel: MyElevatedButton(
|
||||
title: 'cancel',
|
||||
kolor: AppColor.redColor,
|
||||
onPressed: () => Get.back()));
|
||||
}),
|
||||
AdminWidgetsDashBoard(
|
||||
title: 'send notification Drivers',
|
||||
onPressed: () async {
|
||||
await Get.put(NotificationController())
|
||||
.getTokensDrivers();
|
||||
}),
|
||||
AdminWidgetsDashBoard(
|
||||
title: 'send SMS Drivers',
|
||||
onPressed: () async {
|
||||
Get.defaultDialog(
|
||||
title: 'Are you sure to send SMS ?',
|
||||
middleText: '',
|
||||
content: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Form(
|
||||
key: dashboardController.formKey,
|
||||
child: MyTextForm(
|
||||
controller:
|
||||
dashboardController.smsText,
|
||||
label: 'label',
|
||||
hint: 'hint',
|
||||
type: TextInputType.name)),
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok',
|
||||
kolor: AppColor.greenColor,
|
||||
onPressed: () async {
|
||||
dashboardController.sendSMSMethod();
|
||||
}),
|
||||
cancel: MyElevatedButton(
|
||||
title: 'cancel',
|
||||
kolor: AppColor.redColor,
|
||||
onPressed: () => Get.back()));
|
||||
}),
|
||||
AdminWidgetsDashBoard(
|
||||
title: 'send notification Passengers',
|
||||
onPressed: () async {
|
||||
|
||||
Reference in New Issue
Block a user