Skip to content

Commit 8d2577e

Browse files
Merge branch 'development' into sorting-of-sales
2 parents 4e66224 + af6f92b commit 8d2577e

File tree

13 files changed

+86
-51
lines changed

13 files changed

+86
-51
lines changed

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

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ export default class VideoroomForm extends Component.extend(FormMixin) {
259259
this.data.stream.extra.bbb_options.endCurrentMeeting = this.showUpdateOptions ? this.endCurrentMeeting : false;
260260
await this.data.stream.save();
261261
const saveModerators = this.data.stream.moderators.toArray().map(moderator => {
262+
if (moderator.id) {
263+
return moderator;
264+
}
262265
return moderator.save();
263266
});
264267
const deleteModerators = this.deletedModerators.map(moderator => {
@@ -291,20 +294,29 @@ export default class VideoroomForm extends Component.extend(FormMixin) {
291294
this.onValid(() => {
292295
const existingEmails = this.data.stream.moderators.map(moderator => moderator.email);
293296
if (!existingEmails.includes(this.moderatorEmail)) {
294-
const moderator = this.store.createRecord('video-stream-moderator', {
295-
email : this.moderatorEmail,
296-
videoStream : this.data.stream
297-
});
298-
this.data.stream.moderators.pushObject(moderator);
297+
const existingModerator = this.deletedModerators.filter(moderator => moderator.email === this.moderatorEmail);
298+
if (existingModerator.length === 0) {
299+
const newModerator = this.store.createRecord('video-stream-moderator', {
300+
email : this.moderatorEmail,
301+
videoStream : this.data.stream
302+
});
303+
this.data.stream.moderators.pushObject(newModerator);
304+
} else {
305+
const moderator = this.store.peekRecord('video-stream-moderator', existingModerator[0].id);
306+
this.data.stream.moderators.pushObject(moderator);
307+
}
299308
}
309+
this.deletedModerators = this.deletedModerators.filter(moderator => moderator.email !== this.moderatorEmail);
300310
this.moderatorEmail = '';
301311
});
302312
}
303313

304314
@action
305315
deleteModerator(moderator) {
306-
this.deletedModerators.push(moderator);
307316
this.data.stream.moderators.removeObject(moderator);
317+
if (moderator.id) {
318+
this.deletedModerators.push(moderator);
319+
}
308320
}
309321

310322
async loadRecordings() {

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ export default Component.extend(FormMixin, {
461461
}
462462
return speakerInvite.save();
463463
});
464-
this.deletedSpeakerInvites.filter(speakerInvite => (speakerInvite.id === null));
465464
const deleteSpeakerInvites = this.deletedSpeakerInvites.map(speakerInvite => {
466465
return speakerInvite.destroyRecord();
467466
});
@@ -494,12 +493,18 @@ export default Component.extend(FormMixin, {
494493
const existingEmails = this.data.session.speakerInvites.filter(speakerInvite => speakerInvite.status === 'pending');
495494
existingEmails.map(speakerInvite => speakerInvite.email);
496495
if (!existingEmails.includes(this.speakerInviteEmail)) {
497-
const speakerInvite = this.store.createRecord('speaker-invite', {
498-
email : this.speakerInviteEmail,
499-
session : this.data.session,
500-
event : this.data.event
501-
});
502-
this.data.session.speakerInvites.pushObject(speakerInvite);
496+
const existingSpeakerInvite = this.deletedSpeakerInvites.filter(speakerInvite => speakerInvite.email === this.speakerInviteEmail);
497+
if (existingSpeakerInvite.length === 0) {
498+
const newSpeakerInvite = this.store.createRecord('speaker-invite', {
499+
email : this.speakerInviteEmail,
500+
session : this.data.session,
501+
event : this.data.event
502+
});
503+
this.data.session.speakerInvites.pushObject(newSpeakerInvite);
504+
} else {
505+
const speakerInvite = this.store.peekRecord('speaker-invite', existingSpeakerInvite[0].id);
506+
this.data.session.speakerInvites.pushObject(speakerInvite);
507+
}
503508
}
504509
this.deletedSpeakerInvites = this.deletedSpeakerInvites.filter(speakerInvite => speakerInvite.email !== this.speakerInviteEmail);
505510
this.speakerInviteEmail = '';

app/routes/groups/view.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ export default class ViewRoute extends Route.extend(AuthenticatedRouteMixin) {
3131
sort : 'name'
3232
}),
3333
group: this.store.findRecord('group', params.group_id, {
34-
include: 'events,follower,user'
34+
include: 'events,follower,followers,user'
3535
})
3636
});
3737
}
3838
}
39+

app/templates/components/forms/group/group-view.hbs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,25 @@
8080
<i class="users icon"></i>
8181
({{@group.followerCount}} {{t 'followers'}})
8282
</div>
83+
{{#if @group.followers}}
84+
<div class="d-flex content-center items-center wrap mt-4">
85+
{{#each @group.followers as |follower index|}}
86+
{{#if (lt index 6)}}
87+
<a href={{if follower.user.isProfilePublic (href-to 'public.sessions.user.view' follower.user.id) '#'}}
88+
class="pointer"
89+
data-tooltip={{follower.user.resolvedName}}>
90+
<img
91+
class="ui tiny avatar image mb-2"
92+
src={{or follower.user.thumbnailImageUrl follower.user.avatarUrl '/images/placeholders/avatar.png'}} />
93+
</a>
94+
{{else}}
95+
{{#if (eq index 6)}}
96+
<span>{{t 'and'}} {{sub @group.followerCount index}} {{t 'others'}}</span>
97+
{{/if}}
98+
{{/if}}
99+
{{/each}}
100+
</div>
101+
{{/if}}
83102
</div>
84103
</div>
85104
<Modals::EventShareModal @isOpen={{this.isShareModalOpen}} @event={{this.eventToShare}} />

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"ember-export-application-global": "^2.0.1",
111111
"ember-fetch": "8.1.0",
112112
"ember-fullcalendar": "^1.8.0",
113-
"ember-h-captcha": "^2.1.4",
113+
"ember-h-captcha": "^2.1.5",
114114
"ember-href-to": "4.1.0",
115115
"ember-infinity": "^2.2.1",
116116
"ember-l10n": "^4.3.1",
@@ -145,15 +145,15 @@
145145
"leaflet": "^1.6.0",
146146
"loader.js": "^4.7.0",
147147
"lodash-es": "^4.17.21",
148-
"mini-css-extract-plugin": "^1.6.2",
148+
"mini-css-extract-plugin": "^2.2.0",
149149
"moment-timezone": "^0.5.31",
150150
"npm-run-all": "^4.1.5",
151151
"object-to-formdata": "^4.1.0",
152152
"paypal-checkout": "^4.0.328",
153153
"pre-commit": "^1.2.2",
154154
"query-string": "^7.0.1",
155155
"qunit-dom": "^1.6.0",
156-
"sass": "^1.37.0",
156+
"sass": "^1.37.5",
157157
"semantic-ui-calendar": "^0.0.8",
158158
"semantic-ui-ember": "3.0.5",
159159
"string_decoder": "^1.3.0",

tests/integration/components/create-session-message-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ module('Integration | Component | create session message', function(hooks) {
99
test('it renders', async function(assert) {
1010
this.set('shouldShowMessage', true);
1111
await render(hbs`{{create-session-message shouldShowMessage=shouldShowMessage}}`);
12-
assert.ok(this.element.innerHTML.trim().includes('Your Speaker Details have been saved'));
12+
assert.dom(this.element).includesText('Your Speaker Details have been saved');
1313
});
1414
});

tests/integration/components/notification-dropdown-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module('Integration | Component | notification dropdown', function(hooks) {
6161
test('it renders', async function(assert) {
6262
this.set('unreadNotifications', unreadNotifications);
6363
await render(hbs`{{notification-dropdown unreadNotifications=unreadNotifications l10n=l10n}}`);
64-
assert.ok(this.element.textContent.trim().includes('New Session Proposal for event1 by user1'));
64+
assert.dom(this.element).includesText('New Session Proposal for event1 by user1');
6565
});
6666
});
6767
*/

tests/integration/components/order-card-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ module('Integration | Component | order card', function(hooks) {
2727
this.set('order', order);
2828
this.set('authManager', authManager);
2929
await render(hbs`{{order-card order=order authManager=authManager}}`);
30-
assert.ok(this.element.innerHTML.trim().includes('Pragma'));
30+
assert.dom(this.element).includesText('Pragma');
3131
});
3232
});

tests/integration/components/side-bar-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ module('Integration | Component | side bar', function(hooks) {
1616
<div class="main-container">Search text</div>
1717
{{/side-bar}}
1818
`);
19-
assert.ok(this.element.textContent.trim().includes('Search text'));
19+
assert.dom(this.element).includesText('Search text');
2020
});
2121
});

tests/integration/components/tabbed-navigation-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ module('Integration | Component | tabbed navigation', function(hooks) {
1414
{{/link-to}}
1515
{{/tabbed-navigation}}`);
1616

17-
assert.ok(this.element.innerHTML.trim().includes('Overview'));
17+
assert.dom(this.element).includesText('Overview');
1818
});
1919
});

0 commit comments

Comments
 (0)