Skip to content

Commit 46ae533

Browse files
authored
Add meeting time zone field (#6042)
1 parent 27d25ef commit 46ae533

File tree

25 files changed

+322
-55
lines changed

25 files changed

+322
-55
lines changed

client/package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"@cantoo/pdf-lib": "^2.6.5",
4848
"@coreui/angular-chartjs": "~5.6.21",
4949
"@coreui/chartjs": "^4.1.0",
50+
"@date-fns/tz": "^1.4.1",
5051
"@intevation/tiptap-extension-office-paste": "^0.1.2",
5152
"@material/typography": "^14.0.0",
5253
"@ngx-pwa/local-storage": "^21.0.0",

client/src/app/domain/models/meetings/meeting.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export class Settings {
3131
// in the committee-list-view is finished.
3232
public enable_anonymous!: boolean;
3333
public language!: string;
34+
public time_zone!: string;
3435

3536
// Jitsi/Livestream settings
3637
public jitsi_domain!: string;
@@ -305,6 +306,7 @@ export class Meeting extends BaseModel<Meeting> {
305306
`is_archived_in_organization_id`,
306307
`description`,
307308
`location`,
309+
`time_zone`,
308310
`start_time`,
309311
`end_time`,
310312
`locked_from_inside`,

client/src/app/domain/models/organizations/organization.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export class Organization extends BaseModel<Organization> {
5757
public mediafile_ids!: Id[];
5858
public gender_ids!: Id[]; // (gender/organization_id);
5959
public published_mediafile_ids!: Id[];
60+
public time_zone!: string;
6061

6162
public constructor(input?: any) {
6263
super(Organization.COLLECTION, input);
@@ -78,6 +79,7 @@ export class Organization extends BaseModel<Organization> {
7879
`limit_of_meetings`,
7980
`limit_of_users`,
8081
`default_language`,
82+
`time_zone`,
8183
`require_duplicate_from`,
8284
`enable_anonymous`,
8385
`restrict_editing_same_level_committee_admins`,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Injectable } from '@angular/core';
2+
3+
import { Presenter } from './presenter';
4+
import { PresenterService } from './presenter.service';
5+
6+
type ValidTimeZones = Record<string, string>;
7+
8+
@Injectable({
9+
providedIn: `root`
10+
})
11+
export class GetValidTimezonesPresenterService {
12+
public constructor(private presenter: PresenterService) {}
13+
14+
public async call(): Promise<ValidTimeZones> {
15+
const response = await this.presenter.call<ValidTimeZones>(Presenter.GET_VALID_TIMEZONES, {});
16+
return response;
17+
}
18+
}

client/src/app/gateways/presenter/presenter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export enum Presenter {
77
GET_USER_SCOPE = `get_user_scope`,
88
GET_FORWARDING_COMMITTEES = `get_forwarding_committees`,
99
GET_FORWARDING_MEETINGS = `get_forwarding_meetings`,
10+
GET_VALID_TIMEZONES = `get_valid_timezones`,
1011
SEARCH_USERS = `search_users`,
1112
SEARCH_DELETED_MODELS = `search_deleted_models`,
1213
EXPORT_MEETING = `export_meeting`

client/src/app/gateways/repositories/meeting-repository.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,16 @@ export class MeetingRepositoryService extends BaseRepository<ViewMeeting, Meetin
7575
`group_ids`,
7676
`language`,
7777
`locked_from_inside`,
78-
`enable_anonymous`
78+
`enable_anonymous`,
79+
`time_zone`
7980
]);
8081
const detailEditFields: TypedFieldset<Meeting> = [
8182
`default_meeting_for_committee_id`,
8283
`jitsi_domain`,
8384
`jitsi_room_name`,
8485
`jitsi_room_password`,
85-
`language`
86+
`language`,
87+
`time_zone`
8688
];
8789
const groupFields: TypedFieldset<Meeting> = [`admin_group_id`, `default_group_id`];
8890

client/src/app/gateways/repositories/organization-repository.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export class OrganizationRepositoryService extends BaseRepository<ViewOrganizati
4848
`enable_anonymous`,
4949
`disable_forward_with_attachments`,
5050
`restrict_editing_same_level_committee_admins`,
51-
`restrict_edit_forward_committees`
51+
`restrict_edit_forward_committees`,
52+
`time_zone`
5253
);
5354
return {
5455
...super.getFieldsets(),

client/src/app/site/pages/meetings/services/active-meeting.subscription.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export function getActiveMeetingSubscriptionConfig(id: Id, settingsKeys: string[
2424
`description`,
2525
`location`,
2626
`language`,
27+
`time_zone`,
2728
`organization_tag_ids`,
2829
`welcome_title`,
2930
`welcome_text`,

client/src/app/site/pages/organization/pages/committees/committees.subscription.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export const getCommitteeDetailSubscriptionConfig: SubscriptionConfigGenerator =
8686
`organization_tag_ids`,
8787
`start_time`,
8888
`user_ids`,
89-
`template_for_organization_id`
89+
`template_for_organization_id`,
90+
`time_zone`
9091
]
9192
}
9293
]
@@ -105,7 +106,8 @@ export const getCommitteeMeetingDetailSubscriptionConfig: SubscriptionConfigGene
105106
`jitsi_room_name`,
106107
`jitsi_room_password`,
107108
`language`,
108-
`external_id`
109+
`external_id`,
110+
`time_zone`
109111
],
110112
follow: [
111113
{

0 commit comments

Comments
 (0)