salix/modules/ticket/front/boxing/index.js

33 lines
795 B
JavaScript
Raw Normal View History

2022-08-01 05:59:04 +00:00
import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
constructor($element, $) {
super($element, $);
}
$onInit() {
2022-08-03 12:57:39 +00:00
window.location.href = this.lilium(`ticket/${this.ticket.id}/boxing`);
2022-08-01 05:59:04 +00:00
}
lilium(route) {
const env = process.env.NODE_ENV;
let newRoute = 'http://localhost:8080/#/' + route;
if (env == 'test')
newRoute = 'https://test-lilium.verdnatura.es/#/' + route;
if (env == 'producction')
newRoute = 'https://lilium.verdnatura.es/#/' + route;
return newRoute;
}
}
ngModule.vnComponent('vnTicketBoxing', {
template: require('./index.html'),
controller: Controller,
bindings: {
ticket: '<'
}
});