diff --git a/src/scheduler/schedule.component.ts b/src/scheduler/schedule.component.ts index 5a8b3b6..f2fc90c 100644 --- a/src/scheduler/schedule.component.ts +++ b/src/scheduler/schedule.component.ts @@ -21,7 +21,7 @@ export class ScheduleComponent { private $modal ) {} - $onInit = function() { + $onInit() { // Load operations on controller initialization. this.load(); } @@ -29,7 +29,7 @@ export class ScheduleComponent { /* * Add a new operation at the beginning of th array. */ - add = function() { + add() { var schedule = new Schedule(); schedule.account_id = this.accountId; @@ -39,7 +39,7 @@ export class ScheduleComponent { /* * Load operations. */ - load = function() { + load() { return this.scheduleService.query(this.accountId) .subscribe((schedules: Schedule[]) => { this.operations = schedules; @@ -52,7 +52,7 @@ export class ScheduleComponent { /* * Save operation. */ - save = function(operation: Schedule) { + save(operation: Schedule) { let subscription: Observable; if(operation.id) { @@ -79,7 +79,7 @@ export class ScheduleComponent { /* * Delete an operation and return a promise. */ - confirmDelete = function(operation: Schedule) { + confirmDelete(operation: Schedule) { var title = "Delete operation #" + operation.id; this.$modal({ @@ -105,7 +105,7 @@ export class ScheduleComponent { /* * Delete operation. */ - delete = function(operation: Schedule) { + delete(operation: Schedule) { var id = operation.id; return this.scheduleService.delete(operation).subscribe(() => { @@ -126,7 +126,7 @@ export class ScheduleComponent { * Open the popup to modify the operation, save it on confirm. * @returns a promise. */ - modify = function(operation: Schedule) { + modify(operation: Schedule) { // FIXME Alexis Lahouze 2017-06-15 i18n var title = "Operation";