C:/GoDev/src/TCSTK-Angular/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-actions/live-apps-actions.component.ts
Not used by app but wraps action list and action execution.
<tcla-live-apps-actions></tcla-live-apps-actions>
selector | tcla-live-apps-actions |
styleUrls | ./live-apps-actions.component.css |
templateUrl | ./live-apps-actions.component.html |
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor()
|
actionFilter | |
Type : string[]
|
|
Dont show buttons for any actions that start with this string. eg: '$' will remove the action $Update |
applicationId | |
Type : string
|
|
LA Application ID |
caseRef | |
Type : string
|
|
The case reference |
caseState | |
Type : string
|
|
The state of the case |
customFormDefs | |
Type : CustomFormDefs
|
|
Custom Form configuration file |
formsFramework | |
Type : string
|
|
sandboxId | |
Type : number
|
|
sandboxId - this comes from claims resolver |
typeId | |
Type : string
|
|
The LA Application Type Id (generally 1) |
caseActioned | |
Type : EventEmitter<ProcessId>
|
|
~event caseActioned : Case action starterd (process started) ~payload ProcessId : processId of started process in live apps (action) |
ngOnInit |
ngOnInit()
|
Returns :
void
|
actionSelector |
Type : LiveAppsCaseActionsComponent
|
Decorators :
@ViewChild(LiveAppsCaseActionsComponent, {static: false})
|
Public formsFramework |
Type : string
|
Default value : 'material-design'
|
Allow override of forms framework Options: bootstrap-4 or material-design |
handleActionClicked |
Default value : () => {...}
|
handleActionCompleted |
Default value : () => {...}
|
selectedAction |
Type : LaProcessSelection
|
FormsFramework | ||||||
setFormsFramework(formsFramework: string)
|
||||||
Parameters :
Returns :
void
|
import {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
import {ProcessId} from '../../models/liveappsdata';
import {LaProcessSelection} from '../../models/tc-case-processes';
import {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';
import {LiveAppsCaseActionsComponent} from '../live-apps-case-actions/live-apps-case-actions.component';
/**
* Not used by app but wraps action list and action execution.
*
*@example <tcla-live-apps-actions></tcla-live-apps-actions>
*/
@Component({
selector: 'tcla-live-apps-actions',
templateUrl: './live-apps-actions.component.html',
styleUrls: ['./live-apps-actions.component.css']
})
export class LiveAppsActionsComponent implements OnInit {
@ViewChild(LiveAppsCaseActionsComponent, {static: false}) actionSelector: LiveAppsCaseActionsComponent
/**
* The case reference
*/
@Input() caseRef: string;
/**
* The state of the case
*/
@Input() caseState: string;
/**
* sandboxId - this comes from claims resolver
*/
@Input() sandboxId: number;
/**
* LA Application ID
*/
@Input() applicationId: string;
/**
* The LA Application Type Id (generally 1)
*/
@Input() typeId: string;
/**
* Custom Form configuration file
*/
@Input() customFormDefs: CustomFormDefs;
/**
* Allow override of forms framework
* Options: bootstrap-4 or material-design
*/
public formsFramework: string = 'material-design';
@Input('formsFramework') set FormsFramework(formsFramework: string) {
if (formsFramework){
this.formsFramework = formsFramework;
}
}
/**
* Dont show buttons for any actions that start with this string.
* eg: '$' will remove the action $Update
*/
@Input() actionFilter: string[];
/**
* ~event caseActioned : Case action starterd (process started)
* ~payload ProcessId : processId of started process in live apps (action)
*/
@Output() caseActioned: EventEmitter<ProcessId> = new EventEmitter<ProcessId>();
selectedAction: LaProcessSelection;
// action clicked
handleActionCompleted = (result: ProcessId) => {
this.caseActioned.emit(result);
this.actionSelector.toggleEnable();
}
handleActionClicked = (action) => {
this.actionSelector.toggleEnable();
this.selectedAction = action;
}
constructor() { }
ngOnInit() {
}
}
<div fxLayout="column" fxFlexFill>
<tcla-live-apps-case-actions [sandboxId]="sandboxId" [typeId]="typeId" [appId]="applicationId" [caseRef]="caseRef" [maxActions]="5" [actionFilter]="actionFilter" (actionClicked)="handleActionClicked($event)"></tcla-live-apps-case-actions>
<tcla-live-apps-case-action *ngIf="selectedAction" [process]="selectedAction" [caseRef]="caseRef" [typeId]="typeId" [applicationId]="applicationId" [sandboxId]="sandboxId" [formsFramework]="formsFramework"></tcla-live-apps-case-action>
</div>
./live-apps-actions.component.css