Skip to content

Commit c66b5aa

Browse files
authored
fix: Remove my-sessions from organizer view session route (#4629)
1 parent 579db43 commit c66b5aa

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

app/controllers/events/view/sessions/list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
132132
}
133133

134134
@action
135-
viewSession(id) {
136-
this.transitionToRoute('my-sessions.view', id);
135+
viewSession(session_id, event_id) {
136+
this.transitionToRoute('public.sessions.view', event_id, session_id);
137137
}
138138

139139
@action
File renamed without changes.

app/router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ Router.map(function() {
4141
this.route('oauth', { path: '/oauth/callback' });
4242
this.route('public', { path: '/e/:event_id' }, function() {
4343
this.route('sessions', function() {
44-
this.route('list', { path: '/s/:session_status' });
44+
this.route('list', { path: '/:session_status' });
45+
this.route('view', { path: '/:session_id' });
4546
});
4647
this.route('cfs', { path: '/cfs/:speaker_call_hash' }, function() {
4748
this.route('new-speaker');
@@ -128,7 +129,6 @@ Router.map(function() {
128129
});
129130
this.route('my-sessions', function() {
130131
this.route('list', { path: '/:session_status' });
131-
this.route('view', { path: '/s/:session_id' });
132132
});
133133
this.route('notifications', function() {
134134
this.route('all', { path: '/:notification_state' });
File renamed without changes.

app/templates/components/session-card.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div class="event wide ui grid row">
22
{{#unless this.device.isMobile}}
33
<div class="ui card three wide computer six wide tablet column">
4-
<a class="image" href="{{href-to 'my-sessions.view' this.session.id}}">
4+
<a class="image" href="{{href-to 'public.sessions.view' this.session.event.id this.session.id}}">
55
<Widgets::SafeImage @src={{if this.session.event.thumbnailImageUrl this.session.event.thumbnailImageUrl "assets/images/landing.jpg"}} />
66
</a>
77
</div>
88
{{/unless}}
99
<div class="ui card thirteen wide computer ten wide tablet sixteen wide mobile column">
10-
<a class="main content" href="{{href-to 'my-sessions.view' this.session.id}}">
10+
<a class="main content" href="{{href-to 'public.sessions.view' this.session.event.id this.session.id}}">
1111
<div class="header">
1212
<span>{{this.session.title}}</span>
1313
<div class="right floated author">

app/templates/components/ui-table/cell/events/view/sessions/cell-session-title.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{this.record}}
22
<div class="hidden ui divider"></div>
33
<div class="ui horizontal compact basic buttons">
4-
<UiPopup @content={{t "View Session"}} @class="ui icon button" @click={{action this.props.actions.viewSession this.extraRecords.id}} @position="left center">
4+
<UiPopup @content={{t "View Session"}} @class="ui icon button" @click={{action this.props.actions.viewSession this.extraRecords.id this.extraRecords.event.id}} @position="left center">
55
<i class="unhide icon"></i>
66
</UiPopup>
77
{{#if (not this.extraRecords.isLocked)}}
File renamed without changes.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { render } from '@ember/test-helpers';
77
module('Integration | Component | session card', function(hooks) {
88
setupIntegrationTest(hooks);
99

10-
const session = EmberObject.create({ id: 123, title: 'Super cool JS', state: 'rejected', event: 'OS Tech', startsAt: new Date(), endsAt: new Date() });
10+
const session = EmberObject.create({ id: 123, title: 'Super cool JS', state: 'rejected', event: { name: 'OS Tech', id: 123 }, startsAt: new Date(), endsAt: new Date() });
1111

1212
test('it renders', async function(assert) {
1313
this.set('session', session);

0 commit comments

Comments
 (0)