fix: 🐛 update const name
This commit is contained in:
1 parent
e2b0c3ad13
commit
99e24500d3
3 files changed
+14
-9
No files matched your search
@@ -18,11 +18,13 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsRoute extends Rou
|
||||
* @return {Promise{[HostSetModel]}}
|
||||
*/
|
||||
model() {
|
||||
const scope = this.modelFor('scopes.scope.host-catalogs.host-catalog');
|
||||
const hostCatalog = this.modelFor(
|
||||
'scopes.scope.host-catalogs.host-catalog'
|
||||
);
|
||||
|
||||
const { id: host_catalog_id } = scope;
|
||||
const { id: host_catalog_id } = hostCatalog;
|
||||
if (
|
||||
this.can.can('list collection', scope, {
|
||||
this.can.can('list collection', hostCatalog, {
|
||||
collection: 'host-sets',
|
||||
})
|
||||
) {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import Route from '@ember/routing/route';
|
||||
export default class ScopesScopeHostCatalogsHostCatalogHostSetsIndexRoute extends Route {
|
||||
// =methods
|
||||
|
||||
setupController(controller) {
|
||||
const scope = this.modelFor('scopes.scope.host-catalogs.host-catalog');
|
||||
const hostCatalog = this.modelFor(
|
||||
'scopes.scope.host-catalogs.host-catalog'
|
||||
);
|
||||
super.setupController(...arguments);
|
||||
controller.setProperties({ scope });
|
||||
controller.setProperties({ hostCatalog });
|
||||
}
|
||||
}
|
||||
@@ -52,11 +52,13 @@
|
||||
>
|
||||
<message.description>
|
||||
|
||||
{{#if (can 'list collection' this.scope collection='host-sets')}}
|
||||
{{#if (can 'list collection' this.hostCatalog collection='host-sets')}}
|
||||
{{! can list (at least): show default welcome message}}
|
||||
{{t 'resources.host-set.description'}}
|
||||
|
||||
{{else if (can 'create collection' this.scope collection='host-sets')}}
|
||||
{{else if (can
|
||||
'create collection' this.hostCatalog collection='host-sets'
|
||||
)}}
|
||||
{{! can create (only): show create-but-not-list welcome message}}
|
||||
{{t
|
||||
'descriptions.create-but-not-list'
|
||||
@@ -71,7 +73,7 @@
|
||||
{{/if}}
|
||||
</message.description>
|
||||
|
||||
{{#if (can 'create collection' this.scope collection='host-sets')}}
|
||||
{{#if (can 'create collection' this.hostCatalog collection='host-sets')}}
|
||||
<message.link
|
||||
@route='scopes.scope.host-catalogs.host-catalog.host-sets.new'
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user