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
| Method | Signature | Returns |
|---|---|---|
SetStoredName | SetStoredName(name: string) | void |
GetFieldName | GetFieldName() | string |
SetFieldName | SetFieldName(name: string) | void |
GetType | GetType() | DateGroupEnum |
SetType | SetType(type: DateGroupEnum) | void |
GetCaption | GetCaption() | string |
SetCaption | SetCaption(input: string) | void |
SetDataType | SetDataType(ty: DataTypeEnum) | void |
GetDataType | GetDataType() | DataTypeEnum |
isHidden | isHidden() | boolean |
setHidden | setHidden(flag: boolean) | void |
Properties
| Property | Type |
|---|---|
CertainYear | number |
GetStoredName | any |
Where it refuses work
GroupOperationstops the work with an early return whenthis.Field.StoredName.GroupOperationstops the work with an early return whenthis.Field.FieldName.
Diagram
mermaidgraph 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
tsimport {
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
GroupOperationto dashboard rendering code. - Pass values from
DateGroupEnumtoSetType()and values fromDataTypeEnumtoSetDataType(). - Read configuration through
GetFieldName(),GetType(),GetCaption(), andGetDataType()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)
DashboardWidgetOperationsService—Pams/Web/Pams.Web/Client/app/services/dashboard/dashboard-widget-operations.service.ts:1
Was this page helpful?