Erweiterungen

This commit is contained in:
Sven committed 2024-02-08 14:38:04 +01:00
1 parent c69a5644a1
commit e04ee3cce1
7 files changed
+11 -9

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ class _AcceptedJobsPageState extends State<AcceptedJobsPage> {
@override
void initState() {
Future.delayed(const Duration(seconds: 0), () async {
_jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(Constants.STATE_ACCEPTED).findAll();
_jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(Constants.stateAccepted).findAll();
_initCompleted = true;
+1 -1
View File
@@ -80,7 +80,7 @@ class _AssignedJobsPageState extends State<AssignedJobsPage> {
Future<List<Widget>> _createListEntries() async {
List<Widget> entries = [];
var jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(Constants.STATE_ASSIGNED).findAll();
var jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(Constants.stateAssigned).findAll();
for (var job in jobs) {
entries.add(ExpandableNotifier(
child: ListTile(
+1 -1
View File
@@ -44,7 +44,7 @@ class _FinishedJobsPageState extends State<FinishedJobsPage> {
@override
void initState() {
Future.delayed(const Duration(seconds: 0), () async {
_jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(Constants.STATE_FINISHED).findAll();
_jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(Constants.stateFinished).findAll();
_initCompleted = true;
+1 -1
View File
@@ -457,7 +457,7 @@ class _TaskListPageState extends State<TaskListPage> {
finTourMessage.finTour.tasks.add(finTourTask);
}
MqttCore.instance.publishPayloadMessage("job", finTourMessage.toJson());
MqttCore.instance.publishPayloadMessage("fin_tour", finTourMessage.toJson());
widget.tour.state = 9;
await MyApp.isarInstance.writeTxn(() async {
@@ -59,6 +59,8 @@ showPickupDeliveryStatusPopup(BuildContext context, TaskInfo taskInfo, Function(
Visibility(visible: selectedTourEntry != null ? selectedTourEntry!.queryRemark : false, child: Util.getDefaultTextField("Bemerkung")),
const SizedBox(height: 20),
getDefaultButton('Übernehmen', buttonHeight: 50, () => {
Navigator.of(context).pop(),
onFinished(selectedTourEntry)
})
],
+4 -4
View File
@@ -16,8 +16,8 @@ class Constants {
static const String messageTopicHideRightButton = "hide_right_button";
static const String messageShowPopup = "show_popup";
static const int STATE_ASSIGNED = 0;
static const int STATE_ACCEPTED = 1;
static const int STATE_FINISHED = 2;
static const int STATE_FINISHED_NOT_CONFIRMED = 9;
static const int stateAssigned = 0;
static const int stateAccepted = 1;
static const int stateFinished = 2;
static const int stateFinishedNotConfirmed = 9;
}
+1 -1
View File
@@ -238,7 +238,7 @@ class MqttCore {
MyApp.isarInstance.jobs.putSync(newJob);
});
if (newJob.state == Constants.STATE_ASSIGNED) {
if (newJob.state == Constants.stateAssigned) {
if (newJob.global) {
await Util.playMp3('aaa.mp3');
} else {