redirect after delete an us or task
parent
6c0423da80
commit
2f7430117d
|
@ -140,7 +140,12 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
promise = @.repo.remove(@scope.task)
|
promise = @.repo.remove(@scope.task)
|
||||||
promise.then =>
|
promise.then =>
|
||||||
finish()
|
finish()
|
||||||
@location.path(@navUrls.resolve("project-backlog", {project: @scope.project.slug}))
|
|
||||||
|
if @scope.task.milestone
|
||||||
|
@location.path(@navUrls.resolve("project-taskboard", {project: @scope.project.slug, sprint: @scope.sprint.slug}))
|
||||||
|
else if @scope.us
|
||||||
|
@location.path(@navUrls.resolve("project-userstories-detail", {project: @scope.project.slug, ref: @scope.us.ref}))
|
||||||
|
|
||||||
promise.then null, =>
|
promise.then null, =>
|
||||||
finish(false)
|
finish(false)
|
||||||
@confirm.notify("error")
|
@confirm.notify("error")
|
||||||
|
|
|
@ -152,7 +152,13 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
promise = @.repo.remove(@scope.us)
|
promise = @.repo.remove(@scope.us)
|
||||||
promise.then =>
|
promise.then =>
|
||||||
finish()
|
finish()
|
||||||
|
|
||||||
|
if @scope.us.milestone
|
||||||
|
@location.path(@navUrls.resolve("project-taskboard", {project: @scope.project.slug, sprint: @scope.sprint.slug}))
|
||||||
|
else if @scope.project.is_backlog_activated
|
||||||
@location.path(@navUrls.resolve("project-backlog", {project: @scope.project.slug}))
|
@location.path(@navUrls.resolve("project-backlog", {project: @scope.project.slug}))
|
||||||
|
else
|
||||||
|
@location.path(@navUrls.resolve("project-kanban", {project: @scope.project.slug}))
|
||||||
promise.then null, =>
|
promise.then null, =>
|
||||||
finish(false)
|
finish(false)
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
|
|
Loading…
Reference in New Issue