Skip to content

GroupOperation

reference
1 min readUpdated

Kind: Class

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

Part of: Pams

GroupOperation stores dashboard grouping field metadata, including stored name, field name, caption, group type, and data type. Dashboard code can populate it through setter methods and read configured values and visibility through getter methods and isHidden().

Methods

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

Properties

PropertyType
CertainYearnumber
GetStoredNameany

Where it refuses work

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

Diagram

mermaid
graph LR
  Dashboard[Dashboard configuration] --> GroupOperation
  GroupOperation --> SetStoredName
  GroupOperation --> SetFieldName
  GroupOperation --> SetType
  GroupOperation --> SetCaption
  GroupOperation --> SetDataType
  GroupOperation --> GetFieldName
  GroupOperation --> GetType
  GroupOperation --> GetCaption
  GroupOperation --> GetDataType
  GroupOperation --> isHidden

Usage

ts
import {
  DataTypeEnum,
  DateGroupEnum,
  GroupOperation,
} from "./models/dashboard/dashboard-data-fields";

function createGroupOperation(
  storedName: string,
  groupType: DateGroupEnum,
  dataType: DataTypeEnum,
): GroupOperation {
  const operation = new GroupOperation();

  operation.SetStoredName(storedName);
  operation.SetFieldName(storedName);
  operation.SetCaption("Order date");
  operation.SetType(groupType);
  operation.SetDataType(dataType);

  if (!operation.isHidden()) {
    console.log(operation.GetCaption(), operation.GetFieldName());
  }

  return operation;
}

AI Coding Instructions

  • Set the stored name, field name, caption, type, and data type before passing a GroupOperation to dashboard rendering code.
  • Pass values from DateGroupEnum to SetType() and values from DataTypeEnum to SetDataType().
  • Read configuration through GetFieldName(), GetType(), GetCaption(), and GetDataType() instead of duplicating field metadata elsewhere.
  • Check isHidden() before showing the operation in dashboard field selectors or grouping controls.

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