Skip to content

Commit

Permalink
Merge pull request #286 from traPtitech/fix/new_project_router_push
Browse files Browse the repository at this point in the history
プロジェクト作成したときにページ遷移するように
  • Loading branch information
mehm8128 authored Jun 16, 2024
2 parents 3b73404 + 7e6c134 commit 0cc4b4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pages/ContestTeamEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const updateContestTeam = async () => {
members: members.value.map(member => member.id)
})
toast.success('コンテストチ-ム情報を更新しました')
router.push(`/contests/${contestId.value}/teams/${contestTeamId.value}`)
router.push(`/contests/${contestId.value}`)
} catch {
toast.error('コンテストチーム情報の更新に失敗しました')
}
Expand Down Expand Up @@ -98,7 +98,7 @@ const deleteContestTeam = async () => {
},
{
title: contestTeam.name,
url: `/contests/${contestId}/teams/${contestTeamId}`
url: `/contests/${contestId}/teams/${contestTeamId}/edit`
},
{
title: 'Edit',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const handleDelete = (id: string) => {
icon-name="mdi:clipboard-file-outline"
:header-texts="[
{ title: 'Projects', url: '/projects' },
{ title: projectDetail.name, url: `/projects/${projectId}` },
{ title: projectDetail.name, url: `/projects/${projectId}/edit` },
{ title: 'Edit', url: `/projects/${projectId}/edit` }
]"
detail="プロジェクトの情報を変更します。"
Expand Down
4 changes: 3 additions & 1 deletion src/pages/ProjectNew.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import apis, {
CreateProjectRequest,
ProjectMember as ProjectMemberType
} from '/@/lib/apis'
import { RouterLink } from 'vue-router'
import { RouterLink, useRouter } from 'vue-router'
import { computed, reactive, ref } from 'vue'
import LabeledForm from '/@/components/Form/LabeledForm.vue'
import FormInput from '/@/components/UI/FormInput.vue'
Expand All @@ -24,6 +24,7 @@ import {
import { useProjectStore } from '/@/store/project'
import FieldErrorMessage from '/@/components/UI/FieldErrorMessage.vue'
const router = useRouter()
const toast = useToast()
const { mutate } = useProjectStore()
Expand Down Expand Up @@ -60,6 +61,7 @@ const createProject = async () => {
}))
})
toast.success('プロジェクトを追加しました')
router.push(`/projects/${res.data.id}`)
} catch {
toast.error('プロジェクトの追加に失敗しました')
}
Expand Down

0 comments on commit 0cc4b4b

Please sign in to comment.