Clear unused code

This commit is contained in:
Stanislav Romanov 2022-06-04 10:56:13 +03:00
parent b8f948f984
commit 9b98682005

View file

@ -1,39 +1,6 @@
import Route from '@ember/routing/route';
import { hash } from 'rsvp';
function attributeValue(key) {
return function () {
return {
get() {
return this.settings[key].includes(this.name);
},
set(value) {
if (value) {
this.settings[key].addObject(this.name);
} else {
this.settings[key].removeObject(this.name);
}
},
};
};
}
class IndexAttribute {
name;
settings;
@attributeValue('displayedAttributes') displayed;
@attributeValue('filterableAttributes') filterable;
@attributeValue('searchableAttributes') searchable;
@attributeValue('sortableAttributes') sortable;
constructor(name, settings) {
this.name = name;
this.settings = settings;
}
}
export default class AdminIndexesItemSettingsRoute extends Route {
async model() {
const index = this.modelFor('admin.indexes.item');