Skip to content

Commit

Permalink
게시판 삭제 , 댓글 삭제, 디자인 (#88)
Browse files Browse the repository at this point in the history
* feat: 댓글 창

* feat: 줄바꿈 지원

* feat: 줄바꿈 지원

* feat: 줄바꿈 지원

* design: 디자인 수정

* design: 이름과 본문 분리

* refactor: 사용하지 않는 코드 정리

* design: 세부사항 정렬

* design: 세부사항 정렬

* feat: 게시글 수정 삭제를 위한 유저 아이디 저장

* feat: 댓글, 게시글 삭제
  • Loading branch information
birdieHyun authored Nov 16, 2023
1 parent c777ba4 commit 290a62d
Show file tree
Hide file tree
Showing 11 changed files with 398 additions and 52 deletions.
2 changes: 1 addition & 1 deletion src/components/application/ApplicationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export default {
});
// 응답에서 이미지 URL을 가져와서 저장
this.applications.photo = response.data.data;
this.applications.photo = response.data.data.image;
} catch (error) {
console.error("Image upload failed:", error);
Expand Down
4 changes: 4 additions & 0 deletions src/components/application/NotApplyTerm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,8 @@ h1 {
}
}
}
input{
outline: none;
}
</style>
41 changes: 23 additions & 18 deletions src/components/application/admin/ApplicationDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@
</thead>
<tbody>
<tr>
<td>
{{ applications.selfIntroduction }}
<td v-html="formatContent(applications.selfIntroduction)">
</td>
</tr>
</tbody>
Expand All @@ -112,8 +111,7 @@
</thead>
<tbody>
<tr>
<td>
{{ applications.applyReason }}
<td v-html="formatContent(applications.applyReason)">
</td>
</tr>
</tbody>
Expand All @@ -127,8 +125,7 @@
</thead>
<tbody>
<tr>
<td>
{{ applications.skillEvaluation }}
<td v-html="formatContent(applications.skillEvaluation)">
</td>
</tr>
</tbody>
Expand All @@ -142,8 +139,7 @@
</thead>
<tbody>
<tr>
<td>
{{ applications.golfMemory }}
<td v-html="formatContent(applications.golfMemory)">
</td>
</tr>
</tbody>
Expand All @@ -157,8 +153,7 @@
</thead>
<tbody>
<tr>
<td>
{{ applications.otherClub }}
<td v-html="formatContent(applications.otherClub)">
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -196,7 +191,7 @@
{{ applications.interviewTime }} &nbsp;
<button @click="showInterviewModal = true">면접 시간 변경</button>

<InterviewModal v-if="showInterviewModal" @close="showInterviewModal = false" @save="updateInterviewTime" />
<InterviewModal v-if="showInterviewModal" @close="showInterviewModal = false" @save="updateInterviewTime"/>
</td>
</tr>

Expand Down Expand Up @@ -251,21 +246,22 @@ export default {
showInterviewModal.value = false;
};
const updateInterviewTime = async(newTime) => {
const updateInterviewTime = async (newTime) => {
interviewTime.value = newTime;
try{
try {
const response = await axios.patch(`${process.env.VUE_APP_API_URL}/admin/forms/${currentPageId}/interviewTime`, {
time: interviewTime.value});
time: interviewTime.value
});
if (response.status === 200) {
alert("면접 시간 변경 완료");
closeModal();
location.reload();
}else {
} else {
alert("면접 시간 변경 실패");
}
}catch (error) {
} catch (error) {
alert(error);
}
}
Expand Down Expand Up @@ -349,7 +345,16 @@ export default {
.catch(error => {
console.error("Error updating finalPass:", error);
});
},
formatContent(content) {
// 줄바꿈 문자를 <br> 태그로 변환
if (!content) {
return '';
}
return content.replace(/\n/g, '<br>');
}
},
};
Expand All @@ -361,7 +366,7 @@ img {
max-width: 100px;
}
.profile-info{
.profile-info {
margin-top: 30px;
}
Expand All @@ -387,7 +392,7 @@ table th {
color: #fff;
}
.application-footer{
.application-footer {
margin-bottom: 30px;
}
Expand Down
Loading

0 comments on commit 290a62d

Please sign in to comment.