diff --git a/src/components/Events/EventItem.vue b/src/components/Events/EventItem.vue new file mode 100644 index 00000000..234998ee --- /dev/null +++ b/src/components/Events/EventItem.vue @@ -0,0 +1,130 @@ + + + + + + {{ event.name }} + + + {{ getFullDayString(new Date(event.duration.since)) }} + + + + + + {{ eventLevels[eventLevelValue].label }} + + + + + + + + + + + diff --git a/src/components/Events/EventLevelMenu.vue b/src/components/Events/EventLevelMenu.vue index bc50dce2..8bc77a15 100644 --- a/src/components/Events/EventLevelMenu.vue +++ b/src/components/Events/EventLevelMenu.vue @@ -1,8 +1,5 @@ + + + + diff --git a/src/consts/eventLevel.ts b/src/consts/eventLevel.ts index c38ac8ea..a7310dc6 100644 --- a/src/consts/eventLevel.ts +++ b/src/consts/eventLevel.ts @@ -11,6 +11,8 @@ type EventLevelValueMap = typeof eventLevelValueMap export type EventLevelValue = EventLevelValueMap[keyof EventLevelValueMap] +export type EventLevelValueWithAll = EventLevelValue | 'all' + interface EventLevelDetail { label: string value: Level diff --git a/src/pages/Event.vue b/src/pages/Event.vue index 9c10bcc1..7e95aea4 100644 --- a/src/pages/Event.vue +++ b/src/pages/Event.vue @@ -25,14 +25,14 @@ const { mutate } = useEventStore() const eventId = useParam('id') const event: EventDetail = (await apis.getEvent(eventId.value)).data -const eventLevel = ref(eventLevelValueMap[event.eventLevel]) +const eventLevel = ref(eventLevelValueMap[event.level]) const isSending = ref(false) const updateEvent = async () => { isSending.value = true try { const requestData: EditEventRequest = { - eventLevel: getEventLevelFromValue(eventLevel.value) + level: getEventLevelFromValue(eventLevel.value) } await apis.editEvent(eventId.value, requestData) mutate() diff --git a/src/pages/Events.vue b/src/pages/Events.vue index 0ce92fa9..48bb4ad5 100644 --- a/src/pages/Events.vue +++ b/src/pages/Events.vue @@ -1,15 +1,93 @@ - - Events - + + + + + + + + 検索 + + + + 公開設定で絞り込み + + + + + + + + + + + +
{{ event.name }}
+ + {{ getFullDayString(new Date(event.duration.since)) }} +
検索
公開設定で絞り込み