Question

How to add custom field on Activity mini page

Hi,

 

How to add custom field on this mini page which opens when we mark any task as "Complete"?

 

Please help!

Thanks in advance.

Like 0

Like

1 comments

hi Akshit,



The module that brings the mini page is ActivityMiniPage.

It's possible to replace the schema and add custom logic and fields inside the diff property.



Below is a sample that depicts the Select Result (the first dropdown in the mini page) Similar way we can add other custom fields here.

define("ActivityMiniPage", [], function() {
	return {
		entitySchemaName: "Activity",
		messages:{
 
		},
		methods: {
 
		},
		diff: /**SCHEMA_DIFF*/[
					{
				"operation": "insert",
				"name": "ResultsContainer",
				"parentName": "MiniPage",
				"propertyName": "items",
				"values": {
					"itemType": this.Terrasoft.ViewItemType.CONTAINER,
					"items": [],
					"layout": {
						"column": 0,
						"row": 5,
						"colSpan": 24
					},
					"visible": {
						"bindTo": "isEditableResultsVisible"
					}
				}
			},
			{
				"operation": "insert",
				"parentName": "ResultsContainer",
				"propertyName": "items",
				"name": "Result",
				"values": {
					"generator": "MiniPageEditControlsGenerator.generateModelItem",
					"visible": {
						"bindTo": "hasResults"
					},
					"contentType": this.Terrasoft.ContentType.ENUM,
					"wrapClass": ["container-mini-wrap"],
					"controlConfig": {
						"placeholder": {
							"bindTo": "Resources.Strings.ResultControlPlaceholder"
						}
					},
					"controlWrapConfig": {
						"classes": {
							"wrapClassName": ["control-mini-wrap"]
						}
					},
					"labelConfig": {
						"visible": false,
						"markerValue": ""
					}
				}
			},
			{
				"operation": "insert",
				"parentName": "ResultsContainer",
				"propertyName": "items",
				"name": "ProcessResult",
				"values": {
					"bindTo": "ProcessResult",
					"generator": "MiniPageEditControlsGenerator.generateModelItem",
					"visible": {
						"bindTo": "hasProcessResults"
					},
					"contentType": this.Terrasoft.ContentType.ENUM,
					"wrapClass": ["container-mini-wrap"],
					"controlConfig": {
						"prepareList": {"bindTo": "onPrepareProcessResultList"},
						"list": {"bindTo": "ProcessResultList"},
						"placeholder": {
							"bindTo": "Resources.Strings.ResultControlPlaceholder"
						}
					},
					"controlWrapConfig": {
						"classes": {
							"wrapClassName": ["control-mini-wrap"]
						}
					},
					"labelConfig": {
						"visible": false,
						"markerValue": ""
					}
				}
			},
		]/**SCHEMA_DIFF*/,
		rules: {}
	};
});
Show all comments