# CalendarService

**Kind:** Class

**Source:** `Pams/Web/Pams.Web/Client/app/services/dashboard/mydesk/calendar.service.ts` (line 68)

**Part of:** [Pams](subsystem-pams)

`CalendarService` is a dashboard My Desk client service for retrieving calendar data and related priority and type data. Components can call `getPriorityData()`, `getTypeData()`, `getData()`, and `GetCalendar()` to obtain data for calendar views.

## Methods

| Method | Signature | Returns |
|---|---|---|
| `getPriorityData` | `getPriorityData()` | `void` |
| `getTypeData` | `getTypeData()` | `void` |
| `getData` | `getData()` | `void` |
| `GetCalendar` | `GetCalendar(clientId: number, principleId: number, projectId: number, responsibleId: number, contact: number, team: number)` | `void` |

## Diagram

```mermaid
graph LR
  Component[Dashboard Component] --> Service[CalendarService]
  Service --> Priority[getPriorityData()]
  Service --> Type[getTypeData()]
  Service --> Data[getData()]
  Service --> Calendar[GetCalendar()]
```

## Usage

```ts
import { CalendarService } from './calendar.service';

export class MyDeskCalendarComponent {
  constructor(private readonly calendarService: CalendarService) {}

  loadCalendarData() {
    return {
      calendar: this.calendarService.GetCalendar(),
      data: this.calendarService.getData(),
      priorities: this.calendarService.getPriorityData(),
      types: this.calendarService.getTypeData(),
    };
  }
}
```

## AI Coding Instructions

- Inject `CalendarService` into dashboard components that render My Desk calendar data.
- Preserve the existing method casing, including `GetCalendar()` with an uppercase `G`.
- Use `getPriorityData()` and `getTypeData()` when calendar UI filters or labels depend on those datasets.
- Handle each method result according to its declared return type before binding it to the view.

## Used by

2 references from 2 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (2)

- `CalendarComponent` — `Pams/Web/Pams.Web/Client/app/components/dashboard/my-desk/calendar/calendar.component.ts`:1
- `PamsServicesModule` — `Pams/Web/Pams.Web/Client/app/services/pams-services.module.ts`:1
