diff --git a/client/src/app/site/pages/meetings/pages/agenda/modules/list-of-speakers/view-models/view-speaker.ts b/client/src/app/site/pages/meetings/pages/agenda/modules/list-of-speakers/view-models/view-speaker.ts index 3a1fc8a5be..643baeb207 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/modules/list-of-speakers/view-models/view-speaker.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/modules/list-of-speakers/view-models/view-speaker.ts @@ -7,6 +7,7 @@ import { Id } from '../../../../../../../../domain/definitions/key-types'; import { Speaker } from '../../../../../../../../domain/models/speakers/speaker'; import { SpeakerState } from '../../../../../../../../domain/models/speakers/speaker-state'; import { HasMeeting } from '../../../../../view-models/has-meeting'; +import { ViewMotion } from '../../../../motions'; import { ViewListOfSpeakers } from './view-list-of-speakers'; import { ViewPointOfOrderCategory } from './view-point-of-order-category'; /** @@ -57,6 +58,15 @@ export class ViewSpeaker extends BaseHasMeetingUserViewModel { ); } + public get numbering(): string { + if (this.list_of_speakers?.content_object.collection === `motion`) { + return (this.list_of_speakers?.content_object as ViewMotion).number; + } else if (this.list_of_speakers?.content_object.collection === `topic`) { + return this.list_of_speakers?.content_object.agenda_item.item_number; + } + return null; + } + public get name(): string { return this.user ? this.user.getFullName(this.structure_level_list_of_speakers?.structure_level) : ``; } @@ -101,6 +111,13 @@ export class ViewSpeaker extends BaseHasMeetingUserViewModel { return collectionFromFqid(this.list_of_speakers?.content_object_id); } + public get contentSeqNum(): string { + if (!this.list_of_speakers?.content_object) { + return null; + } + return this.list_of_speakers?.content_object[`sequential_number`]; + } + public get topic(): string { const number = this.list_of_speakers?.content_object?.agenda_item?.item_number; const title = this.list_of_speakers?.content_object?.getTitle(); @@ -124,6 +141,10 @@ export class ViewSpeaker extends BaseHasMeetingUserViewModel { : null; } + public get hasSpoken(): boolean { + return this.speaker.end_time ? true : false; + } + public getBeginTimeAsDate(): Date | null { return this.speaker.begin_time ? new Date(this.speaker.begin_time * 1000) : null; } diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/components/participant-speaker-list/participant-speaker-list.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/components/participant-speaker-list/participant-speaker-list.component.html index 9166c6caf6..8daf726282 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/components/participant-speaker-list/participant-speaker-list.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/components/participant-speaker-list/participant-speaker-list.component.html @@ -31,11 +31,16 @@

{{ 'Contributions' | translate }}

- +
Point of order
diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/components/participant-speaker-list/participant-speaker-list.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/components/participant-speaker-list/participant-speaker-list.component.ts index 9e5b490aa0..59aa6ce1c5 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/components/participant-speaker-list/participant-speaker-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/components/participant-speaker-list/participant-speaker-list.component.ts @@ -85,7 +85,24 @@ export class ParticipantSpeakerListComponent extends BaseMeetingListViewComponen this.csvExport.export(this.listComponent.source); } - public getSpeakerIcon(speaker: ViewSpeaker) { + public getSpeakerIcon(speaker: ViewSpeaker): string { return modelIcons[speaker.contentType]; } + + private getSpeakerContentType(speaker: ViewSpeaker): string { + return speaker.contentType; + } + + protected viewModelUrl(speaker: ViewSpeaker): string { + if (this.getSpeakerContentType(speaker) === `topic`) { + return `/${this.activeMeetingId}/agenda/topics/${speaker.contentSeqNum}`; + } else if (this.getSpeakerContentType(speaker) === `motion`) { + return `/${this.activeMeetingId}/motions/${speaker.contentSeqNum}`; + } else if (this.getSpeakerContentType(speaker) === `motion_block`) { + return `/${this.activeMeetingId}/motions/blocks/${speaker.contentSeqNum}`; + } else if (this.getSpeakerContentType(speaker) === `assignment`) { + return `/${this.activeMeetingId}/assignments/${speaker.contentSeqNum}`; + } + return `/${this.activeMeetingId}`; + } } diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts index 8cb58b3287..51b0f14e3d 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts @@ -79,6 +79,14 @@ export class ParticipantSpeakerListFilterService extends BaseMeetingFilterListSe { condition: `motion_block`, label: this.translate.instant(`Motion blocks`) }, { condition: `assignment`, label: this.translate.instant(`Elections`) } ] + }, + { + property: `hasSpoken`, + label: this.translate.instant(`Spoken`), + options: [ + { condition: true, label: this.translate.instant(`Has spoken`) }, + { condition: [false, null], label: this.translate.instant(`Has not spoken`) } + ] } ]; return staticFilterOptions.concat(this.speakerStructureLevelFilterOptions); diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-sort.service/participant-speaker-list-sort.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-sort.service/participant-speaker-list-sort.service.ts index 04810c284c..e14b121517 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-sort.service/participant-speaker-list-sort.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-sort.service/participant-speaker-list-sort.service.ts @@ -23,7 +23,12 @@ export class ParticipantSpeakerListSortService extends BaseSortListService[] = [ { property: `id`, label: _(`Receipt of contributions`) }, { property: `begin_time`, label: _(`Speech start time`) }, - { property: `name`, label: _(`Speaker`) } + { property: `name`, label: _(`Speaker`) }, + { + property: `numbering`, + label: _(`Numbering`), + foreignBaseKeys: { agenda_item: [`item_number`], motion: [`number`] } + } ]; public constructor() { diff --git a/client/src/app/site/pages/meetings/pages/participants/participants.subscription.ts b/client/src/app/site/pages/meetings/pages/participants/participants.subscription.ts index d3f970a055..4c0d7d80c9 100644 --- a/client/src/app/site/pages/meetings/pages/participants/participants.subscription.ts +++ b/client/src/app/site/pages/meetings/pages/participants/participants.subscription.ts @@ -167,7 +167,7 @@ export const getSpeakersListSubscriptionConfig: SubscriptionConfigGenerator = (i follow: [ { idField: `content_object_id`, - fieldset: [`title`, `list_of_speakers_id`, ...MEETING_ROUTING_FIELDS], + fieldset: [`title`, `number`, `list_of_speakers_id`, ...MEETING_ROUTING_FIELDS], follow: [ { idField: `agenda_item_id`,