Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
f913477
Remove old fields
bastianjoel Oct 27, 2025
e9201af
Add api service
bastianjoel Oct 27, 2025
aaeff35
Update models
bastianjoel Feb 13, 2026
306bfed
Rename vote to ballot
bastianjoel Feb 13, 2026
3a9b5d9
Add poll config models
bastianjoel Feb 13, 2026
b49e788
Poll config repos
bastianjoel Feb 13, 2026
f201791
Add missing poll fields
bastianjoel Feb 16, 2026
7932673
Add relations
bastianjoel Feb 16, 2026
9399942
WIP: Restructure poll forms
bastianjoel Feb 19, 2026
09db792
WIP: Restructure poll forms
bastianjoel Feb 20, 2026
c0ae8b4
WIP: Approval poll form
bastianjoel Feb 20, 2026
cfc4d27
Use defaults
bastianjoel Feb 20, 2026
8f42c0b
Fix build
bastianjoel Feb 25, 2026
c0ee1b7
Implement new published state
bastianjoel Feb 26, 2026
c806cd9
Update vote meta
bastianjoel Feb 26, 2026
a3c272b
Approval poll form edit
bastianjoel Feb 26, 2026
55fafea
Standalone migration/New vote view
bastianjoel Feb 26, 2026
deaeb78
Merge branch 'main' into new-vote-service
bastianjoel Feb 27, 2026
3085cbd
Merge branch 'main' into new-vote-service
bastianjoel Feb 27, 2026
0393a9b
Fix abstain edit
bastianjoel Feb 27, 2026
a871a38
Implement poll-vote component
bastianjoel Mar 2, 2026
1ba7e29
Migrate poll progress to signals
bastianjoel Mar 2, 2026
e9270cb
Update vote api routes
bastianjoel Mar 2, 2026
4a86f36
Fix vote state change button
bastianjoel Mar 2, 2026
7008b95
Fix karma tests
bastianjoel Mar 2, 2026
1664209
Discard ng-content concept for voting form
bastianjoel Mar 2, 2026
910afa5
Add approval vote component to poll
bastianjoel Mar 2, 2026
fa3ff71
Send votes
bastianjoel Mar 3, 2026
21cf087
Fix votecast in progress
bastianjoel Mar 4, 2026
8098542
Merge branch 'main' into new-vote-service
bastianjoel Mar 4, 2026
302892e
Merge branch 'main' into new-vote-service
bastianjoel Mar 4, 2026
e0ecdb3
Fix progress
bastianjoel Mar 4, 2026
436abdb
Display already voted message
bastianjoel Mar 4, 2026
71ce38f
Display poll prohibition reason
bastianjoel Mar 4, 2026
b2d7d9a
Vote banner
bastianjoel Mar 4, 2026
cd2d5e5
Display polls in autopilot
bastianjoel Mar 4, 2026
472db7f
Poll approval vote result chart
bastianjoel Mar 4, 2026
79b6d3c
Add result table
bastianjoel Mar 4, 2026
9979556
Rename vote/form components
bastianjoel Mar 5, 2026
e33ba97
Onehundred percent base in approval vote form
bastianjoel Mar 5, 2026
6e88b7d
Create components for selection poll
bastianjoel Mar 5, 2026
a752f13
Topic poll form
bastianjoel Mar 6, 2026
1571763
Fix config undefined
bastianjoel Mar 6, 2026
0e04e26
Subscribe poll options
bastianjoel Mar 6, 2026
5257c5e
Cleanup
bastianjoel Mar 6, 2026
035a184
Topic option list styling
bastianjoel Mar 6, 2026
6bac1ed
Fix poll config option relation
bastianjoel Mar 6, 2026
70a2a2e
Selection vote
bastianjoel Mar 6, 2026
92bc1f9
Update config field
bastianjoel Mar 11, 2026
09fc5d1
WIP: Assignment poll form dialog
bastianjoel Mar 11, 2026
8c72c5e
Move assignment forms into tabs
bastianjoel Mar 16, 2026
589e569
Save asignment poll options
bastianjoel Mar 16, 2026
8e63577
Update meta
bastianjoel Mar 17, 2026
cb180c5
Allow live voting for open visibility
bastianjoel Mar 17, 2026
45bb001
Move poll vote option into component
bastianjoel Mar 18, 2026
9eff99b
Update poll options model
bastianjoel Mar 20, 2026
873f57a
Remove ViewOption, ViewPollCandidate, ViewPollCandidateList models
bastianjoel Mar 23, 2026
a97b10a
Fix remaining components depending on old stuff
bastianjoel Mar 24, 2026
5179b88
Merge branch 'feature/vote' into new-vote-service
bastianjoel Mar 26, 2026
2b07df4
Linter fixes
bastianjoel Mar 26, 2026
20e2e25
WIP: Remove old fields
bastianjoel Apr 24, 2026
e2fced1
Add missing fields
bastianjoel Apr 27, 2026
338b6f0
Remove old fields
bastianjoel Apr 27, 2026
b570872
Remove unused models
bastianjoel Apr 27, 2026
11b42c4
Unused type removal
bastianjoel Apr 28, 2026
250ff93
Replace some form checkboxes with selects
bastianjoel Apr 28, 2026
cfbf400
Cleanup poll dialogs
bastianjoel Apr 29, 2026
539899a
Further poll dialog cleanup
bastianjoel Apr 29, 2026
b28fc52
Add poll meta component
bastianjoel Apr 30, 2026
1093a9a
Fix privacy warning dialog button
bastianjoel Apr 30, 2026
524b51a
Cleanup motion poll component
bastianjoel Apr 30, 2026
fbcde5e
WIP: Poll update
bastianjoel Apr 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/src/app/domain/models/meeting-users/meeting-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class MeetingUser extends BaseDecimalModel<MeetingUser> {

public vote_delegated_to_id!: Id; // meeting_user/vote_delegations_from_ids;

public poll_voted_ids: Id[];
public group_ids!: Id[]; // (group/meeting_user_ids)[];
public speaker_ids!: Id[]; // (speaker/meeting_user_id)[];
public personal_note_ids!: Id[]; // (personal_note/meeting_user_id)[];
Expand Down Expand Up @@ -52,6 +53,7 @@ export class MeetingUser extends BaseDecimalModel<MeetingUser> {
`assignment_candidate_ids`,
`vote_delegated_to_id`,
`vote_delegations_from_ids`,
`poll_voted_ids`,
`chat_message_ids`,
`group_ids`,
`structure_level_ids`
Expand Down
31 changes: 8 additions & 23 deletions client/src/app/domain/models/meetings/meeting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { HasProperties } from '../../interfaces/has-properties';
import { AgendaItemCreation, AgendaItemType } from '../agenda/agenda-item';
import { BaseModel } from '../base/base-model';
import { ChangeRecoMode, LineNumberingMode } from '../motions/motions.constants';
import { PollBackendDurationType, PollMethod, PollPercentBase, PollType } from '../poll/poll-constants';
import { PollVisibility } from '../poll';
import { BaseOnehundredPercentBase } from '../poll/poll-config-types';
import { ApplauseType } from './applause';
import {
BallotPaperSelection,
Expand Down Expand Up @@ -146,11 +147,9 @@ export class Settings {

public motion_poll_ballot_paper_selection!: BallotPaperSelection;
public motion_poll_ballot_paper_number!: number;
public motion_poll_default_type!: PollType;
public motion_poll_default_onehundred_percent_base!: PollPercentBase;
public motion_poll_default_type!: PollVisibility;
public motion_poll_default_onehundred_percent_base!: BaseOnehundredPercentBase;
public motion_poll_default_group_ids!: Id[]; // (group/used_as_motion_poll_default_id)[];
public motion_poll_default_backend!: PollBackendDurationType;
public motion_poll_default_method!: PollMethod;
public motion_poll_projection_name_order_first!: `first_name` | `last_name`;
public motion_poll_projection_max_columns!: number;

Expand Down Expand Up @@ -182,11 +181,9 @@ export class Settings {
public assignment_poll_add_candidates_to_list_of_speakers!: boolean;
public assignment_poll_enable_max_votes_per_option!: boolean;
public assignment_poll_sort_poll_result_by_votes!: boolean;
public assignment_poll_default_type!: PollType;
public assignment_poll_default_method!: PollMethod;
public assignment_poll_default_onehundred_percent_base!: PollPercentBase;
public assignment_poll_default_type!: PollVisibility;
public assignment_poll_default_onehundred_percent_base!: BaseOnehundredPercentBase;
public assignment_poll_default_group_ids!: Id[]; // (group/used_as_assignment_poll_default_id)[];
public assignment_poll_default_backend!: PollBackendDurationType;

// topic poll
public topic_poll_default_group_ids: Id[]; // (group/used_as_poll_default_id)[];
Expand All @@ -195,11 +192,9 @@ export class Settings {
public poll_ballot_paper_selection: BallotPaperSelection;
public poll_ballot_paper_number: number;
public poll_sort_poll_result_by_votes: boolean;
public poll_default_type: PollType;
public poll_default_method: PollMethod;
public poll_default_onehundred_percent_base: PollPercentBase;
public poll_default_type: PollVisibility;
public poll_default_onehundred_percent_base: BaseOnehundredPercentBase;
public poll_default_group_ids: Id[]; // (group/used_as_poll_default_id)[];
public poll_default_backend: PollBackendDurationType;
public poll_default_live_voting_enabled: boolean;

// SSO
Expand Down Expand Up @@ -412,14 +407,10 @@ export class Meeting extends BaseModel<Meeting> {
`motion_poll_ballot_paper_selection`,
`motion_poll_ballot_paper_number`,
`motion_poll_default_type`,
`motion_poll_default_method`,
`motion_poll_default_onehundred_percent_base`,
`motion_poll_default_group_ids`,
`motion_poll_default_backend`,
`motion_poll_projection_name_order_first`,
`motion_poll_projection_max_columns`,
`poll_candidate_list_ids`,
`poll_candidate_ids`,
`meeting_user_ids`,
`users_enable_presence_view`,
`users_enable_vote_weight`,
Expand All @@ -446,18 +437,14 @@ export class Meeting extends BaseModel<Meeting> {
`assignment_poll_enable_max_votes_per_option`,
`assignment_poll_sort_poll_result_by_votes`,
`assignment_poll_default_type`,
`assignment_poll_default_method`,
`assignment_poll_default_onehundred_percent_base`,
`assignment_poll_default_group_ids`,
`assignment_poll_default_backend`,
`poll_ballot_paper_selection`,
`poll_ballot_paper_number`,
`poll_sort_poll_result_by_votes`,
`poll_default_type`,
`poll_default_method`,
`poll_default_onehundred_percent_base`,
`poll_default_group_ids`,
`poll_default_backend`,
`poll_default_live_voting_enabled`,
`topic_poll_default_group_ids`,
`projector_ids`,
Expand Down Expand Up @@ -488,8 +475,6 @@ export class Meeting extends BaseModel<Meeting> {
`motion_change_recommendation_ids`,
`motion_state_ids`,
`poll_ids`,
`option_ids`,
`vote_ids`,
`assignment_ids`,
`assignment_candidate_ids`,
`personal_note_ids`,
Expand Down

This file was deleted.

This file was deleted.

41 changes: 41 additions & 0 deletions client/src/app/domain/models/poll/ballot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Id } from '../../definitions/key-types';
import { HasMeetingId } from '../../interfaces';
import { BaseModel } from '../base/base-model';
import { VoteValue, VoteValueVerbose } from './vote-constants';

export class Ballot extends BaseModel<Ballot> {
public static COLLECTION = `ballot`;

public weight: number;
public split: boolean;
public value: VoteValue;

public poll_id!: Id;
public acting_meeting_user_id: Id;
public represented_meeting_user_id: Id;

public get valueVerbose(): string {
return VoteValueVerbose[this.value];
}

public constructor(input?: Partial<Ballot>) {
super(Ballot.COLLECTION, input);
}

protected getDecimalFields(): string[] {
return [`weight`];
}

public static readonly REQUESTABLE_FIELDS: (keyof Ballot)[] = [
`id`,
`weight`,
`split`,
`value`,
`meeting_id`,
`poll_id`,
`acting_meeting_user_id`,
`represented_meeting_user_id`
];
}

export interface Ballot extends HasMeetingId {}
6 changes: 6 additions & 0 deletions client/src/app/domain/models/poll/base-poll-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Id } from '../../definitions/key-types';
import { BaseModel } from '../base/base-model';

export abstract class BasePollConfigModel<T = any> extends BaseModel<T> {
public poll_id!: Id;
}
30 changes: 3 additions & 27 deletions client/src/app/domain/models/poll/generic-poll.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { Observable } from 'rxjs';
import { ViewTopic } from 'src/app/site/pages/meetings/pages/agenda';
import { ViewAssignment } from 'src/app/site/pages/meetings/pages/assignments';
import { ViewMotion } from 'src/app/site/pages/meetings/pages/motions';
import { ViewPollCandidateList } from 'src/app/site/pages/meetings/pages/polls/view-models/view-poll-candidate-list';
import { ViewUser } from 'src/app/site/pages/meetings/view-models/view-user';

import { EntitledUsersEntry, PollClassType, PollMethod, PollPercentBase, PollState, PollType } from './poll-constants';
import { ViewMeetingUser } from 'src/app/site/pages/meetings/view-models/view-meeting-user';

export type PollContentObject = ViewAssignment | ViewMotion | ViewTopic;

Expand All @@ -14,27 +10,6 @@ export type PollContentObject = ViewAssignment | ViewMotion | ViewTopic;
* This is a unification of the data received in the projector and ViewPoll; both
* use this interface, so the poll services can work on this shared view on the data.
*/
export interface PollData {
pollClassType?: PollClassType;
pollmethod: PollMethod;
state: PollState;
onehundred_percent_base: PollPercentBase;
votesvalid: number;
votesinvalid: number;
votescast: number;
type: PollType;
entitled_users_at_stop: EntitledUsersEntry[];
options: OptionData[];
options$: Observable<OptionData[]>;
global_option: OptionData;
global_yes?: boolean;
global_no?: boolean;
global_abstain?: boolean;
content_object?: PollContentObject;
getContentObjectTitle: () => string | null;
}

export type PollDataKey = keyof PollData;

export interface OptionTitle {
title: string;
Expand All @@ -53,7 +28,8 @@ export interface OptionData {
amount_global_yes?: number;
amount_global_no?: number;
amount_global_abstain?: number;
content_object?: ViewUser | ViewMotion | ViewPollCandidateList;
meeting_user?: ViewMeetingUser;
text?: string;
entries_amount?: number;
}

Expand Down
3 changes: 1 addition & 2 deletions client/src/app/domain/models/poll/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * from './ballot';
export * from './generic-poll';
export * from './option';
export * from './poll';
export * from './poll-constants';
export * from './vote';
export * from './vote-constants';
42 changes: 0 additions & 42 deletions client/src/app/domain/models/poll/option.ts

This file was deleted.

25 changes: 25 additions & 0 deletions client/src/app/domain/models/poll/poll-config-approval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { HasMeetingId } from '../../interfaces';
import { BasePollConfigModel } from './base-poll-config';
import { BaseOnehundredPercentBase } from './poll-config-types';

export type ApprovalOnehundredPercentBase = BaseOnehundredPercentBase | `yes_no`;

export class PollConfigApproval extends BasePollConfigModel<PollConfigApproval> {
public static COLLECTION = `poll_config_approval`;

public allow_abstain!: boolean;
public onehundred_percent_base!: ApprovalOnehundredPercentBase;

public constructor(input?: Partial<PollConfigApproval>) {
super(PollConfigApproval.COLLECTION, input);
}

public static readonly REQUESTABLE_FIELDS: (keyof PollConfigApproval)[] = [
`id`,
`poll_id`,
`allow_abstain`,
`onehundred_percent_base`
];
}

export interface PollConfigApproval extends HasMeetingId {}
29 changes: 29 additions & 0 deletions client/src/app/domain/models/poll/poll-config-rating-approval.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { HasMeetingId } from '../../interfaces';
import { BasePollConfigModel } from './base-poll-config';
import { BaseOnehundredPercentBase } from './poll-config-types';

export type RatingApprovalOnehundredPercentBase = BaseOnehundredPercentBase | `yes_no`;

export class PollConfigRatingApproval extends BasePollConfigModel<PollConfigRatingApproval> {
public static COLLECTION = `poll_config_rating_approval`;

public max_options_amount!: number;
public min_options_amount!: number;
public allow_abstain!: boolean;
public onehundred_percent_base!: RatingApprovalOnehundredPercentBase;

public constructor(input?: Partial<PollConfigRatingApproval>) {
super(PollConfigRatingApproval.COLLECTION, input);
}

public static readonly REQUESTABLE_FIELDS: (keyof PollConfigRatingApproval)[] = [
`id`,
`poll_id`,
`max_options_amount`,
`min_options_amount`,
`allow_abstain`,
`onehundred_percent_base`
];
}

export interface PollConfigRatingApproval extends HasMeetingId {}
Loading
Loading