Skip to main content

Class: GtcDialogs

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Dialog/GtcDialogs.tsx:78

Utility class for opening GTC dialogs.

Constructors​

Constructor​

new GtcDialogs(): GtcDialogs

Returns​

GtcDialogs

Methods​

openDialogChain()​

static openDialogChain<Steps>(gtcService, steps): Promise<GtcDialogChainResult<Steps>>

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Dialog/GtcDialogs.tsx:120

Opens a chain of dialogs. Each dialog in the chain is opened sequentially until the chain is cancelled or there are no more dialogs left to open. By default, if a user cancels any dialog request in the chain, the entire chain is cancelled. This behavior can be overridden by the definitions of the individual steps in the chain. Additionally, if the GTC's active view at the beginning of any step is different from the active view when the chain was started, the chain will be immediately cancelled.

Type Parameters​

Type Parameter
Steps extends readonly GtcDialogChainStep<any>[]

Parameters​

ParameterTypeDescription
gtcServiceGtcServiceThe GTC service.
stepsStepsAn array of steps defining the actions to take with each dialog opened in the chain.

Returns​

Promise<GtcDialogChainResult<Steps>>

A Promise which is fulfilled with the result of the chain when the chain is completed or cancelled.


openMessageDialog()​

static openMessageDialog(gtcService, message, showRejectButton, acceptButtonLabel, rejectButtonLabel): Promise<boolean>

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Dialog/GtcDialogs.tsx:88

Opens a message dialog.

Parameters​

ParameterTypeDefault valueDescription
gtcServiceGtcServiceundefinedThe GtcService.
messagestring | VNodeundefinedThe message to display.
showRejectButtonbooleantrueWhether to show the reject button. Defaults to true.
acceptButtonLabelstring'OK'The label to display for the accept button. Defaults to 'OK'.
rejectButtonLabelstring'Cancel'The label to display for the reject button. Defaults to 'Cancel'.

Returns​

Promise<boolean>

True if user hit the accept button, otherwise false.