Files
P42_UI/app/views/coachings/coach/CoachingCoachDashboardView.js
T
2025-08-27 07:03:09 +00:00

37 lines
915 B
JavaScript

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);