Skip to content

PrincipalReportComponent

reference
3 min readUpdated

Kind: Class

Source: Pams/Web/Pams.Web/Client/app/components/dashboard/_principalReport/principal-report.component.ts (line 97)

Part of: Pams

PrincipalReportComponent manages the principal dashboard report view. It handles introduction and outlines modal state, report period changes, date and numeral formatting, resize behavior, and page-number retrieval within the dashboard client.

Implements: OnInit

Methods

MethodSignatureReturns
openIntroductionAndOutlinesPopupopenIntroductionAndOutlinesPopup()void
closeIntroductionAndOutlinesModalcloseIntroductionAndOutlinesModal()void
formatDateformatDate(date: undefined)void
NumeralConversionDefaultNumeralConversionDefault(num: number)void
resizeWindowresizeWindow()void
ngOnInitngOnInit()void
BookingHistoryPeriodChangedBookingHistoryPeriodChanged(period: string)void
DeliveriesHistoryPeriodChangedDeliveriesHistoryPeriodChanged(period: string)void
OverallAnalysisPeriodChangedOverallAnalysisPeriodChanged(period: string)void
getPageNumbergetPageNumber(pageId: string)number
getAllLookupsgetAllLookups()void
AddInquiriesColAddInquiriesCol(e: undefined)void
RemoveInquiriesColRemoveInquiriesCol(e: undefined)void
AddOffersColAddOffersCol(e: undefined)void
RemoveOffersColRemoveOffersCol(e: undefined)void
getImagesFroPrintgetImagesFroPrint(accountId: number)void
GenerateNewReportGenerateNewReport()void
GenerateReportGenerateReport()void
checkForCachedDatacheckForCachedData()void
prepareGeneratedReportParameterprepareGeneratedReportParameter()void
prepareGeneratedReportDataprepareGeneratedReportData()void
compareReportSettingscompareReportSettings()void
PrintReportPrintReport()void
scrollscroll(id: undefined)void
isScrolledIntoViewisScrolledIntoView(id: undefined)void
checkScrolledIntoViewcheckScrolledIntoView()void
onAccountTypeChangeonAccountTypeChange(e: undefined)void
onPrincipalChangeonPrincipalChange(e: undefined)void
onPrincipalRemoveonPrincipalRemove(e: undefined)void
onClientChangeonClientChange(e: undefined)void
onClientRemoveonClientRemove(e: undefined)void
onGridContentReadyonGridContentReady(e: undefined)void
chooseWidgetchooseWidget(e: undefined)void
onClientFilterChangeonClientFilterChange(e: undefined)void
onProductTypeChangeonProductTypeChange(e: undefined)void
onStatusChangeonStatusChange(e: undefined)void
onSelectAllChartsonSelectAllCharts()void
ClosewithDonotSaveClosewithDonotSave()void
openTimeFrameOptionsopenTimeFrameOptions()void
openSettingsOptionsopenSettingsOptions()void
TimeFrameValueChangedTimeFrameValueChanged()void
OnOpenedPopupOnOpenedPopup()void
openPopupopenPopup(n: string, t: string, i: string, btnTxt: string)void
savePopupsavePopup()void
closePopupclosePopup()void
ngDoCheckngDoCheck()void
validatevalidate(e: undefined)void
selectTextselectText(e: undefined)void
ngOnDestroyngOnDestroy()void
onChartInit1onChartInit1(e: any)void

Properties

PropertyType
sharedPopupSharedPopupComponent
GenerateReportValidationDxValidationGroupComponent
TimeFrameValidationDxValidationGroupComponent
alertsAlertsComponent
RunningJobsElementRef
SalesOverviewElementRef
FirmOffersElementElementRef
OrdersStatusElementElementRef
LostAnalysisElementElementRef
OrdersBookingElementElementRef
DeliveredOrdersElementElementRef
SubmittedOffersElementElementRef
OverallAnalysisElementElementRef
subscriptionSubscription
LodingPanalMessageany
loadingVisibleany
principalsany
clientsany
accountsInfoPrincipalsInfo[]
selectedAccountInfonumber[]
SelectedAccountstring[]
SelectedPrincipalIdnumber
SelectedClientIdnumber
clientsFiltersany
accountTypeany
productTypesany
Statusany
SelectedStatusesany
TempKeystring
Periodsany
DateDisplayFormatany
dateDisplayFormatForTypeScriptany
DateDisplayFormatForMomentany
UseDateboolean
UsePeriodboolean
ClientsPerChartnumber
SelectAllChartsboolean
ThisYearany
TimeValuenumber
TimePeriodnumber
LostTotalAmountnumber
LostTotalCountnumber
SubmittedTotalCountnumber
SubmittedTotalAmountnumber
HitRateCountnumber
HitRateValuenumber
ReportDataany
ReportIsReadyboolean
GeneratedReportboolean
dataBackdropstring

Where it refuses work

  • PrincipalReportComponent stops the work with an early return when date.
  • PrincipalReportComponent stops the work with an early return when dataField == "OfferTotalPrice" || dataField == "OrderTotalPrice" || dataField == "OrderBa….
  • PrincipalReportComponent stops the work with an early return when id == ReportSettingsEnum.ReportIntroduction.
  • PrincipalReportComponent stops the work with an early return when id == ReportSettingsEnum.ReportSalesAnalysis.
  • PrincipalReportComponent stops the work with an early return when id == ReportSettingsEnum.ReportLostOpportunities.
  • PrincipalReportComponent stops the work with an early return when id == ReportSettingsEnum.ReportClientComplaints.

Diagram

mermaid
graph LR
  Dashboard[Dashboard View] --> Report[PrincipalReportComponent]
  Report --> Modal[Introduction and Outlines Modal]
  Report --> Periods[Report Period Handlers]
  Report --> Formatting[Date and Numeral Formatting]
  Report --> Resize[Window Resize Handling]
  Report --> Page[Page Number]

Usage

ts
function manageReport(report: PrincipalReportComponent): number {
  report.openIntroductionAndOutlinesPopup();

  const pageNumber = report.getPageNumber();

  report.closeIntroductionAndOutlinesModal();

  return pageNumber;
}

AI Coding Instructions

  • Keep modal opening and closing behavior within openIntroductionAndOutlinesPopup() and closeIntroductionAndOutlinesModal().
  • Bind dashboard period controls to the relevant booking, deliveries, or overall-analysis period-change handler.
  • Preserve existing date and numeral formatting behavior by routing display values through formatDate() and NumeralConversionDefault().
  • Do not manually call ngOnInit() outside the Angular component lifecycle.
  • Keep resize-related UI updates inside resizeWindow() so window behavior remains centralized.

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)

  • AppRoutingModulePams/Web/Pams.Web/Client/app/app-routing.module.ts:1
  • TranslateHandlerPams/Web/Pams.Web/Client/app/app.module.ts:1

Was this page helpful?

Download as PDF