File

C:/GoDev/src/TCSTK-Angular/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-actions/live-apps-actions.component.ts

Description

Not used by app but wraps action list and action execution.

Implements

OnInit

Example

<tcla-live-apps-actions></tcla-live-apps-actions>

Metadata

selector tcla-live-apps-actions
styleUrls ./live-apps-actions.component.css
templateUrl ./live-apps-actions.component.html

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor()

Inputs

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)

Outputs

caseActioned
Type : EventEmitter<ProcessId>

~event caseActioned : Case action starterd (process started) ~payload ProcessId : processId of started process in live apps (action)

Methods

ngOnInit
ngOnInit()
Returns : void

Properties

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

Accessors

FormsFramework
setFormsFramework(formsFramework: string)
Parameters :
Name Type Optional
formsFramework string No
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

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""