Skip to content

Delta

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.Web/Client/app/models/dashboard/dashboard-data-fields.ts (line 323)

Part of: Pams

Delta models a dashboard data field and stores its visibility, stored name, field name, type, and caption. It exposes getter and setter methods so dashboard code can read and update field metadata.

Methods

MethodSignatureReturns
isHiddenisHidden()boolean
setHiddensetHidden(flag: boolean)void
GetStoredNameGetStoredName()string
SetStoredNameSetStoredName(name: string)void
GetFieldNameGetFieldName()string
SetFieldNameSetFieldName(name: string)void
GetTypeGetType()DeltaTypeEnum
SetTypeSetType(type: DeltaTypeEnum)void
GetCaptionGetCaption()string
SetCaptionSetCaption(input: string)void
SetDataTypeSetDataType(ty: DataTypeEnum)void
GetDataTypeGetDataType()DataTypeEnum
GetFieldNameTargetGetFieldNameTarget()string
SetFieldNameTargetSetFieldNameTarget(name: string)void
GetStoredNameTargetGetStoredNameTarget()string
SetStoredNameTargetSetStoredNameTarget(name: string)void

Where it refuses work

  • Delta stops the work with an early return when this.FieldName.

Diagram

mermaid
graph LR
  Delta[Delta]
  Hidden[Hidden state]
  StoredName[Stored name]
  FieldName[Field name]
  Type[DeltaTypeEnum]
  Caption[Caption]

  Delta --> Hidden
  Delta --> StoredName
  Delta --> FieldName
  Delta --> Type
  Delta --> Caption

Usage

ts
import { Delta } from "./dashboard-data-fields";

const field = new Delta();

field.setHidden();

const hidden = field.isHidden();
const storedName = field.GetStoredName();
const fieldName = field.GetFieldName();
const fieldType = field.GetType();
const caption = field.GetCaption();

if (hidden) {
  console.log(`Hidden dashboard field: ${caption ?? fieldName ?? storedName}`);
}

console.log(fieldType);

AI Coding Instructions

  • Keep the existing method casing, including GetStoredName, SetStoredName, and setHidden.
  • Use isHidden() when reading visibility state and setHidden() when marking a field as hidden.
  • Read field metadata through the matching getter methods rather than accessing internal state directly.
  • Treat DeltaTypeEnum as the source for field type values when integrating dashboard field handling.
  • Do not assume setter argument signatures without checking the implementation in dashboard-data-fields.ts.

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)

  • DashboardWidgetOperationsServicePams/Web/Pams.Web/Client/app/services/dashboard/dashboard-widget-operations.service.ts:1

Was this page helpful?

Download as PDF