public 기능 완료
This commit is contained in:
@@ -24,6 +24,14 @@
|
||||
<p><strong>시작일:</strong> {{ formattedStartDate }}</p>
|
||||
<p><strong>종료일:</strong> {{ formattedEndDate }}</p>
|
||||
<p><strong>장소:</strong> {{ eventModel.location }}</p>
|
||||
<p v-if="eventModel.publicHash">
|
||||
<strong>공개 URL:</strong>
|
||||
<InputText :value="publicEventUrl" readonly style="width:70%" class="mr-2" />
|
||||
<Button icon="pi pi-copy" @click="copyPublicUrl" class="p-button-sm" v-tooltip.bottom="'복사'" />
|
||||
</p>
|
||||
<p v-if="eventModel.accessPassword">
|
||||
<strong>공개 비밀번호:</strong> {{ eventModel.accessPassword }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-12 md:col-6">
|
||||
<p><strong>최대 참가자 수:</strong> {{ eventModel.maxParticipants || '제한 없음' }}</p>
|
||||
@@ -81,7 +89,6 @@ import TabPanel from 'primevue/tabpanel';
|
||||
import Badge from 'primevue/badge';
|
||||
import Button from 'primevue/button';
|
||||
import InputNumber from 'primevue/inputnumber';
|
||||
import Dropdown from 'primevue/dropdown';
|
||||
import InputText from 'primevue/inputtext';
|
||||
import ParticipantManagement from './ParticipantManagement.vue';
|
||||
import ScoreManagement from './ScoreManagement.vue';
|
||||
@@ -94,6 +101,11 @@ const props = defineProps({
|
||||
getStatusName: { type: Function, required: true },
|
||||
getStatusSeverity: { type: Function, required: true },
|
||||
formatDate: { type: Function, required: true },
|
||||
|
||||
// (권장) 상태명이 매칭 안 될 경우 실제 상태 문자열 반환
|
||||
// getStatusName 함수 예시:
|
||||
// (status) => STATUS_LABELS[status] || status
|
||||
|
||||
availableMembers: { type: Array, default: () => [] }
|
||||
});
|
||||
|
||||
@@ -103,6 +115,20 @@ const eventModel = computed(() => props.event || {});
|
||||
const formattedStartDate = computed(() => props.formatDate(eventModel.value.startDate));
|
||||
const formattedEndDate = computed(() => props.formatDate(eventModel.value.endDate));
|
||||
|
||||
// 공개 URL 전체 경로
|
||||
const publicEventUrl = computed(() => {
|
||||
if (!eventModel.value.publicHash) return '';
|
||||
// 실제 서비스 도메인에 맞게 수정 가능
|
||||
return `${window.location.origin}/public/${eventModel.value.publicHash}`;
|
||||
});
|
||||
|
||||
function copyPublicUrl() {
|
||||
if (!publicEventUrl.value) return;
|
||||
navigator.clipboard.writeText(publicEventUrl.value).then(() => {
|
||||
toast.add({ severity: 'info', summary: 'URL 복사', detail: '공개 URL이 복사되었습니다.', life: 1500 });
|
||||
});
|
||||
}
|
||||
|
||||
const hideDialog = () => {
|
||||
emit('hide');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user