This commit is contained in:
1 parent
3ae2aa4432
commit
64ea72de89
3 files changed
+19
-14
No files matched your search
@@ -419,20 +419,24 @@ class _TaskListPageState extends State<TaskListPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isTaskActive(int index) {
|
bool isTaskActive(int index) {
|
||||||
var currentTaskInfo = _taskList[index];
|
if (!widget.readOnly) {
|
||||||
|
var currentTaskInfo = _taskList[index];
|
||||||
|
|
||||||
if (currentTaskInfo.completed && !currentTaskInfo.task.reenter!) return false;
|
if (currentTaskInfo.completed && !currentTaskInfo.task.reenter!) return false;
|
||||||
|
|
||||||
for (var taskInfo in _taskList)
|
for (var taskInfo in _taskList)
|
||||||
{
|
{
|
||||||
if (taskInfo == currentTaskInfo) break;
|
if (taskInfo == currentTaskInfo) break;
|
||||||
|
|
||||||
if (!taskInfo.task.opt! && !taskInfo.completed) return false;
|
if (!taskInfo.task.opt! && !taskInfo.completed) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentTaskInfo.task.reenter!) return true;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentTaskInfo.task.reenter!) return true;
|
return false;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_sendArrivedMessage(TaskInfo taskInfo) {
|
_sendArrivedMessage(TaskInfo taskInfo) {
|
||||||
|
|||||||
@@ -162,7 +162,9 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
contentPadding: const EdgeInsets.all(0),
|
contentPadding: const EdgeInsets.all(0),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (tourActive) {
|
if (tourActive) {
|
||||||
_clicked(tour);
|
_clicked(tour, false);
|
||||||
|
} else {
|
||||||
|
_clicked(tour, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
title: Container(
|
title: Container(
|
||||||
@@ -198,8 +200,7 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
return tourWidgets;
|
return tourWidgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _clicked(JobTour tour) {
|
void _clicked(JobTour tour, bool readOnly) {
|
||||||
MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView,
|
MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: TourDetailsPage(job: widget.job, tour: tour, readOnly: readOnly));
|
||||||
arguments: TourDetailsPage(job: widget.job, tour: tour, readOnly: tour.state != 0));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -34,7 +34,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.2"
|
version: "1.2.2"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: archive
|
name: archive
|
||||||
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
|
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
|
||||||
|
|||||||
Reference in new issue
Block a user