From 550422c812c03d5571548f27019cab2729e5a7fa Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Thu, 5 Oct 2023 09:46:42 +0200 Subject: [PATCH] Add lines between class members eslint rule (#2849) --- client/.eslintrc.js | 1 + client/src/app/domain/models/projector/projection.ts | 1 + .../action-worker-watch.service.spec.ts | 3 +++ .../http-stream/http-stream-endpoint.service.spec.ts | 1 + ...tem-and-list-of-speakers-content-object-repository.ts | 1 + .../point-of-order-category-repository.service.ts | 1 + .../projector-message-repository.service.ts | 1 + .../repositories/themes/theme-repository.service.ts | 2 ++ .../site/base/base-import.service/base-import.service.ts | 1 + client/src/app/site/base/base-view-model.ts | 5 +++++ .../components/global-search/global-search.component.ts | 1 + .../meetings/base/base-has-meeting-user-view-model.ts | 2 ++ .../attachment-control/attachment-control.component.ts | 1 + .../slide-container/slide-container.component.ts | 1 + .../motion-slide/change-recommendation-unified-change.ts | 2 ++ .../interaction/services/call-restriction.service.ts | 2 ++ .../interaction/services/interaction-receive.service.ts | 2 ++ .../pages/interaction/services/interaction.service.ts | 1 + .../category-detail/category-detail.component.ts | 2 ++ .../motion-detail-diff-summary.component.ts | 2 ++ .../motion-detail-diff/motion-detail-diff.component.ts | 9 +++++++++ ...n-detail-original-change-recommendations.component.ts | 1 + .../motion-csv-export.service.ts | 1 + .../meetings/pages/motions/view-models/view-motion.ts | 1 + .../pages/polls/view-models/view-poll-candidate-list.ts | 2 ++ .../pages/polls/view-models/view-poll-candidate.ts | 1 + .../pages/meetings/pages/polls/view-models/view-poll.ts | 1 + .../meeting-component-service-collector.service.ts | 2 ++ .../account-detail/account-detail.component.ts | 1 + .../committee-export.service.ts | 1 + client/src/app/site/services/operator.service.ts | 6 ++++++ client/src/app/ui/base/base-form-control.ts | 3 +++ client/src/app/ui/base/base-form-field-control.ts | 3 +++ .../ui/modules/choice-dialog/services/choice.service.ts | 1 + .../color-form-field/color-form-field.component.ts | 2 ++ .../modules/editor/components/editor/editor.component.ts | 1 + .../backend-import-list.component.ts | 1 + .../sorting-tree/services/tree-sort.service.spec.ts | 1 + 38 files changed, 71 insertions(+) diff --git a/client/.eslintrc.js b/client/.eslintrc.js index d5f36f1ae5..646883db1c 100644 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -61,6 +61,7 @@ module.exports = { 'property': 'asObservable', 'message': 'Please use a typecast or explicitly instantiate a new Observable.' }], + 'lines-between-class-members': ['error', 'always', { 'exceptAfterSingleLine': true }], 'jsdoc/require-example': ['off'], 'jsdoc/newline-after-description': ['off'], diff --git a/client/src/app/domain/models/projector/projection.ts b/client/src/app/domain/models/projector/projection.ts index 0ce43942dc..82073a2dc2 100644 --- a/client/src/app/domain/models/projector/projection.ts +++ b/client/src/app/domain/models/projector/projection.ts @@ -13,6 +13,7 @@ export class Projection extends BaseModel { public options!: { [key: string]: any; }; + public weight!: number; // Calculated field diff --git a/client/src/app/gateways/action-worker-watch/action-worker-watch.service.spec.ts b/client/src/app/gateways/action-worker-watch/action-worker-watch.service.spec.ts index 021186abd6..566c12f541 100644 --- a/client/src/app/gateways/action-worker-watch/action-worker-watch.service.spec.ts +++ b/client/src/app/gateways/action-worker-watch/action-worker-watch.service.spec.ts @@ -124,9 +124,11 @@ class MockWaitForActionDialogService { delete currentDialogs[workerId]; this.currentDialogs.next(currentDialogs); } + public async openClosingPrompt(snapshot: Partial & { closed: number }): Promise { this.closingPromptOpenFor.push(snapshot); } + public addNewDialog(reason: WaitForActionReason, data: WaitForActionData): void { const currentDialogs = copy(this.currentDialogs.value); currentDialogs[data.workerId] = { reason, data }; @@ -154,6 +156,7 @@ class MockActionWorkerRepositoryService { public set viewModelList(list: ViewActionWorker[]) { this._viewModelListSubject.next(list); } + public get viewModelList(): ViewActionWorker[] { return this._viewModelListSubject.value; } diff --git a/client/src/app/gateways/http-stream/http-stream-endpoint.service.spec.ts b/client/src/app/gateways/http-stream/http-stream-endpoint.service.spec.ts index bcd55fa8c2..d81d6d515f 100644 --- a/client/src/app/gateways/http-stream/http-stream-endpoint.service.spec.ts +++ b/client/src/app/gateways/http-stream/http-stream-endpoint.service.spec.ts @@ -15,6 +15,7 @@ class MockHttpService { header?: HttpHeaders; responseType?: ResponseType; }[] = []; + public async get( path: string, data?: any, diff --git a/client/src/app/gateways/repositories/base-agenda-item-and-list-of-speakers-content-object-repository.ts b/client/src/app/gateways/repositories/base-agenda-item-and-list-of-speakers-content-object-repository.ts index dc7ea4d9cb..c07fc0933d 100644 --- a/client/src/app/gateways/repositories/base-agenda-item-and-list-of-speakers-content-object-repository.ts +++ b/client/src/app/gateways/repositories/base-agenda-item-and-list-of-speakers-content-object-repository.ts @@ -23,6 +23,7 @@ export abstract class BaseAgendaItemAndListOfSpeakersContentObjectRepository< ) { super(repositoryServiceCollector, baseModelCtor); } + public getAgendaListTitle(viewModel: V): AgendaListTitle { // Return the agenda title with the model's verbose name appended const numberPrefix = this.agendaItemRepo.getItemNumberPrefix(viewModel); diff --git a/client/src/app/gateways/repositories/point-of-order-category/point-of-order-category-repository.service.ts b/client/src/app/gateways/repositories/point-of-order-category/point-of-order-category-repository.service.ts index bb15957123..3602a12b15 100644 --- a/client/src/app/gateways/repositories/point-of-order-category/point-of-order-category-repository.service.ts +++ b/client/src/app/gateways/repositories/point-of-order-category/point-of-order-category-repository.service.ts @@ -24,6 +24,7 @@ export class PointOfOrderCategoryRepositoryService public getVerboseName = (plural?: boolean): string => plural ? `Point of order categories` : `Point of order category`; + public getTitle = (viewModel: PointOfOrderCategory): string => viewModel.text; public create(pointOfOrderCategory: any, meeting_id: Id = this.activeMeetingId): Action { 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 9b71b3fa8e..529c21a931 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 @@ -17,6 +17,7 @@ export class ProjectorMessageRepositoryService extends BaseMeetingRelatedReposit public constructor(repositoryServiceCollector: RepositoryMeetingServiceCollectorService) { super(repositoryServiceCollector, ProjectorMessage); } + public getTitle = () => this.getVerboseName(); public getVerboseName = (plural = false) => this.translate.instant(plural ? `Messages` : `Message`); diff --git a/client/src/app/gateways/repositories/themes/theme-repository.service.ts b/client/src/app/gateways/repositories/themes/theme-repository.service.ts index d1fe24ff8f..4f72d54b69 100644 --- a/client/src/app/gateways/repositories/themes/theme-repository.service.ts +++ b/client/src/app/gateways/repositories/themes/theme-repository.service.ts @@ -83,6 +83,7 @@ export class ThemeRepositoryService extends BaseRepository { const payload = themes; return this.sendBulkActionToBackend(ThemeAction.CREATE, payload); } + public update(update: any, id: Id): Promise { const payload = { id, @@ -90,6 +91,7 @@ export class ThemeRepositoryService extends BaseRepository { }; return this.sendActionToBackend(ThemeAction.UPDATE, payload); } + public delete(...ids: Id[]): Promise { const payload = ids.map(id => ({ id })); return this.sendBulkActionToBackend(ThemeAction.DELETE, payload); 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 9178b2c2c3..7d94bc153f 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 @@ -178,6 +178,7 @@ export abstract class BaseImportService implemen private _afterImportHandler: { [key: string]: { mainHandler: AfterImportHandler; additionalHandlers: AdditionalImportHandler[] }; } = {}; + private _otherMainImportHelper: MainImportHandler[] = []; private _modelHeadersAndVerboseNames: { [key: string]: string } = {}; diff --git a/client/src/app/site/base/base-view-model.ts b/client/src/app/site/base/base-view-model.ts index b701d9972e..81edbf5865 100644 --- a/client/src/app/site/base/base-view-model.ts +++ b/client/src/app/site/base/base-view-model.ts @@ -32,18 +32,23 @@ export abstract class BaseViewModel implements Detail public getModel(): M { return this._model; } + public toString(): string { return this.getTitle(); } + public toJSON(): M { return this.getModel(); } + public getUpdatedModelData(update: Partial): object { return this.getModel().getUpdatedData(update); } + public canAccess(): boolean { return true; } + /** * Override in children */ diff --git a/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.ts b/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.ts index 1e9275edf1..5b72333bde 100644 --- a/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.ts +++ b/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.ts @@ -28,6 +28,7 @@ export class GlobalSearchComponent implements OnDestroy { user: _(`Participants`), mediafile: _(`Files`) }; + public currentlyAvailableFilters = []; public currentFilters = this.formBuilder.group({ diff --git a/client/src/app/site/pages/meetings/base/base-has-meeting-user-view-model.ts b/client/src/app/site/pages/meetings/base/base-has-meeting-user-view-model.ts index 1f74a8e2c4..31ca28ff15 100644 --- a/client/src/app/site/pages/meetings/base/base-has-meeting-user-view-model.ts +++ b/client/src/app/site/pages/meetings/base/base-has-meeting-user-view-model.ts @@ -12,6 +12,7 @@ export abstract class BaseHasMeetingUserViewModel = any public get user(): ViewUser { return this.meeting_user?.user; } + public get user_id(): number { return this.meeting_user?.user_id; } @@ -25,6 +26,7 @@ export abstract class BaseHasMeetingUsersViewModel = an public get calculated_users(): ViewUser[] { return this.meeting_users?.flatMap(user => user.user ?? []); } + public get calculated_user_ids(): number[] { return this.meeting_users?.flatMap(user => user.user_id ?? []); } diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/attachment-control/components/attachment-control/attachment-control.component.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/attachment-control/components/attachment-control/attachment-control.component.ts index 9605a07450..8280c5a64f 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/attachment-control/components/attachment-control/attachment-control.component.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/attachment-control/components/attachment-control/attachment-control.component.ts @@ -58,6 +58,7 @@ export class AttachmentControlComponent extends BaseFormControlComponent>; /** diff --git a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/motions/modules/motion-slide/change-recommendation-unified-change.ts b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/motions/modules/motion-slide/change-recommendation-unified-change.ts index 317cc1503f..311e8330e4 100644 --- a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/motions/modules/motion-slide/change-recommendation-unified-change.ts +++ b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/motions/modules/motion-slide/change-recommendation-unified-change.ts @@ -20,9 +20,11 @@ export class ChangeRecommendationUnifiedChange implements ChangeRecommendationDa public constructor(data: ChangeRecommendationData) { Object.assign(this, data); } + public getTitle(): string { return `Recommendation`; } + public getModificationType(): ModificationType { throw new Error(`Method not implemented.`); } diff --git a/client/src/app/site/pages/meetings/pages/interaction/services/call-restriction.service.ts b/client/src/app/site/pages/meetings/pages/interaction/services/call-restriction.service.ts index 27b3b21292..6024d7da08 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/services/call-restriction.service.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/services/call-restriction.service.ts @@ -18,10 +18,12 @@ export class CallRestrictionService { public isJitsiActiveInAnotherTab: Observable = this.storageMap .watch(RTC_LOGGED_STORAGE_KEY, { type: `boolean` }) .pipe(distinctUntilChanged() as any); + private userClosPosition = this.closService.currentListOfSpeakersObservable.pipe( map(los => los?.findUserIndexOnList(this.operator.operatorId!) ?? -1), distinctUntilChanged() ); + private amountNextSpeakerAutoConnect: Observable = this.settingService.get( `conference_auto_connect_next_speakers` ); diff --git a/client/src/app/site/pages/meetings/pages/interaction/services/interaction-receive.service.ts b/client/src/app/site/pages/meetings/pages/interaction/services/interaction-receive.service.ts index 7c4e491610..94caa7902d 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/services/interaction-receive.service.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/services/interaction-receive.service.ts @@ -46,11 +46,13 @@ export class InteractionReceiveService { } return this._showLiveConfObservable; } + private _showLiveConfObservable: Observable; public get conferenceState(): ConferenceState { return this.conferenceStateSubject.value; } + public set conferenceState(state: ConferenceState) { this.setConferenceState(state); } diff --git a/client/src/app/site/pages/meetings/pages/interaction/services/interaction.service.ts b/client/src/app/site/pages/meetings/pages/interaction/services/interaction.service.ts index 24d5ade3fb..f19efd4a7f 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/services/interaction.service.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/services/interaction.service.ts @@ -45,6 +45,7 @@ export class InteractionService { private get conferenceState(): ConferenceState { return this.interactionReceive.conferenceState; } + private set conferenceState(state: ConferenceState) { this.interactionReceive.conferenceState = state; } diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/categories/components/category-detail/category-detail.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/categories/components/category-detail/category-detail.component.ts index 3f6bf8d6cb..714e34f79c 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/categories/components/category-detail/category-detail.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/categories/components/category-detail/category-detail.component.ts @@ -44,9 +44,11 @@ export class CategoryDetailComponent extends BaseMeetingComponent { public get selectedCategory(): ViewMotionCategory { return this._selectedCategory; } + public set selectedCategory(category: ViewMotionCategory) { this._selectedCategory = category; } + private _selectedCategory!: ViewMotionCategory; /** diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-diff-summary/motion-detail-diff-summary.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-diff-summary/motion-detail-diff-summary.component.ts index 86c010d7a9..9389ee20bc 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-diff-summary/motion-detail-diff-summary.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-diff-summary/motion-detail-diff-summary.component.ts @@ -33,8 +33,10 @@ export class MotionDetailDiffSummaryComponent extends BaseMeetingComponent imple @Input() public changes: ViewUnifiedChange[] = []; + @Input() public scrollToChange: ViewUnifiedChange | null = null; + @Input() public elContainer: any; diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-diff/motion-detail-diff.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-diff/motion-detail-diff.component.ts index 1de22033af..ffbe810b6c 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-diff/motion-detail-diff.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-diff/motion-detail-diff.component.ts @@ -63,22 +63,30 @@ export class MotionDetailDiffComponent extends BaseMeetingComponent implements A @Input() public motion!: ViewMotion; + @Input() public changes: ViewUnifiedChange[] = []; + @Input() public scrollToChange: ViewUnifiedChange | null = null; + @Input() public highlightedLine!: number; + @Input() public lineNumberingMode!: LineNumberingMode; + @Input() public showAllAmendments = false; + @Input() public showSummary = true; + @Input() public set showPreamble(value: boolean) { this._showPreamble = value; } + @Input() public lineRange: LineRange | null = null; @@ -95,6 +103,7 @@ export class MotionDetailDiffComponent extends BaseMeetingComponent implements A public get showPreamble(): boolean { return this.motion.showPreamble ? this._showPreamble : false; } + private _showPreamble = true; public get nativeElement(): any { diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts index 9e755ee724..2b41a1d485 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts @@ -83,6 +83,7 @@ export class MotionDetailOriginalChangeRecommendationsComponent implements OnIni this._changeRecommendations = recos; this.setTextChangeRecommendations(recos); } + public get changeRecommendations(): ViewUnifiedChange[] { return this._changeRecommendations; } diff --git a/client/src/app/site/pages/meetings/pages/motions/services/export/motion-csv-export.service/motion-csv-export.service.ts b/client/src/app/site/pages/meetings/pages/motions/services/export/motion-csv-export.service/motion-csv-export.service.ts index c56f2752a9..8bfecd92a6 100644 --- a/client/src/app/site/pages/meetings/pages/motions/services/export/motion-csv-export.service/motion-csv-export.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/services/export/motion-csv-export.service/motion-csv-export.service.ts @@ -151,6 +151,7 @@ export class MotionCsvExportService { this.csvExport.export(motions, exportProperties, this.translate.instant(`Motions`) + `.csv`); } + /**numberOrTitle * Exports the call list. * diff --git a/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts b/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts index 0611d39dd3..32a8bdef14 100644 --- a/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts +++ b/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts @@ -238,6 +238,7 @@ export class ViewMotion extends BaseProjectableViewModel { recoMode: ChangeRecoMode, includeUnchanged?: boolean ) => DiffLinesInParagraph[] = () => []; + public getParagraphTitleByParagraph!: (paragraph: DiffLinesInParagraph) => string | null; // This is set by the repository public getNumberOrTitle!: () => string; diff --git a/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate-list.ts b/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate-list.ts index 4f5adcb9d8..d9a6bb0529 100644 --- a/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate-list.ts +++ b/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate-list.ts @@ -10,9 +10,11 @@ export class ViewPollCandidateList extends BaseViewModel impl public get entries(): SortedListEntry[] { return this.poll_candidates; } + public get poll_candidate_list(): PollCandidateList { return this._model; } + public static COLLECTION = PollCandidateList.COLLECTION; public getShortenedTitle(length: number): string { diff --git a/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate.ts b/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate.ts index dbd98bf38b..c7cf2744bc 100644 --- a/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate.ts +++ b/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate.ts @@ -10,6 +10,7 @@ export class ViewPollCandidate extends BaseViewModel implements S public get poll_candidate(): PollCandidate { return this._model; } + public static COLLECTION = PollCandidate.COLLECTION; public getSubtitle(): string { diff --git a/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll.ts b/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll.ts index 1d82425dba..b1a5e94d06 100644 --- a/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll.ts +++ b/client/src/app/site/pages/meetings/pages/polls/view-models/view-poll.ts @@ -28,6 +28,7 @@ export class ViewPoll public get poll(): Poll { return this._model; } + public static COLLECTION = Poll.COLLECTION; public set hasVoted(value: boolean | undefined) { diff --git a/client/src/app/site/pages/meetings/services/meeting-component-service-collector.service.ts b/client/src/app/site/pages/meetings/services/meeting-component-service-collector.service.ts index dba5b067ab..496361b8f0 100644 --- a/client/src/app/site/pages/meetings/services/meeting-component-service-collector.service.ts +++ b/client/src/app/site/pages/meetings/services/meeting-component-service-collector.service.ts @@ -17,9 +17,11 @@ export class MeetingComponentServiceCollectorService { public get titleService(): Title { return this.componentServiceCollector.titleService; } + public get matSnackBar(): MatSnackBar { return this.componentServiceCollector.matSnackBar; } + public get storage(): StorageService { return this.componentServiceCollector.storage; } diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.ts index 5c69ac0d0b..d01322e12e 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.ts @@ -146,6 +146,7 @@ export class AccountDetailComponent extends BaseComponent implements OnInit { this.isEditingUser = false; } } + /** * (Re)- send an invitation email for this user after confirmation */ diff --git a/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-export.service/committee-export.service.ts b/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-export.service/committee-export.service.ts index e5d409199f..bd0ada4af3 100644 --- a/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-export.service/committee-export.service.ts +++ b/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-export.service/committee-export.service.ts @@ -15,6 +15,7 @@ export class CommitteeExportService { private csvExport: CsvExportService, private meetingRepo: MeetingControllerService ) {} + public export(committees: ViewCommittee[]): void { const properties: CsvColumnsDefinition = [ { diff --git a/client/src/app/site/services/operator.service.ts b/client/src/app/site/services/operator.service.ts index 58b1e2fbe7..a5de09470d 100644 --- a/client/src/app/site/services/operator.service.ts +++ b/client/src/app/site/services/operator.service.ts @@ -148,16 +148,20 @@ export class OperatorService { private get activeMeetingId(): number | null { return this.activeMeetingService.meetingId; } + private get activeMeeting(): ViewMeeting | null { return this.activeMeetingService.meeting; } + private get anonymousEnabled(): boolean { return this.activeMeetingService.guestsEnabled; } + private get defaultGroupId(): number | null { const activeMeeting = this.activeMeetingService.meeting; return activeMeeting ? activeMeeting.default_group_id : null; } + private get adminGroupId(): number | null { const activeMeeting = this.activeMeetingService.meeting; return activeMeeting ? activeMeeting.admin_group_id : null; @@ -171,6 +175,7 @@ export class OperatorService { private readonly _operatorShortNameSubject: BehaviorSubject = new BehaviorSubject( null ); + private readonly _userSubject = new BehaviorSubject(null); private readonly _operatorReadySubject = new BehaviorSubject(false); @@ -195,6 +200,7 @@ export class OperatorService { private set _permissions(perms: Permission[] | undefined) { this._permissionsSubject.next(perms); } + private get _permissions(): Permission[] | undefined { return this._permissionsSubject.value; } diff --git a/client/src/app/ui/base/base-form-control.ts b/client/src/app/ui/base/base-form-control.ts index f50e070e0f..dbf349b8fd 100644 --- a/client/src/app/ui/base/base-form-control.ts +++ b/client/src/app/ui/base/base-form-control.ts @@ -80,14 +80,17 @@ export abstract class BaseFormControlComponent implements ControlValueAccesso public writeValue(value: T): void { this.value = value; } + public registerOnChange(fn: any): void { this._onChange = fn; this.push(this.value); } + public registerOnTouched(fn: any): void { this._onTouched = fn; this.push(this.value); } + public setDisabledState?(isDisabled: boolean): void { this.disabled = isDisabled; } diff --git a/client/src/app/ui/base/base-form-field-control.ts b/client/src/app/ui/base/base-form-field-control.ts index 9cbbf0e260..32630e39de 100644 --- a/client/src/app/ui/base/base-form-field-control.ts +++ b/client/src/app/ui/base/base-form-field-control.ts @@ -148,18 +148,21 @@ export abstract class BaseFormFieldControlComponent public writeValue(value: T): void { this.value = value; } + public registerOnChange(fn: any): void { this._onChange = fn; if (this.shouldPropagateOnRegistering) { this.push(this.value); } } + public registerOnTouched(fn: any): void { this._onTouched = fn; if (this.shouldPropagateOnRegistering) { this.push(this.value); } } + public setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; } diff --git a/client/src/app/ui/modules/choice-dialog/services/choice.service.ts b/client/src/app/ui/modules/choice-dialog/services/choice.service.ts index 508f25ef80..aae2ac3703 100644 --- a/client/src/app/ui/modules/choice-dialog/services/choice.service.ts +++ b/client/src/app/ui/modules/choice-dialog/services/choice.service.ts @@ -39,6 +39,7 @@ export class ChoiceService { clearChoiceOption?: string, sortFn?: (a: T, b: T) => number ): Promise>; + public async open( titleOrConfig: string | ChoiceDialogConfig, choices?: Observable | T[], diff --git a/client/src/app/ui/modules/color-form-field/components/color-form-field/color-form-field.component.ts b/client/src/app/ui/modules/color-form-field/components/color-form-field/color-form-field.component.ts index 1c597807c0..f7d4f2c66f 100644 --- a/client/src/app/ui/modules/color-form-field/components/color-form-field/color-form-field.component.ts +++ b/client/src/app/ui/modules/color-form-field/components/color-form-field/color-form-field.component.ts @@ -29,9 +29,11 @@ export class ColorFormFieldComponent extends BaseFormControlComponent { this._defaultDisplayColorSubscription = displayCol.subscribe(col => this.setDefaultDisplayColor(col)); } } + public get defaultDisplayColor(): BehaviorSubject { return this._defaultDisplayColor; } + private _defaultDisplayColor = new BehaviorSubject(``); private _defaultDisplayColorSubscription: Subscription; diff --git a/client/src/app/ui/modules/editor/components/editor/editor.component.ts b/client/src/app/ui/modules/editor/components/editor/editor.component.ts index 63df674208..621ff0de40 100644 --- a/client/src/app/ui/modules/editor/components/editor/editor.component.ts +++ b/client/src/app/ui/modules/editor/components/editor/editor.component.ts @@ -84,6 +84,7 @@ export class EditorComponent extends BaseFormControlComponent implements protected createForm(): UntypedFormControl { return this.fb.control([``]); } + protected updateForm(value: string | null): void { this.contentForm.setValue(value); } diff --git a/client/src/app/ui/modules/import-list/components/via-backend-import-list/backend-import-list.component.ts b/client/src/app/ui/modules/import-list/components/via-backend-import-list/backend-import-list.component.ts index 896c3eb5bf..71bca16841 100644 --- a/client/src/app/ui/modules/import-list/components/via-backend-import-list/backend-import-list.component.ts +++ b/client/src/app/ui/modules/import-list/components/via-backend-import-list/backend-import-list.component.ts @@ -116,6 +116,7 @@ export class BackendImportListComponent implements OnInit, OnDestroy { this._defaultColumns = cols; this.setHeaders({ default: cols }); } + public get defaultColumns(): ImportListHeaderDefinition[] { return this._defaultColumns; } diff --git a/client/src/app/ui/modules/sorting/modules/sorting-tree/services/tree-sort.service.spec.ts b/client/src/app/ui/modules/sorting/modules/sorting-tree/services/tree-sort.service.spec.ts index 67f566ac1b..17ff5f7240 100644 --- a/client/src/app/ui/modules/sorting/modules/sorting-tree/services/tree-sort.service.spec.ts +++ b/client/src/app/ui/modules/sorting/modules/sorting-tree/services/tree-sort.service.spec.ts @@ -10,6 +10,7 @@ xdescribe(`TreeSortService`, () => { getTitle() { return `Title`; } + getListTitle() { return `LTitle`; }