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