Skip to content

Commit

Permalink
issue form update ing
Browse files Browse the repository at this point in the history
  • Loading branch information
nc2U committed Apr 20, 2024
1 parent 6f83116 commit 8f51f79
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/vue/src/views/_Work/Manages/Issues/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computed, type ComputedRef, inject, onBeforeMount, ref } from 'vue'
import { navMenu2 as navMenu } from '@/views/_Work/_menu/headermixin1'
import type { Company } from '@/store/types/settings'
import { useRouter } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
import { useWork } from '@/store/pinia/work'
import type { IssueFilter } from '@/store/types/work'
import Header from '@/views/_Work/components/Header/Index.vue'
Expand All @@ -26,7 +26,7 @@ const activityList = computed(() => workStore.activityList)
const priorityList = computed(() => workStore.priorityList)
const getIssues = computed(() => workStore.getIssues)
const router = useRouter()
const [route, router] = [useRoute(), useRouter()]
const onSubmit = (payload: any) => {
const { pk, ...getData } = payload
Expand All @@ -41,7 +41,8 @@ const onSubmit = (payload: any) => {
if (pk) workStore.updateIssue(form)
else {
workStore.createIssue(form)
router.replace({ name: '(업무)' })
if (route.params.projId) router.replace({ name: '(업무)' })
else router.replace({ name: '업무' })
}
}
Expand Down
23 changes: 23 additions & 0 deletions app/vue/src/views/_Work/Manages/Issues/components/IssueView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,29 @@ onBeforeMount(async () => await workStore.fetchIssueLogList({ issue: props.issue

<v-divider />

<CRow v-if="issue.files.length" class="mb-3">
<CCol>
<CRow>
<CCol class="title">파일</CCol>
</CRow>
<CRow>
<CCol v-for="file in issue.files" :key="file.pk">
<v-icon icon="mdi-paperclip" size="sm" color="grey" class="mr-2" />
<span>
<router-link :to="file.file">
{{ file.file.split('/')[file.file.split('/').length - 1] }}
</router-link>
</span>
</CCol>
<CCol class="text-right form-text">
<router-link to="" @click="callComment">댓글달기</router-link>
</CCol>
</CRow>
</CCol>
</CRow>

<v-divider />

<CRow>
<CCol class="title">하위 일감</CCol>
<CCol class="text-right form-text">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const onSubmit = (payload: any) => {
if (pk) workStore.updateIssue(form)
else {
workStore.createIssue(form)
router.replace({ name: '(업무)' })
if (route.params.projId) router.replace({ name: '(업무)' })
else router.replace({ name: '업무' })
}
}
Expand Down

0 comments on commit 8f51f79

Please sign in to comment.