Skip to content

Commit

Permalink
Merge pull request #34 from Triumers/feat/manager
Browse files Browse the repository at this point in the history
[Feature] 관리자 기본 기능 구현
  • Loading branch information
Leegiyeon committed Jun 6, 2024
2 parents b37d426 + 0deab36 commit 91d83a8
Show file tree
Hide file tree
Showing 10 changed files with 1,565 additions and 135 deletions.
7 changes: 6 additions & 1 deletion src/components/anonymous-board/AnonymousBoardDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<hr class="title-separator" />
<div class="board-actions">
<button @click="goToBoardList" class="list-button">글 목록</button>
<button @click="deleteAnonymousBoard" v-if="isAdmin" class="delete-button">삭제</button>
<button @click="deleteAnonymousBoard" v-if="isHrManagerOrAdmin" class="delete-button">삭제</button>
</div>
</div>
<div class="board-info">
Expand Down Expand Up @@ -68,6 +68,11 @@ const isAdmin = ref(false);
const totalPages = computed(() => Math.ceil(totalCount.value / pageSize.value));
const isHrManagerOrAdmin = computed(() => {
const userRole = localStorage.getItem('role');
return ['ROLE_ADMIN', 'ROLE_HR_MANAGER'].includes(userRole);
});
onMounted(() => {
fetchAnonymousBoardById();
fetchAnonymousBoardCommentList();
Expand Down
Loading

0 comments on commit 91d83a8

Please sign in to comment.