diff --git a/src/components/event/EventFormBase.vue b/src/components/event/EventFormBase.vue index 8d6f53fa..99880180 100644 --- a/src/components/event/EventFormBase.vue +++ b/src/components/event/EventFormBase.vue @@ -46,7 +46,7 @@ - + Back diff --git a/src/components/event/EventFormSummary.vue b/src/components/event/EventFormSummary.vue index af24b882..5131c2f8 100644 --- a/src/components/event/EventFormSummary.vue +++ b/src/components/event/EventFormSummary.vue @@ -48,6 +48,30 @@
説明はありません
+ + Invitees + +
+ 参加予定者はいません +
+ + + + + + {{ target.name }} + + +
+ +
@@ -63,6 +87,8 @@ import SummaryItemText from '@/components/shared/SummaryItemText.vue' import SummaryItemSubtext from '@/components/shared/SummaryItemSubtext.vue' import { formatDate, DATETIME_DISPLAY_FORMAT } from '@/workers/date' import EventPlace from '@/components/event/EventPlace.vue' +import { EventInputContent } from '@/components/event/EventFormContent.vue' +import { ResponseUser } from '@/api' export type EventSummary = { name: string description: string @@ -89,6 +115,9 @@ export type EventSummary = { }, }) export default class EventFormSummary extends Vue { + @Prop({ type: Object, required: true }) + content!: EventInputContent + @Prop({ type: String, required: true }) name!: string @@ -119,6 +148,9 @@ export default class EventFormSummary extends Vue { @Prop({ type: Boolean, required: true }) sharedRoom!: boolean + page: number = 1 + inviteesPerPage: number = 6 + get sharedRoomString(): string { return this.sharedRoom ? '部屋の共用可能' : '部屋の共用不可能' } @@ -144,5 +176,22 @@ export default class EventFormSummary extends Vue { get formatDate() { return formatDate(DATETIME_DISPLAY_FORMAT) } + + get invitees(): ResponseUser[] { + const userById = this.$store.direct.getters.usersCache.userById + if (!this.content.group) return [] + let invitees = this.content.group.members.flatMap(userId => { + const user = userById(userId) + return user ? user : [] + }) + return invitees + } + + get inviteesSlice(): ResponseUser[] { + return this.invitees.slice( + (this.page - 1) * this.inviteesPerPage, + this.page * this.inviteesPerPage + ) + } }