Skip to content

Commit 51b209f

Browse files
committed
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-FE into CLAP-281
2 parents 315843f + a29154e commit 51b209f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+563
-810
lines changed

.github/workflows/CD.yml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
front-cicd:
14+
front-cd:
1515
runs-on: ubuntu-latest
1616
steps:
1717
# 저장소 코드를 체크아웃합니다. (PR 올린 코드를 가져오는 행위)
@@ -31,26 +31,16 @@ jobs:
3131
- name: Build with npm
3232
run: npm run build-only
3333

34-
- name: send file via ssh
35-
uses: appleboy/scp-action@v0.1.7
36-
with:
37-
host: ${{ secrets.FRONT_HOST }}
38-
username: ${{ secrets.FRONT_HOST_USERNAME }}
39-
key: ${{ secrets.FRONT_HOST_KEY }}
40-
port: ${{ secrets.FRONT_HOST_PORT }}
41-
source: "dist/*"
42-
target: /home/${{ secrets.FRONT_HOST_USERNAME }}/
43-
#
44-
# - name: Create nginx.conf
45-
# run: touch ./nginx.conf
46-
# - run: echo "${{ secrets.NGINX_CONF }}" > ./nginx.conf
34+
- name: Create nginx.conf
35+
run: touch ./nginx.conf
36+
- run: echo "${{ secrets.NGINX_CONF }}" > ./nginx.conf
4737

48-
## docker build & push to production
49-
# - name: Docker build & push
50-
# run: |
51-
# docker login clap.kr-central-2.kcr.dev -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
52-
# docker build -t ${{ secrets.DOCKER_FRONT_REPO }} .
53-
# docker push ${{ secrets.DOCKER_FRONT_REPO }}
38+
# docker build & push to production
39+
- name: Docker build & push
40+
run: |
41+
docker login clap.kr-central-2.kcr.dev -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
42+
docker build -t ${{ secrets.DOCKER_FRONT_REPO }} .
43+
docker push ${{ secrets.DOCKER_FRONT_REPO }}
5444
5545
## deploy
5646
- name: Deploy
@@ -62,9 +52,6 @@ jobs:
6252
key: ${{ secrets.FRONT_HOST_KEY }}
6353
port: ${{ secrets.FRONT_HOST_PORT }}
6454
script: |
65-
sudo rm -rf /var/www/html/*
66-
sudo cp -r dist/* /var/www/html/
67-
sudo systemctl restart nginx
68-
# docker rm -f taskflow-front
69-
# docker image rm ${{ secrets.DOCKER_FRONT_REPO }} -f
70-
# docker run --name taskflow-front -d -p 80:80 --restart on-failure ${{ secrets.DOCKER_FRONT_REPO }}
55+
docker rm -f taskflow-front
56+
docker image rm ${{ secrets.DOCKER_FRONT_REPO }} -f
57+
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 }}

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
contents: read
1313

1414
jobs:
15-
front-cicd:
15+
front-ci:
1616
runs-on: ubuntu-latest
1717
steps:
1818
# 저장소 코드를 체크아웃합니다. (PR 올린 코드를 가져오는 행위)

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
FROM nginx
22
COPY nginx.conf /etc/nginx/conf.d/default.conf
33
COPY dist/. /usr/share/nginx/html/
4-
EXPOSE 80
54
CMD ["nginx", "-g", "daemon off;"]

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"js-cookie": "^3.0.5",
2020
"pinia": "^2.3.0",
2121
"tailwind-scrollbar-hide": "^2.0.0",
22+
"v3-infinite-loading": "^1.3.2",
2223
"vue": "^3.5.13",
2324
"vue-chartjs": "^5.3.2",
2425
"vue-router": "^4.5.0",

src/api/auth.ts

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
11
import { axiosInstance } from '@/utils/axios'
22
import Cookies from 'js-cookie'
33
import type { loginDataTypes } from '@/types/auth'
4+
import { useMemberStore } from '@/stores/member'
45

56
export const postLogin = async (loginData: loginDataTypes, sessionId: string) => {
7+
const memberStore = useMemberStore()
68
const response = await axiosInstance.post('/api/auths/login', loginData, {
79
headers: { sessionId: sessionId }
810
})
911
Cookies.set('accessToken', response.data.accessToken, {
1012
path: '/',
1113
sameSite: 'strict'
1214
})
15+
Cookies.set('refreshToken', response.data.refreshToken, {
16+
path: '/',
17+
sameSite: 'strict'
18+
})
19+
20+
await memberStore.updateMemberInfoWithToken()
1321
return response.data
1422
}
1523

1624
export const patchPassword = async (password: string) => {
17-
const accessToken = Cookies.get('accessToken')
25+
const response = await axiosInstance.patch('/api/members/password', password)
1826

19-
if (!accessToken) return
27+
return response.data
28+
}
29+
30+
export const deleteLogout = async () => {
31+
const memberStore = useMemberStore()
32+
const refreshToken = Cookies.get('refreshToken')
2033

21-
const response = await axiosInstance.patch('/api/members/password', password, {
34+
const response = await axiosInstance.delete('/api/auths/logout', {
2235
headers: {
23-
Authorization: `Bearer ${accessToken}`
36+
Authorization: `Bearer ${import.meta.env.VITE_ACCESS_TOKEN}`,
37+
refreshToken: refreshToken
2438
}
2539
})
26-
27-
return response.data
40+
Cookies.remove('accessToken', { path: '/' })
41+
Cookies.remove('refreshToken', { path: '/' })
42+
await memberStore.updateMemberInfoWithToken()
43+
return response
2844
}

src/api/common.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
import { axiosInstance } from '../utils/axios'
22

3+
export const getNotification = async (pageNum: number, sizeNum: number) => {
4+
const response = await axiosInstance.get(`/api/notifications?page=${pageNum}&size=${sizeNum}`)
5+
6+
return response.data
7+
}
8+
9+
export const patchNotificationRead = async (notificationId: number) => {
10+
const response = await axiosInstance.patch(`/api/notification/${notificationId}`)
11+
console.log(notificationId)
12+
return response.data
13+
}
14+
15+
export const getNotifiCount = async () => {
16+
const response = await axiosInstance.get(`/api/notifications/count`)
17+
console.log(response.data)
18+
return response.data
19+
}
20+
321
export const getMainCategory = async () => {
422
const response = await axiosInstance.get('/api/main-category')
523
return response.data

src/components/EditInformation.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class="w-24 h-24 rounded-full object-cover border mt-3" />
1717
<div
1818
v-else
19-
class="w-24 h-24 rounded-full bg-background-1 flex items-center justify-center"></div>
19+
class="w-24 h-24 rounded-full bg-background-1 flex items-center justify-center mt-3"></div>
2020
<!-- 파일 업로드 필요 -->
2121
<p class="mt-3 text-xs text-primary1 font-bold cursor-pointer">변경</p>
2222
</div>
@@ -91,7 +91,7 @@ const memberId = ref('Chole.yeon')
9191
const memberEmail = ref('taskflow123@gachon.ac.kr')
9292
const memberDepartment = ref('인프라팀')
9393
const memberJob = ref('인프라 아키텍처')
94-
const imageUrl = ref('../../public/images/mockProfile.jpg')
94+
const imageUrl = ref('')
9595
const isModalVisible = ref(false)
9696
9797
const memberForm = ref({

src/components/PieChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:options="options" />
66
<NoContent
77
v-else
8-
content="데이터가 없습니다" />
8+
content="집계된 데이터가 없습니다" />
99
</template>
1010

1111
<script setup lang="ts">

src/components/TaskCard.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
@click="onTaskClick">
66
<div class="flex flex-col gap-1">
77
<div class="flex justify-between items-center gap-4">
8-
<span class="text-black">{{ data.title }}</span>
8+
<div class="flex items-center gap-2">
9+
<TaskLabel
10+
v-if="data.labelInfo"
11+
:color="data.labelInfo.labelColor"
12+
:content="data.labelInfo.labelName" />
13+
<span class="text-black">{{ data.title }}</span>
14+
</div>
915
<CommonIcons
1016
v-if="draggable"
1117
:name="bentoIcon" />
@@ -34,6 +40,7 @@ import { computed } from 'vue'
3440
import type { TaskCardProps } from '@/types/manager'
3541
import CommonIcons from './common/CommonIcons.vue'
3642
import { statusAsColor } from '@/utils/statusAsColor'
43+
import TaskLabel from './common/TaskLabel.vue'
3744
3845
const { data } = defineProps<{ data: TaskCardProps; draggable?: boolean }>()
3946

0 commit comments

Comments
 (0)