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 = "";
$unfinished_task = ProjectTask::query()
->whereNull("complete_at")
->whereNotNull("start_at")
->where("end_at", "<", $end_time->toDateTimeString())
->join("projects", "projects.id", "=", "project_tasks.project_id")
->whereNull("projects.archived_at")
->whereNull("project_tasks.complete_at")
->whereNotNull("project_tasks.start_at")
->where("project_tasks.end_at", "<", $end_time->toDateTimeString())
->whereHas("taskUser", function ($query) use ($user) {
$query->where("userid", $user->userid);
})
->orderByDesc("id")
->select("project_tasks.*")
->orderByDesc("project_tasks.id")
->get();
if ($unfinished_task->isNotEmpty()) {
foreach ($unfinished_task as $task) {

View File

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