31 lines
701 B
JavaScript
31 lines
701 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
import './style.scss';
|
|
|
|
class Controller extends Section {
|
|
constructor($element, $) {
|
|
super($element, $);
|
|
this.showFields = {
|
|
id: false,
|
|
actions: false
|
|
};
|
|
}
|
|
|
|
onCloneAccept(itemFk) {
|
|
return this.$http.post(`Items/${itemFk}/clone`)
|
|
.then(res => {
|
|
this.$state.go('item.card.tags', {id: res.data.id});
|
|
});
|
|
}
|
|
|
|
preview(item) {
|
|
this.itemSelected = item;
|
|
this.$.preview.show();
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnItemIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|