Compare commits

..

12 Commits

Author SHA1 Message Date
17ff1b817d Merge pull request 'test' (#101) from test into main
Reviewed-on: #101
2026-05-07 06:49:41 +00:00
Yu Sung
90377bdb3c feat(content-list): 검색 버튼 색상 수정
- 검색 버튼 색상: #3bb9f1로 변경
2026-05-07 15:29:34 +09:00
Yu Sung
a58a5cc0d1 feat(member): 계정 상세 팝업에 콘텐츠 관리자 권한 추가 및 라벨/검색 버튼 색상 수정
- 신규 권한: CONTENT_MANAGER 라디오 옵션 및 매핑 추가
- 라벨 변경: '사용 여부' → '권한'
- 검색 버튼 색상: #3bb9f1로 변경

왜: 콘텐츠 관리자 권한 지원 및 UI 용어/가시성 개선
무엇: MemberList.vue 수정으로 옵션/매핑/라벨/컬러 반영
2026-05-07 15:29:02 +09:00
Yu Sung
e7c95ab91b fix(content): ADMIN 권한에서만 테마 조회 API 호출하도록 수정
ContentList.vue의 created 훅에서 isAdmin 검사 후 getAudioContentThemeList 조건부 호출.

불필요한 API 호출 방지 및 권한 준수.
2026-05-07 15:23:49 +09:00
Yu Sung
ad4d498eeb feat(menu): 역할 기반 사이드 메뉴 추가/노출 로직 개선
- ADMIN 권한에만 추가 메뉴(시리즈 배너, 캐릭터 챗봇, 에이전트 관리, 정산 확장) 노출

- API 메뉴가 비어있고 CONTENT_MANAGER이면 '콘텐츠 리스트(/content/list)' 기본 메뉴 추가

- 기존 예외 처리 유지
2026-05-07 15:21:39 +09:00
Yu Sung
c72e1c18df fix(content): 관리 컬럼과 버튼을 ADMIN 권한에만 표시
배경: 비ADMIN 계정에서도 관리 열과 수정/삭제/공유 버튼이 노출되어 접근 혼란을 유발.

변경: computed isAdmin(Vuex accountStore.role 우선, localStorage 폴백) 추가 후, 테이블 헤더와 각 행의 관리 영역에 v-if="isAdmin" 적용.

영향: ADMIN 외 권한에서는 UI 요소가 렌더링되지 않음. 기능 동작 변경 없음.
2026-05-07 14:28:47 +09:00
Yu Sung
9435334734 fix(api): 관리자 로그인 API 엔드포인트 변경
- /member/login -> /admin/member/login
- 프론트엔드 관리자 로그인 경로와 백엔드 변경사항 동기화
2026-05-07 14:21:59 +09:00
Yu Sung
f01f002614 refactor(account): 로그인 상태 필드 정리 및 role 저장
왜: userId/nickname/profileImage는 사용처가 없어 유지보수 단순화. 대신 권한 판별을 위해 role 필요.\n무엇: accountStore에서 세 필드 삭제, role 추가. isAuthenticated 동기화 수정. LOGIN/LOGOUT 로직 role 반영. Axios Authorization 유지.
2026-05-07 14:19:21 +09:00
6769d8d485 Merge pull request 'feat(can): 캔 등록 화면에 일본 엔(JPY) 화폐 단위를 추가' (#100) from test into main
Reviewed-on: #100
2026-05-01 06:35:22 +00:00
Yu Sung
a833f0b6b8 feat(can): 캔 등록 화면에 일본 엔(JPY) 화폐 단위를 추가 2026-05-01 14:27:41 +09:00
860b3c7bab Merge pull request 'fix(calculate): 오리지널 시리즈 정산 - pageSize 20으로 수정' (#99) from test into main
Reviewed-on: #99
2026-04-22 02:14:44 +00:00
Yu Sung
9b756cbaf1 fix(calculate): 오리지널 시리즈 정산 - pageSize 20으로 수정 2026-04-22 11:12:53 +09:00
7 changed files with 155 additions and 123 deletions

View File

@@ -1,7 +1,7 @@
import Vue from 'vue';
async function login(email, password) {
return Vue.axios.post('/member/login', {
return Vue.axios.post('/admin/member/login', {
email,
password,
isAdmin: true,

View File

@@ -94,113 +94,135 @@ export default {
this.isLoading = true
try {
let res = await api.getMenus();
if (res.status === 200 && res.data.success === true && res.data.data.length > 0) {
this.items = res.data.data
if (res.status === 200 && res.data.success === true) {
// 기본 메뉴 설정 (API 결과가 비어있을 수 있음)
this.items = Array.isArray(res.data.data) ? res.data.data : []
// '시리즈 관리' 메뉴에 '배너 등록' 하위 메뉴 추가
try {
const seriesMenu = this.items.find(m => m && m.title === '시리즈 관리')
if (seriesMenu) {
if (!Array.isArray(seriesMenu.items)) {
seriesMenu.items = seriesMenu.items ? [].concat(seriesMenu.items) : []
}
const exists = seriesMenu.items.some(ci => ci && ci.route === '/content/series/banner')
if (!exists) {
seriesMenu.items.push({
title: '배너 등록',
route: '/content/series/banner',
items: null
})
// 현재 사용자 역할 확인
const role = (this.$store && this.$store.state && this.$store.state.accountStore && this.$store.state.accountStore.role)
|| localStorage.role
// ADMIN 권한 전용 추가 메뉴들
if (role === 'ADMIN') {
// '시리즈 관리' 메뉴에 '배너 등록' 하위 메뉴 추가
try {
const seriesMenu = this.items.find(m => m && m.title === '시리즈 관리')
if (seriesMenu) {
if (!Array.isArray(seriesMenu.items)) {
seriesMenu.items = seriesMenu.items ? [].concat(seriesMenu.items) : []
}
const exists = seriesMenu.items.some(ci => ci && ci.route === '/content/series/banner')
if (!exists) {
seriesMenu.items.push({
title: '배너 등록',
route: '/content/series/banner',
items: null
})
}
}
} catch (e) {
// ignore
}
} catch (e) {
// ignore
}
// 캐릭터 챗봇 메뉴 추가
this.items.push({
title: '캐릭터 챗봇',
route: null,
items: [
{
title: '배너 등록',
route: '/character/banner',
items: null
},
{
title: '캐릭터 리스트',
route: '/character',
items: null
},
{
title: '큐레이션',
route: '/character/curation',
items: null
},
{
title: '정산',
route: '/character/calculate',
items: null
},
{
title: '원작',
route: '/original-work',
items: null
},
]
})
// 에이전트 관리 메뉴를 '크리에이터 관리' 바로 아래에 추가
try {
const insertAfterTitle = '크리에이터 관리'
const agentMenu = {
title: '에이전트 관리',
// 캐릭터 챗봇 메뉴 추가
this.items.push({
title: '캐릭터 챗봇',
route: null,
items: [
{ title: '에이전트 리스트', route: '/agent/list', items: null },
{ title: '에이전트 정산 비율', route: '/agent/settlement-ratio', items: null },
{
title: '배너 등록',
route: '/character/banner',
items: null
},
{
title: '캐릭터 리스트',
route: '/character',
items: null
},
{
title: '큐레이션',
route: '/character/curation',
items: null
},
{
title: '정산',
route: '/character/calculate',
items: null
},
{
title: '원작',
route: '/original-work',
items: null
},
]
})
// 에이전트 관리 메뉴를 '크리에이터 관리' 바로 아래에 추가
try {
const insertAfterTitle = '크리에이터 관리'
const agentMenu = {
title: '에이전트 관리',
route: null,
items: [
{ title: '에이전트 리스트', route: '/agent/list', items: null },
{ title: '에이전트 정산 비율', route: '/agent/settlement-ratio', items: null },
]
}
const idx = this.items.findIndex(m => m && m.title === insertAfterTitle)
if (idx >= 0) {
this.items.splice(idx + 1, 0, agentMenu)
} else {
// 기준 메뉴가 없으면 하단에 추가
this.items.push(agentMenu)
}
} catch (e) {
// ignore
}
const idx = this.items.findIndex(m => m && m.title === insertAfterTitle)
if (idx >= 0) {
this.items.splice(idx + 1, 0, agentMenu)
} else {
// 기준 메뉴가 없으면 하단에 추가
this.items.push(agentMenu)
// 정산현황 메뉴에 '채널 후원 정산' 및 '오리지널 시리즈 정산' 추가
try {
const calculateMenu = this.items.find(m => m && m.title === '정산현황')
if (calculateMenu) {
if (!Array.isArray(calculateMenu.items)) {
calculateMenu.items = calculateMenu.items ? [].concat(calculateMenu.items) : []
}
const exists = calculateMenu.items.some(ci => ci && ci.route === '/calculate/channel-donation')
if (!exists) {
calculateMenu.items.push({
title: '채널 후원 정산',
route: '/calculate/channel-donation',
items: null
})
}
const existsOriginal = calculateMenu.items.some(ci => ci && ci.route === '/calculate/original-series')
if (!existsOriginal) {
calculateMenu.items.push({
title: '오리지널 시리즈 정산',
route: '/calculate/original-series',
items: null
})
}
}
} catch (e) {
// ignore
}
} catch (e) {
// ignore
}
// 정산현황 메뉴에 '채널 후원 정산' 추가
try {
const calculateMenu = this.items.find(m => m && m.title === '정산현황')
if (calculateMenu) {
if (!Array.isArray(calculateMenu.items)) {
calculateMenu.items = calculateMenu.items ? [].concat(calculateMenu.items) : []
}
const exists = calculateMenu.items.some(ci => ci && ci.route === '/calculate/channel-donation')
if (!exists) {
calculateMenu.items.push({
title: '채널 후원 정산',
route: '/calculate/channel-donation',
items: null
})
}
// 조회한 메뉴가 비어 있고, 콘텐츠 매니저라면 기본 메뉴 추가
if (this.items.length === 0 && role === 'CONTENT_MANAGER') {
this.items.push({
title: '콘텐츠 리스트',
route: '/content/list',
items: null
})
}
// '오리지널 시리즈 정산' 추가
const existsOriginal = calculateMenu.items.some(ci => ci && ci.route === '/calculate/original-series')
if (!existsOriginal) {
calculateMenu.items.push({
title: '오리지널 시리즈 정산',
route: '/calculate/original-series',
items: null
})
}
}
} catch (e) {
// ignore
// 그래도 비어있다면 이전 동작과 동일하게 처리
if (this.items.length === 0) {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 로그인 해주세요!")
this.logout();
}
} else {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 로그인 해주세요!")

View File

@@ -12,17 +12,13 @@ enhanceAccessToken();
const accountStore = {
namespaced: true,
state: {
userId: '',
nickname: '',
accessToken: '',
profileImage: '',
role: '',
},
getters: {
isAuthenticated(state) {
state.userId = state.userId || localStorage.userId
state.nickname = state.nickname || localStorage.nickname
state.profileImage = state.profileImage || localStorage.profileImage
state.accessToken = state.accessToken || localStorage.accessToken
state.role = state.role || localStorage.role
return state.accessToken !== undefined &&
state.accessToken !== null &&
@@ -31,27 +27,19 @@ const accountStore = {
}
},
mutations: {
LOGIN(state, {userId, nickname, token, profileImage}) {
state.userId = userId
localStorage.userId = userId
state.nickname = nickname
localStorage.nickname = nickname
state.profileImage = profileImage
localStorage.profileImage = profileImage
LOGIN(state, {token, role}) {
state.accessToken = token
localStorage.accessToken = token
state.role = role
localStorage.role = role
Vue.axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
},
LOGOUT(state) {
state.userId = ''
state.nickname = ''
state.profileImage = ''
state.accessToken = ''
state.role = ''
localStorage.clear()
if (location.pathname === '/') {

View File

@@ -180,7 +180,7 @@ export default {
items: [],
totalCount: 0,
page: 1,
pageSize: 10,
pageSize: 20,
excelLoading: false,

View File

@@ -135,7 +135,8 @@ export default {
currency: 'KRW',
currencies: [
{ text: 'KRW (한국 원)', value: 'KRW' },
{ text: 'USD (미국 달러)', value: 'USD' }
{ text: 'USD (미국 달러)', value: 'USD' },
{ text: 'JPY (일본 엔)', value: 'JPY' }
],
headers: [
{

View File

@@ -36,7 +36,7 @@
>
<v-btn
slot="append"
color="#9970ff"
color="#3bb9f1"
dark
@click="search"
>
@@ -96,7 +96,10 @@
<th class="text-center">
오픈 예정일
</th>
<th class="text-center">
<th
v-if="isAdmin"
class="text-center"
>
관리
</th>
</tr>
@@ -214,7 +217,7 @@
</td>
<td>{{ item.date }}</td>
<td>{{ item.releaseDate }}</td>
<td>
<td v-if="isAdmin">
<v-row>
<v-col>
<v-btn
@@ -527,6 +530,14 @@ export default {
};
},
computed: {
isAdmin() {
const role = (this.$store && this.$store.state && this.$store.state.accountStore && this.$store.state.accountStore.role)
|| (typeof localStorage !== 'undefined' ? localStorage.role : '');
return role === 'ADMIN';
},
},
async created() {
this.audio_content = {
id: null,
@@ -539,7 +550,10 @@ export default {
is_settlement_ratio_deleted: false,
settlement_ratio: "",
};
await this.getAudioContentThemeList();
// ADMIN 권한일 때만 테마 리스트 조회
if (this.isAdmin) {
await this.getAudioContentThemeList();
}
await this.getAudioContent();
},

View File

@@ -19,7 +19,7 @@
>
<v-btn
slot="append"
color="#9970ff"
color="#3bb9f1"
dark
@click="search"
>
@@ -171,7 +171,7 @@
<v-card-text>
<v-row align="center">
<v-col cols="4">
사용 여부
권한
</v-col>
<v-col cols="8">
<v-radio-group
@@ -191,6 +191,10 @@
value="USER"
label="일반회원"
/>
<v-radio
value="CONTENT_MANAGER"
label="콘텐츠 관리자"
/>
<v-spacer />
</v-radio-group>
</v-col>
@@ -451,6 +455,8 @@ export default {
this.user_type = 'CREATOR'
} else if (member.userType === '에이전트') {
this.user_type = 'AGENT'
} else if (member.userType === '콘텐츠 관리자') {
this.user_type = 'CONTENT_MANAGER'
}
this.email = member.email
@@ -519,7 +525,8 @@ export default {
if (
(this.user_type === 'CREATOR' && this.member.userType === '크리에이터') ||
(this.user_type === 'USER' && this.member.userType === '일반회원') ||
(this.user_type === 'AGENT' && this.member.userType === '에이전트')
(this.user_type === 'AGENT' && this.member.userType === '에이전트') ||
(this.user_type === 'CONTENT_MANAGER' && this.member.userType === '콘텐츠 관리자')
) {
this.notifyError("변경사항이 없습니다.")
} else {