Skip to content

PrincipalReportService

reference
1 min readUpdated

Kind: Class

Source: Frontend/src/app/components/dashboard/_principalReport/principal-report.service.ts (line 59)

Part of: Frontend

PrincipalReportService builds the data structure for the principal dashboard report. It assembles report columns for inquiries, offers, orders, delivered items, lost items, and cancelled items through focused column methods.

Methods

MethodSignatureReturns
generateReportgenerateReport(reportObject: ReportObject)void
getInquiriesColumngetInquiriesColumn()void
getOffersColumngetOffersColumn()void
getOrdersColumngetOrdersColumn()void
getDeliveredColumngetDeliveredColumn()void
getLostColumngetLostColumn()void
getCancelledColumngetCancelledColumn()void

Properties

PropertyType
InquiriesListColumnsColumnChooser[]
OffersListColumnsColumnChooser[]
OrdersListColumnsColumnChooser[]
DeliveredListColumnsColumnChooser[]
LostListColumnsColumnChooser[]
CancelledListColumnsColumnChooser[]

Diagram

mermaid
graph LR
  Dashboard[Dashboard Component] --> Service[PrincipalReportService]
  Service --> Report[generateReport]
  Report --> Inquiries[getInquiriesColumn]
  Report --> Offers[getOffersColumn]
  Report --> Orders[getOrdersColumn]
  Report --> Delivered[getDeliveredColumn]
  Report --> Lost[getLostColumn]
  Report --> Cancelled[getCancelledColumn]

Usage

ts
import { Component, OnInit } from '@angular/core';
import { PrincipalReportService } from './principal-report.service';

@Component({
  selector: 'app-principal-report',
  template: `<!-- Render report data here -->`,
})
export class PrincipalReportComponent implements OnInit {
  report: unknown;

  constructor(
    private readonly principalReportService: PrincipalReportService,
  ) {}

  ngOnInit(): void {
    this.report = this.principalReportService.generateReport();
  }
}

AI Coding Instructions

  • Call generateReport() when the dashboard needs the complete principal report structure.
  • Keep column-specific logic inside the matching getInquiriesColumn(), getOffersColumn(), or related column method.
  • Preserve the report shape returned by generateReport() when updating dashboard consumers.
  • Update the dashboard component or template when adding data that must be displayed in a report column.

Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (1)

  • OverallAnalysisYearMapFrontend/src/app/components/dashboard/_principalReport/principal-report.component.ts:1

Was this page helpful?

Download as PDF