Skip to content

expectationOperation

reference
1 min readUpdated

Kind: Class

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

Part of: Pams

expectationOperation represents expected metadata for a dashboard data field. It exposes accessors for the field name, caption, expected field type, data type, stored name, and hidden-state evaluation.

Methods

MethodSignatureReturns
SetStoredNameSetStoredName(name: string)void
GetFieldNameGetFieldName()string
SetFieldNameSetFieldName(name: string)void
GetTypeGetType()expectedFieldType
SetTypeSetType(type: expectedFieldType)void
GetCaptionGetCaption()string
SetCaptionSetCaption(input: string)void
SetDataTypeSetDataType(ty: DataTypeEnum)void
GetDataTypeGetDataType()DataTypeEnum
isHiddenisHidden()boolean
setHiddensetHidden(flag: boolean)void

Properties

PropertyType
callbackcallbackPRAny
CertainYearnumber
GetStoredNameany

Where it refuses work

  • expectationOperation stops the work with an early return when this.Field.StoredName.
  • expectationOperation stops the work with an early return when this.Field.FieldName.

Diagram

mermaid
graph LR
  Operation[expectationOperation]
  Operation --> StoredName[SetStoredName]
  Operation --> FieldName[GetFieldName / SetFieldName]
  Operation --> FieldType[GetType / SetType]
  Operation --> Caption[GetCaption / SetCaption]
  Operation --> DataType[GetDataType / SetDataType]
  Operation --> Hidden[isHidden]

Usage

ts
import {
  expectationOperation,
} from "./models/dashboard/dashboard-data-fields";

const operation = new expectationOperation();

operation.SetStoredName();
operation.SetFieldName();
operation.SetType();
operation.SetCaption();
operation.SetDataType();

const fieldName = operation.GetFieldName();
const caption = operation.GetCaption();
const fieldType = operation.GetType();
const dataType = operation.GetDataType();

if (!operation.isHidden()) {
  console.log({ fieldName, caption, fieldType, dataType });
}

AI Coding Instructions

  • Treat expectationOperation as the metadata model for expected dashboard fields.
  • Use the getter methods when reading field names, captions, types, and data types instead of depending on internal state.
  • Keep stored-name, field-name, type, caption, and data-type updates consistent when extending the model.
  • Do not assume hidden-state behavior from the field name alone; use isHidden() for visibility checks.
  • Preserve the existing method naming and casing when integrating with dashboard field processing code.

Was this page helpful?

Download as PDF