fix: 项目已归档,任务面板也没有这三个任务,但是每次新增报告,都会弹任务出来

This commit is contained in:
weifs 2024-02-21 14:42:30 +08:00
parent 12effb5738
commit 2c08145c40
2 changed files with 8 additions and 5 deletions

View File

@ -316,13 +316,16 @@ class ReportController extends AbstractController
// 未完成的任务 // 未完成的任务
$unfinishedContent = ""; $unfinishedContent = "";
$unfinished_task = ProjectTask::query() $unfinished_task = ProjectTask::query()
->whereNull("complete_at") ->join("projects", "projects.id", "=", "project_tasks.project_id")
->whereNotNull("start_at") ->whereNull("projects.archived_at")
->where("end_at", "<", $end_time->toDateTimeString()) ->whereNull("project_tasks.complete_at")
->whereNotNull("project_tasks.start_at")
->where("project_tasks.end_at", "<", $end_time->toDateTimeString())
->whereHas("taskUser", function ($query) use ($user) { ->whereHas("taskUser", function ($query) use ($user) {
$query->where("userid", $user->userid); $query->where("userid", $user->userid);
}) })
->orderByDesc("id") ->select("project_tasks.*")
->orderByDesc("project_tasks.id")
->get(); ->get();
if ($unfinished_task->isNotEmpty()) { if ($unfinished_task->isNotEmpty()) {
foreach ($unfinished_task as $task) { foreach ($unfinished_task as $task) {

View File

@ -649,7 +649,7 @@ export default {
}, [ }, [
h('AutoTip', { h('AutoTip', {
props: { props: {
placement: 'right' placement: 'top'
} }
}, $A.getFileName(row)) }, $A.getFileName(row))
])); ]));