diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index a3fb3932..6d20c956 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -3,8 +3,7 @@ name: CD for front using github actions on: release: - types: [created, edited, published, released, prereleased] - + types: [created] permissions: contents: read @@ -48,7 +47,7 @@ jobs: - name: Docker build & push run: | docker login clap.kr-central-2.kcr.dev -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -t ${{ secrets.DOCKER_REPO }}:${{ steps.version.outputs.VERSION }} . + docker build -t ${{ secrets.DOCKER_REPO }}${{ steps.version.outputs.VERSION }} . docker push ${{ secrets.DOCKER_REPO }}:${{ steps.version.outputs.VERSION }} ## deploy - name: Deploy diff --git a/src/components/common/TaskCard.vue b/src/components/common/TaskCard.vue index ef2a542b..da5fe235 100644 --- a/src/components/common/TaskCard.vue +++ b/src/components/common/TaskCard.vue @@ -42,24 +42,37 @@ diff --git a/src/components/request-task/RequestTask.vue b/src/components/request-task/RequestTask.vue index fa6ba801..9be1863f 100644 --- a/src/components/request-task/RequestTask.vue +++ b/src/components/request-task/RequestTask.vue @@ -30,11 +30,18 @@ cancelText="취소" submitText="요청" /> + + + + @@ -58,7 +65,8 @@ const title = ref('') const description = ref('') const file = ref(null as File[] | null) const isInvalidate = ref('') -const isModalVisible = ref(false) +const isModalVisible = ref('') +const isSubmitting = ref(false) const mainCategoryArr = ref([]) const subCategoryArr = ref([]) @@ -92,10 +100,13 @@ const handleCancel = () => { title.value = '' description.value = '' file.value = [] + isModalVisible.value = '' router.back() } const handleSubmit = async () => { + if (isSubmitting.value || isModalVisible.value) return + if (!category1.value || !category2.value) { isInvalidate.value = 'category' return @@ -109,16 +120,17 @@ const handleSubmit = async () => { isInvalidate.value = 'description' return } + + isSubmitting.value = true + const formData = new FormData() const taskInfo = { categoryId: category2.value.subCategoryId, title: title.value, description: description.value } - const jsonTaskInfo = JSON.stringify(taskInfo) const newBlob = new Blob([jsonTaskInfo], { type: 'application/json' }) - formData.append('taskInfo', newBlob) if (file.value && file.value.length > 0) { @@ -126,9 +138,12 @@ const handleSubmit = async () => { } try { await postTaskRequest(formData) - isModalVisible.value = true - } catch (error) { - console.error('요청 실패:', error) + isModalVisible.value = 'success' + } catch (e) { + console.error(e) + isModalVisible.value = 'fail' + } finally { + isSubmitting.value = false } } diff --git a/src/components/request-task/RequestTaskFileInput.vue b/src/components/request-task/RequestTaskFileInput.vue index d1a13e6a..2fbc1804 100644 --- a/src/components/request-task/RequestTaskFileInput.vue +++ b/src/components/request-task/RequestTaskFileInput.vue @@ -38,7 +38,7 @@ type="failType" @close="handleModal"> - + diff --git a/src/components/request-task/RequestTaskInput.vue b/src/components/request-task/RequestTaskInput.vue index aa08c8cf..5d675614 100644 --- a/src/components/request-task/RequestTaskInput.vue +++ b/src/components/request-task/RequestTaskInput.vue @@ -18,7 +18,7 @@

- 사용할 수 없는 고유코드입니다. + 사용할 수 없는 작업코드입니다.

diff --git a/src/components/requested/RequestedListCard.vue b/src/components/requested/RequestedListCard.vue index 167490c0..07a4fba6 100644 --- a/src/components/requested/RequestedListCard.vue +++ b/src/components/requested/RequestedListCard.vue @@ -32,20 +32,19 @@ :is-approved="true" :selected-id="selectedID" :close-task-detail="() => handleModal(null)" /> - - + - + diff --git a/src/components/task-detail/TaskDetailLabelDropdown.vue b/src/components/task-detail/TaskDetailLabelDropdown.vue index 57999b18..bcb0d892 100644 --- a/src/components/task-detail/TaskDetailLabelDropdown.vue +++ b/src/components/task-detail/TaskDetailLabelDropdown.vue @@ -35,6 +35,7 @@ import { dropdownIcon } from '@/constants/iconPath' import { useOutsideClick } from '@/hooks/useOutsideClick' import type { LabelDataTypes } from '@/types/common' import type { LabelDropdownProps } from '@/types/user' +import { useQueryClient } from '@tanstack/vue-query' import { onMounted, ref } from 'vue' import CommonIcons from '../common/CommonIcons.vue' @@ -43,6 +44,7 @@ const emit = defineEmits(['update:modelValue']) const dropdownOpen = ref(false) const labelArr = ref([]) +const queryClient = useQueryClient() onMounted(async () => { labelArr.value = await getLabelsManager() @@ -54,6 +56,7 @@ const toggleDropdown = () => { const selectOption = async (option: LabelDataTypes) => { emit('update:modelValue', option) await changeLabel(taskId || 0, option.labelId || 0) + queryClient.invalidateQueries({ queryKey: ['taskDetailUser', taskId] }) dropdownOpen.value = false } diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index 8007e443..9af15318 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -1,7 +1,7 @@ diff --git a/src/constants/manager.ts b/src/constants/manager.ts index 9ca7cd74..ed9b0779 100644 --- a/src/constants/manager.ts +++ b/src/constants/manager.ts @@ -11,7 +11,7 @@ export const REQUESTED_LIST_BAR_TAB: ListBarTabProps[] = [ ] export const REQUEST_HISTORY_LIST_BAR_TAB: ListBarTabProps[] = [ - { content: '고유코드', width: 120 }, + { content: '작업코드', width: 120 }, { content: '요청일', width: 80, sortBy: 'REQUESTED_AT' }, { content: '1차 카테고리', width: 80 }, { content: '2차 카테고리', width: 80 }, @@ -23,7 +23,7 @@ export const REQUEST_HISTORY_LIST_BAR_TAB: ListBarTabProps[] = [ ] export const MY_TASK_LIST_BAR_TAB: ListBarTabProps[] = [ - { content: '고유코드', width: 120 }, + { content: '작업코드', width: 120 }, { content: '요청일', width: 80, sortBy: 'REQUESTED_AT' }, { content: '1차 카테고리', width: 80 }, { content: '2차 카테고리', width: 80 }, diff --git a/src/constants/user.ts b/src/constants/user.ts index 1ed926b8..499f4434 100644 --- a/src/constants/user.ts +++ b/src/constants/user.ts @@ -2,7 +2,7 @@ import type { ListBarTabProps } from '@/types/common' import type { TaskHistoryType } from '@/types/user' export const MY_REQUEST_LIST_BAR_TAB: ListBarTabProps[] = [ - { content: '고유코드', width: 120 }, + { content: '작업코드', width: 120 }, { content: '요청일', width: 80, sortBy: 'REQUESTED_AT' }, { content: '1차 카테고리', width: 80 }, { content: '2차 카테고리', width: 80 }, diff --git a/src/utils/date.ts b/src/utils/date.ts index 7aa76c9c..2ecd860a 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -148,3 +148,12 @@ export const formatTimeAgo = (createdAt: string) => { return `${diffInYears}년 전` } } + +export const formatTimeShort = (timeString: string) => { + const [hours, minutes] = timeString.split(':').map(Number) + + const period = hours < 12 ? '오전' : '오후' + const formattedHours = hours % 12 || 12 + + return `${period} ${formattedHours}:${String(minutes).padStart(2, '0')}` +}