From b37dda137912d69c78febbd5b7d453a8b2637b6a Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Fri, 5 Jul 2024 14:44:08 +0200 Subject: [PATCH 1/5] Fix resubscribe to poll detail subscription (#3819) --- .../assignment-poll-meta-info.component.ts | 2 -- .../app/site/pages/meetings/pages/polls/polls.subscription.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll-meta-info/assignment-poll-meta-info.component.ts b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll-meta-info/assignment-poll-meta-info.component.ts index 1c1a4fbf97..c87cbbd8d0 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll-meta-info/assignment-poll-meta-info.component.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll-meta-info/assignment-poll-meta-info.component.ts @@ -5,7 +5,6 @@ import { ViewAssignment } from 'src/app/site/pages/meetings/pages/assignments'; import { ViewOption } from 'src/app/site/pages/meetings/pages/polls'; import { AssignmentPollMethodVerbose } from '../../definitions'; -import { UnknownUserLabel } from '../../services/assignment-poll.service'; @Component({ selector: `os-assignment-poll-meta-info`, @@ -14,7 +13,6 @@ import { UnknownUserLabel } from '../../services/assignment-poll.service'; }) export class AssignmentPollMetaInfoComponent extends BasePollMetaInformationComponent { public pollPropertyVerbose = PollPropertyVerbose; - private unknownUserLabel = UnknownUserLabel; @Input() public showCandidates = true; diff --git a/client/src/app/site/pages/meetings/pages/polls/polls.subscription.ts b/client/src/app/site/pages/meetings/pages/polls/polls.subscription.ts index 1a49ecd9e0..eebfacdbdb 100644 --- a/client/src/app/site/pages/meetings/pages/polls/polls.subscription.ts +++ b/client/src/app/site/pages/meetings/pages/polls/polls.subscription.ts @@ -87,5 +87,5 @@ export const getPollDetailSubscriptionConfig: SubscriptionConfigGenerator = (... } ] }, - subscriptionName: POLL_DETAIL_SUBSCRIPTION + subscriptionName: `${POLL_DETAIL_SUBSCRIPTION}_${ids.join(`_`)}` }); From 7d524fd4eb20ee8f940e220b4bb89006eeeeec12 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Mon, 8 Jul 2024 16:43:50 +0200 Subject: [PATCH 2/5] Merge users together (#3766) --- client/angular.json | 2 +- .../app/domain/models/poll/poll-constants.ts | 2 + .../presenter/history-presenter.service.ts | 3 +- .../users/user-repository.service.ts | 4 + .../poll/base/base-poll-detail.component.ts | 16 +++ .../poll/base/base-poll-pdf.service.ts | 21 +++- .../entitled-users-table.component.html | 27 ++++- .../entitled-users-table.component.ts | 9 +- .../definitions/entitled-users-table-entry.ts | 2 + .../pages/account-list/account-list.module.ts | 11 +- .../account-list/account-list.component.html | 4 + .../account-list/account-list.component.ts | 25 ++++- .../account-merge-dialog.component.html | 104 ++++++++++++++++++ .../account-merge-dialog.component.scss | 27 +++++ .../account-merge-dialog.component.spec.ts | 21 ++++ .../account-merge-dialog.component.ts | 76 +++++++++++++ .../common/account-controller.service.ts | 4 + .../icon-container.component.html | 1 + .../icon-container.component.ts | 6 + client/src/meta | 2 +- 20 files changed, 351 insertions(+), 16 deletions(-) create mode 100644 client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html create mode 100644 client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.scss create mode 100644 client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.spec.ts create mode 100644 client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.ts diff --git a/client/angular.json b/client/angular.json index 445c723da6..c00b3a0ccd 100644 --- a/client/angular.json +++ b/client/angular.json @@ -55,7 +55,7 @@ { "type": "initial", "maximumWarning": "1500kb", - "maximumError": "3mb" + "maximumError": "3500kb" }, { "type": "anyComponentStyle", diff --git a/client/src/app/domain/models/poll/poll-constants.ts b/client/src/app/domain/models/poll/poll-constants.ts index 7e7e4ff86f..053e695478 100644 --- a/client/src/app/domain/models/poll/poll-constants.ts +++ b/client/src/app/domain/models/poll/poll-constants.ts @@ -102,6 +102,8 @@ export interface EntitledUsersEntry { present: boolean; voted: boolean; vote_delegated_to_user_id?: number; + user_merged_into_id?: number; + delegation_user_merged_into_id?: number; } export const VOTE_MAJORITY = -1; diff --git a/client/src/app/gateways/presenter/history-presenter.service.ts b/client/src/app/gateways/presenter/history-presenter.service.ts index 69ea7769ce..9f6930a141 100644 --- a/client/src/app/gateways/presenter/history-presenter.service.ts +++ b/client/src/app/gateways/presenter/history-presenter.service.ts @@ -70,13 +70,14 @@ export class HistoryPresenterService { .flatMap(positions => getUniqueItems(positions)) .sort((positionA, positionB) => positionB.timestamp - positionA.timestamp) .map(position => { + const userView = this.userRepo.getViewModel(position.user_id); return new HistoryPosition({ ...position, information: Array.isArray(position.information) ? position.information : position?.information[fqid], fqid, - user: this.userRepo.getViewModel(position.user_id)?.getFullName() + user: userView?.getFullName() ? userView.getFullName() : `user/${position.user_id}` }); }); } diff --git a/client/src/app/gateways/repositories/users/user-repository.service.ts b/client/src/app/gateways/repositories/users/user-repository.service.ts index 413bce9313..a27bcd93c1 100644 --- a/client/src/app/gateways/repositories/users/user-repository.service.ts +++ b/client/src/app/gateways/repositories/users/user-repository.service.ts @@ -508,6 +508,10 @@ export class UserRepositoryService extends BaseRepository { return this.createAction(UserAction.PARTICIPANT_IMPORT, payload); } + public mergeTogether(payload: { id: number; user_ids: number[] }[]): Action { + return this.createAction(UserAction.MERGE_TOGETHER, payload); + } + private sanitizePayload(payload: any): any { const temp = { ...payload }; for (const key of Object.keys(temp).filter(field => !this.isFieldAllowedToBeEmpty(field))) { diff --git a/client/src/app/site/pages/meetings/modules/poll/base/base-poll-detail.component.ts b/client/src/app/site/pages/meetings/modules/poll/base/base-poll-detail.component.ts index d0ad1600df..8ecf46cdbe 100644 --- a/client/src/app/site/pages/meetings/modules/poll/base/base-poll-detail.component.ts +++ b/client/src/app/site/pages/meetings/modules/poll/base/base-poll-detail.component.ts @@ -230,6 +230,12 @@ export abstract class BasePollDetailComponent user.id === entry.vote_delegated_to_user_id) + : null, + user_merged_into: entry.user_merged_into_id + ? `${this.translate.instant(`Old account of`)} ${users + .find(user => user.id === entry.user_merged_into_id) + ?.getShortName()}` + : null, + delegation_user_merged_into: entry.delegation_user_merged_into_id + ? `(${this.translate.instant(`represented by old account of`)}) ${users + .find(user => user.id === entry.delegation_user_merged_into_id) + ?.getShortName()}` : null }); } diff --git a/client/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts b/client/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts index 3941ba1f23..9fd2c350f3 100644 --- a/client/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts +++ b/client/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts @@ -626,17 +626,26 @@ export abstract class BasePollPdfService { for (const date of usersData.sort((entryA, entryB) => entryA.user?.getName().localeCompare(entryB.user?.getName()) )) { + const name = date.user_merged_into_id + ? `${this.translate.instant(`Old account of`)} ` + + this.getUserNameForExport(this.userRepo.getViewModel(date.user_merged_into_id)) + : this.getUserNameForExport(date.user); + let represented = ``; + if (date.vote_delegated_to_user_id && !date.delegation_user_merged_into_id) { + represented = + `\n${this.translate.instant(`represented by`)} ` + + this.getUserNameForExport(date.vote_delegated_to); + } else if (date.vote_delegated_to_user_id && date.delegation_user_merged_into_id) { + represented = + `\n${this.translate.instant(`represented by old account of`)} ` + + this.getUserNameForExport(this.userRepo.getViewModel(date.delegation_user_merged_into_id)); + } const tableLine = [ { text: index }, { - text: - this.getUserNameForExport(date.user) + - (date.vote_delegated_to - ? `\n${this.translate.instant(`represented by`)} ` + - this.getUserNameForExport(date.vote_delegated_to) - : ``) + text: name + represented }, { text: this.translate.instant(date.voted ? `Yes` : `No`) diff --git a/client/src/app/site/pages/meetings/modules/poll/components/entitled-users-table/entitled-users-table.component.html b/client/src/app/site/pages/meetings/modules/poll/components/entitled-users-table/entitled-users-table.component.html index 6fd5d1f1ef..be1e42a874 100644 --- a/client/src/app/site/pages/meetings/modules/poll/components/entitled-users-table/entitled-users-table.component.html +++ b/client/src/app/site/pages/meetings/modules/poll/components/entitled-users-table/entitled-users-table.component.html @@ -18,14 +18,35 @@ -
+
- ({{ 'represented by' | translate }} {{ entry.vote_delegated_to.getShortName().trim() }}) + ({{ 'represented by' | translate }} {{ entry.vote_delegated_to.getShortName() }}) + +
+
+ + {{ entry.delegation_user_merged_into }} + +
+
+ +
+ {{ entry.user_merged_into }} +
+ +
+ + ({{ 'represented by' | translate }} {{ entry.vote_delegated_to?.getShortName() }}) + +
+
+ + {{ entry.delegation_user_merged_into }}
- {{ 'Anonymous' | translate }} + {{ 'Anonymous' | translate }}
{{ 'Is present' | translate }}
diff --git a/client/src/app/site/pages/meetings/modules/poll/components/entitled-users-table/entitled-users-table.component.ts b/client/src/app/site/pages/meetings/modules/poll/components/entitled-users-table/entitled-users-table.component.ts index eb4d01173b..3b2652615c 100644 --- a/client/src/app/site/pages/meetings/modules/poll/components/entitled-users-table/entitled-users-table.component.ts +++ b/client/src/app/site/pages/meetings/modules/poll/components/entitled-users-table/entitled-users-table.component.ts @@ -44,7 +44,14 @@ export class EntitledUsersTableComponent { public readonly permission = Permission; - public filterPropsEntitledUsersTable = [`user.full_name`, `vote_delegated_to.full_name`, `voted_verbose`]; + public filterPropsEntitledUsersTable = [ + `user.full_name`, + `vote_delegated_to.full_name`, + `user_merged_into`, + `delegation_user_merged_into`, + `voted_verbose` + ]; + public constructor( private controller: ParticipantControllerService, public filter: EntitledUsersListFilterService diff --git a/client/src/app/site/pages/meetings/modules/poll/definitions/entitled-users-table-entry.ts b/client/src/app/site/pages/meetings/modules/poll/definitions/entitled-users-table-entry.ts index f4a894254c..e40b09d33d 100644 --- a/client/src/app/site/pages/meetings/modules/poll/definitions/entitled-users-table-entry.ts +++ b/client/src/app/site/pages/meetings/modules/poll/definitions/entitled-users-table-entry.ts @@ -6,4 +6,6 @@ export interface EntitledUsersTableEntry extends EntitledUsersEntry, Identifiabl user?: ViewUser; voted_verbose: string; vote_delegated_to?: ViewUser | null; + user_merged_into?: string | null; + delegation_user_merged_into?: string | null; } diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/account-list.module.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/account-list.module.ts index f2f480f38f..517c2dfd18 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/account-list.module.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/account-list.module.ts @@ -1,10 +1,13 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; +import { MatDialogModule } from '@angular/material/dialog'; import { MatDividerModule } from '@angular/material/divider'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatIconModule } from '@angular/material/icon'; import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button'; import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu'; +import { MatRadioModule } from '@angular/material/radio'; +import { MatTableModule } from '@angular/material/table'; import { MatTooltipModule } from '@angular/material/tooltip'; import { RouterModule } from '@angular/router'; import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations'; @@ -22,10 +25,11 @@ import { AccountCommonServiceModule } from '../../services/common/account-common import { AccountListRoutingModule } from './account-list-routing.module'; import { AccountListComponent } from './components/account-list/account-list.component'; import { AccountListMainComponent } from './components/account-list-main/account-list-main.component'; +import { AccountMergeDialogComponent } from './components/account-merge-dialog/account-merge-dialog.component'; import { AccountListServiceModule } from './services/account-list-service.module'; @NgModule({ - declarations: [AccountListComponent, AccountListMainComponent], + declarations: [AccountListComponent, AccountListMainComponent, AccountMergeDialogComponent], imports: [ CommonModule, AccountListRoutingModule, @@ -47,7 +51,10 @@ import { AccountListServiceModule } from './services/account-list-service.module MatFormFieldModule, IconContainerModule, RouterModule, - PipesModule + PipesModule, + MatDialogModule, + MatRadioModule, + MatTableModule ] }) export class AccountListModule {} diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html index 896896eb37..cbc4eae45c 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html @@ -177,6 +177,10 @@

block {{ 'Enable/disable accounts' | translate }} ... +

diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.ts index 613f80b9b0..038e151532 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.ts @@ -1,10 +1,13 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; import { TranslateService } from '@ngx-translate/core'; +import { firstValueFrom } from 'rxjs'; import { Observable } from 'rxjs'; import { getOmlVerboseName } from 'src/app/domain/definitions/organization-permission'; import { OMLMapping } from 'src/app/domain/definitions/organization-permission'; +import { mediumDialogSettings } from 'src/app/infrastructure/utils/dialog-settings'; import { BaseListViewComponent } from 'src/app/site/base/base-list-view.component'; import { MeetingControllerService } from 'src/app/site/pages/meetings/services/meeting-controller.service'; import { ViewMeeting } from 'src/app/site/pages/meetings/view-models/view-meeting'; @@ -19,6 +22,7 @@ import { AccountControllerService } from '../../../../services/common/account-co import { AccountFilterService } from '../../../../services/common/account-filter.service'; import { AccountListSearchService } from '../../services/account-list-search/account-list-search.service'; import { AccountSortService } from '../../services/account-list-sort.service/account-sort.service'; +import { AccountMergeDialogComponent } from '../account-merge-dialog/account-merge-dialog.component'; const ACCOUNT_LIST_STORAGE_INDEX = `account_list`; @@ -47,7 +51,8 @@ export class AccountListComponent extends BaseListViewComponent { private userController: UserControllerService, public searchService: AccountListSearchService, private operator: OperatorService, - private vp: ViewPortService + private vp: ViewPortService, + private dialog: MatDialog ) { super(); super.setTitle(`Accounts`); @@ -126,4 +131,22 @@ export class AccountListComponent extends BaseListViewComponent { public getOmlByUser(user: ViewUser): string { return getOmlVerboseName(user.organization_management_level as keyof OMLMapping); } + + public async mergeUsersTogether(): Promise { + const result = await this.openMergeDialog(); + if (result) { + const id = result; + const user_ids = this.selectedRows.map(view => view.id).filter(sRid => sRid !== id); + this.controller.mergeTogether([{ id: id, user_ids: user_ids }]).resolve(); + } + } + + public async openMergeDialog(): Promise { + const data = { choices: this.selectedRows }; + const dialogRef = this.dialog.open(AccountMergeDialogComponent, { + ...mediumDialogSettings, + data: data + }); + return firstValueFrom(dialogRef.afterClosed()); + } } diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html new file mode 100644 index 0000000000..394905c47e --- /dev/null +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html @@ -0,0 +1,104 @@ +
{{ 'Merge users' | translate }}
+ +
{{ 'Please select a primary account.' | translate }}
+ + + + + + + + + + + + + + +
+
+
+
+
+
+ {{ user.short_name }} + + · {{ user.gender }} + + + · {{ user.pronoun }} + +
+
+ {{ user.short_name }} + + · {{ user.gender }} + + + · {{ user.pronoun }} + +
+
+   + + + +
+
+
+ {{ user.saml_id || user.username }} + · {{ user.email }}  + · {{ user.member_number }} +
+
+ {{ 'Last login' | translate }} {{ user.last_login | localizedDate }} +
+
+
+
+ + {{ user.meetings.length }} + + +
+
+
+
{{ 'Attention: Not selected accounts will be merged and then deleted.' | translate }}
+
+ {{ 'Warning: Data loss is possible, because two users are in the same meeting.' | translate }} + {{ 'Meetings effected:' | translate }} + {{ countMeetingsCollide }} +
+
+ + + + diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.scss b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.scss new file mode 100644 index 0000000000..c7ce3aa5ce --- /dev/null +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.scss @@ -0,0 +1,27 @@ +.error-color { + color: red; +} + +.mat-column-button { + width: 60px; +} + +.nameCell { + display: flex; + flex-direction: column; + flex-basis: 620px; +} + +.iconCell { + display: flex; + flex-direction: column; + flex-basis: 100px; +} + +.meta-info { + font-size: 12px; +} + +.crossed-out { + text-decoration: line-through; +} diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.spec.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.spec.ts new file mode 100644 index 0000000000..83abcb8dc6 --- /dev/null +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AccountMergeDialogComponent } from './account-merge-dialog.component'; + +xdescribe(`AccountMergeDialogComponent`, () => { + let component: AccountMergeDialogComponent; + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [AccountMergeDialogComponent] + }); + fixture = TestBed.createComponent(AccountMergeDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it(`should create`, () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.ts new file mode 100644 index 0000000000..1f8bf407e9 --- /dev/null +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.ts @@ -0,0 +1,76 @@ +import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { ViewUser } from 'src/app/site/pages/meetings/view-models/view-user'; + +export type AccountMergeDialogData = { choices: ViewUser[] }; +export type AccountMergeDialogAnswer = number | null; + +@Component({ + selector: `os-account-merge-dialog`, + templateUrl: `./account-merge-dialog.component.html`, + styleUrls: [`./account-merge-dialog.component.scss`], + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class AccountMergeDialogComponent { + public constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: AccountMergeDialogData + ) { + this.data.choices.sort((a, b) => a.name.localeCompare(b.name)); + const meetingIdsVisited: number[] = []; + + for (const user of this.data.choices) { + for (const meeting of user.meetings) { + if (meetingIdsVisited.includes(meeting.id)) { + this._meetingsCollide.add(meeting.id); + } + meetingIdsVisited.push(meeting.id); + } + } + } + + public selectedUserId: number; + public displayedColumns = [`button`, `name`, `icon`]; + private _meetingsCollide = new Set(); + + public get showMeetingsCollide(): boolean { + return this._meetingsCollide.size > 0; + } + + public get countMeetingsCollide(): number { + return this._meetingsCollide.size; + } + + public get possibleChoices(): ViewUser[] { + return this.data.choices; + } + + public userMeetings(user: ViewUser): string { + if (user.meetings.length > 10) { + const res = user.meetings.map(a => a.name).slice(0, 10); + res.push(`...`); + return res.join(`\n`); + } else { + return user.meetings.map(a => a.name).join(`\n`); + } + } + + public isCrossedOut(user: ViewUser): boolean { + if (!this.selectedUserId) { + return false; + } + return this.selectedUserId !== user.id; + } + + public onChange(event): void { + this.selectedUserId = Number.parseInt(event.value); + } + + protected closeDialog(ok: boolean): void { + if (ok && this.selectedUserId) { + this.dialogRef.close(this.selectedUserId); + } else { + this.dialogRef.close(null); + } + } +} diff --git a/client/src/app/site/pages/organization/pages/accounts/services/common/account-controller.service.ts b/client/src/app/site/pages/organization/pages/accounts/services/common/account-controller.service.ts index 42d6228b9d..a388837c3c 100644 --- a/client/src/app/site/pages/organization/pages/accounts/services/common/account-controller.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/services/common/account-controller.service.ts @@ -96,4 +96,8 @@ export class AccountControllerService extends BaseController { public import(payload: { id: number; import: boolean }[]): Action { return this.repo.accountImport(payload); } + + public mergeTogether(payload: { id: number; user_ids: number[] }[]): Action { + return this.repo.mergeTogether(payload); + } } diff --git a/client/src/app/ui/modules/icon-container/components/icon-container/icon-container.component.html b/client/src/app/ui/modules/icon-container/components/icon-container/icon-container.component.html index 827804fa26..d7bd884818 100644 --- a/client/src/app/ui/modules/icon-container/components/icon-container/icon-container.component.html +++ b/client/src/app/ui/modules/icon-container/components/icon-container/icon-container.component.html @@ -17,6 +17,7 @@ [inline]="inline" [matTooltip]="iconTooltip" [matTooltipPosition]="iconTooltipPosition" + [matTooltipClass]="iconTooltipClass" [ngClass]="{ pointer: iconAction, mirrored: mirrored }" [ngStyle]="{ transform: getRotation() }" (click)="iconClick()" diff --git a/client/src/app/ui/modules/icon-container/components/icon-container/icon-container.component.ts b/client/src/app/ui/modules/icon-container/components/icon-container/icon-container.component.ts index 4ac6185de4..04d0ace021 100644 --- a/client/src/app/ui/modules/icon-container/components/icon-container/icon-container.component.ts +++ b/client/src/app/ui/modules/icon-container/components/icon-container/icon-container.component.ts @@ -73,6 +73,12 @@ export class IconContainerComponent { @Input() public iconTooltipPosition: TooltipPosition = `below`; + /** + * Optional string for tooltip class + */ + @Input() + public iconTooltipClass = ``; + /** * Uses a css class for nowrap */ diff --git a/client/src/meta b/client/src/meta index f8326caac3..cd9ea6b837 160000 --- a/client/src/meta +++ b/client/src/meta @@ -1 +1 @@ -Subproject commit f8326caac3e7554f531b0b3a9b7651fbc4fa33af +Subproject commit cd9ea6b83752b6739aafc7a3464e5d8823c4b170 From 36e0784ae1b1c87ab9dae8eda5d28bd73a21c3d2 Mon Sep 17 00:00:00 2001 From: "openslides-automation[bot]" <125256978+openslides-automation[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:18:50 +0200 Subject: [PATCH 3/5] Update meta repository (#3827) --- client/src/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/meta b/client/src/meta index cd9ea6b837..2e80fc0188 160000 --- a/client/src/meta +++ b/client/src/meta @@ -1 +1 @@ -Subproject commit cd9ea6b83752b6739aafc7a3464e5d8823c4b170 +Subproject commit 2e80fc0188c6d0288447c07458f15b031dd89ce5 From 6c31ea259f24dc6bb247341114c80db6d4fb47d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Tue, 9 Jul 2024 12:17:10 +0200 Subject: [PATCH 4/5] Update translations (#3832) --- .../base-poll-vote.component.html | 12 +- .../base-poll-vote.component.scss | 4 + .../participant-list-filter.service.ts | 54 +++---- .../account-list/account-list.component.html | 2 +- .../account-merge-dialog.component.html | 5 +- .../services/common/account-filter.service.ts | 89 +++++------ client/src/assets/i18n/de.po | 124 ++++++--------- client/src/assets/i18n/template-en.pot | 149 ++++++++++-------- 8 files changed, 218 insertions(+), 221 deletions(-) diff --git a/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.html b/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.html index 20bcb802ef..b8d2af3cee 100644 --- a/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.html +++ b/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.html @@ -33,20 +33,22 @@

{{ poll.option_ids.length }} {{ optionPluralLabel | translate }}
- + {{ 'Available votes' | translate }}: {{ getVotesAvailable(delegation) }}/{{ poll.max_votes_amount }} - ({{ 'At least' | translate }} +
+ {{ 'At least' | translate }} {{ poll.min_votes_amount }} - ) + {{ 'Votes' | translate }}
- ({{ 'At most' | translate }} +
+ {{ 'At most' | translate }} {{ poll.max_votes_per_option }} - {{ maxVotesPerOptionSuffix | translate }}) + {{ maxVotesPerOptionSuffix | translate }}
diff --git a/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.scss b/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.scss index 3cdac21197..68ca662eeb 100644 --- a/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.scss +++ b/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.scss @@ -216,3 +216,7 @@ margin-left: 100px; } } + +.text-right { + text-align: right; +} diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts index b18ce3254f..ea956b9e9b 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts @@ -69,82 +69,82 @@ export class ParticipantListFilterService extends BaseMeetingFilterListService[] = [ { property: `isPresentInMeeting`, - label: `Presence`, + label: _(`Presence`), options: [ - { condition: true, label: `Is present` }, - { condition: [false, null], label: `Is not present` } + { condition: true, label: _(`Is present`) }, + { condition: [false, null], label: _(`Is not present`) } ] }, { property: `is_active`, - label: `Active`, + label: _(`Active`), options: [ - { condition: true, label: `Is active` }, - { condition: [false, null], label: `Is not active` } + { condition: true, label: _(`Is active`) }, + { condition: [false, null], label: _(`Is not active`) } ] }, { property: `is_physical_person`, - label: `Committee`, + label: _(`Committee`), options: [ - { condition: true, label: `Is not a committee` }, - { condition: [false, null], label: `Is a committee` } + { condition: true, label: _(`Is not a committee`) }, + { condition: [false, null], label: _(`Is a committee`) } ] }, { property: `isLastEmailSent`, - label: `Last email sent`, + label: _(`Last email sent`), options: [ - { condition: true, label: `Got an email` }, - { condition: [false, null], label: `Didn't get an email` } + { condition: true, label: _(`Got an email`) }, + { condition: [false, null], label: _(`Didn't get an email`) } ] }, { property: `hasEmail`, - label: `Email address`, + label: _(`Email address`), options: [ - { condition: true, label: `Has an email address` }, - { condition: [false, null], label: `Has no email address` } + { condition: true, label: _(`Has an email address`) }, + { condition: [false, null], label: _(`Has no email address`) } ] }, { property: `hasMemberNumber`, - label: `Member number`, + label: _(`Membership number`), options: [ - { condition: true, label: `Has a member number` }, - { condition: [false, null], label: `Has no member number` } + { condition: true, label: _(`Has a membership number`) }, + { condition: [false, null], label: _(`Has no membership number`) } ] }, { property: `isLastLogin`, - label: `Last login`, + label: _(`Last login`), options: [ - { condition: true, label: `Has logged in` }, - { condition: [false, null], label: `Has not logged in yet` } + { condition: true, label: _(`Has logged in`) }, + { condition: [false, null], label: _(`Has not logged in yet`) } ] }, { property: `isVoteWeightOne`, - label: `Vote weight`, + label: _(`Vote weight`), options: [ - { condition: [false, null], label: `Has changed vote weight` }, - { condition: true, label: `Has unchanged vote weight` } + { condition: [false, null], label: _(`Has changed vote weight`) }, + { condition: true, label: _(`Has unchanged vote weight`) } ] }, { property: `gender`, - label: `Gender`, + label: _(`Gender`), options: [ { condition: GENDER_FITLERABLE[0], label: GENDERS[0] }, { condition: GENDER_FITLERABLE[1], label: GENDERS[1] }, { condition: GENDER_FITLERABLE[2], label: GENDERS[2] }, { condition: GENDER_FITLERABLE[3], label: GENDERS[3] }, - { condition: null, label: `not specified` } + { condition: null, label: _(`not specified`) } ] }, { property: `hasSamlId`, - label: `SSO`, + label: _(`SSO`), options: [ { condition: true, label: _(`Has SSO identification`) }, { condition: [false, null], label: _(`Has no SSO identification`) } diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html index cbc4eae45c..10d6f975ed 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html @@ -179,7 +179,7 @@

diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html index 394905c47e..5db9b2e3f8 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html @@ -1,4 +1,4 @@ -
{{ 'Merge users' | translate }}
+
{{ 'Merge accounts' | translate }}
{{ 'Please select a primary account.' | translate }}
@@ -89,7 +89,8 @@
{{ 'Attention: Not selected accounts will be merged and then deleted.' | translate }}
- {{ 'Warning: Data loss is possible, because two users are in the same meeting.' | translate }} + {{ 'Warning: Data loss is possible because accounts are in the same meeting.' | translate }} +
{{ 'Meetings effected:' | translate }} {{ countMeetingsCollide }}
diff --git a/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts b/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts index b3d224a6b9..db2105bf78 100644 --- a/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; import { map, Observable, Subscription } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; import { OML } from 'src/app/domain/definitions/organization-permission'; @@ -96,18 +97,18 @@ export class AccountFilterService extends BaseFilterListService { ? [ { property: `isInActiveMeeting`, - label: `Active meetings`, + label: _(`Active meetings`), options: [ - { condition: true, label: `Is in active meetings` }, - { condition: [false, null], label: `Is not in active meetings` } + { condition: true, label: _(`Is in active meetings`) }, + { condition: [false, null], label: _(`Is not in active meetings`) } ] }, { property: `isInArchivedMeeting`, - label: `Archived meetings`, + label: _(`Archived meetings`), options: [ - { condition: true, label: `Is in archived meetings` }, - { condition: [false, null], label: `Is not in archived meetings` } + { condition: true, label: _(`Is in archived meetings`) }, + { condition: [false, null], label: _(`Is not in archived meetings`) } ] } ] @@ -116,60 +117,60 @@ export class AccountFilterService extends BaseFilterListService { const staticFilterDefinitions: OsFilter[] = [ { property: `is_active`, - label: `Active`, + label: _(`Active`), options: [ - { condition: true, label: `Is active` }, - { condition: [false, null], label: `Is not active` } + { condition: true, label: _(`Is active`) }, + { condition: [false, null], label: _(`Is not active`) } ] }, { property: `is_physical_person`, - label: `Natural person`, + label: _(`Natural person`), options: [ - { condition: true, label: `Is a natural person` }, - { condition: [false, null], label: `Is no natural person` } + { condition: true, label: _(`Is a natural person`) }, + { condition: [false, null], label: _(`Is no natural person`) } ] }, { property: `gender`, - label: `Gender`, + label: _(`Gender`), options: [ - { condition: `female`, label: `female` }, - { condition: `male`, label: `male` }, - { condition: `diverse`, label: `diverse` }, - { condition: `non-binary`, label: `non-binary` }, - { condition: null, label: `not specified` } + { condition: `female`, label: _(`female`) }, + { condition: `male`, label: _(`male`) }, + { condition: `diverse`, label: _(`diverse`) }, + { condition: `non-binary`, label: _(`non-binary`) }, + { condition: null, label: _(`not specified`) } ] }, { property: `hasEmail`, - label: `Email address`, + label: _(`Email address`), options: [ - { condition: true, label: `Has an email address` }, - { condition: [false, null], label: `Has no email address` } + { condition: true, label: _(`Has an email address`) }, + { condition: [false, null], label: _(`Has no email address`) } ] }, { property: `isLastEmailSent`, - label: `Last email sent`, + label: _(`Last email sent`), options: [ - { condition: true, label: `Got an email` }, - { condition: [false, null], label: `Didn't get an email` } + { condition: true, label: _(`Got an email`) }, + { condition: [false, null], label: _(`Didn't get an email`) } ] }, { property: `isLastLogin`, - label: `Last login`, + label: _(`Last login`), options: [ - { condition: true, label: `Has logged in` }, - { condition: [false, null], label: `Has not logged in yet` } + { condition: true, label: _(`Has logged in`) }, + { condition: [false, null], label: _(`Has not logged in yet`) } ] }, { property: `organization_management_level`, - label: `Administration roles`, + label: _(`Administration roles`), options: [ - { condition: `superadmin`, label: `Superadmin` }, + { condition: `superadmin`, label: _(`Superadmin`) }, { condition: `can_manage_organization`, label: `Organization admin` }, { condition: `can_manage_users`, label: `Account admin` }, { condition: null, label: `No admin role` } @@ -177,48 +178,48 @@ export class AccountFilterService extends BaseFilterListService { }, { property: `isCommitteeManager`, - label: `Committee admin`, + label: _(`Committee admin`), options: [ - { condition: true, label: `Is committee admin` }, - { condition: [false, null], label: `No committee admin` } + { condition: true, label: _(`Is committee admin`) }, + { condition: [false, null], label: _(`No committee admin`) } ] }, { property: `isVoteWeightOne`, - label: `Vote weight`, + label: _(`Vote weight`), options: [ - { condition: [false, null], label: `Has changed vote weight` }, - { condition: true, label: `Has unchanged vote weight` } + { condition: [false, null], label: _(`Has changed vote weight`) }, + { condition: true, label: _(`Has unchanged vote weight`) } ] }, { property: `hasSamlId`, - label: `SSO`, + label: _(`SSO`), options: [ - { condition: true, label: `Has SSO identification` }, - { condition: [false, null], label: `Has no SSO identification` } + { condition: true, label: _(`Has SSO identification`) }, + { condition: [false, null], label: _(`Has no SSO identification`) } ] }, { property: `getDuplicateStatusInMap`, - label: `Duplicates`, + label: _(`Duplicates`), options: [ { condition: [DuplicateStatus.All, DuplicateStatus.SameName], - label: `Same first/last name` + label: _(`Same given and surname`) }, { condition: [DuplicateStatus.All, DuplicateStatus.SameEmail], - label: `Same email` + label: _(`Same email`) } ] }, { property: `hasMemberNumber`, - label: `Membership number`, + label: _(`Membership number`), options: [ - { condition: true, label: `Has a membership number` }, - { condition: [false, null], label: `Has no membership number` } + { condition: true, label: _(`Has a membership number`) }, + { condition: [false, null], label: _(`Has no membership number`) } ] } ]; diff --git a/client/src/assets/i18n/de.po b/client/src/assets/i18n/de.po index 9fe3ee1cf6..106093603f 100644 --- a/client/src/assets/i18n/de.po +++ b/client/src/assets/i18n/de.po @@ -1,6 +1,7 @@ # # Translators: # Joshua Sangmeister , 2024 +# Katharina , 2024 # Emanuel Schütze , 2024 # msgid "" @@ -111,9 +112,6 @@ msgstr "Zugangsdaten" msgid "Account" msgstr "Account" -msgid "Account admin" -msgstr "Accountadmin" - msgid "Account successfully assigned" msgstr "Account erfolgreich zugewiesen" @@ -562,9 +560,6 @@ msgstr "Soll dieser Projektor wirklich gelöscht werden?" msgid "Are you sure you want to delete this state?" msgstr "Soll dieser Status wirklich gelöscht werden?" -msgid "Are you sure you want to delete this statute paragraph?" -msgstr "Soll dieser Satzungsabschnitt wirklich gelöscht werden?" - msgid "Are you sure you want to delete this structure level?" msgstr "Soll diese Gliederungsebene wirklich gelöscht werden?" @@ -700,10 +695,10 @@ msgid "Assign" msgstr "Zuweisen" msgid "At least" -msgstr "Mindestens" +msgstr "mindestens" msgid "At most" -msgstr "Höchstens" +msgstr "höchstens" msgid "Attachments" msgstr "Anhänge" @@ -722,6 +717,11 @@ msgstr "" "Achtung: Zunächst unter [Einstellungen > Allgemein] die WLAN-Daten " "eintragen." +msgid "Attention: Not selected accounts will be merged and then deleted." +msgstr "" +"Achtung: Nicht ausgewählte Konten werden zusammengeführt und anschließend " +"gelöscht." + msgid "Attention: This action cannot be undone!" msgstr "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!" @@ -1033,9 +1033,6 @@ msgstr "Kann aufgrund von Fehlern nicht importieren werden" msgid "Can put oneself on the list of speakers" msgstr "Darf sich selbst auf die Redeliste setzen" -msgid "Can receive motions" -msgstr "Darf Anträge erhalten" - msgid "Can receive motions from committee" msgstr "Darf Anträge erhalten von Gremium" @@ -1229,12 +1226,6 @@ msgstr "Kandidat*innen" msgid "Cannot do that in demo mode!" msgstr "Diese Aktion ist im Demo-Modus nicht möglich!" -msgid "Cannot forward motions" -msgstr "Darf keine Anträge weiterleiten" - -msgid "Cannot receive motions" -msgstr "Darf keine Anträge erhalten" - msgid "Categories" msgstr "Sachgebiete" @@ -1890,9 +1881,6 @@ msgstr "Warteschlange bearbeiten" msgid "Edit state" msgstr "Status bearbeiten" -msgid "Edit statute paragraph" -msgstr "Satzungsabschnitt bearbeiten" - msgid "Edit tag" msgstr "Schlagwort bearbeiten" @@ -2179,9 +2167,6 @@ msgstr "Externe ID" msgid "Fallback" msgstr "Fallback" -msgid "Fallback mode" -msgstr "Fallback-Modus" - msgid "Favorites" msgstr "Favoriten" @@ -2272,9 +2257,6 @@ msgstr "Fürrede" msgid "Forward" msgstr "Weiterleiten" -msgid "Forward motions" -msgstr "Anträge weiterleiten" - msgid "Forward motions to" msgstr "Anträge weiterleiten an" @@ -2379,6 +2361,9 @@ msgstr "Gast" msgid "Has SSO identification" msgstr "Hat SSO-Kennung" +msgid "Has a membership number" +msgstr "Hat eine Mitgliedsnummer" + msgid "Has amendments" msgstr "Hat Änderungsanträge" @@ -2409,6 +2394,9 @@ msgstr "Hat keine E-Mail-Adresse" msgid "Has no identical motions" msgstr "Hat keine wortgleichen Anträge" +msgid "Has no membership number" +msgstr "Hat keine Mitgliedsnummer" + msgid "Has no speakers" msgstr "Keine Wortmeldungen vorhanden" @@ -2557,9 +2545,6 @@ msgstr "Anträge importieren" msgid "Import participants" msgstr "Teilnehmende importieren" -msgid "Import statute" -msgstr "Satzung importieren" - msgid "Import successful" msgstr "Import erfolgreich" @@ -2641,6 +2626,9 @@ msgstr "Ungültige Stimmen" msgid "Invite to conference room" msgstr "In den Konferenzraum einladen" +msgid "Is a committee" +msgstr "Ist ein Gremium" + msgid "Is a natural person" msgstr "Ist eine natürliche Person" @@ -2697,6 +2685,9 @@ msgstr "Ist kein Änderungsantrag und hat keine Änderungsanträge" msgid "Is no natural person" msgstr "Ist keine natürliche Person" +msgid "Is not a committee" +msgstr "Ist kein Gremium" + msgid "Is not a template" msgstr "Ist keine öffentliche Vorlage" @@ -2948,12 +2939,21 @@ msgstr "Veranstaltungstitel" msgid "Meetings" msgstr "Veranstaltungen" +msgid "Meetings effected:" +msgstr "Betroffene Veranstaltungen:" + msgid "Meetings selected" msgstr "Anzahl der ausgewählte Veranstaltungen" msgid "Membership number" msgstr "Mitgliedsnummer" +msgid "Merge" +msgstr "Zusammenführen" + +msgid "Merge accounts" +msgstr "Accounts zusammenführen" + msgid "Message" msgstr "Mitteilung" @@ -3193,9 +3193,6 @@ msgstr "Neuer Projektor" msgid "New state" msgstr "Neuer Status" -msgid "New statute paragraph" -msgstr "Neuer Satzungsabschnitt" - msgid "New tag" msgstr "Neues Schlagwort" @@ -3217,9 +3214,6 @@ msgstr "Nächste Zustände" msgid "No" msgstr "Nein" -msgid "No admin role" -msgstr "Keine Adminrolle" - msgid "No category" msgstr "Kein Sachgebiet" @@ -3289,12 +3283,6 @@ msgstr "Keine Ergebnisse gefunden." msgid "No results yet." msgstr "Noch keine Ergebnisse." -msgid "No statute paragraphs" -msgstr "Keine Satzungsabschnitte vorhanden" - -msgid "No structure level" -msgstr "Keine Gliederungsebene" - msgid "No verbose name is defined" msgstr "Es ist kein ausführlicher Name definiert" @@ -3404,6 +3392,9 @@ msgstr "Nummerierungssystem für Tagesordnungspunkte" msgid "OK" msgstr "OK" +msgid "OR" +msgstr "ODER" + msgid "Off" msgstr "Aus" @@ -3413,6 +3404,9 @@ msgstr "Offline-Modus" msgid "Ok" msgstr "Ok" +msgid "Old account of" +msgstr "Alter Account von" + msgid "Old password" msgstr "Altes Passwort" @@ -3498,9 +3492,6 @@ msgstr "Organisation" msgid "Organization Management Level changed" msgstr "Administrationsrolle geändert" -msgid "Organization admin" -msgstr "Organisationsadmin" - msgid "Organization language" msgstr "Organisationssprache" @@ -3722,6 +3713,9 @@ msgstr "Bitte geben Sie Ihr neues Passwort ein" msgid "Please join the conference room now!" msgstr "Bitte kommen Sie jetzt in den Konferenzraum!" +msgid "Please select a primary account." +msgstr "Bitte wählen Sie einen primären Account aus." + msgid "Please select a vote weight greater than or equal to 0.000001" msgstr "Bitte ein Stimmgewicht größer oder gleich 0,000001 wählen." @@ -3890,9 +3884,6 @@ msgstr "Begründung erforderlich zur Erstellung neuer Anträge" msgid "Receipt of contributions" msgstr "Eingang der Wortmeldungen" -msgid "Receive motions" -msgstr "Anträge erhalten" - msgid "Receive motions from" msgstr "Anträge erhalten von" @@ -4100,7 +4091,7 @@ msgstr "SSO-Kennung" msgid "Same email" msgstr "Gleiche E-Mail-Adresse" -msgid "Same first/last name" +msgid "Same given and surname" msgstr "Gleicher Vor- und Nachname" msgid "Save" @@ -4522,21 +4513,6 @@ msgstr "Status gesetzt auf {}" msgid "Statistics" msgstr "Statistiken" -msgid "Statute" -msgstr "Satzung" - -msgid "Statute amendment" -msgstr "Satzungsänderungsantrag" - -msgid "Statute amendment for" -msgstr "Satzungsänderungsantrag zu" - -msgid "Statute paragraph" -msgstr "Satzungsabschnitt" - -msgid "Statute paragraphs" -msgstr "Satzung" - msgid "Stop" msgstr "Beenden" @@ -5313,6 +5289,12 @@ msgstr "" "Achtung! Mindestens einer der ausgewählten Anträge hat Änderungsanträge, " "diese werden ebenfalls gelöscht. Möchten Sie trotzdem löschen?" +msgid "" +"Warning: Data loss is possible because accounts are in the same meeting." +msgstr "" +"Warnung: Es kann zu Datenverlusten kommen, da sich Accounts in der gleichen " +"Veranstaltung befinden." + msgid "Warning: This projector will be set to visible" msgstr "Warnung: Dieser Projektor wird auf sichtbar gesetzt" @@ -5449,16 +5431,6 @@ msgstr "" "Einstellungen einen anderen Arbeitsablauf als Standard fest und versuchen " "Sie erneut, den Arbeitsablauf zu löschen." -msgid "" -"You cannot delete the workflow as long as it is selected as default workflow" -" for new statute amendments in the settings. Please set another workflow as " -"default in the settings and try to delete the workflow again." -msgstr "" -"Sie können den Arbeitsablauf nicht löschen, solange er in den Einstellungen " -"voreingestellt für neue Satzungsänderungsanträge ist. Bitte legen Sie " -"zunächst in den Einstellungen einen anderen Arbeitsablauf als Standard fest " -"und versuchen Sie erneut, den Arbeitsablauf zu löschen." - msgid "You cannot delete yourself." msgstr "Sie dürfen sich nicht selbst löschen." @@ -5794,6 +5766,9 @@ msgstr "Gruppe(n) entfernen" msgid "represented by" msgstr "vertreten durch" +msgid "represented by old account of" +msgstr "vertreten durch alten Account von" + msgid "reset" msgstr "zurückgesetzt" @@ -5833,6 +5808,9 @@ msgstr "Version" msgid "votes per candidate" msgstr "Stimmen pro Kandidat*in" +msgid "votes per option" +msgstr "Stimmen pro Option" + msgid "will be created" msgstr "werden erstellt" diff --git a/client/src/assets/i18n/template-en.pot b/client/src/assets/i18n/template-en.pot index 0381acf928..b1221e104c 100644 --- a/client/src/assets/i18n/template-en.pot +++ b/client/src/assets/i18n/template-en.pot @@ -94,9 +94,6 @@ msgstr "" msgid "Account" msgstr "" -msgid "Account admin" -msgstr "" - msgid "Account successfully assigned" msgstr "" @@ -234,6 +231,7 @@ msgid "" "affect the import." msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Administration roles" msgstr "" @@ -418,6 +416,7 @@ msgstr "" msgid "Archived" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Archived meetings" msgstr "" @@ -531,9 +530,6 @@ msgstr "" msgid "Are you sure you want to delete this state?" msgstr "" -msgid "Are you sure you want to delete this statute paragraph?" -msgstr "" - #: /app/src/app/site/pages/meetings/pages/participants/pages/structure-levels/components/structure-level-list/structure-level-list.component.ts msgid "Are you sure you want to delete this structure level?" msgstr "" @@ -671,6 +667,10 @@ msgstr "" msgid "Attention: First enter the wifi data in [Settings > General]" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html +msgid "Attention: Not selected accounts will be merged and then deleted." +msgstr "" + msgid "Attention: This action cannot be undone!" msgstr "" @@ -952,9 +952,6 @@ msgstr "" msgid "Can put oneself on the list of speakers" msgstr "" -msgid "Can receive motions" -msgstr "" - msgid "Can receive motions from committee" msgstr "" @@ -1128,12 +1125,6 @@ msgstr "" msgid "Cannot do that in demo mode!" msgstr "" -msgid "Cannot forward motions" -msgstr "" - -msgid "Cannot receive motions" -msgstr "" - msgid "Categories" msgstr "" @@ -1641,6 +1632,7 @@ msgstr "" msgid "Designates whether this user is in the room." msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Didn't get an email" msgstr "" @@ -1723,6 +1715,7 @@ msgstr "" msgid "Duplicate from" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Duplicates" msgstr "" @@ -1795,9 +1788,6 @@ msgstr "" msgid "Edit state" msgstr "" -msgid "Edit statute paragraph" -msgstr "" - msgid "Edit tag" msgstr "" @@ -1837,6 +1827,7 @@ msgstr "" msgid "Email" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Email address" msgstr "" @@ -2061,10 +2052,6 @@ msgstr "" msgid "Fallback" msgstr "" -#: /app/src/app/site/services/autoupdate/autoupdate-communication.service.ts -msgid "Fallback mode" -msgstr "" - msgid "Favorites" msgstr "" @@ -2158,9 +2145,6 @@ msgstr "" msgid "Forward" msgstr "" -msgid "Forward motions" -msgstr "" - msgid "Forward motions to" msgstr "" @@ -2227,6 +2211,7 @@ msgstr "" msgid "Go to line" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Got an email" msgstr "" @@ -2263,12 +2248,18 @@ msgstr "" msgid "Has SSO identification" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts +msgid "Has a membership number" +msgstr "" + msgid "Has amendments" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Has an email address" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Has changed vote weight" msgstr "" @@ -2283,12 +2274,14 @@ msgstr "" msgid "Has identical motions" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Has logged in" msgstr "" msgid "Has no SSO identification" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Has no email address" msgstr "" @@ -2296,9 +2289,14 @@ msgstr "" msgid "Has no identical motions" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts +msgid "Has no membership number" +msgstr "" + msgid "Has no speakers" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Has not logged in yet" msgstr "" @@ -2312,6 +2310,7 @@ msgstr "" msgid "Has speakers" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Has unchanged vote weight" msgstr "" @@ -2449,9 +2448,6 @@ msgstr "" msgid "Import participants" msgstr "" -msgid "Import statute" -msgstr "" - msgid "Import successful" msgstr "" @@ -2539,6 +2535,10 @@ msgstr "" msgid "Invite to conference room" msgstr "" +#: /app/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts +msgid "Is a committee" +msgstr "" + msgid "Is a natural person" msgstr "" @@ -2571,15 +2571,18 @@ msgstr "" msgid "Is candidate" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Is committee admin" msgstr "" msgid "Is favorite" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Is in active meetings" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Is in archived meetings" msgstr "" @@ -2592,9 +2595,14 @@ msgstr "" msgid "Is no natural person" msgstr "" +#: /app/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts +msgid "Is not a committee" +msgstr "" + msgid "Is not a template" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Is not active" msgstr "" @@ -2604,9 +2612,11 @@ msgstr "" msgid "Is not favorite" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Is not in active meetings" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Is not in archived meetings" msgstr "" @@ -2842,6 +2852,10 @@ msgstr "" msgid "Meetings" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html +msgid "Meetings effected:" +msgstr "" + msgid "Meetings selected" msgstr "" @@ -2850,6 +2864,14 @@ msgstr "" msgid "Membership number" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html +msgid "Merge" +msgstr "" + +#: /app/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html +msgid "Merge accounts" +msgstr "" + msgid "Message" msgstr "" @@ -3102,9 +3124,6 @@ msgstr "" msgid "New state" msgstr "" -msgid "New statute paragraph" -msgstr "" - msgid "New tag" msgstr "" @@ -3126,9 +3145,6 @@ msgstr "" msgid "No" msgstr "" -msgid "No admin role" -msgstr "" - msgid "No category" msgstr "" @@ -3144,6 +3160,7 @@ msgstr "" msgid "No comment" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "No committee admin" msgstr "" @@ -3199,13 +3216,6 @@ msgstr "" msgid "No results yet." msgstr "" -msgid "No statute paragraphs" -msgstr "" - -#: /app/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts -msgid "No structure level" -msgstr "" - msgid "No verbose name is defined" msgstr "" @@ -3310,6 +3320,10 @@ msgstr "" msgid "OK" msgstr "" +#: /app/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.html +msgid "OR" +msgstr "" + #: /app/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts msgid "Off" msgstr "" @@ -3320,6 +3334,10 @@ msgstr "" msgid "Ok" msgstr "" +#: /app/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts +msgid "Old account of" +msgstr "" + msgid "Old password" msgstr "" @@ -3405,9 +3423,6 @@ msgstr "" msgid "Organization Management Level changed" msgstr "" -msgid "Organization admin" -msgstr "" - msgid "Organization language" msgstr "" @@ -3633,6 +3648,10 @@ msgstr "" msgid "Please join the conference room now!" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html +msgid "Please select a primary account." +msgstr "" + #: /app/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.html msgid "Please select a vote weight greater than or equal to 0.000001" msgstr "" @@ -3805,9 +3824,6 @@ msgstr "" msgid "Receipt of contributions" msgstr "" -msgid "Receive motions" -msgstr "" - msgid "Receive motions from" msgstr "" @@ -4008,6 +4024,7 @@ msgstr "" msgid "Rows with warnings" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "SSO" msgstr "" @@ -4018,10 +4035,12 @@ msgstr "" msgid "SSO identification" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Same email" msgstr "" -msgid "Same first/last name" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts +msgid "Same given and surname" msgstr "" msgid "Save" @@ -4442,21 +4461,6 @@ msgstr "" msgid "Statistics" msgstr "" -msgid "Statute" -msgstr "" - -msgid "Statute amendment" -msgstr "" - -msgid "Statute amendment for" -msgstr "" - -msgid "Statute paragraph" -msgstr "" - -msgid "Statute paragraphs" -msgstr "" - msgid "Stop" msgstr "" @@ -4534,6 +4538,7 @@ msgstr "" msgid "Summary of changes:" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts msgid "Superadmin" msgstr "" @@ -5177,6 +5182,10 @@ msgid "" "deleted as well. Do you want to delete anyway?" msgstr "" +#: /app/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-merge-dialog/account-merge-dialog.component.html +msgid "Warning: Data loss is possible because accounts are in the same meeting." +msgstr "" + msgid "Warning: This projector will be set to visible" msgstr "" @@ -5297,12 +5306,6 @@ msgid "" "default in the settings and try to delete the workflow again." msgstr "" -msgid "" -"You cannot delete the workflow as long as it is selected as default " -"workflow for new statute amendments in the settings. Please set another " -"workflow as default in the settings and try to delete the workflow again." -msgstr "" - msgid "You cannot delete yourself." msgstr "" @@ -5636,6 +5639,10 @@ msgstr "" msgid "represented by" msgstr "" +#: /app/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts +msgid "represented by old account of" +msgstr "" + msgid "reset" msgstr "" @@ -5675,6 +5682,10 @@ msgstr "" msgid "votes per candidate" msgstr "" +#: /app/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.ts +msgid "votes per option" +msgstr "" + msgid "will be created" msgstr "" From e5e295f5b5ddf31a9724a5defc98139ac180f45d Mon Sep 17 00:00:00 2001 From: Elblinator <69210919+Elblinator@users.noreply.github.com> Date: Tue, 9 Jul 2024 13:52:29 +0200 Subject: [PATCH 5/5] Cleanup of linter warnings (#3824) * add return types * Change warn to Error --- client/.eslintrc.js | 2 +- .../gateways/error-mapping/error-map-utils.ts | 2 +- .../pdf-document.service.ts | 4 ++-- .../pdf-document.service/pdf-worker.worker.ts | 2 +- .../gateways/repositories/base-repository.ts | 2 +- .../chat-group-repository.service.ts | 4 ++-- .../chat-message-repository.service.ts | 4 ++-- .../committee-repository.service.ts | 11 +++++---- .../groups/group-repository.service.ts | 4 ++-- .../list-of-speakers-repository.service.ts | 4 ++-- .../mediafile-repository.service.ts | 11 +++++---- .../meeting-repository.service.ts | 19 +++++++++++---- .../meeting-user-repository.service.ts | 2 +- .../motion-block-repository.service.ts | 5 ++-- .../motion-category-repository.service.ts | 4 ++-- ...hange-recommendation-repository.service.ts | 4 ++-- .../motion-comment-repository.service.ts | 4 ++-- ...tion-comment-section-repository.service.ts | 7 +++--- .../motion-editor-repository.service.ts | 3 ++- .../motion-repository.service.ts | 24 ++++++++++++------- .../motion-state-repository.service.ts | 4 ++-- .../motion-submitter-repository.service.ts | 2 +- .../motion-workflow-repository.service.ts | 4 ++-- ...orking-group-speaker-repository.service.ts | 3 ++- .../personal-note-repository.service.ts | 5 ++-- .../app/gateways/repositories/motions/util.ts | 2 +- .../organization-repository.service.ts | 5 ++-- .../option-repository.service.ts | 4 ++-- .../vote-repository.service.ts | 4 ++-- .../projection-repository.service.ts | 8 +++---- .../projector-countdown-repository.service.ts | 4 ++-- .../projector-message-repository.service.ts | 4 ++-- .../projector-repository.service.ts | 4 ++-- .../speakers/speaker-repository.service.ts | 4 ++-- .../tags/tag-repository.service.ts | 4 ++-- .../topics/topic-repository.service.ts | 14 +++++++---- .../annotations/data-transaction.ts | 2 +- .../infrastructure/errors/process.error.ts | 10 ++++++-- .../src/app/infrastructure/utils/functions.ts | 6 ++--- .../utils/import/base-import-handler.ts | 2 +- .../utils/import/base-main-import-handler.ts | 17 +++++++++---- .../utils/import/base-side-import-handler.ts | 8 +++---- .../utils/import/import-step.ts | 2 +- .../static-additional-import-handler.ts | 8 +++---- .../import/static-main-import-handler.ts | 2 +- .../utils/import/users/user-import-helper.ts | 2 +- .../utils/validators/is-unique-among.ts | 2 +- .../base-filter-list.service.ts | 2 +- .../base-backend-import.service.ts | 2 +- .../base-import.service.ts | 4 ++-- .../app/site/base/base-list-view.component.ts | 4 ++-- .../base-sort-list.service.ts | 2 +- .../global-headbar/global-headbar.service.ts | 2 +- .../wait-for-action-banner.component.ts | 2 +- .../wait-for-action-dialog.service.ts | 4 ++-- .../list-of-speakers-entry.component.ts | 2 +- .../poll-cannot-vote-message.component.ts | 2 +- .../services/active-meeting.subscription.ts | 2 +- 58 files changed, 165 insertions(+), 121 deletions(-) diff --git a/client/.eslintrc.js b/client/.eslintrc.js index d8ccee6133..7fe217ba18 100644 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -67,7 +67,7 @@ module.exports = { '@typescript-eslint/adjacent-overload-signatures': ['error'], '@typescript-eslint/ban-types': ['error'], '@typescript-eslint/explicit-member-accessibility': ['error'], - '@typescript-eslint/explicit-function-return-type': ['warn'], + '@typescript-eslint/explicit-function-return-type': ['error'], 'jsdoc/require-example': ['off'], 'jsdoc/newline-after-description': ['off'], diff --git a/client/src/app/gateways/error-mapping/error-map-utils.ts b/client/src/app/gateways/error-mapping/error-map-utils.ts index 8b06a5e4f1..0d8fe5670d 100644 --- a/client/src/app/gateways/error-mapping/error-map-utils.ts +++ b/client/src/app/gateways/error-mapping/error-map-utils.ts @@ -40,7 +40,7 @@ const VoteServiceErrorMap: ErrorMap = new ErrorMap([ [/is not allowed to vote/, _(`You do not have the permission to vote.`)] ]); -const MatchAllErrorMap: ErrorMap = new ErrorMap([[/(.*)/, input => new MapError(input)]]); +const MatchAllErrorMap: ErrorMap = new ErrorMap([[/(.*)/, (input): MapError => new MapError(input)]]); const MeetingCreateErrorMap: ErrorMap = new ErrorMap([ [ /Only one of start_time and end_time is not allowed./, diff --git a/client/src/app/gateways/export/pdf-document.service/pdf-document.service.ts b/client/src/app/gateways/export/pdf-document.service/pdf-document.service.ts index b5d6889a82..664cf055cc 100644 --- a/client/src/app/gateways/export/pdf-document.service/pdf-document.service.ts +++ b/client/src/app/gateways/export/pdf-document.service/pdf-document.service.ts @@ -176,8 +176,8 @@ class PdfCreator { this._document = config.document; this._filename = config.filename; this._loadFonts = config.loadFonts; - this._loadImages = config.loadImages || (() => ({})); - this._createVfs = config.createVfs || (() => ({})); + this._loadImages = config.loadImages || ((): any => ({})); + this._createVfs = config.createVfs || ((): any => ({})); this._progressService = config.progressService; this._progressSnackBarService = config.progressSnackBarService; this._settings = config.settings; diff --git a/client/src/app/gateways/export/pdf-document.service/pdf-worker.worker.ts b/client/src/app/gateways/export/pdf-document.service/pdf-worker.worker.ts index 0f0cfa146f..3b11cee8e1 100644 --- a/client/src/app/gateways/export/pdf-document.service/pdf-worker.worker.ts +++ b/client/src/app/gateways/export/pdf-document.service/pdf-worker.worker.ts @@ -61,7 +61,7 @@ function addPageNumbers(data: any): void { // to allow page numbers in every page, after the initial "%PAGENR%" placeholder was reset let countPageNumbers = false; - data.doc.footer = (currentPage: any, pageCount: any) => { + data.doc.footer = (currentPage: any, pageCount: any): any => { const footer = data.doc.tmpfooter; // if the tmpfooter starts with an image, the pagenumber will be found in column 1 diff --git a/client/src/app/gateways/repositories/base-repository.ts b/client/src/app/gateways/repositories/base-repository.ts index 6d27313b8d..a9572275d9 100644 --- a/client/src/app/gateways/repositories/base-repository.ts +++ b/client/src/app/gateways/repositories/base-repository.ts @@ -680,7 +680,7 @@ export abstract class BaseRepository { + get: (target: V, property): any => { // target is our viewModel and property the requested value: viewModel[property] let result: any; // This is what we have to resolve: viewModel[property] -> result const _model: M = target.getModel(); diff --git a/client/src/app/gateways/repositories/chat/chat-group-repository.service/chat-group-repository.service.ts b/client/src/app/gateways/repositories/chat/chat-group-repository.service/chat-group-repository.service.ts index 3c9bc31354..ead425479c 100644 --- a/client/src/app/gateways/repositories/chat/chat-group-repository.service/chat-group-repository.service.ts +++ b/client/src/app/gateways/repositories/chat/chat-group-repository.service/chat-group-repository.service.ts @@ -16,8 +16,8 @@ export class ChatGroupRepositoryService extends BaseMeetingRelatedRepository (plural ? `Chat groups` : `Chat group`); - public getTitle = (viewModel: ViewChatGroup) => viewModel.name; + public getVerboseName = (plural?: boolean): string => (plural ? `Chat groups` : `Chat group`); + public getTitle = (viewModel: ViewChatGroup): string => viewModel.name; public create(...data: Partial[]): Promise { const payload: any[] = data.map(partialChatGroup => partialChatGroup); diff --git a/client/src/app/gateways/repositories/chat/chat-message-repository.service/chat-message-repository.service.ts b/client/src/app/gateways/repositories/chat/chat-message-repository.service/chat-message-repository.service.ts index 735d6fe759..d12e880083 100644 --- a/client/src/app/gateways/repositories/chat/chat-message-repository.service/chat-message-repository.service.ts +++ b/client/src/app/gateways/repositories/chat/chat-message-repository.service/chat-message-repository.service.ts @@ -19,8 +19,8 @@ export class ChatMessageRepositoryService extends BaseMeetingRelatedRepository (plural ? `Chat messages` : `Chat message`); - public getTitle = () => `No name`; + public getVerboseName = (plural?: boolean): string => (plural ? `Chat messages` : `Chat message`); + public getTitle = (): string => `No name`; public create(...data: any[]): Promise { const payload = data.map(partialChatMessage => partialChatMessage); diff --git a/client/src/app/gateways/repositories/committee-repository.service.ts b/client/src/app/gateways/repositories/committee-repository.service.ts index c5367fe6f0..93c5f47da5 100644 --- a/client/src/app/gateways/repositories/committee-repository.service.ts +++ b/client/src/app/gateways/repositories/committee-repository.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { ViewUser } from 'src/app/site/pages/meetings/view-models/view-user'; import { ORGANIZATION_ID } from 'src/app/site/pages/organization/services/organization.service'; import { BackendImportRawPreview } from 'src/app/ui/modules/import-list/definitions/backend-import-preview'; @@ -27,9 +28,9 @@ export class CommitteeRepositoryService extends BaseRepository viewCommittee.name; + public getTitle = (viewCommittee: ViewCommittee): string => viewCommittee.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Committees` : `Committee`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Committees` : `Committee`); public override getFieldsets(): Fieldsets { const nameFields: TypedFieldset = [`name`]; @@ -61,7 +62,7 @@ export class CommitteeRepositoryService extends BaseRepository { - const createPayload = (id: Id, model: Partial) => ({ + const createPayload = (id: Id, model: Partial): any => ({ id, name: model.name, default_meeting_id: model.default_meeting_id, @@ -107,8 +108,8 @@ export class CommitteeRepositoryService extends BaseRepository this.userRepo.getViewModel(id); - viewModel.canAccess = () => + viewModel.getViewUser = (id: Id): ViewUser => this.userRepo.getViewModel(id); + viewModel.canAccess = (): boolean => this.operator.hasCommitteePermissions(model.id, CML.can_manage) || this.operator.hasOrganizationPermissions(OML.can_manage_users) || this.operator.isInCommitteesNonAdminCheck(model); diff --git a/client/src/app/gateways/repositories/groups/group-repository.service.ts b/client/src/app/gateways/repositories/groups/group-repository.service.ts index ff145fa97b..d9b99e5e36 100644 --- a/client/src/app/gateways/repositories/groups/group-repository.service.ts +++ b/client/src/app/gateways/repositories/groups/group-repository.service.ts @@ -26,9 +26,9 @@ export class GroupRepositoryService extends BaseMeetingRelatedRepository viewGroup.name; + public getTitle = (viewGroup: ViewGroup): string => viewGroup.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Groups` : `Group`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Groups` : `Group`); public getNameForIds(...ids: number[]): string { return this.getSortedViewModelList() diff --git a/client/src/app/gateways/repositories/list-of-speakers/list-of-speakers-repository.service.ts b/client/src/app/gateways/repositories/list-of-speakers/list-of-speakers-repository.service.ts index 66d6e4eb2f..124ec10c58 100644 --- a/client/src/app/gateways/repositories/list-of-speakers/list-of-speakers-repository.service.ts +++ b/client/src/app/gateways/repositories/list-of-speakers/list-of-speakers-repository.service.ts @@ -21,10 +21,10 @@ export class ListOfSpeakersRepositoryService extends BaseMeetingRelatedRepositor super(repositoryServiceCollector, ListOfSpeakers); } - public getVerboseName = (plural = false) => + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Lists of speakers` : `List of speakers`); - public override getTitle = (viewListOfSpeakers: ViewListOfSpeakers) => { + public override getTitle = (viewListOfSpeakers: ViewListOfSpeakers): string => { if (viewListOfSpeakers?.content_object) { return viewListOfSpeakers.content_object.getListOfSpeakersTitle(); } diff --git a/client/src/app/gateways/repositories/mediafiles/mediafile-repository.service.ts b/client/src/app/gateways/repositories/mediafiles/mediafile-repository.service.ts index 59f1a7430a..06d9c05ecd 100644 --- a/client/src/app/gateways/repositories/mediafiles/mediafile-repository.service.ts +++ b/client/src/app/gateways/repositories/mediafiles/mediafile-repository.service.ts @@ -27,12 +27,13 @@ export class MediafileRepositoryService extends BaseRepository this.languageCollator.compare(a.title, b.title); + this.viewModelSortFn = (a: ViewMediafile, b: ViewMediafile): number => + this.languageCollator.compare(a.title, b.title); } - public getTitle = (viewMediafile: ViewMediafile) => viewMediafile.title; + public getTitle = (viewMediafile: ViewMediafile): string => viewMediafile.title; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Files` : `File`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Files` : `File`); public override getFieldsets(): Fieldsets { const fileSelectionFields: TypedFieldset = [`title`, `is_directory`]; @@ -117,8 +118,8 @@ export class MediafileRepositoryService extends BaseRepository this.activeMeetingIdService.meetingId; - viewModel.getProjectedContentObjects = () => + viewModel.getEnsuredActiveMeetingId = (): number => this.activeMeetingIdService.meetingId; + viewModel.getProjectedContentObjects = (): string[] => this.projectionRepo.getViewModelList().map(p => p.content_object_id); return viewModel; } diff --git a/client/src/app/gateways/repositories/meeting-repository.service.ts b/client/src/app/gateways/repositories/meeting-repository.service.ts index 751f6fa724..f9668cfdf9 100644 --- a/client/src/app/gateways/repositories/meeting-repository.service.ts +++ b/client/src/app/gateways/repositories/meeting-repository.service.ts @@ -92,11 +92,16 @@ export class MeetingRepositoryService extends BaseRepository viewMeeting.name; + public getTitle = (viewMeeting: ViewMeeting): string => viewMeeting.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Meetings` : `Meeting`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Meetings` : `Meeting`); - public getProjectorTitle = (_: ViewMeeting, projection: Projection) => { + public getProjectorTitle = ( + _: ViewMeeting, + projection: Projection + ): { + title: string; + } => { let title: string; switch (projection.type as MeetingProjectionType) { @@ -245,7 +250,11 @@ export class MeetingRepositoryService extends BaseRepository this.getProjectorTitle(viewModel, projection); + viewModel.getProjectorTitle = ( + projection: Projection + ): { + title: string; + } => this.getProjectorTitle(viewModel, projection); return viewModel; } @@ -312,7 +321,7 @@ export class MeetingRepositoryService extends BaseRepository { + const getNextGroupIds = (groupIds: Id[]): number[] => { const index = groupIds.findIndex(id => groupId === id); if (index > -1) { groupIds.splice(index, 1); diff --git a/client/src/app/gateways/repositories/meeting_user/meeting-user-repository.service.ts b/client/src/app/gateways/repositories/meeting_user/meeting-user-repository.service.ts index 4498ec3608..1ff8b96974 100644 --- a/client/src/app/gateways/repositories/meeting_user/meeting-user-repository.service.ts +++ b/client/src/app/gateways/repositories/meeting_user/meeting-user-repository.service.ts @@ -66,7 +66,7 @@ export class MeetingUserRepositoryService extends BaseMeetingRelatedRepository viewUser.user?.getTitle() ?? `Unknown`; + public getTitle = (viewUser: ViewMeetingUser): string => viewUser.user?.getTitle() ?? `Unknown`; public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Participants` : `Participant`); diff --git a/client/src/app/gateways/repositories/motions/motion-block-repository.service/motion-block-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-block-repository.service/motion-block-repository.service.ts index 6c94552ac5..9ad15ccad5 100644 --- a/client/src/app/gateways/repositories/motions/motion-block-repository.service/motion-block-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-block-repository.service/motion-block-repository.service.ts @@ -42,9 +42,10 @@ export class MotionBlockRepositoryService extends BaseAgendaItemAndListOfSpeaker return this.sendBulkActionToBackend(MotionBlockAction.DELETE, payload); } - public getTitle = (viewMotionBlock: ViewMotionBlock) => viewMotionBlock.title; + public getTitle = (viewMotionBlock: ViewMotionBlock): string => viewMotionBlock.title; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Motion blocks` : `Motion block`); + public getVerboseName = (plural = false): string => + this.translate.instant(plural ? `Motion blocks` : `Motion block`); /** * Sets the default sorting (e.g. in dropdowns and for new users) to 'title' diff --git a/client/src/app/gateways/repositories/motions/motion-category-repository.service/motion-category-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-category-repository.service/motion-category-repository.service.ts index b0b1625856..abf55dd537 100644 --- a/client/src/app/gateways/repositories/motions/motion-category-repository.service/motion-category-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-category-repository.service/motion-category-repository.service.ts @@ -52,12 +52,12 @@ export class MotionCategoryRepositoryService extends BaseMeetingRelatedRepositor }; } - public getTitle = (viewMotionCategory: ViewMotionCategory) => + public getTitle = (viewMotionCategory: ViewMotionCategory): string => viewMotionCategory.prefix ? viewMotionCategory.prefix + ` - ` + viewMotionCategory.name : viewMotionCategory.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Categories` : `Category`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Categories` : `Category`); /** * Updates a categories numbering. diff --git a/client/src/app/gateways/repositories/motions/motion-change-recommendation-repository.service/motion-change-recommendation-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-change-recommendation-repository.service/motion-change-recommendation-repository.service.ts index a7a59435be..d525f5a1e8 100644 --- a/client/src/app/gateways/repositories/motions/motion-change-recommendation-repository.service/motion-change-recommendation-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-change-recommendation-repository.service/motion-change-recommendation-repository.service.ts @@ -18,9 +18,9 @@ export class MotionChangeRecommendationRepositoryService extends BaseMeetingRela super(repositoryServiceCollector, MotionChangeRecommendation); } - public getTitle = () => this.getVerboseName(); + public getTitle = (): string => this.getVerboseName(); - public getVerboseName = (plural = false) => + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Change recommendations` : `Change recommendation`); public create(model: Partial, firstLine = 1): Promise { diff --git a/client/src/app/gateways/repositories/motions/motion-comments/motion-comment-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-comments/motion-comment-repository.service.ts index 297f08c77f..b6ff9846e6 100644 --- a/client/src/app/gateways/repositories/motions/motion-comments/motion-comment-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-comments/motion-comment-repository.service.ts @@ -15,9 +15,9 @@ export class MotionCommentRepositoryService extends BaseMeetingRelatedRepository super(repositoryServiceCollector, MotionComment); } - public getTitle = () => `Comment`; + public getTitle = (): string => `Comment`; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Comments` : `Comment`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Comments` : `Comment`); public async create(partialModel: Partial): Promise { const payload = { diff --git a/client/src/app/gateways/repositories/motions/motion-comments/motion-comment-section-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-comments/motion-comment-section-repository.service.ts index 013f6ed941..ec1daec495 100644 --- a/client/src/app/gateways/repositories/motions/motion-comments/motion-comment-section-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-comments/motion-comment-section-repository.service.ts @@ -17,7 +17,7 @@ export class MotionCommentSectionRepositoryService extends BaseMeetingRelatedRep public constructor(repositoryServiceCollector: RepositoryMeetingServiceCollectorService) { super(repositoryServiceCollector, MotionCommentSection); - this.viewModelSortFn = (a: ViewMotionCommentSection, b: ViewMotionCommentSection) => { + this.viewModelSortFn = (a: ViewMotionCommentSection, b: ViewMotionCommentSection): number => { if (a.weight === b.weight) { return a.id - b.id; } else { @@ -26,9 +26,10 @@ export class MotionCommentSectionRepositoryService extends BaseMeetingRelatedRep }; } - public getTitle = (viewMotionCommentSection: ViewMotionCommentSection) => viewMotionCommentSection.name; + public getTitle = (viewMotionCommentSection: ViewMotionCommentSection): string => viewMotionCommentSection.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Comment sections` : `Comment section`); + public getVerboseName = (plural = false): string => + this.translate.instant(plural ? `Comment sections` : `Comment section`); public async create(partialModel: Partial): Promise { const payload = { diff --git a/client/src/app/gateways/repositories/motions/motion-editor-repository/motion-editor-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-editor-repository/motion-editor-repository.service.ts index 506f77c7ff..db10c4ac63 100644 --- a/client/src/app/gateways/repositories/motions/motion-editor-repository/motion-editor-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-editor-repository/motion-editor-repository.service.ts @@ -19,5 +19,6 @@ export class MotionEditorRepositoryService extends BaseMotionMeetingUserReposito super(repositoryServiceCollector, MotionEditor, MotionEditorAction); } - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Motion editors` : `Motion editor`); + public getVerboseName = (plural = false): string => + this.translate.instant(plural ? `Motion editors` : `Motion editor`); } diff --git a/client/src/app/gateways/repositories/motions/motion-repository.service/motion-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-repository.service/motion-repository.service.ts index c000293387..7e9b5af1c7 100644 --- a/client/src/app/gateways/repositories/motions/motion-repository.service/motion-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-repository.service/motion-repository.service.ts @@ -233,7 +233,7 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont return this.createAction(AmendmentAction.CREATE_PARAGRAPHBASED_AMENDMENT, payload); } - public getTitle = (viewMotion: ViewMotion) => { + public getTitle = (viewMotion: ViewMotion): string => { if (viewMotion.number) { return `${viewMotion.number}: ${viewMotion.title}`; } else { @@ -241,7 +241,7 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont } }; - public getNumberOrTitle = (viewMotion: ViewMotion) => { + public getNumberOrTitle = (viewMotion: ViewMotion): string => { if (viewMotion.number) { return viewMotion.number; } else { @@ -249,7 +249,7 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont } }; - public override getAgendaSlideTitle = (viewMotion: ViewMotion) => { + public override getAgendaSlideTitle = (viewMotion: ViewMotion): string => { const numberPrefix = this.agendaItemRepo.getItemNumberPrefix(viewMotion); // if the number is set, the title will be 'Motion '. if (viewMotion.number) { @@ -259,7 +259,7 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont } }; - public override getAgendaListTitle = (viewMotion: ViewMotion) => { + public override getAgendaListTitle = (viewMotion: ViewMotion): AgendaListTitle => { const numberPrefix = this.agendaItemRepo.getItemNumberPrefix(viewMotion); // Append the verbose name only, if not the special format 'Motion ' is used. let title: string; @@ -276,9 +276,14 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont return agendaTitle; }; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Motions` : `Motion`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Motions` : `Motion`); - public getProjectorTitle = (viewMotion: ViewMotion) => { + public getProjectorTitle = ( + viewMotion: ViewMotion + ): { + title: string; + subtitle: string; + } => { const subtitle = viewMotion.agenda_item && viewMotion.agenda_item.comment ? viewMotion.agenda_item.comment : undefined; return { title: this.getTitle(viewMotion), subtitle }; @@ -287,8 +292,11 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont protected override createViewModel(model: Motion): ViewMotion { const viewModel = super.createViewModel(model); - viewModel.getNumberOrTitle = () => this.getNumberOrTitle(viewModel); - viewModel.getProjectorTitle = () => this.getProjectorTitle(viewModel); + viewModel.getNumberOrTitle = (): string => this.getNumberOrTitle(viewModel); + viewModel.getProjectorTitle = (): { + title: string; + subtitle: string; + } => this.getProjectorTitle(viewModel); return viewModel; } diff --git a/client/src/app/gateways/repositories/motions/motion-state-repository.service/motion-state-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-state-repository.service/motion-state-repository.service.ts index 4698029573..33d0208db6 100644 --- a/client/src/app/gateways/repositories/motions/motion-state-repository.service/motion-state-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-state-repository.service/motion-state-repository.service.ts @@ -16,9 +16,9 @@ export class MotionStateRepositoryService extends BaseMeetingRelatedRepository viewMotionState.name; + public getTitle = (viewMotionState: ViewMotionState): string => viewMotionState.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Workflows` : `Workflow`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Workflows` : `Workflow`); public async create(model: Partial): Promise { const payload = { diff --git a/client/src/app/gateways/repositories/motions/motion-submitter-repository.service/motion-submitter-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-submitter-repository.service/motion-submitter-repository.service.ts index 44bd93dc28..8c1bdfc6f2 100644 --- a/client/src/app/gateways/repositories/motions/motion-submitter-repository.service/motion-submitter-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-submitter-repository.service/motion-submitter-repository.service.ts @@ -19,5 +19,5 @@ export class MotionSubmitterRepositoryService extends BaseMotionMeetingUserRepos super(repositoryServiceCollector, MotionSubmitter, MotionSubmitterAction); } - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Submitters` : `Submitter`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Submitters` : `Submitter`); } diff --git a/client/src/app/gateways/repositories/motions/motion-workflow-repository.service/motion-workflow-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-workflow-repository.service/motion-workflow-repository.service.ts index f2b2edeba4..4f31e30a76 100644 --- a/client/src/app/gateways/repositories/motions/motion-workflow-repository.service/motion-workflow-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-workflow-repository.service/motion-workflow-repository.service.ts @@ -31,9 +31,9 @@ export class MotionWorkflowRepositoryService extends BaseMeetingRelatedRepositor }; } - public getTitle = (viewMotionWorkflow: ViewMotionWorkflow) => viewMotionWorkflow.name; + public getTitle = (viewMotionWorkflow: ViewMotionWorkflow): string => viewMotionWorkflow.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Workflows` : `Workflow`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Workflows` : `Workflow`); public create(partialModel: Partial): Promise { const payload = { diff --git a/client/src/app/gateways/repositories/motions/motion-working-group-speaker-repository/motion-working-group-speaker-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-working-group-speaker-repository/motion-working-group-speaker-repository.service.ts index 2d6091cbeb..86693cc4c5 100644 --- a/client/src/app/gateways/repositories/motions/motion-working-group-speaker-repository/motion-working-group-speaker-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-working-group-speaker-repository/motion-working-group-speaker-repository.service.ts @@ -19,5 +19,6 @@ export class MotionWorkingGroupSpeakerRepositoryService extends BaseMotionMeetin super(repositoryServiceCollector, MotionWorkingGroupSpeaker, MotionWorkingGroupSpeakerAction); } - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Spokespersons` : `Spokesperson`); + public getVerboseName = (plural = false): string => + this.translate.instant(plural ? `Spokespersons` : `Spokesperson`); } diff --git a/client/src/app/gateways/repositories/motions/personal-note-repository.service/personal-note-repository.service.ts b/client/src/app/gateways/repositories/motions/personal-note-repository.service/personal-note-repository.service.ts index 86b6a1023a..8c31cd76a3 100644 --- a/client/src/app/gateways/repositories/motions/personal-note-repository.service/personal-note-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/personal-note-repository.service/personal-note-repository.service.ts @@ -19,9 +19,10 @@ export class PersonalNoteRepositoryService extends BaseMeetingRelatedRepository< super(repositoryServiceCollector, PersonalNote); } - public getTitle = () => this.getVerboseName(); + public getTitle = (): string => this.getVerboseName(); - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Personal notes` : `Personal note`); + public getVerboseName = (plural = false): string => + this.translate.instant(plural ? `Personal notes` : `Personal note`); public create(personalNote: Partial, content_object_id: Fqid): Action { if (personalNote.star === undefined && personalNote.note === undefined) { diff --git a/client/src/app/gateways/repositories/motions/util.ts b/client/src/app/gateways/repositories/motions/util.ts index 8b265a5131..349fc193e7 100644 --- a/client/src/app/gateways/repositories/motions/util.ts +++ b/client/src/app/gateways/repositories/motions/util.ts @@ -26,7 +26,7 @@ export abstract class BaseMotionMeetingUserRepositoryService< super(repositoryServiceCollector, constructor); } - public getTitle = (model: V) => model?.user?.getTitle() || this.translate.instant(`Unknown participant`); + public getTitle = (model: V): string => model?.user?.getTitle() || this.translate.instant(`Unknown participant`); public create(motion: Identifiable, ...meetingUsers: Identifiable[]): Action { const payload = meetingUsers.map(user => ({ diff --git a/client/src/app/gateways/repositories/organization-repository.service.ts b/client/src/app/gateways/repositories/organization-repository.service.ts index 6d4611d9cf..cdb030b710 100644 --- a/client/src/app/gateways/repositories/organization-repository.service.ts +++ b/client/src/app/gateways/repositories/organization-repository.service.ts @@ -15,9 +15,10 @@ export class OrganizationRepositoryService extends BaseRepository viewOrganization.name; + public getTitle = (viewOrganization: ViewOrganization): string => viewOrganization.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Organizations` : `Organization`); + public getVerboseName = (plural = false): string => + this.translate.instant(plural ? `Organizations` : `Organization`); public override getFieldsets(): Fieldsets { const coreFieldset: (keyof Organization)[] = [`name`, `description`]; diff --git a/client/src/app/gateways/repositories/polls/option-repository.service/option-repository.service.ts b/client/src/app/gateways/repositories/polls/option-repository.service/option-repository.service.ts index 1ea5726ea3..43af9f79f1 100644 --- a/client/src/app/gateways/repositories/polls/option-repository.service/option-repository.service.ts +++ b/client/src/app/gateways/repositories/polls/option-repository.service/option-repository.service.ts @@ -13,7 +13,7 @@ export class OptionRepositoryService extends BaseMeetingRelatedRepository `Option`; + public getTitle = (_viewOption: ViewOption): string => `Option`; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Options` : `Option`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Options` : `Option`); } diff --git a/client/src/app/gateways/repositories/polls/vote-repository.service/vote-repository.service.ts b/client/src/app/gateways/repositories/polls/vote-repository.service/vote-repository.service.ts index cdb827bda8..a7035c79ad 100644 --- a/client/src/app/gateways/repositories/polls/vote-repository.service/vote-repository.service.ts +++ b/client/src/app/gateways/repositories/polls/vote-repository.service/vote-repository.service.ts @@ -49,9 +49,9 @@ export class VoteRepositoryService extends BaseMeetingRelatedRepository `Vote`; + public getTitle = (): string => `Vote`; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Votes` : `Vote`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Votes` : `Vote`); public async sendVote(pollId: Id, payload: VotePayload): Promise { const request: Promise = this.http.post(`${VOTE_URL}?id=${pollId}`, payload); diff --git a/client/src/app/gateways/repositories/projections/projection-repository.service.ts b/client/src/app/gateways/repositories/projections/projection-repository.service.ts index 807ae74587..6ec2a5b6cb 100644 --- a/client/src/app/gateways/repositories/projections/projection-repository.service.ts +++ b/client/src/app/gateways/repositories/projections/projection-repository.service.ts @@ -16,12 +16,12 @@ export class ProjectionRepositoryService extends BaseMeetingRelatedRepository this.translate.instant(plural ? `Projections` : `Projection`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Projections` : `Projection`); - public getTitle = (viewProjection: ViewProjection) => + public getTitle = (viewProjection: ViewProjection): string => viewProjection.content_object?.getProjectorTitle(viewProjection.projection).title; - public getSubtitle = (viewProjection: ViewProjection) => + public getSubtitle = (viewProjection: ViewProjection): string => viewProjection.content_object?.getProjectorTitle(viewProjection.projection).subtitle || ``; public override getFieldsets(): Fieldsets { @@ -63,7 +63,7 @@ export class ProjectionRepositoryService extends BaseMeetingRelatedRepository this.getSubtitle(viewModel); + viewModel.getSubtitle = (): string => this.getSubtitle(viewModel); return viewModel; } } diff --git a/client/src/app/gateways/repositories/projector-countdowns/projector-countdown-repository.service.ts b/client/src/app/gateways/repositories/projector-countdowns/projector-countdown-repository.service.ts index 47f914f225..c2c8bbb2a1 100644 --- a/client/src/app/gateways/repositories/projector-countdowns/projector-countdown-repository.service.ts +++ b/client/src/app/gateways/repositories/projector-countdowns/projector-countdown-repository.service.ts @@ -22,12 +22,12 @@ export class ProjectorCountdownRepositoryService extends BaseMeetingRelatedRepos super(repositoryServiceCollector, ProjectorCountdown); } - public getTitle = (viewProjectorCountdown: ViewProjectorCountdown) => + public getTitle = (viewProjectorCountdown: ViewProjectorCountdown): string => viewProjectorCountdown.description ? `${viewProjectorCountdown.title} (${viewProjectorCountdown.description})` : viewProjectorCountdown.title; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Countdowns` : `Countdown`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Countdowns` : `Countdown`); public async create(payload: any): Promise { return await this.sendActionToBackend(ProjectorCountdownAction.CREATE, payload); diff --git a/client/src/app/gateways/repositories/projector-messages/projector-message-repository.service.ts b/client/src/app/gateways/repositories/projector-messages/projector-message-repository.service.ts index 529c21a931..228bb3e633 100644 --- a/client/src/app/gateways/repositories/projector-messages/projector-message-repository.service.ts +++ b/client/src/app/gateways/repositories/projector-messages/projector-message-repository.service.ts @@ -18,9 +18,9 @@ export class ProjectorMessageRepositoryService extends BaseMeetingRelatedReposit super(repositoryServiceCollector, ProjectorMessage); } - public getTitle = () => this.getVerboseName(); + public getTitle = (): string => this.getVerboseName(); - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Messages` : `Message`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Messages` : `Message`); public async create(payload: any): Promise { return await this.sendActionToBackend(ProjectorMessageAction.CREATE, payload); diff --git a/client/src/app/gateways/repositories/projectors/projector-repository.service.ts b/client/src/app/gateways/repositories/projectors/projector-repository.service.ts index 8273b25787..23b9701716 100644 --- a/client/src/app/gateways/repositories/projectors/projector-repository.service.ts +++ b/client/src/app/gateways/repositories/projectors/projector-repository.service.ts @@ -21,9 +21,9 @@ export class ProjectorRepositoryService extends BaseMeetingRelatedRepository viewProjector.name; + public getTitle = (viewProjector: ViewProjector): string => viewProjector.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Projectors` : `Projector`); + public getVerboseName = (plural = false): string => this.translate.instant(plural ? `Projectors` : `Projector`); public async create(partialProjector: Partial & { name: string }): Promise { const payload: any = { diff --git a/client/src/app/gateways/repositories/speakers/speaker-repository.service.ts b/client/src/app/gateways/repositories/speakers/speaker-repository.service.ts index c38cc5d19a..2c409419ba 100644 --- a/client/src/app/gateways/repositories/speakers/speaker-repository.service.ts +++ b/client/src/app/gateways/repositories/speakers/speaker-repository.service.ts @@ -24,9 +24,9 @@ export class SpeakerRepositoryService extends BaseMeetingRelatedRepository this.translate.instant(plural ? `Speakers` : `Speaker`); + public getVerboseName = (plural = false): any => this.translate.instant(plural ? `Speakers` : `Speaker`); - public getTitle = (viewSpeaker: ViewSpeaker) => + public getTitle = (viewSpeaker: ViewSpeaker): any => viewSpeaker.user ? viewSpeaker.user.getFullName() : this.translate.instant(`Deleted user`); public create( diff --git a/client/src/app/gateways/repositories/tags/tag-repository.service.ts b/client/src/app/gateways/repositories/tags/tag-repository.service.ts index c31986dc12..87d9f4e105 100644 --- a/client/src/app/gateways/repositories/tags/tag-repository.service.ts +++ b/client/src/app/gateways/repositories/tags/tag-repository.service.ts @@ -31,9 +31,9 @@ export class TagRepositoryService extends BaseMeetingRelatedRepository viewTag.name; + public getTitle = (viewTag: ViewTag): string => viewTag.name; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Tags` : `Tag`); + public getVerboseName = (plural = false): any => this.translate.instant(plural ? `Tags` : `Tag`); /** * Sets the default sorting (e.g. in dropdowns and for new users) to 'name' diff --git a/client/src/app/gateways/repositories/topics/topic-repository.service.ts b/client/src/app/gateways/repositories/topics/topic-repository.service.ts index 2a5d498155..6fd41ce8e5 100644 --- a/client/src/app/gateways/repositories/topics/topic-repository.service.ts +++ b/client/src/app/gateways/repositories/topics/topic-repository.service.ts @@ -50,9 +50,9 @@ export class TopicRepositoryService extends BaseAgendaItemAndListOfSpeakersConte return this.createAction(TopicAction.IMPORT, payload); } - public getTitle = (topic: ViewTopic) => topic.title; + public getTitle = (topic: ViewTopic): string => topic.title; - public override getListTitle = (topic: ViewTopic) => { + public override getListTitle = (topic: ViewTopic): string => { if (topic.agenda_item && topic.agenda_item.item_number) { return `${topic.agenda_item.item_number} · ${topic.title}`; } else { @@ -60,11 +60,15 @@ export class TopicRepositoryService extends BaseAgendaItemAndListOfSpeakersConte } }; - public override getAgendaListTitle = (topic: ViewTopic) => ({ title: this.getListTitle(topic) }); + public override getAgendaListTitle = ( + topic: ViewTopic + ): { + title: string; + } => ({ title: this.getListTitle(topic) }); - public override getAgendaSlideTitle = (topic: ViewTopic) => this.getAgendaListTitle(topic).title; + public override getAgendaSlideTitle = (topic: ViewTopic): string => this.getAgendaListTitle(topic).title; - public getVerboseName = (plural = false) => this.translate.instant(plural ? `Topics` : `Topic`); + public getVerboseName = (plural = false): any => this.translate.instant(plural ? `Topics` : `Topic`); public duplicateTopics(...topicAgendaItems: ViewAgendaItem[]): Promise { return this.create(...topicAgendaItems.map(topic => this.getDuplicatedTopic(topic))); diff --git a/client/src/app/infrastructure/annotations/data-transaction.ts b/client/src/app/infrastructure/annotations/data-transaction.ts index 0efcaec59b..7d5ddaae15 100644 --- a/client/src/app/infrastructure/annotations/data-transaction.ts +++ b/client/src/app/infrastructure/annotations/data-transaction.ts @@ -77,7 +77,7 @@ export function ValidateDtoFor(fnName: string, dataArgumentIndex = 0): any { return (_: Constructable, methodName: string, descriptor: PropertyDescriptor) => { const fn = descriptor.value; const description = DtoContainer.getClassDescriptionFor(fnName); - descriptor.value = function (...args: any[]) { + descriptor.value = function (...args: any[]): any { const data = args[dataArgumentIndex]; // Suppose that the data is the first argument const payload: any = {}; for (const propertyName of Object.keys(description)) { diff --git a/client/src/app/infrastructure/errors/process.error.ts b/client/src/app/infrastructure/errors/process.error.ts index e53206ff47..6cd0ebe208 100644 --- a/client/src/app/infrastructure/errors/process.error.ts +++ b/client/src/app/infrastructure/errors/process.error.ts @@ -18,10 +18,16 @@ export class ProcessError extends Error { public constructor(description: unknown) { // Unfortunately, this must be handled before the `super`-call to have the dedicated message. - const handleErrorDescription = () => { + const handleErrorDescription = (): { + message: string; + status: number; + } => { let errorStatus = 400; let errorMessage: string; - const getReturnValue = () => ({ message: errorMessage, status: errorStatus }); + const getReturnValue = (): { + message: string; + status: number; + } => ({ message: errorMessage, status: errorStatus }); // If the error is a string already, return it. if (typeof description === `string`) { errorMessage = _(description); diff --git a/client/src/app/infrastructure/utils/functions.ts b/client/src/app/infrastructure/utils/functions.ts index e1c4fbed7e..10d76d000b 100644 --- a/client/src/app/infrastructure/utils/functions.ts +++ b/client/src/app/infrastructure/utils/functions.ts @@ -5,11 +5,11 @@ import { Decimal, Id } from '../../domain/definitions/key-types'; export function toBase64(data: File | Blob): Promise { return new Promise(async (resolve, reject) => { const reader = new FileReader(); - reader.onload = () => { + reader.onload = (): void => { const resultStr: string = reader.result as string; resolve(resultStr.split(`,`)[1]); }; - reader.onerror = error => { + reader.onerror = (error): void => { reject(error); }; reader.readAsDataURL(data); @@ -54,7 +54,7 @@ export function toBoolean(value: string): boolean { return VERBOSE_TRUE_FIELDS.includes(value.toLowerCase()); } -export const VoidFn = () => {}; +export const VoidFn = (): void => {}; const AMOUNT_DECIMAL_PLACES = 6; diff --git a/client/src/app/infrastructure/utils/import/base-import-handler.ts b/client/src/app/infrastructure/utils/import/base-import-handler.ts index d3aed80a08..240c95a58d 100644 --- a/client/src/app/infrastructure/utils/import/base-import-handler.ts +++ b/client/src/app/infrastructure/utils/import/base-import-handler.ts @@ -58,7 +58,7 @@ export abstract class BaseImportHandler implem translateFn: config.translateFn }); this._fixedChunkSize = config.fixedChunkSize ?? 100; - this._transformFn = config.transformFn ?? (models => models as any); + this._transformFn = config.transformFn ?? ((models): any => models as any); } public startImport(): void { diff --git a/client/src/app/infrastructure/utils/import/base-main-import-handler.ts b/client/src/app/infrastructure/utils/import/base-main-import-handler.ts index 6fd81ab560..b53e4cd7bb 100644 --- a/client/src/app/infrastructure/utils/import/base-main-import-handler.ts +++ b/client/src/app/infrastructure/utils/import/base-main-import-handler.ts @@ -59,8 +59,8 @@ export abstract class BaseMainImportHandler) { super(config); this._createFn = config.createFn; - this._updateFn = config.updateFn || (async () => {}); - this._resolveEntryFn = config.resolveEntryFn ?? (model => model.model); + this._updateFn = config.updateFn || (async (): Promise => {}); + this._resolveEntryFn = config.resolveEntryFn ?? ((model): MainModel => model.model); } public abstract override pipeModels(models: ImportModel[]): void | Promise; @@ -132,7 +132,16 @@ export abstract class BaseMainImportHandler Promise ): Promise { - const request = async (data: { model: MainModel; index: number }[]) => { + const request = async ( + data: { model: MainModel; index: number }[] + ): Promise< + { + index: number; + identifiable: { + id: number; + }; + }[] + > => { const defaultIdentifiables = data.map(date => ({ id: date.model.id })); const returnValue = (await fn(data.map(date => date.model))) || defaultIdentifiables; this.modelsImported = this.modelsImported.concat(data as any); @@ -141,7 +150,7 @@ export abstract class BaseMainImportHandler { + const sendSingleRequest = async (date: { model: MainModel; index: number }): Promise => { let response: ImportResponse[] = []; try { response = (await request([date])).map(receivedValue => ({ errors: [], ...receivedValue })); diff --git a/client/src/app/infrastructure/utils/import/base-side-import-handler.ts b/client/src/app/infrastructure/utils/import/base-side-import-handler.ts index c1f767bb08..ed04c5bc31 100644 --- a/client/src/app/infrastructure/utils/import/base-side-import-handler.ts +++ b/client/src/app/infrastructure/utils/import/base-side-import-handler.ts @@ -76,11 +76,11 @@ export abstract class BaseSideImportHandler public constructor(config: BaseSideImportHandlerConfig) { super({ ...config, verboseNameFn: config.verboseNameFn ?? config.repo?.getVerboseName }); this.idProperty = config.idProperty; - this.translateFn = config.translateFn || (value => value); + this.translateFn = config.translateFn || ((value): string => value); this._useArray = config.useArray ?? false; this._additionalFields = config.additionalFields ?? []; this._nameDelimiter = config.nameDelimiter ?? `,`; - this._shouldCreateModelFn = config.shouldCreateModelFn ?? (() => true); + this._shouldCreateModelFn = config.shouldCreateModelFn ?? ((): true => true); this.setCreateFn(config.createFn as any, config.repo); this.setFindFn(config.findFn, config.repo); @@ -209,7 +209,7 @@ export abstract class BaseSideImportHandler if (findFn) { this._findFn = findFn; } else if (fallbackRepo) { - this._findFn = name => + this._findFn = (name): any => fallbackRepo .getViewModelList() .find((model: any) => model.getTitle() === name || this.translateFn(model.getTitle()) === name); @@ -220,7 +220,7 @@ export abstract class BaseSideImportHandler if (createFn) { this._createFn = createFn; } else if (fallbackRepo) { - this._createFn = entries => fallbackRepo.create(...entries); + this._createFn = (entries): any => fallbackRepo.create(...entries); } } diff --git a/client/src/app/infrastructure/utils/import/import-step.ts b/client/src/app/infrastructure/utils/import/import-step.ts index 115bcbb1ec..61d40144be 100644 --- a/client/src/app/infrastructure/utils/import/import-step.ts +++ b/client/src/app/infrastructure/utils/import/import-step.ts @@ -34,7 +34,7 @@ export class ImportStepDescriptor { public constructor({ verboseNameFn, labelFn, translateFn }: ImportStepDescriptorConfig) { this._verboseNameFn = verboseNameFn; this._labelFn = labelFn; - this._translateFn = translateFn ?? (key => key); + this._translateFn = translateFn ?? ((key): string => key); } public getDescription(phase: ImportStepPhase, plural?: boolean): string { diff --git a/client/src/app/infrastructure/utils/import/static-additional-import-handler.ts b/client/src/app/infrastructure/utils/import/static-additional-import-handler.ts index 06b963a353..16a7cdeba0 100644 --- a/client/src/app/infrastructure/utils/import/static-additional-import-handler.ts +++ b/client/src/app/infrastructure/utils/import/static-additional-import-handler.ts @@ -45,7 +45,7 @@ export class StaticAdditionalImportHandler extends BaseAdd this._pipeModelsFn = config.pipeModelsFn; this._getModelsToCreateAmountFn = config.getModelsToCreateAmountFn; this._getModelsImportedAmountFn = config.getModelsImportedAmountFn; - this._pipeSideModelsFn = config.pipeSideModelsFn || (() => {}); + this._pipeSideModelsFn = config.pipeSideModelsFn || ((): void => {}); } public override pipeModels(importModels: ImportModel[]): void { @@ -77,15 +77,15 @@ export class StaticAdditionalImportHandler extends BaseAdd this._modelsToCreateAmount = 0; } - public getModelsToCreateAmount = () => this._modelsToCreateAmount; - public getModelsImportedAmount = () => this._modelsImportedAmount; + public getModelsToCreateAmount = (): number => this._modelsToCreateAmount; + public getModelsImportedAmount = (): number => this._modelsImportedAmount; private createImportProcess(): ImportProcess { return new ImportProcess({ importFn: models => this._doImportFn(models, this.getImportContext()), chunkSize: this.chunkSize, models: this.doTransformModels(this._sideModels), - afterImportChunkFn: nextChunk => { + afterImportChunkFn: (nextChunk): void => { const oldValue = this._modelsImportedAmount; this.importContext.modelsImported = this.importContext.modelsImported.concat(nextChunk as any); this._modelsImportedAmount = this._getModelsImportedAmountFn(nextChunk as any, oldValue); diff --git a/client/src/app/infrastructure/utils/import/static-main-import-handler.ts b/client/src/app/infrastructure/utils/import/static-main-import-handler.ts index 1238212b96..b7c8f53ded 100644 --- a/client/src/app/infrastructure/utils/import/static-main-import-handler.ts +++ b/client/src/app/infrastructure/utils/import/static-main-import-handler.ts @@ -19,7 +19,7 @@ export class StaticMainImportHandler extend public constructor(config: StaticMainImportConfig) { super(config); - this._shouldCreateModelFn = config.shouldCreateModelFn ?? (model => !model.hasDuplicates); + this._shouldCreateModelFn = config.shouldCreateModelFn ?? ((model): boolean => !model.hasDuplicates); } public pipeModels(models: ImportModel[]): void | Promise { diff --git a/client/src/app/infrastructure/utils/import/users/user-import-helper.ts b/client/src/app/infrastructure/utils/import/users/user-import-helper.ts index f544541c8e..5e6e930ac0 100644 --- a/client/src/app/infrastructure/utils/import/users/user-import-helper.ts +++ b/client/src/app/infrastructure/utils/import/users/user-import-helper.ts @@ -84,7 +84,7 @@ export class UserImportHelper extends BaseBeforeImportHandler (item[this._property] = ids as any)); + this._mapPropertyToFn = config.mapPropertyToFn || ((item, ids): any => (item[this._property] = ids as any)); } public async onBeforeFind(allImportModels: ImportModel[]): Promise { diff --git a/client/src/app/infrastructure/utils/validators/is-unique-among.ts b/client/src/app/infrastructure/utils/validators/is-unique-among.ts index a4e2698a52..b1ecb750d2 100644 --- a/client/src/app/infrastructure/utils/validators/is-unique-among.ts +++ b/client/src/app/infrastructure/utils/validators/is-unique-among.ts @@ -3,7 +3,7 @@ import { BehaviorSubject } from 'rxjs'; export function isUniqueAmong( preExistingValues: T[] | BehaviorSubject, - isEqualFn: (a: T, b: T) => boolean = (a, b) => a === b, + isEqualFn: (a: T, b: T) => boolean = (a, b): boolean => a === b, ignoredValues: T[] = [] ): ValidatorFn { return (formControl: AbstractControl): { [key: string]: any } | null => { diff --git a/client/src/app/site/base/base-filter.service/base-filter-list.service.ts b/client/src/app/site/base/base-filter.service/base-filter-list.service.ts index 3a1d78a99b..33ea26cccf 100644 --- a/client/src/app/site/base/base-filter.service/base-filter-list.service.ts +++ b/client/src/app/site/base/base-filter.service/base-filter-list.service.ts @@ -290,7 +290,7 @@ export abstract class BaseFilterListService implements map(viewModels => { let filterProperties: (OsFilterOption | string)[] = []; if (viewModels && viewModels.length) { - let models: FilterModel[] = viewModels.filter(filterFn ?? (() => true)); + let models: FilterModel[] = viewModels.filter(filterFn ?? ((): boolean => true)); if (mapFn) { models = Object.values(models.map(mapFn).mapToObject(model => ({ [model.id]: model }))); } diff --git a/client/src/app/site/base/base-import.service/base-backend-import.service.ts b/client/src/app/site/base/base-import.service/base-backend-import.service.ts index 3fc278b73f..470d9bfa5f 100644 --- a/client/src/app/site/base/base-import.service/base-backend-import.service.ts +++ b/client/src/app/site/base/base-import.service/base-backend-import.service.ts @@ -160,7 +160,7 @@ export abstract class BaseBackendImportService implements BackendImportService { * strings */ public constructor(private importServiceCollector: ImportServiceCollectorService) { - this._reader.onload = (event: FileReaderProgressEvent) => { + this._reader.onload = (event: FileReaderProgressEvent): void => { this.parseInput(event.target?.result as string); }; } diff --git a/client/src/app/site/base/base-import.service/base-import.service.ts b/client/src/app/site/base/base-import.service/base-import.service.ts index 7d94bc153f..3de9404056 100644 --- a/client/src/app/site/base/base-import.service/base-import.service.ts +++ b/client/src/app/site/base/base-import.service/base-import.service.ts @@ -227,7 +227,7 @@ export abstract class BaseImportService implemen * strings */ public constructor(private importServiceCollector: ImportServiceCollectorService) { - this._reader.onload = (event: FileReaderProgressEvent) => { + this._reader.onload = (event: FileReaderProgressEvent): void => { this.parseInput(event.target?.result as string); }; this.init(); @@ -468,7 +468,7 @@ export abstract class BaseImportService implemen _handler: | StaticAdditionalImportHandlerConfig | BaseAdditionalImportHandler - ) => { + ): BaseAdditionalImportHandler => { if (_handler instanceof BaseAdditionalImportHandler) { return _handler; } else { diff --git a/client/src/app/site/base/base-list-view.component.ts b/client/src/app/site/base/base-list-view.component.ts index 38358994ba..5bdc5b34f2 100644 --- a/client/src/app/site/base/base-list-view.component.ts +++ b/client/src/app/site/base/base-list-view.component.ts @@ -10,8 +10,8 @@ import { import { BaseViewModel } from './base-view-model'; -const createStorageOffsetIndex = (prefix: string) => `${prefix}:offset`; -const createStorageSearchIndex = (prefix: string) => `${prefix}:search`; +const createStorageOffsetIndex = (prefix: string): string => `${prefix}:offset`; +const createStorageSearchIndex = (prefix: string): string => `${prefix}:search`; @Directive() export abstract class BaseListViewComponent extends BaseComponent implements AfterViewInit { diff --git a/client/src/app/site/base/base-sort.service/base-sort-list.service.ts b/client/src/app/site/base/base-sort.service/base-sort-list.service.ts index 93811e1277..60655a4798 100644 --- a/client/src/app/site/base/base-sort.service/base-sort-list.service.ts +++ b/client/src/app/site/base/base-sort.service/base-sort-list.service.ts @@ -130,7 +130,7 @@ export abstract class BaseSortListService /** * Updates every time when there's a new sortDefinition. Emits said sortDefinition. */ - public get sortingUpdatedObservable() { + public get sortingUpdatedObservable(): Observable> { return this.sortDefinitionSubject.pipe( distinctUntilChanged((prev, curr) => { return JSON.stringify(prev) === JSON.stringify(curr); diff --git a/client/src/app/site/modules/global-headbar/global-headbar.service.ts b/client/src/app/site/modules/global-headbar/global-headbar.service.ts index 8388e14af7..b6f8e4bee5 100644 --- a/client/src/app/site/modules/global-headbar/global-headbar.service.ts +++ b/client/src/app/site/modules/global-headbar/global-headbar.service.ts @@ -6,7 +6,7 @@ export class GlobalHeadbarService { private _headbar: TemplatePortal = null; public longpolling = false; - public get headbar() { + public get headbar(): TemplatePortal { return this._headbar; } diff --git a/client/src/app/site/modules/wait-for-action-dialog/components/wait-for-action-banner/wait-for-action-banner.component.ts b/client/src/app/site/modules/wait-for-action-dialog/components/wait-for-action-banner/wait-for-action-banner.component.ts index a962e79d55..115f42c582 100644 --- a/client/src/app/site/modules/wait-for-action-dialog/components/wait-for-action-banner/wait-for-action-banner.component.ts +++ b/client/src/app/site/modules/wait-for-action-dialog/components/wait-for-action-banner/wait-for-action-banner.component.ts @@ -54,7 +54,7 @@ export class WaitForActionBannerComponent extends BaseUiComponent { this.waitService.stopWaiting(all); } - private nextDataArray() { + private nextDataArray(): void { this._dataArraySubject.next(this._currentData.get(this.waitService.currentReason)); } } diff --git a/client/src/app/site/modules/wait-for-action-dialog/services/wait-for-action-dialog.service.ts b/client/src/app/site/modules/wait-for-action-dialog/services/wait-for-action-dialog.service.ts index 87a7be6739..0e2c133abe 100644 --- a/client/src/app/site/modules/wait-for-action-dialog/services/wait-for-action-dialog.service.ts +++ b/client/src/app/site/modules/wait-for-action-dialog/services/wait-for-action-dialog.service.ts @@ -153,11 +153,11 @@ export class WaitForActionDialogService { this.newCurrentReason(); } - private async openDialog() { + private async openDialog(): Promise { this.bannerService.addBanner({ component: WaitForActionBannerComponent }); } - private closeDialog() { + private closeDialog(): void { this.bannerService.removeBanner({ component: WaitForActionBannerComponent }); } diff --git a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-entry/list-of-speakers-entry.component.ts b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-entry/list-of-speakers-entry.component.ts index e8c1f9cbed..61f5afffe4 100644 --- a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-entry/list-of-speakers-entry.component.ts +++ b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-entry/list-of-speakers-entry.component.ts @@ -89,7 +89,7 @@ export class ListOfSpeakersEntryComponent extends BaseMeetingComponent implement return this.canManage && this.isCallEnabled; } - public isPointOfOrderFn = () => this.speaker.point_of_order; + public isPointOfOrderFn = (): boolean => this.speaker.point_of_order; public isCallEnabled = false; public pointOfOrderCategoriesEnabled = false; diff --git a/client/src/app/site/pages/meetings/modules/poll/components/poll-cannot-vote-message/poll-cannot-vote-message.component.ts b/client/src/app/site/pages/meetings/modules/poll/components/poll-cannot-vote-message/poll-cannot-vote-message.component.ts index cd26eeab1a..b4e959ddbd 100644 --- a/client/src/app/site/pages/meetings/modules/poll/components/poll-cannot-vote-message/poll-cannot-vote-message.component.ts +++ b/client/src/app/site/pages/meetings/modules/poll/components/poll-cannot-vote-message/poll-cannot-vote-message.component.ts @@ -59,7 +59,7 @@ export class PollCannotVoteMessageComponent extends BaseMeetingComponent { return this.votingService.getVotingProhibitionReasonVerbose(this.poll, user) || ``; } - public getVotingErrorFromName(errorName: string) { + public getVotingErrorFromName(errorName: string): string { return this.votingService.getVotingProhibitionReasonVerboseFromName(errorName) || ``; } } diff --git a/client/src/app/site/pages/meetings/services/active-meeting.subscription.ts b/client/src/app/site/pages/meetings/services/active-meeting.subscription.ts index 9636f91cf3..cb4e60f6b1 100644 --- a/client/src/app/site/pages/meetings/services/active-meeting.subscription.ts +++ b/client/src/app/site/pages/meetings/services/active-meeting.subscription.ts @@ -9,7 +9,7 @@ import { ViewMeeting } from '../view-models/view-meeting'; export const ACTIVE_MEETING_SUBSCRIPTION = `active_meeting`; -export function getActiveMeetingSubscriptionConfig(id: Id, settingsKeys: string[] = []) { +export function getActiveMeetingSubscriptionConfig(id: Id, settingsKeys: string[] = []): any { return { modelRequest: { viewModelCtor: ViewMeeting,