class CoachingCoachDashboardView extends EICDomContent { DOMContentLoaded() { let profileBt = this.find('.profile button'); profileBt.addEventListener('click', this.onProfileEdit.bind(this)); let coachings = this.findAll('.list button') for(let button of coachings) { button.addEventListener('click', this.onCoachingSelect.bind(this)); } this.components = ui.eicfy(this.el); } onProfileEdit(event) { event.stopPropagation(); event.preventDefault(); let id = 1; app.Router.route(`/coachings/coaches/${id}`, { }); } onCoachingSelect(event) { event.stopPropagation(); event.preventDefault(); //let id = event.dataset.id; app.Router.route(`/coachings/coaching/1`, { }); } } app.registerClass('CoachingCoachDashboardView', CoachingCoachDashboardView);