Geopackage export: geometriák exportálása dátum szerinti szűréssel
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s
This commit is contained in:
@@ -1895,6 +1895,9 @@ class MapSurveyController extends GetxController implements StyleEditable {
|
||||
showGeometryLabels.value = !showGeometryLabels.value;
|
||||
|
||||
Future<void> exportProject() async {
|
||||
final since = await _showExportDateDialog();
|
||||
if (since == false) return; // felhasználó megszakította
|
||||
|
||||
Get.dialog(
|
||||
Center(
|
||||
child: Material(
|
||||
@@ -1932,6 +1935,59 @@ class MapSurveyController extends GetxController implements StyleEditable {
|
||||
}
|
||||
}
|
||||
|
||||
/// Visszaad: DateTime (szűrt export), null (teljes export), false (mégse)
|
||||
Future<dynamic> _showExportDateDialog() async {
|
||||
return Get.dialog<dynamic>(AlertDialog(
|
||||
title: const Text('Export tartalma'),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.all_inclusive),
|
||||
title: const Text('Teljes projekt'),
|
||||
onTap: () => Get.back(result: null),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.today),
|
||||
title: const Text('Mai nap'),
|
||||
onTap: () => Get.back(
|
||||
result: DateTime(DateTime.now().year, DateTime.now().month,
|
||||
DateTime.now().day)),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.today),
|
||||
title: const Text('Tegnapi nap'),
|
||||
onTap: () => Get.back(
|
||||
result: DateTime(DateTime.now().year, DateTime.now().month,
|
||||
DateTime.now().day)
|
||||
.subtract(const Duration(days: 1))),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.date_range),
|
||||
title: const Text('Dátum kiválasztása...'),
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
final picked = await showDatePicker(
|
||||
context: Get.context!,
|
||||
initialDate: DateTime.now().subtract(const Duration(days: 7)),
|
||||
firstDate: DateTime(2024),
|
||||
lastDate: DateTime.now(),
|
||||
);
|
||||
if (picked != null) Get.back(result: picked);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Get.back(result: false),
|
||||
child: const Text('Mégse'),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
void _subscribeToTeamPosition() {
|
||||
_teamChannel = Supabase.instance.client
|
||||
.channel('public:terepi_seged_device_positions')
|
||||
|
||||
Reference in New Issue
Block a user