Skip to content

WidgetBookingSummaryTodayComponent

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.Web/Client/app/components/dashboard/dashboard-libary/widgets/widget-booking-summary-today/widget-booking-summary-today.component.ts (line 38)

Part of: Pams

WidgetBookingSummaryTodayComponent manages the dashboard widget that presents booking summary data for the current day. It loads and displays dashboard data, synchronizes branch-specific views, handles planned-visit chart interaction, formats price values, and releases resources during component destruction.

Implements: OnInit

Methods

MethodSignatureReturns
ngOnInitngOnInit()void
getDashboardDatagetDashboardData()void
displayDashboardDatadisplayDashboardData()void
syncWithSeparateBranchesViewssyncWithSeparateBranchesViews()void
getpriceFormattedgetpriceFormatted(x: undefined)string
onChartInitonChartInit(e: any)void
onPlannedVisitsChartClickonPlannedVisitsChartClick(e: undefined)void
ngOnDestroyngOnDestroy()void
setValuesetValue(value: number)void

Properties

PropertyType
_widgetWidget
todayWidgetsEnumany
subscriptionSubscription
allDataMonthData[]
dataData[]
tempDataData
separateBranchesViewsboolean
initOptsany
seriesany[]
headerDataany
echartsIntanceany
optionsany
TargetBookingnumber
AchievedBookingnumber
ForecastBookingnumber
BlindForecastBookingnumber
TargetBookingFormattedany
AchievedBookingFormattedany
ForecastBookingFormattedany
BlindForecastFormattedany
branchTendencynumber
branchCurrencyany

Diagram

mermaid
graph LR
  Dashboard[Dashboard] --> WidgetBookingSummaryTodayComponent
  WidgetBookingSummaryTodayComponent --> GetDashboardData[getDashboardData]
  GetDashboardData --> DisplayDashboardData[displayDashboardData]
  DisplayDashboardData --> BranchViews[syncWithSeparateBranchesViews]
  DisplayDashboardData --> PriceFormat[getpriceFormatted]
  WidgetBookingSummaryTodayComponent --> ChartInit[onChartInit]
  ChartInit --> PlannedVisitsClick[onPlannedVisitsChartClick]
  WidgetBookingSummaryTodayComponent --> Cleanup[ngOnDestroy]
  WidgetBookingSummaryTodayComponent --> SetValue[setValue]

Usage

ts
import { WidgetBookingSummaryTodayComponent } from './widget-booking-summary-today.component';

function refreshBookingWidget(
  widget: WidgetBookingSummaryTodayComponent,
): void {
  widget.getDashboardData();
  widget.displayDashboardData();

  const formattedPrice = widget.getpriceFormatted();
  console.log(formattedPrice);
}

// Angular calls lifecycle hooks when the component is created and destroyed.

AI Coding Instructions

  • Keep data loading in getDashboardData() and render-state updates in displayDashboardData().
  • Call syncWithSeparateBranchesViews() after dashboard data changes when branch-specific views must reflect the current state.
  • Initialize chart event handling through onChartInit() and route planned-visit interactions through onPlannedVisitsChartClick().
  • Preserve cleanup logic in ngOnDestroy() when adding subscriptions, timers, or chart listeners.

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)

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

Was this page helpful?

Download as PDF