mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
perf: 已删除任务操作文案及显示优化
This commit is contained in:
parent
7c82769448
commit
c1fb67f143
@ -1232,7 +1232,11 @@ class ProjectTask extends AbstractModel
|
||||
$task = $builder->first();
|
||||
//
|
||||
if (empty($task)) {
|
||||
throw new ApiException('任务不存在', [ 'task_id' => $task_id ], -4002);
|
||||
if(self::whereId(intval($task_id))->withTrashed()->exists()){
|
||||
throw new ApiException('任务已删除,不可编辑', [ 'task_id' => $task_id ], -4002);
|
||||
}else{
|
||||
throw new ApiException('任务不存在', [ 'task_id' => $task_id ], -4002);
|
||||
}
|
||||
}
|
||||
if ($archived === true && $task->archived_at != null) {
|
||||
throw new ApiException('任务已归档', [ 'task_id' => $task_id ]);
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
<Icon type="ios-filing" />{{$L(task.archived_at ? '还原归档' : '归档')}}
|
||||
</div>
|
||||
</EDropdownItem>
|
||||
<EDropdownItem command="remove">
|
||||
<EDropdownItem command="remove" v-if="!task.deleted_at">
|
||||
<div class="item hover-del">
|
||||
<Icon type="md-trash" />{{$L('删除')}}
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user