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

fix: Remove my-sessions from organizer view session route #4629

Merged
merged 8 commits into from
Jul 27, 2020
4 changes: 2 additions & 2 deletions app/controllers/events/view/sessions/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
}

@action
viewSession(id) {
this.transitionToRoute('my-sessions.view', id);
viewSession(session_id, event_id) {
this.transitionToRoute('public.sessions.view', event_id, session_id);
}

@action
Expand Down
2 changes: 1 addition & 1 deletion app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Router.map(function() {
this.route('public', { path: '/e/:event_id' }, function() {
this.route('sessions', function() {
this.route('list', { path: '/s/:session_status' });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/session/, not /s/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove /s? Because after that the route will become sessions/:session_status

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Please review

this.route('view', { path: '/:session_id' });
});
this.route('cfs', { path: '/cfs/:speaker_call_hash' }, function() {
this.route('new-speaker');
Expand Down Expand Up @@ -128,7 +129,6 @@ Router.map(function() {
});
this.route('my-sessions', function() {
this.route('list', { path: '/:session_status' });
this.route('view', { path: '/s/:session_id' });
});
this.route('notifications', function() {
this.route('all', { path: '/:notification_state' });
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{this.record}}
<div class="hidden ui divider"></div>
<div class="ui horizontal compact basic buttons">
<UiPopup @content={{t "View Session"}} @class="ui icon button" @click={{action this.props.actions.viewSession this.extraRecords.id}} @position="left center">
<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">
<i class="unhide icon"></i>
</UiPopup>
{{#if (not this.extraRecords.isLocked)}}
Expand Down