chore: 🤖 create session-recording route

Create `session-recording` route with empty landing page. Added
translations to `resources.yaml` file.

✅ Closes: ICU-8270
This commit is contained in:
dvonanderson committed 2023-02-28 11:18:50 -05:00
1 parent 18ecef4c0b
commit 774377db76
3 files changed
+46 -3

No files matched your search

@@ -208,9 +208,12 @@ org:
new: New Org
actions:
delete: Delete Org
session-recording:
session-recordings:
title: Session Recording
title_plural: Session Recordings
recorded-sessions:
title: Recorded Session
title_plural: Recorded Sessions
project:
title: Project
title_plural: Projects
+7 -1
View File
@@ -132,7 +132,13 @@ Router.map(function () {
this.route('new');
this.route('worker', { path: ':worker_id' }, function () {});
});
this.route('session-recordings', function () {});
this.route('session-recordings', function () {
this.route(
'session-recording',
{ path: ':session_recording_id' },
function () {}
);
});
});
});
@@ -1,3 +1,37 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class ScopesScopeSessionRecordingsRoute extends Route {}
export default class ScopesScopeSessionRecordingsRoute extends Route {
// =services
@service store;
@service can;
@service session;
@service router;
// =methods
/**
* If arriving here unauthenticated, redirect to index for further processing.
*/
beforeModel() {
if (!this.session.isAuthenticated) this.router.transitionTo('index');
}
/**
* Load all session recordings.
* @return {SessionRecordingModel}
*/
model() {
// TODO: awaiting modeled data
// const scope = this.modelFor('scopes.scope');
// const { id: scope_id } = scope;
// if (this.can.can('list session-recording', scope, { collection: 'session-recordings' })) {
// return this.store.query('session-recording', { scope_id });
// }
return 'i am session-recordings';
}
// =actions
}