Skip to content

CalendarService

reference
1 min readUpdated

Kind: Class

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

Part of: 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

MethodSignatureReturns
getPriorityDatagetPriorityData()void
getTypeDatagetTypeData()void
getDatagetData()void
GetCalendarGetCalendar(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)

  • CalendarComponentPams/Web/Pams.Web/Client/app/components/dashboard/my-desk/calendar/calendar.component.ts:1
  • PamsServicesModulePams/Web/Pams.Web/Client/app/services/pams-services.module.ts:1

Was this page helpful?

Download as PDF