@@ -5,6 +5,7 @@ import { Router } from '@angular/router';
55import { Subject , takeUntil } from 'rxjs' ;
66import { TaskItemsApiClient } from '../../../../core/api/clients/task-items-api.client' ;
77import { TaskItemDto } from '../../../../core/api/models/task-item.model' ;
8+ import { AppRole } from '../../../../core/auth/models/app-role.model' ;
89import { AuthService } from '../../../../core/auth/services/auth.service' ;
910import { SharedModule } from '../../../../shared/shared.module' ;
1011
@@ -80,6 +81,30 @@ export class TaskCalendarComponent implements OnInit, OnDestroy {
8081 return this . authService . isAuthenticated ( ) ;
8182 }
8283
84+ get calendarTitle ( ) : string {
85+ if ( this . authService . hasRole ( AppRole . ProjectManager ) ) {
86+ return 'Project Due Date Calendar' ;
87+ }
88+
89+ if ( this . authService . hasRole ( AppRole . Administrator ) ) {
90+ return 'Workspace Due Date Calendar' ;
91+ }
92+
93+ return 'My Due Date Calendar' ;
94+ }
95+
96+ get calendarSubtitle ( ) : string {
97+ if ( this . authService . hasRole ( AppRole . ProjectManager ) ) {
98+ return 'Track due dates across tasks in your managed projects. Select a day to inspect workload and jump into project context.' ;
99+ }
100+
101+ if ( this . authService . hasRole ( AppRole . Administrator ) ) {
102+ return 'Track due dates across workspace tasks. Select a day to inspect workload and jump into project context.' ;
103+ }
104+
105+ return 'Track your assigned tasks by due date, grouped by project color. Select a day to inspect tasks and jump directly into project context.' ;
106+ }
107+
83108 openTaskContext ( task : TaskItemDto ) : void {
84109 void this . router . navigate ( [ '/projects/kanban' ] , {
85110 queryParams : { projectId : task . projectId }
@@ -104,8 +129,12 @@ export class TaskCalendarComponent implements OnInit, OnDestroy {
104129 return ;
105130 }
106131
132+ const query = this . authService . hasRole ( AppRole . User )
133+ ? { assignedUserId : currentUserId , page : 1 , pageSize : 500 }
134+ : { page : 1 , pageSize : 500 } ;
135+
107136 this . taskItemsApiClient
108- . getTasks ( { assignedUserId : currentUserId , page : 1 , pageSize : 500 } )
137+ . getTasks ( query )
109138 . pipe ( takeUntil ( this . destroy$ ) )
110139 . subscribe ( {
111140 next : ( tasks ) => {
0 commit comments