Kind: Class
Source: Pams/Web/Pams.Web/Client/app/models/dashboard/dashboard-data-fields.ts (line 384)
Part of: Pams
ActiveTotal models metadata for an active dashboard total, including its stored name, field name, caption, delta type, and data type. Dashboard code can read and update these values through paired getter and setter methods when assembling or rendering total fields.
Methods
| Method | Signature | Returns |
|---|---|---|
GetStoredName | GetStoredName() | string |
SetStoredName | SetStoredName(name: string) | void |
GetFieldName | GetFieldName() | string |
SetFieldName | SetFieldName(name: string) | void |
GetType | GetType() | DeltaTypeEnum |
SetType | SetType(type: DeltaTypeEnum) | void |
GetCaption | GetCaption() | string |
SetCaption | SetCaption(input: string) | void |
SetDataType | SetDataType(ty: DataTypeEnum) | void |
GetDataType | GetDataType() | DataTypeEnum |
GetFieldNameTarget | GetFieldNameTarget() | string |
SetFieldNameTarget | SetFieldNameTarget(name: string) | void |
GetStoredNameTarget | GetStoredNameTarget() | string |
SetStoredNameTarget | SetStoredNameTarget(name: string) | void |
Properties
| Property | Type |
|---|---|
Type | any |
Where it refuses work
ActiveTotalstops the work with an early return whenthis.FieldName.
Diagram
mermaidgraph LR ActiveTotal --> StoredName ActiveTotal --> FieldName ActiveTotal --> Caption ActiveTotal --> DeltaType[DeltaTypeEnum] ActiveTotal --> DataType[DataTypeEnum] GetStoredName --> StoredName SetStoredName --> StoredName GetFieldName --> FieldName SetFieldName --> FieldName GetCaption --> Caption SetCaption --> Caption GetType --> DeltaType SetType --> DeltaType GetDataType --> DataType SetDataType --> DataType
Usage
tsimport { ActiveTotal } from "./models/dashboard/dashboard-data-fields";
const activeTotal = new ActiveTotal();
activeTotal.SetStoredName("OrderTotal");
activeTotal.SetFieldName("total");
activeTotal.SetCaption("Total");
const storedName = activeTotal.GetStoredName();
const fieldName = activeTotal.GetFieldName();
const caption = activeTotal.GetCaption();
console.log({ storedName, fieldName, caption });
AI Coding Instructions
- Use the getter and setter pairs rather than reading or writing internal fields directly.
- Keep
StoredNamealigned with the dashboard payload field expected by the data source. - Set
FieldNameandCaptionseparately when the display label differs from the source field name. - Pass values from
DeltaTypeEnumtoSetTypeand values fromDataTypeEnumtoSetDataType.
Was this page helpful?