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

Add default field to subscriptions #4310

Closed
Closed
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ export const listOfSpeakersSpeakerCountSubscription = {
follow: [
{
idField: `speaker_ids`,
fieldset: [`begin_time`, `end_time`],
follow: [
{
idField: `point_of_order_category_id`,
fieldset: FULL_FIELDSET
}
],
fieldset: [`begin_time`, `end_time`]
]
}
]
};
Expand All @@ -151,11 +151,11 @@ export const getListOfSpeakersDetailSubscriptionConfig: SubscriptionConfigGenera
follow: [
{
idField: `meeting_user_id`,
fieldset: [`number`, `vote_weight`],
follow: [
{ idField: `user_id`, ...UserFieldsets.FullNameSubscription },
{ idField: `structure_level_ids`, fieldset: [`name`] }
],
fieldset: [`number`, `vote_weight`]
]
},
{
idField: `structure_level_list_of_speakers_id`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FULL_FIELDSET } from 'src/app/domain/fieldsets/misc';
import { MeetingUserFieldsets } 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 { DEFAULT_FIELDSET } from 'src/app/site/services/model-request-builder';

import { listOfSpeakersSpeakerCountSubscription } from '../agenda/agenda.subscription';
import { pollModelRequest } from '../polls/polls.subscription';
Expand All @@ -17,6 +18,7 @@ export const getAssignmentSubscriptionConfig: SubscriptionConfigGenerator = (id:
follow: [
{
idField: `assignment_ids`,
fieldset: DEFAULT_FIELDSET,
follow: [
{
idField: `attachment_meeting_mediafile_ids`,
Expand All @@ -29,6 +31,7 @@ export const getAssignmentSubscriptionConfig: SubscriptionConfigGenerator = (id:
},
{
idField: `assignment_candidate_ids`,
fieldset: DEFAULT_FIELDSET,
follow: [{ idField: `meeting_user_id`, ...MeetingUserFieldsets.FullNameSubscription }]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export const getMediafilesListMinimalSubscriptionConfig: SubscriptionConfigGener
modelRequest: {
viewModelCtor: ViewMeeting,
ids: [id],
follow: [`mediafile_ids`, `meeting_mediafile_ids`]
follow: [
{ idField: `mediafile_ids`, fieldset: DEFAULT_FIELDSET },
{ idField: `meeting_mediafile_ids`, fieldset: DEFAULT_FIELDSET }
]
},
subscriptionName: MEDIAFILES_LIST_MINIMAL_SUBSCRIPTION
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FULL_FIELDSET } from 'src/app/domain/fieldsets/misc';
import { MeetingUserFieldsets } 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 { DEFAULT_FIELDSET } from 'src/app/site/services/model-request-builder';

import { listOfSpeakersSpeakerCountSubscription } from '../agenda/agenda.subscription';
import { pollModelRequest } from '../polls/polls.subscription';
Expand Down Expand Up @@ -121,10 +122,11 @@ export const getMotionWorkflowDetailSubscriptionConfig: SubscriptionConfigGenera
viewModelCtor: ViewMotionWorkflow,
follow: [
{
idField: `state_ids`
idField: `state_ids`,
fieldset: DEFAULT_FIELDSET
}
],
fieldset: ``
fieldset: []
},
subscriptionName: MOTION_WORKFLOW_DETAIL_SUBSCRIPTION
});
Expand All @@ -133,6 +135,7 @@ export const getMotionsSubmodelSubscriptionConfig: SubscriptionConfigGenerator =
modelRequest: {
viewModelCtor: ViewMeeting,
ids: [id],
fieldset: DEFAULT_FIELDSET,
follow: [
{ idField: `motion_category_ids`, fieldset: FULL_FIELDSET },
{ idField: `motion_state_ids`, fieldset: FULL_FIELDSET },
Expand Down Expand Up @@ -189,13 +192,13 @@ export const getMotionDetailSubscriptionConfig: SubscriptionConfigGenerator = (.
{ idField: `comment_ids`, fieldset: FULL_FIELDSET },
{
idField: `supporter_meeting_user_ids`,
fieldset: `participantListMinimal`,
follow: [
{
idField: `user_id`,
fieldset: `participantList`
}
],
fieldset: `participantListMinimal`
]
}
],
fieldset: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const getParticipantVoteInfoSubscriptionConfig: SubscriptionConfigGenerat
},
{
idField: `vote_delegated_to_id`,
follow: [{ idField: `user_id`, fieldset: [`is_present_in_meeting_ids`] }],
fieldset: [`meeting_id`]
fieldset: [`meeting_id`],
follow: [{ idField: `user_id`, fieldset: [`is_present_in_meeting_ids`] }]
}
]
}
Expand All @@ -55,7 +55,10 @@ export const getParticipantIsPresentSubscriptionConfig: SubscriptionConfigGenera
follow: [
{
idField: `meeting_user_ids`,
follow: [{ idField: `user_id`, additionalFields: [`is_present_in_meeting_ids`] }]
fieldset: DEFAULT_FIELDSET,
follow: [
{ idField: `user_id`, fieldset: DEFAULT_FIELDSET, additionalFields: [`is_present_in_meeting_ids`] }
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Id } from 'src/app/domain/definitions/key-types';
import { FULL_FIELDSET, MEETING_ROUTING_FIELDS } from 'src/app/domain/fieldsets/misc';
import { MeetingUserFieldsets, UserFieldsets } from 'src/app/domain/fieldsets/user';
import { SubscriptionConfigGenerator } from 'src/app/domain/interfaces/subscription-config';
import { BaseSimplifiedModelRequest } from 'src/app/site/services/model-request-builder';
import { BaseSimplifiedModelRequest, DEFAULT_FIELDSET } from 'src/app/site/services/model-request-builder';

import { ViewMeeting } from '../../view-models/view-meeting';
import { ViewPoll } from './view-models';
Expand Down Expand Up @@ -50,6 +50,7 @@ export const getPollListSubscriptionConfig: SubscriptionConfigGenerator = (id: I
modelRequest: {
viewModelCtor: ViewMeeting,
ids: [id],
fieldset: DEFAULT_FIELDSET,
follow: [{ idField: `poll_ids`, ...pollModelRequest }]
},
subscriptionName: POLL_LIST_SUBSCRIPTION
Expand Down Expand Up @@ -83,7 +84,7 @@ export const getPollDetailSubscriptionConfig: SubscriptionConfigGenerator = (...
{
idField: `global_option_id`,
fieldset: FULL_FIELDSET,
follow: [{ idField: `vote_ids` }]
follow: [{ idField: `vote_ids`, fieldset: DEFAULT_FIELDSET }]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ export const getProjectorListSubscriptionConfig: SubscriptionConfigGenerator = (
modelRequest: {
viewModelCtor: ViewMeeting,
ids: [id],
fieldset: DEFAULT_FIELDSET,
additionalFields: [`reference_projector_id`],
follow: [
{
idField: `projector_ids`,
fieldset: DEFAULT_FIELDSET,
follow: [
{
idField: `current_projection_ids`,
Expand All @@ -41,6 +44,7 @@ export const getProjectorListSubscriptionConfig: SubscriptionConfigGenerator = (
},
{
idField: `preview_projection_ids`,
fieldset: DEFAULT_FIELDSET,
follow: [
{
idField: `content_object_id`,
Expand All @@ -51,6 +55,7 @@ export const getProjectorListSubscriptionConfig: SubscriptionConfigGenerator = (
},
{
idField: `history_projection_ids`,
fieldset: DEFAULT_FIELDSET,
follow: [
{
idField: `content_object_id`,
Expand All @@ -61,14 +66,16 @@ export const getProjectorListSubscriptionConfig: SubscriptionConfigGenerator = (
}
]
},
`projector_countdown_ids`,
`projector_message_ids`,
...MEETING_DEFAULT_PROJECTOR_IDS_KEYS,
{ idField: `speaker_ids`, additionalFields: [`meeting_user_id`] },
`list_of_speakers_ids`,
{ idField: `projector_countdown_ids`, fieldset: DEFAULT_FIELDSET },
{ idField: `projector_message_ids`, fieldset: DEFAULT_FIELDSET },
...MEETING_DEFAULT_PROJECTOR_IDS_KEYS.map(idField => ({
idField,
fieldset: DEFAULT_FIELDSET
})),
{ idField: `speaker_ids`, fieldset: DEFAULT_FIELDSET, additionalFields: [`meeting_user_id`] },
{ idField: `list_of_speakers_ids`, fieldset: DEFAULT_FIELDSET },
{ idField: `agenda_item_ids`, fieldset: [`item_number`, `content_object_id`] }
],
additionalFields: [`reference_projector_id`]
]
},
subscriptionName: PROJECTOR_LIST_SUBSCRIPTION
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { ViewProjectorMeetingUsageKey } from 'src/app/domain/models/projector/pr
import { BaseViewModel, ViewModelRelations } from 'src/app/site/base/base-view-model';
import { HasMeeting } from 'src/app/site/pages/meetings/view-models/has-meeting';
import { ViewMeeting } from 'src/app/site/pages/meetings/view-models/view-meeting';
import { Follow } from 'src/app/site/services/model-request-builder';
import { DEFAULT_FIELDSET, Follow } from 'src/app/site/services/model-request-builder';

import { ViewProjection } from './view-projection';

export const PROJECTOR_CONTENT_FOLLOW: Follow = {
idField: `current_projection_ids`,
follow: [{ idField: `content_object_id` }],
fieldset: `content`
fieldset: `content`,
follow: [{ idField: `content_object_id`, fieldset: DEFAULT_FIELDSET }]
};

export class ViewProjector extends BaseViewModel<Projector> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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 { MEETING_MEDIAFILE_USAGE_ID_KEYS } from 'src/app/domain/models/meetings/meeting.constants';
import { DEFAULT_FIELDSET } from 'src/app/site/services/model-request-builder';

import { ViewMeeting } from '../view-models/view-meeting';

Expand Down Expand Up @@ -36,9 +37,10 @@ export function getActiveMeetingSubscriptionConfig(id: Id, settingsKeys: string[
idField,
fieldset: [`mediafile_id`]
})),
{ idField: `chat_group_ids` /*, fieldset: [`chat_message_ids`]*/ },
{ idField: `chat_group_ids`, fieldset: DEFAULT_FIELDSET /*, fieldset: [`chat_message_ids`]*/ },
{
idField: `chat_message_ids`,
fieldset: DEFAULT_FIELDSET,
follow: [
{
idField: `meeting_user_id`,
Expand All @@ -54,14 +56,14 @@ export function getActiveMeetingSubscriptionConfig(id: Id, settingsKeys: string[
}, // TODO: Remove and count unread messages by chat_group_ids/chat_message_ids
{
idField: `poll_ids`,
fieldset: [`title`, `state`, `entitled_group_ids`],
follow: [
{
idField: `content_object_id`,
fieldset: [`title`],
follow: [{ idField: `agenda_item_id`, fieldset: [`item_number`, `content_object_id`] }]
}
],
fieldset: [`title`, `state`, `entitled_group_ids`]
]
},
{
idField: `point_of_order_category_ids`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ function getMeetingListFollowConfig(
): any {
return {
idField: idField,
fieldset: `list`,
follow: [
{ idField: `committee_id`, fieldset: `name` },
{ idField: `organization_tag_ids`, fieldset: FULL_FIELDSET }
],
fieldset: `list`
]
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export const getAccountDetailSubscriptionConfig: SubscriptionConfigGenerator = (
{ idField: `committee_ids`, fieldset: [`name`, `manager_ids`] },
{
idField: `meeting_ids`,
follow: [{ idField: `group_ids`, fieldset: [`name`], isFullList: false }],
fieldset: [`name`, `committee_id`]
fieldset: [`name`, `committee_id`],
follow: [{ idField: `group_ids`, fieldset: [`name`], isFullList: false }]
},
{ idField: `gender_id`, fieldset: [`name`] }
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,18 @@ export const getCommitteeDetailSubscriptionConfig: SubscriptionConfigGenerator =
follow: [{ idField: `meeting_user_ids`, fieldset: `groups` }]
},
{
idField: `meeting_ids`
idField: `meeting_ids`,
fieldset: [
`end_time`,
`is_active_in_organization_id`,
`location`,
`locked_from_inside`,
`name`,
`organization_tag_ids`,
`start_time`,
`template_for_organization_id`,
`user_ids`
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SubscriptionConfigGenerator } from 'src/app/domain/interfaces/subscription-config';
import { DEFAULT_FIELDSET } from 'src/app/site/services/model-request-builder';

import { ORGANIZATION_ID } from '../../services/organization.service';
import { ViewOrganization } from '../../view-models/view-organization';
Expand All @@ -10,6 +11,7 @@ export const getOrganizationMediafileListSubscriptionConfig: SubscriptionConfigG
modelRequest: {
viewModelCtor: ViewOrganization,
ids: [ORGANIZATION_ID],
fieldset: DEFAULT_FIELDSET,
follow: [
{
idField: `mediafile_ids`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { SubscriptionConfigGenerator } from 'src/app/domain/interfaces/subscription-config';
import { ORGANIZATION_ID } from 'src/app/site/pages/organization/services/organization.service';
import { ViewOrganization } from 'src/app/site/pages/organization/view-models/view-organization';
import { DEFAULT_FIELDSET } from 'src/app/site/services/model-request-builder';

export const ORGANIZATION_TAG_LIST_SUBSCRIPTION = `organization_tag_list`;

Expand All @@ -9,6 +10,6 @@ export const getOrganizationTagListSubscriptionConfig: SubscriptionConfigGenerat
modelRequest: {
viewModelCtor: ViewOrganization,
ids: [ORGANIZATION_ID],
follow: [`organization_tag_ids`]
follow: [{ idField: `organization_tag_ids`, fieldset: DEFAULT_FIELDSET }]
}
});
Loading