From 1072cc543f5d4b72903f33ae01eb1a53ebc33692 Mon Sep 17 00:00:00 2001 From: mathsuky Date: Sat, 18 Nov 2023 10:49:48 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=81=AE=E5=AF=BE?= =?UTF-8?q?=E8=B1=A1=E8=80=85=E3=82=92=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/event/EventFormBase.vue | 2 +- src/components/event/EventFormSummary.vue | 49 +++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) 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..ddb47e00 100644 --- a/src/components/event/EventFormSummary.vue +++ b/src/components/event/EventFormSummary.vue @@ -48,6 +48,30 @@
説明はありません
+ + Targets + +
+ 対象者はいません +
+ + + + + + {{ 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 + targetsPerPage: 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 targets(): ResponseUser[] { + const userById = this.$store.direct.getters.usersCache.userById + if (!this.content.group) return [] + let targets = this.content.group.members.flatMap(userId => { + const user = userById(userId) + return user ? user : [] + }) + return targets + } + + get targetsSlice(): ResponseUser[] { + return this.targets.slice( + (this.page - 1) * this.targetsPerPage, + this.page * this.targetsPerPage + ) + } } From ff94d9c0f7b8f1cd30d981c2e27e3a0ee1dac710 Mon Sep 17 00:00:00 2001 From: mathsuky Date: Thu, 21 Dec 2023 13:43:19 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E5=90=8D=E7=A7=B0=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/event/EventFormSummary.vue | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/event/EventFormSummary.vue b/src/components/event/EventFormSummary.vue index ddb47e00..5131c2f8 100644 --- a/src/components/event/EventFormSummary.vue +++ b/src/components/event/EventFormSummary.vue @@ -49,12 +49,12 @@ - Targets + Invitees -
- 対象者はいません +
+ 参加予定者はいません
- +
@@ -149,7 +149,7 @@ export default class EventFormSummary extends Vue { sharedRoom!: boolean page: number = 1 - targetsPerPage: number = 6 + inviteesPerPage: number = 6 get sharedRoomString(): string { return this.sharedRoom ? '部屋の共用可能' : '部屋の共用不可能' @@ -177,20 +177,20 @@ export default class EventFormSummary extends Vue { return formatDate(DATETIME_DISPLAY_FORMAT) } - get targets(): ResponseUser[] { + get invitees(): ResponseUser[] { const userById = this.$store.direct.getters.usersCache.userById if (!this.content.group) return [] - let targets = this.content.group.members.flatMap(userId => { + let invitees = this.content.group.members.flatMap(userId => { const user = userById(userId) return user ? user : [] }) - return targets + return invitees } - get targetsSlice(): ResponseUser[] { - return this.targets.slice( - (this.page - 1) * this.targetsPerPage, - this.page * this.targetsPerPage + get inviteesSlice(): ResponseUser[] { + return this.invitees.slice( + (this.page - 1) * this.inviteesPerPage, + this.page * this.inviteesPerPage ) } }