Skip to content

Commit 71d08e5

Browse files
committed
🔀 [fix] : conflict resolved
2 parents 9f0a485 + 3cfbb50 commit 71d08e5

Some content is hidden

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

62 files changed

+1265
-601
lines changed

.github/workflows/CD.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,26 @@ jobs:
3131
- name: Build with npm
3232
run: npm run build-only
3333

34-
- name: Create nginx.conf
35-
run: touch ./nginx.conf
36-
- run: echo "${{ secrets.NGINX_CONF }}" > ./nginx.conf
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
3747

3848
## 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 }}
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 }}
4454

4555
## deploy
4656
- name: Deploy
@@ -52,6 +62,9 @@ jobs:
5262
key: ${{ secrets.FRONT_HOST_KEY }}
5363
port: ${{ secrets.FRONT_HOST_PORT }}
5464
script: |
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 --restart on-failure ${{ secrets.DOCKER_FRONT_REPO }}
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 }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM nginx
2-
COPY nginx.conf /etc/nginx/sites-available/default
2+
COPY nginx.conf /etc/nginx/conf.d/default.conf
33
COPY dist/. /usr/share/nginx/html/
44
EXPOSE 80
55
CMD ["nginx", "-g", "daemon off;"]

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import TopBar from './components/TopBar.vue'
2+
import TopBar from './components/top-bar/TopBar.vue'
33
import TheView from './layout/TheView.vue'
44
</script>
55

src/api/admin.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { LabelDataTypes, NewLabelTypes } from '@/types/admin'
2+
import { axiosInstance } from '@/utils/axios'
3+
4+
export const deleteLabelAdmin = async (id: number) => {
5+
const response = await axiosInstance.delete(`/api/management/labels/${id}`)
6+
return response.data
7+
}
8+
9+
export const postAddLabelAdmin = async (newLabel: NewLabelTypes) => {
10+
const response = await axiosInstance.post('/api/management/labels', newLabel)
11+
return response.data
12+
}
13+
14+
export const patchLabelAdmin = async (editLabel: LabelDataTypes) => {
15+
const response = await axiosInstance.patch(`/api/management/labels/${editLabel.labelId}`, {
16+
labelName: editLabel.labelName,
17+
labelColor: editLabel.labelColor
18+
})
19+
return response.data
20+
}
21+
22+
export const deleteCategoryAdmin = async (id: number) => {
23+
const response = await axiosInstance.delete(`/api/managements/categories/${id}`)
24+
return response.data
25+
}

src/api/test.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/api/user.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@ export const postTaskRequest = async (formdata: FormData) => {
44
const response = await formDataAxiosInstance.post('/api/tasks', formdata)
55
return response.data
66
}
7+
8+
export const getTaskDetailUser = async (id: number) => {
9+
const response = await formDataAxiosInstance.get(`/api/tasks/${id}/requests/details`)
10+
return response.data
11+
}
12+
13+
export const getTaskDetailManager = async (id: number) => {
14+
const response = await formDataAxiosInstance.get(`/api/tasks/${id}/details`)
15+
return response.data
16+
}

src/components/LineChart.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<template>
22
<Line
3+
v-if="labels.length !== 0"
34
:data="teamData"
45
:options="options" />
6+
<NoContent
7+
v-else
8+
content="데이터가 없습니다" />
59
</template>
610

711
<script setup lang="ts">
@@ -17,6 +21,7 @@ import {
1721
LinearScale,
1822
Colors
1923
} from 'chart.js'
24+
import NoContent from './lists/NoContent.vue'
2025
2126
ChartJS.register(
2227
Title,
@@ -41,14 +46,22 @@ const teamData = {
4146
{
4247
label: dataLabel,
4348
data: series,
44-
fill: true,
45-
tension: 0.4
49+
fill: true
4650
}
4751
]
4852
}
4953
5054
const options = {
5155
responsive: true,
52-
maintainAspectRatio: false
56+
maintainAspectRatio: false,
57+
scales: {
58+
y: {
59+
beginAtZero: true,
60+
ticks: {
61+
stepSize: 1
62+
},
63+
suggestedMax: Math.max(...series) + 1
64+
}
65+
}
5366
}
5467
</script>

src/components/ModalView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ watch(textValue, newValue => {
9292
})
9393
9494
const closeModal = () => {
95+
textValue.value = ''
9596
emit('close')
9697
}
9798

src/components/PieChart.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<template>
22
<Pie
3+
v-if="labels.length !== 0"
34
:data="teamData"
45
:options="options" />
6+
<NoContent
7+
v-else
8+
content="데이터가 없습니다" />
59
</template>
610

711
<script setup lang="ts">
@@ -16,6 +20,7 @@ import {
1620
type ChartEvent,
1721
type ActiveElement
1822
} from 'chart.js'
23+
import NoContent from './lists/NoContent.vue'
1924
ChartJS.register(Title, Tooltip, Legend, ArcElement, Colors)
2025
2126
const { labels, series } = defineProps<{ labels: string[]; series: number[] }>()

src/components/TaskStatus.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@ const bgColor = computed(() => {
2828
return isActive ? `bg-${statusAsColor(status)}-1` : `bg-${statusAsColor(status)}-2`
2929
})
3030
</script>
31-
32-
<style scoped></style>

0 commit comments

Comments
 (0)