Erweiterungen

This commit is contained in:
Sven committed 2025-08-20 11:11:34 +02:00
1 parent 52415e0759
commit 265d75a99b
10 files changed
+481 -406

No files matched your search

@@ -2,27 +2,27 @@ C/C++ Structured Log
Ž
‹/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/additional_project_files.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ó°«µŒ3  Ë‹·�Ô2Ž
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint   þóµŒ3  Ë‹·�Ô2Ž
‹
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/android_gradle_build.json  Ó°«µŒ3Á Í‹·�Ô2“
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/android_gradle_build.json   þóµŒ3Á Í‹·�Ô2“
�
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/android_gradle_build_mini.json  Ó°«µŒ3¸ ΋·�Ô2~
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/android_gradle_build_mini.json   þóµŒ3¸ ΋·�Ô2~
|
z/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/build.ninja  Ó°«µŒ3€Ö À‹·�Ô2ƒ
z/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/build.ninja   þóµŒ3€Ö À‹·�Ô2ƒ
€
~/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/build.ninja.txt  Ó°«µŒ3‰
~/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/build.ninja.txt   þóµŒ3‰
†
ƒ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/build_file_index.txt  Ó°«µŒ3␍f Ï‹·�Ô2Š
ƒ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/build_file_index.txt   þóµŒ3␍f Ï‹·�Ô2Š
‡
„/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/compile_commands.json  Ó°«µŒ3Ž
„/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/compile_commands.json   þóµŒ3Ž
‹
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/compile_commands.json.bin  Ó°«µŒ3 ”
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/compile_commands.json.bin   þóµŒ3 ”
‘
Ž/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/metadata_generation_command.txt  Ó°«µŒ3
Ž/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/metadata_generation_command.txt   þóµŒ3
Ê Ï‹·�Ô2‡
„
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/prefab_config.json  Ó°«µŒ3␍ ( Ï‹·�Ô2Œ
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/prefab_config.json   þóµŒ3␍ ( Ï‹·�Ô2Œ
‰
†/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/symbol_folder_index.txt  Ó°«µŒ3␍ } Ï‹·�Ô2j
†/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/arm64-v8a/symbol_folder_index.txt   þóµŒ3␍ } Ï‹·�Ô2j
h
f/Users/svencarstensen/Entwicklung/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  Ó°«µŒ3␍¤ ÊÍÊáÓ2
f/Users/svencarstensen/Entwicklung/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt   þóµŒ3␍¤ ÊÍÊáÓ2
@@ -2,27 +2,27 @@ C/C++ Structured Log
�
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/additional_project_files.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ݰ«µŒ3  ¨‘·�Ô2�
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ¦þóµŒ3  ¨‘·�Ô2�
�
Š/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/android_gradle_build.json  ݰ«µŒ3Å ©‘·�Ô2•
Š/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/android_gradle_build.json  ¦þóµŒ3Å ©‘·�Ô2•
’
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/android_gradle_build_mini.json  ݰ«µŒ3¼ ©‘·�Ô2€
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/android_gradle_build_mini.json  ¦þóµŒ3¼ ©‘·�Ô2€
~
|/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/build.ninja  ݰ«µŒ3ŒÖ ¡‘·�Ô2†
|/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/build.ninja  ¦þóµŒ3ŒÖ ¡‘·�Ô2†
ƒ
€/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/build.ninja.txt  ݰ«µŒ3‹
€/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/build.ninja.txt  ¦þóµŒ3‹
ˆ
…/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/build_file_index.txt  ݰ«µŒ3␍f ©‘·�Ô2Œ
…/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/build_file_index.txt  ¦þóµŒ3␍f ©‘·�Ô2Œ
‰
†/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/compile_commands.json  ݰ«µŒ3�
†/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/compile_commands.json  ¦þóµŒ3�
�
Š/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/compile_commands.json.bin  ݰ«µŒ3 –
Š/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/compile_commands.json.bin  ¦þóµŒ3 –
“
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/metadata_generation_command.txt  ݰ«µŒ3
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/metadata_generation_command.txt  ¦þóµŒ3
Ô ©‘·�Ô2‰
†
ƒ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/prefab_config.json  ݰ«µŒ3␍ ( ©‘·�Ô2Ž
ƒ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/prefab_config.json  ¦þóµŒ3␍ ( ©‘·�Ô2Ž
‹
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/symbol_folder_index.txt  ݰ«µŒ3␍  ©‘·�Ô2j
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/armeabi-v7a/symbol_folder_index.txt  ¦þóµŒ3␍  ©‘·�Ô2j
h
f/Users/svencarstensen/Entwicklung/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ݰ«µŒ3␍¤ ÊÍÊáÓ2
f/Users/svencarstensen/Entwicklung/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ¦þóµŒ3␍¤ ÊÍÊáÓ2
@@ -2,27 +2,27 @@ C/C++ Structured Log
ˆ
…/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/additional_project_files.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ä°«µŒ3  ¥“·�Ô2ˆ
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  «þóµŒ3  ¥“·�Ô2ˆ
…
‚/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/android_gradle_build.json  ä°«µŒ3µ ¥“·�Ô2�
‚/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/android_gradle_build.json  «þóµŒ3µ ¥“·�Ô2�
Š
‡/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/android_gradle_build_mini.json  ä°«µŒ3¬ ¥“·�Ô2x
‡/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/android_gradle_build_mini.json  «þóµŒ3¬ ¥“·�Ô2x
v
t/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/build.ninja  ä°«µŒ3ÜÕ ž“·�Ô2|
t/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/build.ninja  «þóµŒ3ÜÕ ž“·�Ô2|
z
x/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/build.ninja.txt  ä°«µŒ3�
x/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/build.ninja.txt  «þóµŒ3�

}/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/build_file_index.txt  ä°«µŒ3␍f ¦“·�Ô2ƒ
}/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/build_file_index.txt  «þóµŒ3␍f ¦“·�Ô2ƒ
€
~/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/compile_commands.json  ä°«µŒ3ˆ
~/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/compile_commands.json  «þóµŒ3ˆ
…
‚/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/compile_commands.json.bin  ä°«µŒ3 Ž
‚/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/compile_commands.json.bin  «þóµŒ3 Ž
‹
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/metadata_generation_command.txt  ä°«µŒ3
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/metadata_generation_command.txt  «þóµŒ3
¬ ¦“·�Ô2
}
{/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/prefab_config.json  ä°«µŒ3␍ ( ¦“·�Ô2†
{/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/prefab_config.json  «þóµŒ3␍ ( ¦“·�Ô2†
ƒ
€/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/symbol_folder_index.txt  ä°«µŒ3␍ w ¦“·�Ô2j
€/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86/symbol_folder_index.txt  «þóµŒ3␍ w ¦“·�Ô2j
h
f/Users/svencarstensen/Entwicklung/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ä°«µŒ3␍¤ ÊÍÊáÓ2
f/Users/svencarstensen/Entwicklung/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  «þóµŒ3␍¤ ÊÍÊáÓ2
@@ -2,27 +2,27 @@ C/C++ Structured Log
‹
ˆ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/additional_project_files.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ê°«µŒ3  ”•·�Ô2‹
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ¯þóµŒ3  ”•·�Ô2‹
ˆ
…/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/android_gradle_build.json  ê°«µŒ3» ••·�Ô2�
…/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/android_gradle_build.json  ¯þóµŒ3» ••·�Ô2�
�
Š/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/android_gradle_build_mini.json  ê°«µŒ3² ••·�Ô2{
Š/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/android_gradle_build_mini.json  ¯þóµŒ3² ••·�Ô2{
y
w/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/build.ninja  ê°«µŒ3îÕ Ž•·�Ô2
w/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/build.ninja  ¯þóµŒ3îÕ Ž•·�Ô2
}
{/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/build.ninja.txt  ê°«µŒ3†
{/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/build.ninja.txt  ¯þóµŒ3†
ƒ
€/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/build_file_index.txt  ê°«µŒ3␍f –•·�Ô2‡
€/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/build_file_index.txt  ¯þóµŒ3␍f –•·�Ô2‡
„
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/compile_commands.json  ê°«µŒ3‹
�/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/compile_commands.json  ¯þóµŒ3‹
ˆ
…/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/compile_commands.json.bin  ê°«µŒ3 ‘
…/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/compile_commands.json.bin  ¯þóµŒ3 ‘
Ž
‹/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/metadata_generation_command.txt  ê°«µŒ3
‹/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/metadata_generation_command.txt  ¯þóµŒ3
» ••·�Ô2ƒ
€
~/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/prefab_config.json  ê°«µŒ3␍ ( ••·�Ô2‰
~/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/prefab_config.json  ¯þóµŒ3␍ ( ••·�Ô2‰
†
ƒ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/symbol_folder_index.txt  ê°«µŒ3␍ z –•·�Ô2j
ƒ/Users/svencarstensen/Entwicklung/Source/flutter/Assecutor/stadtbote/android/app/.cxx/Debug/2a1172u2/x86_64/symbol_folder_index.txt  ¯þóµŒ3␍ z –•·�Ô2j
h
f/Users/svencarstensen/Entwicklung/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ê°«µŒ3␍¤ ÊÍÊáÓ2
f/Users/svencarstensen/Entwicklung/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ¯þóµŒ3␍¤ ÊÍÊáÓ2
+65 -58
View File
@@ -25,7 +25,8 @@ class AcceptedJobsPage extends ContentViewWidget {
}
}
class _AcceptedJobsPageState extends State<AcceptedJobsPage> with ProducerMixin {
class _AcceptedJobsPageState extends State<AcceptedJobsPage>
with ProducerMixin {
late List<Job> _jobs;
late bool _initCompleted = false;
@@ -33,7 +34,10 @@ class _AcceptedJobsPageState extends State<AcceptedJobsPage> with ProducerMixin
@override
void initState() {
Future.delayed(const Duration(seconds: 0), () async {
_jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(Constants.stateAccepted).findAll();
_jobs = await MyApp.isarInstance.jobs
.filter()
.stateEqualTo(Constants.stateAccepted)
.findAll();
_jobs.sort((job1, job2) {
var date1 = DateTime.parse(job1.ordertime).millisecondsSinceEpoch;
var date2 = DateTime.parse(job2.ordertime).millisecondsSinceEpoch;
@@ -61,9 +65,7 @@ class _AcceptedJobsPageState extends State<AcceptedJobsPage> with ProducerMixin
padding: const EdgeInsets.all(8.0),
child: Scrollbar(
thumbVisibility: true,
child: ListView(
children: jobWidgets
),
child: ListView(children: jobWidgets),
),
);
}
@@ -72,53 +74,58 @@ class _AcceptedJobsPageState extends State<AcceptedJobsPage> with ProducerMixin
List<Widget> jobWidgets = [];
for (var job in _jobs) {
var bottomText = "${job.id}\n${job.tours[0].comp}\n${job.tours[0].street}\n${job.tours[0].city}";
var bottomText =
"${job.id}\n${job.tours[0].comp}\n${job.tours[0].street}\n${job.tours[0].city}";
if (job.rem.trim().isNotEmpty) {
bottomText += "\n\n${job.rem.trim()}";
}
jobWidgets.add(
ListTile(
onTap: () {
_clicked(job);
},
title: Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.grey, width: 0.5),
borderRadius: const BorderRadius.all(Radius.circular(13))
),
padding: const EdgeInsets.all(15.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
DateFormat('dd.MM.yyyy HH:mm').format(DateTime.parse(job.ordertime).toLocal()).toString(),
style: TextStyle(backgroundColor: isJobTooFarInFuture(job) ? Colors.red : Colors.transparent),
textAlign: TextAlign.left,
),
Text(
job.crFilter != null ? job.crFilter.toString() : "",
textAlign: TextAlign.left,
),
Row(
children: [
Image.asset("assets/${mapVehicleTypeToImageName(job.vhtId)}", width: 60, height: 60),
const SizedBox(width: 10),
Text(
mapVehicleTypeToText(job.vhtId)
),
],
),
Text(
bottomText,
textAlign: TextAlign.left,
),
],
),
)
),
onTap: () {
_clicked(job);
},
title: Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.grey, width: 0.5),
borderRadius: const BorderRadius.all(Radius.circular(13))),
padding: const EdgeInsets.all(15.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
DateFormat('dd.MM.yyyy HH:mm')
.format(DateTime.parse(job.ordertime).toLocal())
.toString(),
style: TextStyle(
backgroundColor: isJobTooFarInFuture(job)
? Colors.red
: Colors.transparent),
textAlign: TextAlign.left,
),
Text(
job.crFilter != null ? job.crFilter.toString() : "",
textAlign: TextAlign.left,
),
Row(
children: [
Image.asset(
"assets/${mapVehicleTypeToImageName(job.vhtId)}",
width: 60,
height: 60),
const SizedBox(width: 10),
Text(mapVehicleTypeToText(job.vhtId)),
],
),
Text(
bottomText,
textAlign: TextAlign.left,
),
],
),
)),
);
}
@@ -126,13 +133,10 @@ class _AcceptedJobsPageState extends State<AcceptedJobsPage> with ProducerMixin
}
void _clicked(Job job) async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: TourListPage(job: job),
);
//await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: TourListPage(job: job));
}
}
@@ -171,18 +175,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
radius: 10,
backgroundColor: Constants.colorPrimary,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.arrow_back, size: 20.0, color: Colors.white)),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.arrow_back,
size: 20.0, color: Colors.white)),
),
),
),
@@ -200,18 +204,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
backgroundColor: Constants.colorPrimary,
radius: 10,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.info_outline, size: 20.0, color: Colors.white))),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.info_outline,
size: 20.0, color: Colors.white))),
),
),
),
@@ -225,7 +229,10 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: Text(
textAlign: TextAlign.center,
"Angenommene Aufträge",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.white),
),
),
),
+31 -27
View File
@@ -25,7 +25,8 @@ class FinishedJobsPage extends ContentViewWidget {
}
}
class _FinishedJobsPageState extends State<FinishedJobsPage> with ProducerMixin {
class _FinishedJobsPageState extends State<FinishedJobsPage>
with ProducerMixin {
late List<Job> _jobs;
late bool _initCompleted = false;
@@ -33,7 +34,10 @@ class _FinishedJobsPageState extends State<FinishedJobsPage> with ProducerMixin
@override
void initState() {
Future.delayed(const Duration(seconds: 0), () async {
_jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(Constants.stateFinished).findAll();
_jobs = await MyApp.isarInstance.jobs
.filter()
.stateEqualTo(Constants.stateFinished)
.findAll();
_initCompleted = true;
@@ -55,9 +59,7 @@ class _FinishedJobsPageState extends State<FinishedJobsPage> with ProducerMixin
padding: const EdgeInsets.all(8.0),
child: Scrollbar(
thumbVisibility: true,
child: ListView(
children: jobWidgets
),
child: ListView(children: jobWidgets),
),
);
}
@@ -66,7 +68,8 @@ class _FinishedJobsPageState extends State<FinishedJobsPage> with ProducerMixin
List<Widget> jobWidgets = [];
for (var job in _jobs) {
var bottomText = "${job.id}\n${job.tours[0].comp}\n${job.tours[0].street}\n${job.tours[0].city}";
var bottomText =
"${job.id}\n${job.tours[0].comp}\n${job.tours[0].street}\n${job.tours[0].city}";
if (job.rem.trim().isNotEmpty) {
bottomText += "\n\n${job.rem.trim()}";
}
@@ -80,15 +83,16 @@ class _FinishedJobsPageState extends State<FinishedJobsPage> with ProducerMixin
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.grey, width: 0.5),
borderRadius: const BorderRadius.all(Radius.circular(13))
),
borderRadius: const BorderRadius.all(Radius.circular(13))),
padding: const EdgeInsets.all(15.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
DateFormat('dd.MM.yyyy HH:mm').format(DateTime.parse(job.ordertime).toLocal()).toString(),
DateFormat('dd.MM.yyyy HH:mm')
.format(DateTime.parse(job.ordertime).toLocal())
.toString(),
textAlign: TextAlign.left,
),
Text(
@@ -97,11 +101,12 @@ class _FinishedJobsPageState extends State<FinishedJobsPage> with ProducerMixin
),
Row(
children: [
Image.asset("assets/${mapVehicleTypeToImageName(job.vhtId)}", width: 60, height: 60),
Image.asset(
"assets/${mapVehicleTypeToImageName(job.vhtId)}",
width: 60,
height: 60),
const SizedBox(width: 10),
Text(
mapVehicleTypeToText(job.vhtId)
),
Text(mapVehicleTypeToText(job.vhtId)),
],
),
Text(
@@ -110,8 +115,7 @@ class _FinishedJobsPageState extends State<FinishedJobsPage> with ProducerMixin
),
],
),
)
),
)),
);
}
@@ -119,13 +123,10 @@ class _FinishedJobsPageState extends State<FinishedJobsPage> with ProducerMixin
}
void _clicked(Job job) async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: TourListPage(job: job, readOnly: true),
);
//await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: TourListPage(job: job, readOnly: true,));
}
}
@@ -164,18 +165,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
radius: 10,
backgroundColor: Constants.colorPrimary,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.arrow_back, size: 20.0, color: Colors.white)),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.arrow_back,
size: 20.0, color: Colors.white)),
),
),
),
@@ -193,18 +194,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
backgroundColor: Constants.colorPrimary,
radius: 10,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.info_outline, size: 20.0, color: Colors.white))),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.info_outline,
size: 20.0, color: Colors.white))),
),
),
),
@@ -218,7 +219,10 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: Text(
textAlign: TextAlign.center,
"Erledigte Aufträge",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.white),
),
),
),
+130 -105
View File
@@ -91,22 +91,21 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
badgeColor: Colors.red,
padding: const EdgeInsets.all(10),
borderRadius: BorderRadius.circular(4),
borderSide: const BorderSide(color: Colors.white, width: 0),
borderSide:
const BorderSide(color: Colors.white, width: 0),
elevation: 0,
),
child: getDefaultButton(
'Zugewiesene Aufträge',
image: Image.asset('assets/zugewiesene_auftraege.png', width: 30, height: 30),
image: Image.asset('assets/zugewiesene_auftraege.png',
width: 30, height: 30),
() async => {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const AssignedJobsPage(),
)
//await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: const AssignedJobsPage())
}
),
sendMessage(
routingKey:
Constants.messageTopicPushContentView,
payload: const AssignedJobsPage(),
)
}),
);
},
),
@@ -119,7 +118,8 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
builder: (context, value, child) {
return badges.Badge(
showBadge: value > 0,
position: badges.BadgePosition.topEnd(top: -12, end: -5),
position:
badges.BadgePosition.topEnd(top: -12, end: -5),
badgeContent: Text(
value.toString(),
style: const TextStyle(
@@ -131,23 +131,23 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
badgeColor: Colors.red,
padding: const EdgeInsets.all(10),
borderRadius: BorderRadius.circular(4),
borderSide: const BorderSide(color: Colors.white, width: 0),
borderSide:
const BorderSide(color: Colors.white, width: 0),
elevation: 0,
),
child: getDefaultButton(
'Angenommene Aufträge',
image: Image.asset('assets/angenommene_auftraege.png', width: 30, height: 30),
image: Image.asset(
'assets/angenommene_auftraege.png',
width: 30,
height: 30),
() async => {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const AcceptedJobsPage(),
)
//await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: const AcceptedJobsPage())
}
)
);
sendMessage(
routingKey:
Constants.messageTopicPushContentView,
payload: const AcceptedJobsPage(),
)
}));
},
),
),
@@ -156,17 +156,14 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
visible: !_loggedOut,
child: getDefaultButton(
'Erledigte Aufträge',
image: Image.asset('assets/erledigte_auftraege.png', width: 30, height: 30),
image: Image.asset('assets/erledigte_auftraege.png',
width: 30, height: 30),
() async => {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const FinishedJobsPage(),
)
//await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: const FinishedJobsPage())
}
),
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const FinishedJobsPage(),
)
}),
),
SizedBox(height: _loggedOut == true ? 0 : 20),
Visibility(
@@ -176,7 +173,8 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
builder: (context, value, child) {
return badges.Badge(
showBadge: value > 0,
position: badges.BadgePosition.topEnd(top: -12, end: -5),
position:
badges.BadgePosition.topEnd(top: -12, end: -5),
badgeContent: Text(
value.toString(),
style: const TextStyle(
@@ -188,23 +186,21 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
badgeColor: Colors.red,
padding: const EdgeInsets.all(10),
borderRadius: BorderRadius.circular(4),
borderSide: const BorderSide(color: Colors.white, width: 0),
borderSide:
const BorderSide(color: Colors.white, width: 0),
elevation: 0,
),
child: getDefaultButton(
'Nachrichten',
image: Image.asset('assets/nachrichten.png', width: 30, height: 30),
image: Image.asset('assets/nachrichten.png',
width: 30, height: 30),
() async => {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const MessagesPage(),
)
//await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: const MessagesPage())
}
)
);
sendMessage(
routingKey:
Constants.messageTopicPushContentView,
payload: const MessagesPage(),
)
}));
},
),
),
@@ -213,30 +209,37 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
visible: !_loggedOut,
child: getDefaultButton(
'Anfahrtsbereich',
image: Image.asset('assets/anfahrtsbereich.png', width: 30, height: 30),
() async => {
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const ApproachAreaPage(),
)
}),
image: Image.asset('assets/anfahrtsbereich.png',
width: 30, height: 30),
() async => {
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const ApproachAreaPage(),
)
}),
),
SizedBox(height: _loggedOut == true ? 0 : 20),
Visibility(
visible: !_loggedOut && _showBWVButton,
child: getDefaultButton(
'Wunschziel für heute',
image: Image.asset('assets/wunsch_plz.png', width: 30, height: 30),
() async => {
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const SetDesiredZipPage(),
)
}),
image: Image.asset('assets/wunsch_plz.png',
width: 30, height: 30),
() async => {
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: const SetDesiredZipPage(),
)
}),
),
SizedBox(height: _loggedOut == true ? 0 : 20),
getDefaultButton(_loggedOut ? 'Anmelden' : 'Abmelden',
image: Image.asset(_loggedOut ? 'assets/anmelden.png' : 'assets/abmelden.png', width: 30, height: 30), () async {
image: Image.asset(
_loggedOut
? 'assets/anmelden.png'
: 'assets/abmelden.png',
width: 30,
height: 30), () async {
_logout(context);
}),
Expanded(
@@ -299,19 +302,24 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
);
subscribe(
queueId: Constants.messageTopicBWVEnabled,
callback: (message) {
setState(() {
_showBWVButton = Util.preferencesGetBool(Constants.prefsBWVEnabled, false);
queueId: Constants.messageTopicBWVEnabled,
callback: (message) {
setState(() {
_showBWVButton =
Util.preferencesGetBool(Constants.prefsBWVEnabled, false);
});
});
}
);
}
void _refreshBadges() async {
_assignedJobsValueNotifier.value = await MyApp.isarInstance.jobs.filter().stateEqualTo(0).count();
_acceptedJobsValueNotifier.value = await MyApp.isarInstance.jobs.filter().stateEqualTo(1).count();
_messagesValueNotifier.value = await MyApp.isarInstance.chatMessages.filter().readEqualTo(false).count();
_assignedJobsValueNotifier.value =
await MyApp.isarInstance.jobs.filter().stateEqualTo(0).count();
_acceptedJobsValueNotifier.value =
await MyApp.isarInstance.jobs.filter().stateEqualTo(1).count();
_messagesValueNotifier.value = await MyApp.isarInstance.chatMessages
.filter()
.readEqualTo(false)
.count();
}
void _jobReceived(Job job) {
@@ -329,7 +337,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
_loggedOut = false;
setState(() { });
setState(() {});
}
}
@@ -339,7 +347,8 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
onPressed: () async {
Navigator.of(context).pop();
showMessageDialog(context, "Information", "Sie werden abgemeldet.\nBitte warten...");
showMessageDialog(
context, "Information", "Sie werden abgemeldet.\nBitte warten...");
_sendLogoutMessage();
@@ -352,14 +361,11 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
);
Future.delayed(const Duration(seconds: 3), () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicDisconnectClient,
payload: DisconnectClientMessage(),
);
//await MessageService().publish<DisconnectClientMessage>(Constants.messageTopicDisconnectClient, arguments: DisconnectClientMessage());
Navigator.of(MyApp.appNavigatorKey.currentContext!).pop();
setState(() {});
@@ -406,13 +412,13 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
logoutMessage.pos!.acc = position.accuracy.toInt();
}
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPublishPayload,
payload: PublishPayloadMessage(topic: "logout", message: logoutMessage.toJson(), acknowledgeRequired: false),
payload: PublishPayloadMessage(
topic: "logout",
message: logoutMessage.toJson(),
acknowledgeRequired: false),
);
//await MessageService().publish<PublishPayloadMessage>(Constants.messageTopicPublishPayload, arguments: PublishPayloadMessage(topic: "logout", message: logoutMessage.toJson(), qos: MqttQos.exactlyOnce));
}
}
@@ -458,12 +464,14 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
),
child: FittedBox(
child: GestureDetector(
onTap: () async {
},
onTap: () async {},
child: const CircleAvatar(
radius: 10,
backgroundColor: Constants.colorPrimary,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.info_outline, size: 20.0, color: Colors.white)),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.info_outline,
size: 20.0, color: Colors.white)),
),
),
),
@@ -481,18 +489,24 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
var sessionStatus = await MyApp.isarInstance.sessionStatus.where().findFirst();
var sessionStatus = await MyApp
.isarInstance.sessionStatus
.where()
.findFirst();
showInfosPopup(sessionStatus);
},
child: const CircleAvatar(
backgroundColor: Constants.colorPrimary,
radius: 10,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.info_outline, size: 20.0, color: Colors.white))),
),
backgroundColor: Constants.colorPrimary,
radius: 10,
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.info_outline,
size: 20.0, color: Colors.white))),
),
),
),
),
],
),
SizedBox(
@@ -501,7 +515,8 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // Verteilt die Texte gleichmäßig in der Zeile
mainAxisAlignment: MainAxisAlignment
.spaceBetween, // Verteilt die Texte gleichmäßig in der Zeile
children: <Widget>[
SizedBox(
width: cellWidth,
@@ -522,21 +537,24 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // Verteilt die Texte gleichmäßig in der Zeile
mainAxisAlignment: MainAxisAlignment
.spaceBetween, // Verteilt die Texte gleichmäßig in der Zeile
children: <Widget>[
SizedBox(
width: cellWidth,
child: ValueListenableBuilder<String>(
valueListenable: _zipValueNotifier,
builder: (context, value, child) {
return Text(
textAlign: TextAlign.center,
value,
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
);
},
)
),
width: cellWidth,
child: ValueListenableBuilder<String>(
valueListenable: _zipValueNotifier,
builder: (context, value, child) {
return Text(
textAlign: TextAlign.center,
value,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.white),
);
},
)),
SizedBox(
width: cellWidth,
child: ValueListenableBuilder<String>(
@@ -545,7 +563,10 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
return Text(
textAlign: TextAlign.center,
value,
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.white),
);
},
),
@@ -565,7 +586,10 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
return Text(
textAlign: TextAlign.center,
value,
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.white),
);
},
),
@@ -597,7 +621,8 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
_updateHeader() async {
var status = await MyApp.isarInstance.locationStatus.where().findFirst();
var sessionStatus = await MyApp.isarInstance.sessionStatus.where().findFirst();
var sessionStatus =
await MyApp.isarInstance.sessionStatus.where().findFirst();
if (status != null) {
_zipValueNotifier.value = status.zip;
+57 -43
View File
@@ -1,4 +1,3 @@
import 'package:dart_mq/dart_mq.dart';
import 'package:flutter/material.dart';
import 'package:flutter_chat_ui/flutter_chat_ui.dart';
@@ -73,14 +72,13 @@ class _MessagesPageState extends State<MessagesPage> with ProducerMixin {
children: [
Chat(
messages: _messages,
textMessageOptions:const TextMessageOptions(isTextSelectable:false),
textMessageOptions: const TextMessageOptions(isTextSelectable: false),
onSendPressed: _handleSendPressed,
showUserAvatars: false,
showUserNames: false,
user: _user,
onMessageTap: (context, message) => {
_showDeleteMessageDialog(context, message)
},
onMessageTap: (context, message) =>
{_showDeleteMessageDialog(context, message)},
),
],
);
@@ -103,15 +101,20 @@ class _MessagesPageState extends State<MessagesPage> with ProducerMixin {
sendMessage(
routingKey: Constants.messageTopicPublishPayload,
payload: PublishPayloadMessage(topic: "message", message: message.toJson(), acknowledgeRequired: true),
payload: PublishPayloadMessage(
topic: "message",
message: message.toJson(),
acknowledgeRequired: true),
);
_messages.insert(0, types.TextMessage(
author: _user,
createdAt: now.millisecondsSinceEpoch,
id: message.id.toString(),
text: text.text,
));
_messages.insert(
0,
types.TextMessage(
author: _user,
createdAt: now.millisecondsSinceEpoch,
id: message.id.toString(),
text: text.text,
));
setState(() {});
}
@@ -123,7 +126,8 @@ class _MessagesPageState extends State<MessagesPage> with ProducerMixin {
for (var message in messages) {
_messages.add(types.TextMessage(
author: message.from == _sid ? _user : _central,
createdAt: DateTime.parse(message.time).toLocal().millisecondsSinceEpoch,
createdAt:
DateTime.parse(message.time).toLocal().millisecondsSinceEpoch,
id: message.id.toString(),
text: "${message.subj}\n${message.text}",
));
@@ -147,14 +151,12 @@ class _MessagesPageState extends State<MessagesPage> with ProducerMixin {
contentPadding: EdgeInsets.zero,
shadowColor: Colors.transparent,
backgroundColor: Colors.white,
content: StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
content: StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return SizedBox(
key: GlobalKey(),
height: 120,
width: MediaQuery
.of(context)
.size
.width * 1.2,
width: MediaQuery.of(context).size.width * 1.2,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
@@ -166,28 +168,34 @@ class _MessagesPageState extends State<MessagesPage> with ProducerMixin {
const SizedBox(height: 20),
Row(children: [
Expanded(
child: getDefaultButton('Nein', () => {Navigator.of(context).pop()}),
child: getDefaultButton('Nein',
() => {Navigator.of(context).pop()}),
),
const SizedBox(width: 20),
Expanded(
child: getDefaultButton('Ja', () async => {
await MyApp.isarInstance.writeTxn(() async => { await MyApp.isarInstance.chatMessages.delete(int.parse(message.id))}),
_fetchMessages(),
setState(() {}),
Navigator.of(MyApp.appNavigatorKey.currentContext!).pop()
}),
child: getDefaultButton(
'Ja',
() async => {
await MyApp.isarInstance.writeTxn(
() async => {
await MyApp.isarInstance
.chatMessages
.delete(int.parse(
message.id))
}),
_fetchMessages(),
setState(() {}),
Navigator.of(MyApp.appNavigatorKey
.currentContext!)
.pop()
}),
)
])
],
),
),
)
);
})
);
));
}));
});
}
@@ -199,7 +207,7 @@ class _MessagesPageState extends State<MessagesPage> with ProducerMixin {
if (unreadChatMessages.isNotEmpty) {
List<String> chatMessageIds = [];
for(var message in unreadChatMessages) {
for (var message in unreadChatMessages) {
chatMessageIds.add(message.id.toString());
}
@@ -209,7 +217,10 @@ class _MessagesPageState extends State<MessagesPage> with ProducerMixin {
sendMessage(
routingKey: Constants.messageTopicPublishPayload,
payload: PublishPayloadMessage(topic: "mssg_received", message: chatMessagesShowed.toJson(), acknowledgeRequired: false),
payload: PublishPayloadMessage(
topic: "mssg_received",
message: chatMessagesShowed.toJson(),
acknowledgeRequired: false),
);
}
}
@@ -250,18 +261,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
radius: 10,
backgroundColor: Constants.colorPrimary,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.arrow_back, size: 20.0, color: Colors.white)),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.arrow_back,
size: 20.0, color: Colors.white)),
),
),
),
@@ -279,18 +290,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
backgroundColor: Constants.colorPrimary,
radius: 10,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.info_outline, size: 20.0, color: Colors.white))),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.info_outline,
size: 20.0, color: Colors.white))),
),
),
),
@@ -304,7 +315,10 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: Text(
textAlign: TextAlign.center,
"Nachrichten",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.white),
),
),
),
+63 -54
View File
@@ -23,12 +23,14 @@ class SetDesiredZipPage extends ContentViewWidget {
}
}
class _SetDesiredZipPageState extends State<SetDesiredZipPage> with ProducerMixin {
class _SetDesiredZipPageState extends State<SetDesiredZipPage>
with ProducerMixin {
TextEditingController textEditController = TextEditingController();
@override
void initState() {
var savedDesiredZip = Util.preferencesGetString(Constants.prefsDesiredZip, null);
var savedDesiredZip =
Util.preferencesGetString(Constants.prefsDesiredZip, null);
if (savedDesiredZip != null) {
textEditController.text = savedDesiredZip;
}
@@ -40,50 +42,51 @@ class _SetDesiredZipPageState extends State<SetDesiredZipPage> with ProducerMixi
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children:
[
const Text("Bitte geben Sie Ihr Wunschziel für heute ein"),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center, // Zentriert das Textfeld horizontal
children: [
SizedBox(
width: 120, // Festlegen der Breite des Textfelds
child:
Util.getDefaultTextField('PLZ',
textInputType: TextInputType.number,
formatter: [
// Erlaubt nur Ziffern
FilteringTextInputFormatter.digitsOnly,
// Begrenzt die maximale Eingabelänge auf 5 Zeichen
LengthLimitingTextInputFormatter(5),
],
controller: textEditController,
maxLength: 5,
autofocus: true
),
),
child: Column(children: [
const Text("Bitte geben Sie Ihr Wunschziel für heute ein"),
const SizedBox(height: 20),
Row(
mainAxisAlignment:
MainAxisAlignment.center, // Zentriert das Textfeld horizontal
children: [
SizedBox(
width: 120, // Festlegen der Breite des Textfelds
child: Util.getDefaultTextField('PLZ',
textInputType: TextInputType.number,
formatter: [
// Erlaubt nur Ziffern
FilteringTextInputFormatter.digitsOnly,
// Begrenzt die maximale Eingabelänge auf 5 Zeichen
LengthLimitingTextInputFormatter(5),
],
),
const SizedBox(height: 20),
getDefaultButton('Übernehmen', () =>
{
if (textEditController.text.isEmpty || textEditController.text.length == 5) {
Util.preferencesSaveString(Constants.prefsDesiredZip, textEditController.text),
_sendDesiredZipMessage(textEditController.text),
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
)
} else {
showAlertDialog("Fehler", "Das Feld muss leer sein, oder es müssen fünf Zahlen eingegeben werden")
}
controller: textEditController,
maxLength: 5,
autofocus: true),
),
],
),
const SizedBox(height: 20),
getDefaultButton(
'Übernehmen',
() => {
if (textEditController.text.isEmpty ||
textEditController.text.length == 5)
{
Util.preferencesSaveString(
Constants.prefsDesiredZip, textEditController.text),
_sendDesiredZipMessage(textEditController.text),
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
)
}
else
{
showAlertDialog("Fehler",
"Das Feld muss leer sein, oder es müssen fünf Zahlen eingegeben werden")
}
})
]
),
]),
);
}
@@ -93,7 +96,10 @@ class _SetDesiredZipPageState extends State<SetDesiredZipPage> with ProducerMixi
sendMessage(
routingKey: Constants.messageTopicPublishPayload,
payload: PublishPayloadMessage(topic: "set_desired_zip", message: desiredZipMessage.toJson(), acknowledgeRequired: true),
payload: PublishPayloadMessage(
topic: "set_desired_zip",
message: desiredZipMessage.toJson(),
acknowledgeRequired: true),
);
}
}
@@ -133,18 +139,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
radius: 10,
backgroundColor: Constants.colorPrimary,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.arrow_back, size: 20.0, color: Colors.white)),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.arrow_back,
size: 20.0, color: Colors.white)),
),
),
),
@@ -162,18 +168,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
backgroundColor: Constants.colorPrimary,
radius: 10,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.info_outline, size: 20.0, color: Colors.white))),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.info_outline,
size: 20.0, color: Colors.white))),
),
),
),
@@ -187,7 +193,10 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: Text(
textAlign: TextAlign.center,
"Wunschziel für heute",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.white),
),
),
),
+87 -71
View File
@@ -11,7 +11,11 @@ import '../tools/constants.dart';
import '../tools/util.dart';
class TourDetailsPage extends ContentViewWidget {
const TourDetailsPage({super.key, required this.job, required this.tour, this.readOnly = false});
const TourDetailsPage(
{super.key,
required this.job,
required this.tour,
this.readOnly = false});
final Job job;
@@ -63,56 +67,60 @@ class _TourDetailsPageState extends State<TourDetailsPage> with ProducerMixin {
children: [
Expanded(
child: Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.transparent,
borderRadius: const BorderRadius.all(Radius.circular(13))
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.transparent,
borderRadius: const BorderRadius.all(Radius.circular(13))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
"${"Station ${widget.tour.sort}"} ${mapTourMode(widget.tour.mode)}",
textAlign: TextAlign.left,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
"${"Station ${widget.tour.sort}"} ${mapTourMode(widget.tour.mode)}",
textAlign: TextAlign.left,
),
Text(
widget.tour.comp,
textAlign: TextAlign.left,
),
Text(
widget.tour.person,
textAlign: TextAlign.left,
),
Text(
widget.tour.street,
textAlign: TextAlign.left,
),
Text(
widget.tour.city,
textAlign: TextAlign.left,
),
Text(
"Tel.: ${widget.tour.phone}",
textAlign: TextAlign.left,
),
Text(
"Komm-#: ${widget.tour.com}",
textAlign: TextAlign.left,
),
const SizedBox(height: 10),
getDefaultButton('Karte', () =>
{
if (widget.tour.pos != null) {
showMapPopup(context, widget.tour, widget.job.tours)
} else {
showAlertDialog('Information', 'Es liegt keine Position für diese Station vor')
}
}),
],
Text(
widget.tour.comp,
textAlign: TextAlign.left,
),
)
),
Text(
widget.tour.person,
textAlign: TextAlign.left,
),
Text(
widget.tour.street,
textAlign: TextAlign.left,
),
Text(
widget.tour.city,
textAlign: TextAlign.left,
),
Text(
"Tel.: ${widget.tour.phone}",
textAlign: TextAlign.left,
),
Text(
"Komm-#: ${widget.tour.com}",
textAlign: TextAlign.left,
),
const SizedBox(height: 10),
getDefaultButton(
'Karte',
() => {
if (widget.tour.pos != null)
{
showMapPopup(
context, widget.tour, widget.job.tours)
}
else
{
showAlertDialog('Information',
'Es liegt keine Position für diese Station vor')
}
}),
],
),
)),
const SizedBox(height: 10),
Expanded(
child: Container(
@@ -120,24 +128,29 @@ class _TourDetailsPageState extends State<TourDetailsPage> with ProducerMixin {
decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 1.5),
color: Colors.transparent,
borderRadius: const BorderRadius.all(Radius.circular(13))
),
borderRadius: const BorderRadius.all(Radius.circular(13))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(child: Scrollbar(thumbVisibility: true, child: SingleChildScrollView(child: Text(remark)))),
]
),
Expanded(
child: Scrollbar(
thumbVisibility: true,
child: SingleChildScrollView(child: Text(remark)))),
]),
),
),
const SizedBox(height: 10),
getDefaultButton('Weiter', () async =>
{
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: TaskListPage(job: widget.job, tour: widget.tour, readOnly: widget.readOnly),
)
}),
getDefaultButton(
'Weiter',
() async => {
sendMessage(
routingKey: Constants.messageTopicPushContentView,
payload: TaskListPage(
job: widget.job,
tour: widget.tour,
readOnly: widget.readOnly),
)
}),
],
),
);
@@ -179,18 +192,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
radius: 10,
backgroundColor: Constants.colorPrimary,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.arrow_back, size: 20.0, color: Colors.white)),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.arrow_back,
size: 20.0, color: Colors.white)),
),
),
),
@@ -208,18 +221,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: FittedBox(
child: GestureDetector(
onTap: () async {
// TODO MESSAGING
sendMessage(
routingKey: Constants.messageTopicPopContentView,
payload: PopContentViewMessage(count: 1),
);
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
backgroundColor: Constants.colorPrimary,
radius: 10,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.info_outline, size: 20.0, color: Colors.white))),
child: Padding(
padding: EdgeInsets.all(1.0),
child: Icon(Icons.info_outline,
size: 20.0, color: Colors.white))),
),
),
),
@@ -233,7 +246,10 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
child: Text(
textAlign: TextAlign.center,
"Details der Station",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.white),
),
),
),
@@ -241,4 +257,4 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
),
);
}
}
}