diff --git a/src/app/dashboard/components/dashboard-actions/dashboard-actions.component.spec.ts b/src/app/dashboard/components/dashboard-actions/dashboard-actions.component.spec.ts index 2effd7b23..a6f9b146a 100644 --- a/src/app/dashboard/components/dashboard-actions/dashboard-actions.component.spec.ts +++ b/src/app/dashboard/components/dashboard-actions/dashboard-actions.component.spec.ts @@ -80,7 +80,7 @@ describe('DashboardActionsComponent', () => { provide: StorageService, useValue: { getPayload(): any { - return { id_person: '123' }; + return { id_person: '123', fullName: 'Stolz Zuzana' }; }, getListOfUnconfirmed() { return of([ @@ -137,9 +137,6 @@ describe('DashboardActionsComponent', () => { expect(element.textContent).toContain( 'dashboard.actions.presence-control' ); - expect(element.textContent).toContain( - 'dashboard.actions.presence-control' - ); expect(element.textContent).toContain('dashboard.actions.edit-absences0'); expect(element.textContent).toContain('dashboard.actions.open-absences1'); expect(element.textContent).not.toContain('dashboard.actions.tests'); diff --git a/src/app/dashboard/components/dashboard-actions/dashboard-actions.component.ts b/src/app/dashboard/components/dashboard-actions/dashboard-actions.component.ts index c903a73bc..ce20b88bb 100644 --- a/src/app/dashboard/components/dashboard-actions/dashboard-actions.component.ts +++ b/src/app/dashboard/components/dashboard-actions/dashboard-actions.component.ts @@ -2,6 +2,7 @@ import { Component, Inject } from '@angular/core'; import { Settings, SETTINGS } from '../../../settings'; import { Params } from '@angular/router'; import { DashboardService } from '../../services/dashboard.service'; +import { StorageService } from '../../../shared/services/storage.service'; @Component({ selector: 'erz-dashboard-actions', @@ -11,11 +12,15 @@ import { DashboardService } from '../../services/dashboard.service'; export class DashboardActionsComponent { constructor( public dashboardService: DashboardService, + private storageService: StorageService, @Inject(SETTINGS) public settings: Settings ) {} get editAbsencesParams(): Params { - return { confirmationStates: this.settings.checkableAbsenceStateId }; + return { + confirmationStates: this.settings.checkableAbsenceStateId, + teacher: this.storageService.getPayload()?.fullname, + }; } get substitutionsAdminLink(): string {