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

Fix motion list structure level #2828

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
6 changes: 6 additions & 0 deletions client/src/app/domain/fieldsets/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ export class UserFieldsets {
]
};
}

export class MeetingUserFieldsets {
public static readonly FullNameSubscription: BaseSimplifiedModelRequest = {
fieldset: [`group_ids`, `meeting_id`, `user_id`, `structure_level`, `number`]
};
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not want to add new fieldsets because within the subscriptions we do not have any direct reference to these and therefore cannot see which fields will be subscribed.

Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export class MeetingUserRepositoryService extends BaseMeetingRelatedRepository<V
`vote_delegated_to_id`,
`vote_delegations_from_ids`,
`vote_weight`,
`structure_level`,
`number`,
`comment`,
`user_id`
`user_id`,
`structure_level`,
`number`
]);

const detailFields: TypedFieldset<MeetingUser> = [`about_me`, `user_id`, `meeting_id`];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Id } from 'src/app/domain/definitions/key-types';
import { FULL_FIELDSET, MEETING_ROUTING_FIELDS } from 'src/app/domain/fieldsets/misc';
import { UserFieldsets } from 'src/app/domain/fieldsets/user';
import { MeetingUserFieldsets, UserFieldsets } from 'src/app/domain/fieldsets/user';
import { SubscriptionConfigGenerator } from 'src/app/domain/interfaces/subscription-config';
import { ViewMeeting } from 'src/app/site/pages/meetings/view-models/view-meeting';
import { FollowList } from 'src/app/site/services/model-request-builder';
Expand All @@ -21,13 +21,13 @@ export const agendaItemFollow: FollowList<any> = [
follow: [
{
idField: `meeting_user_id`,
fieldset: [],
follow: [
{
idField: `user_id`,
...UserFieldsets.FullNameSubscription
fieldset: [...UserFieldsets.FullNameSubscription.fieldset, `meeting_user_ids`]
}
]
],
...MeetingUserFieldsets.FullNameSubscription
},
{
idField: `point_of_order_category_id`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Id } from 'src/app/domain/definitions/key-types';
import { UserFieldsets } from 'src/app/domain/fieldsets/user';
import { MeetingUserFieldsets, UserFieldsets } from 'src/app/domain/fieldsets/user';
import { SubscriptionConfigGenerator } from 'src/app/domain/interfaces/subscription-config';
import { ViewMeeting } from 'src/app/site/pages/meetings/view-models/view-meeting';

Expand All @@ -25,13 +25,13 @@ export const getAssignmentSubscriptionConfig: SubscriptionConfigGenerator = (id:
follow: [
{
idField: `meeting_user_id`,
fieldset: [],
follow: [
{
idField: `user_id`,
...UserFieldsets.FullNameSubscription
fieldset: [...UserFieldsets.FullNameSubscription.fieldset, `meeting_user_ids`]
}
]
],
...MeetingUserFieldsets.FullNameSubscription
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Id } from 'src/app/domain/definitions/key-types';
import { FULL_FIELDSET, MEETING_ROUTING_FIELDS } from 'src/app/domain/fieldsets/misc';
import { UserFieldsets } from 'src/app/domain/fieldsets/user';
import { MeetingUserFieldsets, UserFieldsets } from 'src/app/domain/fieldsets/user';
import { SubscriptionConfig, SubscriptionConfigGenerator } from 'src/app/domain/interfaces/subscription-config';
import { ViewMeeting } from 'src/app/site/pages/meetings/view-models/view-meeting';

Expand Down Expand Up @@ -59,13 +59,16 @@ export const getAutopilotContentSubscriptionConfig = (id: Id): SubscriptionConfi
follow: [
{
idField: `meeting_user_id`,
fieldset: [],
follow: [
{
idField: `user_id`,
...UserFieldsets.FullNameSubscription
fieldset: [
...UserFieldsets.FullNameSubscription.fieldset,
`meeting_user_ids`
]
}
]
],
...MeetingUserFieldsets.FullNameSubscription
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Id } from 'src/app/domain/definitions/key-types';
import { FULL_FIELDSET } from 'src/app/domain/fieldsets/misc';
import { UserFieldsets } from 'src/app/domain/fieldsets/user';
import { MeetingUserFieldsets, UserFieldsets } from 'src/app/domain/fieldsets/user';
import { SubscriptionConfigGenerator } from 'src/app/domain/interfaces/subscription-config';
import { ViewMeeting } from 'src/app/site/pages/meetings/view-models/view-meeting';

Expand Down Expand Up @@ -67,7 +67,13 @@ export const getMotionListSubscriptionConfig: SubscriptionConfigGenerator = (id:
follow: [
{
idField: `meeting_user_id`,
follow: [{ idField: `user_id`, ...UserFieldsets.FullNameSubscription }]
follow: [
{
idField: `user_id`,
fieldset: [...UserFieldsets.FullNameSubscription.fieldset, `meeting_user_ids`]
bastianjoel marked this conversation as resolved.
Show resolved Hide resolved
}
],
...MeetingUserFieldsets.FullNameSubscription
}
]
}
Expand Down