Skip to content

Commit 775e5eb

Browse files
committed
🔀 [fix] : conflict resolved
2 parents 3621bc5 + c4faa85 commit 775e5eb

26 files changed

+243
-97
lines changed

.github/workflows/dev-CD.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# github repository actions 페이지에 나타날 이름
2+
name: CD for front using github actions
3+
4+
on:
5+
pull_request:
6+
types: [ closed ]
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
front-cd:
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
steps:
17+
# 저장소 코드를 체크아웃합니다. (PR 올린 코드를 가져오는 행위)
18+
- uses: actions/checkout@v4
19+
20+
# Node.js 환경 설정
21+
- name: Use Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22 # 지정된 Node.js 버전 사용
25+
cache: npm # setup-node 의 캐시 기능을 사용함
26+
cache-dependency-path: package-lock.json # 캐시 기능을 사용할 때 캐시의 기준이 될 파일을 지정
27+
28+
- name: Install Dependencies
29+
run: npm install
30+
31+
- name: Build with npm
32+
run: npm run build-only
33+
34+
- name: Create nginxfile.conf
35+
run: touch ./nginxfile.conf
36+
- run: echo "${{ secrets.NGINX_FILE_CONF }}" > ./nginxfile.conf
37+
38+
- name: Create Develop nginx.conf
39+
run: touch ./nginx.conf
40+
- run: echo "${{ secrets.NGINX_CONF }}" > ./nginx.conf
41+
42+
# docker build & push to develop
43+
- name: Docker build & push develop
44+
run: |
45+
docker login clap.kr-central-2.kcr.dev -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
46+
docker build -t ${{ secrets.DOCKER_FRONT_REPO }} .
47+
docker push ${{ secrets.DOCKER_FRONT_REPO }}
48+
49+
# deploy
50+
- name: Deploy Develop
51+
uses: appleboy/ssh-action@master
52+
id: deployDevelop
53+
with:
54+
host: ${{ secrets.FRONT_HOST }}
55+
username: ${{ secrets.FRONT_HOST_USERNAME }}
56+
key: ${{ secrets.FRONT_HOST_KEY }}
57+
port: ${{ secrets.FRONT_HOST_PORT }}
58+
script: |
59+
docker rm -f taskflow-front
60+
docker image rm -f ${{ secrets.DOCKER_FRONT_REPO }}
61+
docker run --name taskflow-front -d -p 80:80 -p 443:443 -v /etc/letsencrypt/:/etc/letsencrypt/ -v /etc/ssl/:/etc/ssl/ --restart on-failure ${{ secrets.DOCKER_FRONT_REPO }}
Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,37 +37,14 @@ jobs:
3737
run: touch ./nginxfile.conf
3838
- run: echo "${{ secrets.NGINX_FILE_CONF }}" > ./nginxfile.conf
3939

40-
- name: Create Develop nginx.conf
41-
run: touch ./nginx.conf
42-
- run: echo "${{ secrets.NGINX_CONF }}" > ./nginx.conf
43-
44-
# docker build & push to develop
45-
- name: Docker build & push develop
46-
run: |
47-
docker login clap.kr-central-2.kcr.dev -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
48-
docker build -t ${{ secrets.DOCKER_FRONT_REPO }} .
49-
docker push ${{ secrets.DOCKER_FRONT_REPO }}
50-
51-
# deploy
52-
- name: Deploy Develop
53-
uses: appleboy/ssh-action@master
54-
id: deployDevelop
55-
with:
56-
host: ${{ secrets.FRONT_HOST }}
57-
username: ${{ secrets.FRONT_HOST_USERNAME }}
58-
key: ${{ secrets.FRONT_HOST_KEY }}
59-
port: ${{ secrets.FRONT_HOST_PORT }}
60-
script: |
61-
docker rm -f taskflow-front
62-
docker image rm -f ${{ secrets.DOCKER_FRONT_REPO }}
63-
docker run --name taskflow-front -d -p 80:80 -p 443:443 -v /etc/letsencrypt/:/etc/letsencrypt/ -v /etc/ssl/:/etc/ssl/ --restart on-failure ${{ secrets.DOCKER_FRONT_REPO }}
64-
6540
- name: Create Production nginx.conf
66-
run: echo "${{ secrets.PROD_NGINX_CONF }}" > ./nginx.conf
41+
run: touch ./nginx.conf
42+
- run: echo "${{ secrets.PROD_NGINX_CONF }}" > ./nginx.conf
6743

6844
# docker build & push to production
6945
- name: Docker build & push production
7046
run: |
47+
docker login clap.kr-central-2.kcr.dev -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
7148
docker build -t ${{ secrets.DOCKER_FRONT_REPO }}:${{ steps.version.outputs.VERSION }} .
7249
docker push ${{ secrets.DOCKER_FRONT_REPO }}:${{ steps.version.outputs.VERSION }}
7350

src/api/admin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ export const getMemberDetailAdmin = async (id: string) => {
4646
}
4747

4848
export const updateMemberAdmin = async (id: string, data: UserUpdateValue) => {
49-
const response = await axiosInstance.post(`api/managements/members/${id}`, data)
49+
const response = await axiosInstance.patch(`api/managements/members/${id}`, data)
5050
return response.data
5151
}

src/components/common/EditInformation.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,15 @@
5656
class="hidden" />
5757
</div>
5858
<div class="flex flex-col relative">
59-
<p class="text-body text-xs font-semibold">이름</p>
60-
<span class="absolute top-1 right-2 text-xs text-gray-500"> {{ name.length }} / 10 </span>
59+
<div class="flex items-center gap-1 text-red-1">
60+
<p class="text-body text-xs font-semibold">이름</p>
61+
<p>*</p>
62+
<span
63+
v-show="isInvalid || isFull"
64+
class="text-xs font-semibold"
65+
>{{ nameError }}</span
66+
>
67+
</div>
6168
<input
6269
:class="[
6370
'block w-full px-4 py-4 border rounded focus:outline-none h-11 mt-2',
@@ -68,13 +75,7 @@
6875
maxlength="10"
6976
ref="nameInput"
7077
@blur="validateName" />
71-
<div class="mb-1">
72-
<span
73-
v-show="isInvalid || isFull"
74-
class="absolute text-red-1 text-xs font-semibold mt-1"
75-
>{{ nameError }}</span
76-
>
77-
</div>
78+
<span class="mt-1.5 text-xs text-gray-500"> {{ name.length }} / 10 </span>
7879
</div>
7980
<div class="flex flex-col">
8081
<p class="text-body text-xs font-semibold">아이디</p>
@@ -127,7 +128,7 @@
127128

128129
<script lang="ts" setup>
129130
import { patchEditInfo } from '@/api/common'
130-
import { ALLOWED_FILE_EXTENSIONS } from '@/constants/common'
131+
import { ALLOWED_FILE_EXTENSIONS, ALLOWED_FILE_EXTENSIONS_IMAGE } from '@/constants/common'
131132
import { useMemberStore } from '@/stores/member'
132133
import { storeToRefs } from 'pinia'
133134
import { nextTick, ref, watchEffect } from 'vue'
@@ -232,7 +233,7 @@ const handleFileUpload = (event: Event) => {
232233
failModalToggle()
233234
return
234235
}
235-
if (!ALLOWED_FILE_EXTENSIONS.includes(file.type)) {
236+
if (!ALLOWED_FILE_EXTENSIONS_IMAGE.includes(file.type)) {
236237
failHeader.value = '파일 타입을 확인해주세요'
237238
failBody.value = '파일 타입과 확장자명이 일치해야합니다'
238239
failModalToggle()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<svg
3+
class="animate-spin"
4+
xmlns="http://www.w3.org/2000/svg"
5+
width="64"
6+
height="64"
7+
viewBox="0 0 64 64"
8+
fill="none">
9+
<path
10+
opacity="0.2"
11+
fill-rule="evenodd"
12+
clip-rule="evenodd"
13+
d="M31.9999 50.6667C34.4513 50.6667 36.8786 50.1839 39.1433 49.2458C41.4081 48.3077 43.4659 46.9327 45.1992 45.1994C46.9326 43.466 48.3076 41.4082 49.2457 39.1435C50.1838 36.8787 50.6666 34.4514 50.6666 32C50.6666 29.5487 50.1838 27.1214 49.2457 24.8566C48.3076 22.5919 46.9326 20.5341 45.1992 18.8007C43.4659 17.0674 41.4081 15.6924 39.1433 14.7543C36.8786 13.8162 34.4513 13.3334 31.9999 13.3334C27.0492 13.3334 22.3013 15.3 18.8006 18.8007C15.2999 22.3014 13.3333 27.0493 13.3333 32C13.3333 36.9507 15.2999 41.6987 18.8006 45.1994C22.3013 48.7 27.0492 50.6667 31.9999 50.6667ZM31.9999 58.6667C46.7279 58.6667 58.6666 46.728 58.6666 32C58.6666 17.272 46.7279 5.33337 31.9999 5.33337C17.2719 5.33337 5.33325 17.272 5.33325 32C5.33325 46.728 17.2719 58.6667 31.9999 58.6667Z"
14+
fill="#18181B" />
15+
<path
16+
d="M5.33325 32C5.33325 17.272 17.2719 5.33337 31.9999 5.33337V13.3334C27.0492 13.3334 22.3013 15.3 18.8006 18.8007C15.2999 22.3014 13.3333 27.0493 13.3333 32H5.33325Z"
17+
fill="#71717A" />
18+
</svg>
19+
</template>

src/components/common/ModalView.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<CommonIcons
2020
v-if="type == 'warningType'"
2121
:name="warningIcon" />
22-
22+
<LoadingIcon v-if="type == 'loadingType'" />
2323
<div
2424
v-if="$slots.header"
2525
class="flex text-2xl font-semibold justify-center whitespace-pre-wrap text-center">
@@ -81,9 +81,10 @@
8181

8282
<script setup lang="ts">
8383
import { failIcon, successIcon, warningIcon } from '@/constants/iconPath'
84+
import { preventEnter } from '@/utils/preventEnter'
8485
import { onUnmounted, ref, watch } from 'vue'
8586
import CommonIcons from './CommonIcons.vue'
86-
import { preventEnter } from '@/utils/preventEnter'
87+
import LoadingIcon from './LoadingIcon.vue'
8788
8889
const { isOpen, type, modelValue } = defineProps<{
8990
isOpen: boolean
@@ -116,6 +117,7 @@ watch(
116117
() => isOpen,
117118
() => {
118119
if (isOpen) {
120+
textValue.value = ''
119121
document.body.style.overflow = 'hidden'
120122
window.addEventListener('keydown', preventEnter)
121123
} else {

src/components/request-approve/RequestApprove.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@
6363
import { getMainCategory, getSubCategory } from '@/api/common'
6464
import { getTaskDetailUser, postTaskApprove } from '@/api/user'
6565
import { INITIAL_REQUEST_APPROVE_DATA } from '@/constants/manager'
66+
import { useErrorStore } from '@/stores/error'
6667
import type { Category, SubCategory } from '@/types/common'
6768
import { convertToISO, isAfterNow } from '@/utils/date'
69+
import { redirectToLogin } from '@/utils/redirectToLogin'
6870
import { computed, onMounted, ref, watch } from 'vue'
6971
import { onBeforeRouteLeave, useRouter } from 'vue-router'
7072
import FormButtonContainer from '../common/FormButtonContainer.vue'
@@ -73,8 +75,6 @@ import CategoryDropDown from '../request-task/CategoryDropDown.vue'
7375
import DueDateInput from './DueDateInput.vue'
7476
import LabelDropdown from './LabelDropdown.vue'
7577
import ManagerDropdown from './ManagerDropdown.vue'
76-
import { useErrorStore } from '@/stores/error'
77-
import { redirectToLogin } from '@/utils/redirectToLogin'
7878
7979
const isModalVisible = ref(false)
8080
const category1 = ref<Category | null>(null)
@@ -163,10 +163,11 @@ const handleSubmit = async () => {
163163
isInvalidate.value = ''
164164
return
165165
}
166+
166167
const requestData = {
167168
categoryId: category2.value.subCategoryId,
168169
processorId: approveData.value.processor.memberId,
169-
dueDate: !isTimeFilled.value
170+
dueDate: isTimeFilled.value
170171
? convertToISO(approveData.value.dueDate, approveData.value.dueTime)
171172
: null,
172173
labelId: approveData.value.label?.labelId || null

src/components/request-task/ReRequestTask.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@
1818
v-model="title"
1919
:placeholderText="'제목을 입력해주세요'"
2020
:label-name="'제목'"
21+
:limit-length="30"
2122
:is-invalidate="isInvalidate === 'input' ? 'input' : ''" />
2223
<RequestTaskTextArea
2324
v-model="description"
2425
:is-invalidate="isInvalidate"
25-
:placeholderText="'부가 정보를 입력해주세요'" />
26-
<RequestTaskFileInput v-model="file" />
26+
:placeholderText="'부가 정보를 입력해주세요'"
27+
:limit-length="200" />
28+
<RequestTaskFileInput
29+
v-model="file"
30+
:isEdit="true" />
2731
<FormButtonContainer
2832
:handleCancel="handleCancel"
2933
:handleSubmit="handleSubmit"
@@ -173,15 +177,12 @@ const handleSubmit = async () => {
173177
})
174178
}
175179
176-
try {
177-
if (reqType === 're') {
178-
await postTaskRequest(formData)
179-
} else {
180-
await patchTaskRequest(id, formData)
181-
}
182-
isModalVisible.value = 'success'
183-
} finally {
184-
isSubmitting.value = false
180+
if (reqType === 're') {
181+
await postTaskRequest(formData)
182+
} else {
183+
await patchTaskRequest(id, formData)
185184
}
185+
isModalVisible.value = 'success'
186+
isSubmitting.value = false
186187
}
187188
</script>

src/components/request-task/RequestTask.vue

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@
1818
v-model="title"
1919
:placeholderText="'제목을 입력해주세요'"
2020
:label-name="'제목'"
21-
:is-invalidate="isInvalidate === 'input' ? 'input' : ''" />
21+
:is-invalidate="isInvalidate === 'input' ? 'input' : ''"
22+
:limit-length="30" />
2223
<RequestTaskTextArea
2324
v-model="description"
2425
:is-invalidate="isInvalidate"
25-
:placeholderText="'부가 정보를 입력해주세요'" />
26-
<RequestTaskFileInput v-model="file" />
26+
:placeholderText="'부가 정보를 입력해주세요'"
27+
:limit-length="200" />
28+
<RequestTaskFileInput
29+
v-model="file"
30+
:isUploading="isUploading" />
2731
<FormButtonContainer
2832
:handleCancel="handleCancel"
2933
:handleSubmit="handleSubmit"
@@ -36,11 +40,10 @@
3640
<template #header>작업이 요청되었습니다</template>
3741
</ModalView>
3842
<ModalView
39-
:isOpen="isModalVisible === 'fail'"
40-
:type="'failType'"
41-
@close="handleCancel">
42-
<template #header>작업요청을 실패했습니다</template>
43-
<template #body>잠시후 시도해주세요</template>
43+
:isOpen="isModalVisible === 'loading'"
44+
type="loadingType">
45+
<template #header>작업을 요청 중입니다...</template>
46+
<template #body>잠시만 기다려주세요</template>
4447
</ModalView>
4548
</div>
4649
</template>
@@ -64,9 +67,11 @@ const category2 = ref<SubCategory | null>(null)
6467
const title = ref('')
6568
const description = ref('')
6669
const file = ref(null as File[] | null)
70+
6771
const isInvalidate = ref('')
6872
const isModalVisible = ref('')
6973
const isSubmitting = ref(false)
74+
const isUploading = ref(false)
7075
7176
const mainCategoryArr = ref<Category[]>([])
7277
const subCategoryArr = ref<SubCategory[]>([])
@@ -125,6 +130,8 @@ const handleSubmit = async () => {
125130
}
126131
127132
isSubmitting.value = true
133+
isUploading.value = true
134+
isModalVisible.value = 'loading'
128135
129136
const formData = new FormData()
130137
const taskInfo = {
@@ -139,11 +146,9 @@ const handleSubmit = async () => {
139146
if (file.value && file.value.length > 0) {
140147
file.value.forEach(f => formData.append('attachment', f))
141148
}
142-
try {
143-
await postTaskRequest(formData)
144-
isModalVisible.value = 'success'
145-
} finally {
146-
isSubmitting.value = false
147-
}
149+
await postTaskRequest(formData)
150+
isModalVisible.value = 'success'
151+
isSubmitting.value = false
152+
isUploading.value = false
148153
}
149154
</script>

0 commit comments

Comments
 (0)