Skip to content

Commit 099784b

Browse files
authored
Merge branch 'development' into sorting-of-sales
2 parents 46d8324 + ce07816 commit 099784b

File tree

92 files changed

+11086
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+11086
-529
lines changed

app/components/forms/events/view/videoroom-form.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<UiPopup
4949
@tagName="i"
5050
@class="info circle icon"
51-
@content={{'This column shows the original link of the video. We do not recommend to share this link as users can access it without loggin into ' this.settings.appName '.com.'}} />
51+
@content={{t 'This column shows the original link of the video. We do not recommend to share this link as users can access it without loggin into ' this.settings.appName '.com.'}} />
5252
</label>
5353
{{#if (eq this.data.stream.videoChannel.provider 'youtube')}}
5454
<Widgets::Forms::SocialLinkField
@@ -75,7 +75,7 @@
7575
<UiPopup
7676
@tagName="i"
7777
@class="info circle icon"
78-
@content={{'The room password field can be used to communicate a password which is necessary to access online video rooms for example for external video services such a Zoom, Teams and Webex. The need for a password entry depends on the configuration of your video channel. The integrated Big Blue Button video solution in ' this.settings.appName '.com does not need a password as only ticket holders are able to access it. The difference between the password and PIN is that the password option is used for online access while PINs are used to access video rooms through the telephone.'}} />
78+
@content={{t 'The room password field can be used to communicate a password which is necessary to access online video rooms for example for external video services such a Zoom, Teams and Webex. The need for a password entry depends on the configuration of your video channel. The integrated Big Blue Button video solution in ' this.settings.appName '.com does not need a password as only ticket holders are able to access it. The difference between the password and PIN is that the password option is used for online access while PINs are used to access video rooms through the telephone.'}} />
7979
</label>
8080
<Input
8181
@value={{this.data.stream.password}} />
@@ -87,7 +87,7 @@
8787
<UiPopup
8888
@tagName="i"
8989
@class="info circle icon"
90-
@content={{'Additional Information fields can be used to share information such as phone access, PINs and other video room specific information.'}} />
90+
@content={{t 'Additional Information fields can be used to share information such as phone access, PINs and other video room specific information.'}} />
9191
</label>
9292
<Textarea
9393
@value={{this.data.stream.additionalInformation}} />

app/components/forms/group/group-events-form.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,17 @@ export default class GroupEventsForm extends Component.extend(FormMixin) {
7373
});
7474
}
7575

76-
@computed('events.[]', 'group.events.[]')
76+
@computed('events.[]', 'groupEvents.[]')
7777
get remainingEvents() {
78-
return sortBy(this.events.toArray().filter(event => !this.group.events.toArray().includes(event)), ['startsAt']).reverse();
78+
return sortBy(this.events.toArray().filter(event => !this.groupEvents.toArray().includes(event)), ['startsAt']).reverse();
7979
}
8080

81-
@computed('events.[]', 'group.events.[]')
81+
@computed('events.[]', 'groupEvents.[]')
8282
get pastEvents() {
8383
return sortBy(this.remainingEvents.toArray().filter(event => { return moment(event.endsAt) < moment()}), ['startsAt']).reverse();
8484
}
8585

86-
@computed('events.[]', 'group.events.[]')
86+
@computed('events.[]', 'groupEvents.[]')
8787
get upcomingEvents() {
8888
return sortBy(this.remainingEvents.toArray().filter(event => { return moment(event.endsAt) > moment()}), ['startsAt']).reverse();
8989
}
@@ -114,7 +114,7 @@ export default class GroupEventsForm extends Component.extend(FormMixin) {
114114
{
115115
id: 'group_save'
116116
});
117-
this.router.transitionTo('groups.list');
117+
this.router.transitionTo('my-groups.list');
118118
} catch (e) {
119119
console.error('Error while saving group', e);
120120
this.errorHandler.handle(e);

app/components/forms/session-section.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,19 @@ import { levels } from 'open-event-frontend/utils/dictionary/levels';
66

77
export default Component.extend(FormMixin, {
88
languages : orderBy(languages, 'name'),
9-
levels : orderBy(levels, 'position')
9+
levels : orderBy(levels, 'position'),
10+
11+
actions: {
12+
removeDocument(document) {
13+
this.data.session.slides = this.data.session.slides.filter(dl => dl !== document);
14+
},
15+
addSessionDocument() {
16+
if (this.data.session.slides) {
17+
this.data.session.slides = [...this.data.session.slides, { name: '', link: '' }];
18+
} else {
19+
this.data.session.slides = [{ name: '', link: '' }];
20+
}
21+
}
22+
}
23+
1024
});

app/components/forms/session-speaker-form.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -106,31 +106,6 @@ export default Component.extend(FormMixin, {
106106
}
107107
]
108108
},
109-
slidesUrlRequired: {
110-
identifier : 'session_slidesUrl_required',
111-
rules : [
112-
{
113-
type : 'empty',
114-
prompt : this.l10n.t('Please enter a url')
115-
},
116-
{
117-
type : 'regExp',
118-
value : protocolLessValidUrlPattern,
119-
prompt : this.l10n.t('Please enter a valid url')
120-
}
121-
]
122-
},
123-
slidesUrl: {
124-
identifier : 'session_slidesUrl',
125-
optional : true,
126-
rules : [
127-
{
128-
type : 'regExp',
129-
value : protocolLessValidUrlPattern,
130-
prompt : this.l10n.t('Please enter a valid url')
131-
}
132-
]
133-
},
134109
videoUrlRequired: {
135110
identifier : 'session_videoUrl_required',
136111
rules : [

app/components/forms/wizard/basic-details-step.js

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,18 +448,41 @@ export default Component.extend(FormMixin, EventWizardMixin, {
448448
});
449449

450450
},
451-
addTicket(type, position) {
451+
452+
async addTicket(type, position) {
452453
const { event } = this.data;
453454
const salesStartDateTime = moment();
454-
const salesEndDateTime = this.data.event.startsAt;
455+
const salesEndDateTime = this.data.event.endsAt;
456+
if (type === 'registration') {
457+
if (this.data.event.isOneclickSignupEnabled) {
458+
this.data.event.isOneclickSignupEnabled = false;
459+
return;
460+
}
461+
try {
462+
await this.confirm.prompt(this.l10n.t('If you choose this option other ticket options will not be available. Do you want to proceed? '));
463+
this.data.event.isOneclickSignupEnabled = true;
464+
let countRegistration = 0;
465+
this.data.event.tickets?.toArray().filter(x => {
466+
if (x.type === 'registration') {
467+
countRegistration += 1;
468+
}
469+
});
470+
if (countRegistration > 0) {
471+
return;
472+
}
473+
} catch (e) {
474+
this.data.event.isOneclickSignupEnabled = false;
475+
}
476+
}
455477
this.data.event.tickets.pushObject(this.store.createRecord('ticket', {
478+
name : type === 'registration' ? 'registration' : '',
456479
event,
457480
type,
458481
position,
459482
quantity : 100,
460483
maxPrice : type === 'donation' ? 10000 : null,
461484
salesStartsAt : salesStartDateTime,
462-
salesEndsAt : salesEndDateTime
485+
salesEndsAt : type === 'registration' ? this.data.event.endsAt : salesEndDateTime
463486
}));
464487
},
465488

app/components/forms/wizard/sessions-speakers-step.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,18 @@ export default Component.extend(EventWizardMixin, FormMixin, {
257257
isComplex : true
258258
}));
259259
},
260+
async toggle(microlocation) {
261+
try {
262+
if (!microlocation.hiddenInScheduler) {
263+
await this.confirm.prompt(this.l10n.t('If you hide this microlocation you will not be able to schedule sessions in it. The location will still be available for online events without scheduled sessions, e.g. break-out or discussion rooms. '));
264+
microlocation.hiddenInScheduler = true;
265+
} else {
266+
microlocation.hiddenInScheduler = false;
267+
}
268+
} catch {
269+
microlocation.hiddenInScheduler = false;
270+
}
271+
},
260272
removeField(field) {
261273
this.data.customForms.removeObject(field);
262274
},

app/components/nav-bar.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,33 @@ import Component from '@ember/component';
44

55
@classic
66
export default class NavBar extends Component {
7+
@computed('session.currentRouteName')
8+
get isGroupRoute() {
9+
return (String(this.session.currentRouteName).includes('group'));
10+
}
11+
712
@computed('session.currentRouteName')
813
get isNotEventPageRoute() {
14+
if (this.isGroupRoute) {
15+
return true;
16+
}
917
return !(String(this.session.currentRouteName).includes('public'));
1018
}
1119

1220
@computed('session.currentRouteName')
1321
get isNotWizardPageRoute() {
22+
if (this.isGroupRoute) {
23+
return true;
24+
}
1425
return !(String(this.session.currentRouteName).includes('edit'))
1526
&& String(this.session.currentRouteName) !== 'create';
1627
}
1728

1829
@computed('session.currentRouteName')
1930
get isNotExplorePageRoute() {
31+
if (this.isGroupRoute) {
32+
return true;
33+
}
2034
return !(String(this.session.currentRouteName).includes('explore'));
2135
}
2236

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<UiAccordion class="segment p-0">
2+
<div class="title ui header m-2">
3+
{{t 'Session Documents'}}
4+
</div>
5+
<div class="content m-2">
6+
<div class="d-flex flex-row mb-2 mr-2">
7+
{{#each @session.slides as |slide|}}
8+
<button class="ui button fluid {{if (eq this.currDoc slide.link) 'grey' 'white'}}" style="width:auto;" {{action 'selectedDocument' slide.link}}>
9+
{{slide.name}}
10+
</button>
11+
{{/each}}
12+
</div>
13+
<iframe title="session-slides" id="googleFrame" class="slide-iframe mb-2" width="100%" style="max-width: 1200px; height: 600px;" frameborder="0" src="https://docs.google.com/gview?url={{ this.currDoc }}&embedded=true"></iframe>
14+
</div>
15+
</UiAccordion>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { action } from '@ember/object';
2+
import Component from '@glimmer/component';
3+
import { tracked } from '@glimmer/tracking';
4+
import { inject as service } from '@ember/service';
5+
6+
export default class SessionDocuments extends Component {
7+
8+
@service session;
9+
10+
@tracked currDoc = this.args.session?.slides[0].link;
11+
12+
@action
13+
refreshSlide() {
14+
if (document.getElementById('googleFrame')) {
15+
document.getElementById('googleFrame').src += '';
16+
}
17+
}
18+
19+
@action
20+
selectedDocument(doc) {
21+
this.currDoc = doc;
22+
this.refreshSlide();
23+
}
24+
}

app/components/public/session-item.hbs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
</div>
1111
</div>
1212
<div class="d-flex ml-auto" style="height: fit-content;">
13-
{{#if @session.slidesUrl}}
14-
<button class="ui basic {{text-color @session.track.color 'basic' 'inverted'}} button no-wrap" style={{css color=(text-color @session.track.color 'grey' 'lightgrey')}} {{action this.goToSlides}}>
15-
<i class="icon {{if this.slidesUploaded 'download' 'linkify'}}"></i>
16-
{{if this.slidesUploaded (t 'Download Slides') (t 'Link to Slides')}}
17-
</button>
18-
{{/if}}
1913
{{#if this.sessionEnded}}
2014
{{#if @session.videoUrl}}
2115
<button class="ui basic {{text-color @session.track.color 'basic' 'inverted'}} button no-wrap" style={{css color=(text-color @session.track.color 'grey' 'lightgrey')}} {{action this.goToVideo}}>
@@ -150,20 +144,9 @@
150144
{{/if}}
151145
</div>
152146
</div>
153-
{{#if (and @expanded (or @session.slidesUrl @session.videoUrl))}}
147+
{{#if (and @expanded @session.videoUrl)}}
154148
<div class="row p-4">
155-
<div class="column" style={{css display='flex' align-items='center' flex-direction='column'}}>
156-
{{#if (or this.pdfLink this.pptLink)}}
157-
<iframe title="session-slides" class="slide-iframe mb-2" width="100%" frameborder="0" src="https://docs.google.com/gview?url={{ @session.slidesUrl }}&embedded=true"></iframe>
158-
{{else if @session.slidesUrl}}
159-
<a class="mb-2" href={{ @session.slidesUrl }} target="_blank" rel="noopener noreferrer">
160-
<button class="ui labeled icon button">
161-
<i class="file powerpoint icon"></i>
162-
{{t 'Slides'}}
163-
</button>
164-
</a>
165-
{{/if}}
166-
149+
<div class="column" style={{css display='flex' align-items='center' flex-direction='column'}}>
167150
{{#if this.youtubeLink}}
168151
<iframe title="youtube-session-video" class="video-iframe" width="100%" src="https://www.youtube.com/embed/{{ this.youtubeLink }}?enablejsapi=1&modestbranding=1" frameborder="0" allowfullscreen></iframe>
169152
{{else if @session.videoUrl}}

0 commit comments

Comments
 (0)