Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/motion forward #4190

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c0883b1
Fix follow generic relation subset (#4141)
bastianjoel Sep 17, 2024
75ea7c7
Replace span with the relevant os-class (#4134)
vkrasnovyd Sep 18, 2024
88ba93b
Change default motion poll title (#4136)
vkrasnovyd Sep 18, 2024
55a7996
Bump video.js from 8.17.3 to 8.17.4 in /client (#4122)
dependabot[bot] Sep 18, 2024
9450514
Bump ng2-pdf-viewer from 10.3.0 to 10.3.1 in /client (#4121)
dependabot[bot] Sep 18, 2024
dc21e8d
Bump the angular group in /client with 15 updates (#4118)
dependabot[bot] Sep 18, 2024
aafe887
Bump eslint-plugin-unused-imports from 4.1.3 to 4.1.4 in /client (#4120)
dependabot[bot] Sep 18, 2024
569fe95
Update meta repository (#4116)
openslides-automation[bot] Sep 18, 2024
6f8316f
Bump the angular-eslint group in /client with 5 updates (#4119)
dependabot[bot] Sep 18, 2024
7be728e
Fix none item setting id 0 in selector for motion block (#4128)
reiterl Sep 18, 2024
ec12018
Align editor styles with displayed content stylings (#4100)
bastianjoel Sep 18, 2024
c5afd08
Change poll title in Autopilot (#4139)
vkrasnovyd Sep 19, 2024
f510430
Fix amendment list performance (#3969)
bastianjoel Sep 20, 2024
0db6a3a
Dashboard reposition closed meeting icon (#4082)
reiterl Sep 20, 2024
a68d5b0
Hide group/external_id for non meeting admins (#4160)
reiterl Sep 23, 2024
2a900ee
File-list: Hide edit/group button in multiselect (#4161)
reiterl Sep 23, 2024
a37f70b
Bump the tiptap group in /client with 16 updates (#4165)
dependabot[bot] Sep 23, 2024
3c4cb65
Bump fetch-mock from 11.1.3 to 11.1.4 in /client (#4168)
dependabot[bot] Sep 23, 2024
6f7a5f0
Bump the angular group in /client with 15 updates (#4164)
dependabot[bot] Sep 23, 2024
31a5218
Bump eslint from 8.57.0 to 8.57.1 in /client (#4167)
dependabot[bot] Sep 23, 2024
c613d30
Add `default_password` to `account_list` subscription (#4169)
reiterl Sep 24, 2024
b95b55a
Update layout of pw reset/pw reset confirm pages (#4162)
reiterl Sep 24, 2024
953f551
Fix meeting disappearing on template meeting toggle (#4176)
bastianjoel Sep 25, 2024
fccfc7d
Lock participant out of meeting (#3815)
reiterl Sep 26, 2024
4e6057a
Change layout (#4180)
Elblinator Sep 27, 2024
3056053
Fix Motion-list CSV export and add new Version to export (#4177)
Elblinator Sep 27, 2024
109974a
Add default poll method to motion settings (#4173)
Elblinator Sep 27, 2024
7bdf456
Update meta repository (#4186)
openslides-automation[bot] Sep 27, 2024
f097ed2
Customizable gender field (#4027)
reiterl Sep 27, 2024
ea93051
Update meta repository (#4187)
openslides-automation[bot] Sep 27, 2024
a72366f
Merge branch 'main' into feature/motion-forward
bastianjoel Sep 30, 2024
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
952 changes: 484 additions & 468 deletions client/package-lock.json

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,38 @@
"get-available-languages": "npm run ts -- cli/get-available-languages.ts"
},
"dependencies": {
"@angular/animations": "^18.2.3",
"@angular/cdk": "^18.2.3",
"@angular/common": "^18.2.3",
"@angular/compiler": "^18.2.3",
"@angular/core": "^18.2.3",
"@angular/forms": "^18.2.3",
"@angular/material": "^18.2.3",
"@angular/material-date-fns-adapter": "^18.2.3",
"@angular/platform-browser": "^18.2.3",
"@angular/platform-browser-dynamic": "^18.2.3",
"@angular/router": "^18.2.3",
"@angular/service-worker": "^18.2.3",
"@angular/animations": "^18.2.5",
"@angular/cdk": "^18.2.5",
"@angular/common": "^18.2.5",
"@angular/compiler": "^18.2.5",
"@angular/core": "^18.2.5",
"@angular/forms": "^18.2.5",
"@angular/material": "^18.2.5",
"@angular/material-date-fns-adapter": "^18.2.5",
"@angular/platform-browser": "^18.2.5",
"@angular/platform-browser-dynamic": "^18.2.5",
"@angular/router": "^18.2.5",
"@angular/service-worker": "^18.2.5",
"@material/typography": "^14.0.0",
"@ngx-pwa/local-storage": "^18.0.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@tiptap/core": "^2.6.6",
"@tiptap/extension-color": "^2.6.6",
"@tiptap/extension-highlight": "^2.6.6",
"@tiptap/extension-image": "^2.6.6",
"@tiptap/extension-link": "^2.6.6",
"@tiptap/extension-subscript": "^2.6.6",
"@tiptap/extension-superscript": "^2.6.6",
"@tiptap/extension-table": "^2.6.6",
"@tiptap/extension-table-cell": "^2.6.6",
"@tiptap/extension-table-header": "^2.6.6",
"@tiptap/extension-table-row": "^2.6.6",
"@tiptap/extension-text-align": "^2.6.6",
"@tiptap/core": "^2.7.2",
"@tiptap/extension-color": "^2.7.2",
"@tiptap/extension-highlight": "^2.7.2",
"@tiptap/extension-image": "^2.7.2",
"@tiptap/extension-link": "^2.7.2",
"@tiptap/extension-subscript": "^2.7.2",
"@tiptap/extension-superscript": "^2.7.2",
"@tiptap/extension-table": "^2.7.2",
"@tiptap/extension-table-cell": "^2.7.2",
"@tiptap/extension-table-header": "^2.7.2",
"@tiptap/extension-table-row": "^2.7.2",
"@tiptap/extension-text-align": "^2.7.2",
"@tiptap/extension-text-style": "^2.5.4",
"@tiptap/extension-underline": "^2.6.6",
"@tiptap/extension-underline": "^2.7.2",
"@tiptap/pm": "^2.5.4",
"@tiptap/starter-kit": "^2.6.6",
"@tiptap/starter-kit": "^2.7.2",
"@tsparticles/angular": "^3.0.0",
"@tsparticles/engine": "^3.5.0",
"@tsparticles/plugin-emitters": "^3.5.0",
Expand All @@ -83,7 +83,7 @@
"jszip": "^3.10.1",
"material-design-icons-iconfont": "^6.7.0",
"ng2-charts": "^6.0.1",
"ng2-pdf-viewer": "^10.3.0",
"ng2-pdf-viewer": "^10.3.1",
"ngx-date-fns": "^11.0.0",
"ngx-device-detector": "^8.0.0",
"ngx-file-drop": "^16.0.0",
Expand All @@ -95,18 +95,18 @@
"qrcode": "^1.5.4",
"rxjs": "^7.8.1",
"tinycolor2": "1.6.0",
"video.js": "^8.17.3",
"video.js": "^8.17.4",
"zone.js": "^0.14.10"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.3",
"@angular-eslint/builder": "^18.3.0",
"@angular-eslint/eslint-plugin": "^18.3.0",
"@angular-eslint/eslint-plugin-template": "^18.3.0",
"@angular-eslint/schematics": "^18.3.0",
"@angular-eslint/template-parser": "^18.3.0",
"@angular/cli": "^18.2.3",
"@angular/compiler-cli": "^18.2.3",
"@angular-devkit/build-angular": "^18.2.5",
"@angular-eslint/builder": "^18.3.1",
"@angular-eslint/eslint-plugin": "^18.3.1",
"@angular-eslint/eslint-plugin-template": "^18.3.1",
"@angular-eslint/schematics": "^18.3.1",
"@angular-eslint/template-parser": "^18.3.1",
"@angular/cli": "^18.2.5",
"@angular/compiler-cli": "^18.2.5",
"@colsen1991/ngx-translate-extract-marker": "^2.0.8",
"@types/file-saver": "^2.0.7",
"@types/jasmine": "~5.1.4",
Expand All @@ -119,12 +119,12 @@
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vendure/ngx-translate-extract": "^9.2.1",
"eslint": "^8.57.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.1.3",
"fetch-mock": "^11.1.3",
"eslint-plugin-unused-imports": "^4.1.4",
"fetch-mock": "^11.1.4",
"jasmine-core": "~5.3.0",
"js-yaml": "^4.1.0",
"karma": "~6.4.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const meetingSettingsDefaults: { [key: string]: any } = {
motions_supporters_min_amount: 0,
motions_block_slide_columns: 3,
motion_poll_default_type: `pseudoanonymous`,
motion_poll_default_method: `YNA`,
motion_poll_default_onehundred_percent_base: `YNA`,
motion_poll_ballot_paper_selection: `CUSTOM_NUMBER`,
motion_poll_ballot_paper_number: 8,
Expand Down
4 changes: 3 additions & 1 deletion client/src/app/domain/definitions/permission.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ Meeting specific information: Structure level, Group, Participant number, About
},
{
display_name: _(`Can see sensitive data`),
help_text: _(`Can see email, username and SSO identification of all participants.`),
help_text: _(
`Can see email, username, membership number, SSO identification and locked out state of all participants.`
),
value: Permission.userCanSeeSensitiveData
},
{
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/domain/fieldsets/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BaseSimplifiedModelRequest } from 'src/app/site/services/model-request-

export class UserFieldsets {
public static readonly FullNameSubscription: BaseSimplifiedModelRequest = {
fieldset: [`title`, `first_name`, `last_name`, `pronoun`, `username`, `gender`, `default_vote_weight`]
fieldset: [`title`, `first_name`, `last_name`, `pronoun`, `username`, `default_vote_weight`, `gender_id`]
};
}

Expand Down
21 changes: 21 additions & 0 deletions client/src/app/domain/models/gender/gender.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Id } from '../../definitions/key-types';
import { BaseModel } from '../base/base-model';
/**
* Representation of a gender.
* @ignore
*/

export class Gender extends BaseModel<Gender> {
public static COLLECTION = `gender`;

public readonly name!: string;
public organization_id!: Id; // (organization/gender_ids)[]
public user_ids!: Id[]; // user/gender_id

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

public static readonly REQUESTABLE_FIELDS: (keyof Gender)[] = [`id`, `name`, `organization_id`, `user_ids`];
}
export interface Gender {}
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 @@ -11,6 +11,7 @@ export class MeetingUser extends BaseDecimalModel<MeetingUser> {
public readonly number!: string;
public readonly about_me!: string;
public readonly vote_weight!: number;
public readonly locked_out!: boolean;

public user_id!: Id;
public meeting_id!: Id;
Expand Down Expand Up @@ -42,6 +43,7 @@ export class MeetingUser extends BaseDecimalModel<MeetingUser> {
`number`,
`about_me`,
`vote_weight`,
`locked_out`,
`user_id`,
`meeting_id`,
`personal_note_ids`,
Expand Down
2 changes: 2 additions & 0 deletions client/src/app/domain/models/meetings/meeting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export class Settings {
public motion_poll_default_onehundred_percent_base!: PollPercentBase;
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;

// Users
public users_enable_presence_view!: boolean;
Expand Down Expand Up @@ -394,6 +395,7 @@ 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`,
Expand Down
4 changes: 2 additions & 2 deletions client/src/app/domain/models/organizations/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class OrganizationSetting {
public saml_metadata_idp!: string;
public saml_metadata_sp!: string;
public saml_private_key!: string;
public genders!: string[];
}

export class Organization extends BaseModel<Organization> {
Expand All @@ -52,6 +51,7 @@ export class Organization extends BaseModel<Organization> {
public archived_meeting_ids!: Id[]; // (meeting/is_archived_in_organization_id)[];
public template_meeting_ids!: Id[]; // (meeting/template_for_organization_id)[];
public mediafile_ids!: Id[];
public gender_ids!: Id[]; // (gender/organization_id);
public published_mediafile_ids!: Id[];

public constructor(input?: any) {
Expand All @@ -66,7 +66,7 @@ export class Organization extends BaseModel<Organization> {
`privacy_policy`,
`login_text`,
`reset_password_verbose_errors`,
`genders`,
`gender_ids`,
`enable_electronic_voting`,
`enable_chat`,
`limit_of_meetings`,
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/domain/models/users/user.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { marker as _ } from '@colsen1991/ngx-translate-extract-marker';

import { User } from './user';

export const userHeadersAndVerboseNames: { [key in keyof User]?: any } = {
export const userHeadersAndVerboseNames: { [key in keyof User | 'gender']?: any } = {
title: _(`Title`),
first_name: _(`Given name`),
last_name: _(`Surname`),
Expand Down
4 changes: 2 additions & 2 deletions client/src/app/domain/models/users/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class User extends BaseDecimalModel<User> {
public readonly is_physical_person!: boolean;
public readonly default_password!: string;
public readonly can_change_own_password!: boolean;
public readonly gender!: string;
public readonly email!: string;
public readonly last_email_sent!: number; // comes in seconds
public readonly last_login!: number; // comes in seconds
Expand All @@ -52,6 +51,7 @@ export class User extends BaseDecimalModel<User> {

public organization_management_level!: keyof OMLMapping;
public committee_management_ids!: Id[];
public gender_id: Id; // (gender/user_ids)[]

public constructor(input?: Partial<User>) {
super(User.COLLECTION, input);
Expand All @@ -74,12 +74,12 @@ export class User extends BaseDecimalModel<User> {
`is_physical_person`,
`default_password`,
`can_change_own_password`,
`gender`,
`email`,
`default_vote_weight`,
`last_email_sent`,
`is_demo_user`,
`last_login`,
`gender_id`,
`organization_management_level`,
`is_present_in_meeting_ids`,
`committee_ids`,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';

import { GenderRepositoryService } from './gender-repository.service';

xdescribe(`GenderRepositoryService`, () => {
let service: GenderRepositoryService;

beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(GenderRepositoryService);
});

it(`should be created`, () => {
expect(service).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Injectable } from '@angular/core';
import { Id } from 'src/app/domain/definitions/key-types';
import { Identifiable } from 'src/app/domain/interfaces';
import { Gender } from 'src/app/domain/models/gender/gender';
import { BaseRepository } from 'src/app/gateways/repositories/base-repository';
import { ViewGender } from 'src/app/site/pages/organization/pages/accounts/pages/gender/view-models/view-gender';
import { Fieldsets } from 'src/app/site/services/model-request-builder';

import { Action } from '../../actions';
import { RepositoryServiceCollectorService } from '../repository-service-collector.service';
import { GenderAction } from './gender.action';

@Injectable({
providedIn: `root`
})
export class GenderRepositoryService extends BaseRepository<ViewGender, Gender> {
public constructor(repositoryServiceCollector: RepositoryServiceCollectorService) {
super(repositoryServiceCollector, Gender);
}

public getVerboseName = (plural?: boolean): string => (plural ? `Genders` : `Gender`);
public getTitle = (viewModel: ViewGender): string => viewModel.name;
public override getFieldsets(): Fieldsets<any> {
const baseFields: (keyof Gender)[] = [];
const requiredFields: (keyof Gender)[] = baseFields.concat([`name`]);
return {
...super.getFieldsets(),
required: requiredFields
};
}

public create(...genders: any[]): Action<Identifiable[]> {
const payload = genders;
return this.createAction(GenderAction.CREATE, payload);
}

public update(update: any, id: Id): Action<void> {
const payload = {
id,
...update
};
return this.createAction(GenderAction.UPDATE, payload);
}

public delete(...ids: Id[]): Action<void> {
const payload = ids.map(id => ({ id }));
return this.createAction(GenderAction.DELETE, payload);
}
}
5 changes: 5 additions & 0 deletions client/src/app/gateways/repositories/gender/gender.action.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export class GenderAction {
public static readonly CREATE = `gender.create`;
public static readonly UPDATE = `gender.update`;
public static readonly DELETE = `gender.delete`;
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export class MeetingUserRepositoryService extends BaseMeetingRelatedRepository<V
`vote_weight`,
`comment`,
`user_id`,
`number`
`number`,
`locked_out`
]);

const detailFields: TypedFieldset<MeetingUser> = [`about_me`, `user_id`, `meeting_id`];
Expand All @@ -57,7 +58,8 @@ export class MeetingUserRepositoryService extends BaseMeetingRelatedRepository<V
vote_delegated_to_id: partialUser.vote_delegated_to_id,
vote_delegations_from_ids: partialUser.vote_delegations_from_ids,
structure_level_ids: partialUser.structure_level_ids,
group_ids: partialUser.group_ids
group_ids: partialUser.group_ids,
locked_out: partialUser.locked_out
};

if (Object.values(partialPayload).filter(val => val !== undefined).length > 1 && partialPayload.meeting_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ export class OrganizationRepositoryService extends BaseRepository<ViewOrganizati
`default_language`,
`saml_metadata_idp`,
`saml_metadata_sp`,
`saml_private_key`,
`genders`
`saml_private_key`
);
return {
...super.getFieldsets(),
Expand Down
Loading