Skip to main content

IAreaService

Allows to to manipulate work Area.
Currently service supports:

  • banners,

area service banners
  • getting current PCC.

Acquiring service

In order to obtain IAreaService and use it, you need to import it:

import {IAreaService} from 'sabre-ngv-app/app/services/impl/IAreaService';

Then obtain the service inside your source as below:

const areaService: IAreaService = getService(IAreaService);

Available methods

Currently available methods:

getActiveArea
getActiveArea(): string;

Returns active Area.

Returns:
string

showBanner
showBanner(type: BannerType, text: string, title?: string): void;

Allows to show a banner in work Area.

Type Parameteres:
type - Type of banner to be displayed

type BannerType = 'Info' | 'Warning' | 'Success' | 'Error';

text - Text to be displayed on the banner (passing an empty string may result in a text that does not make sense, the text is capitalised)
[title] - Title of the banner (optional, the title is capitalised)

Returns:
void

getCurrentPcc
getCurrentPcc(): string;

Returns current PCC in work Area.

Returns:
string

clear
clear(): void;

Clears current work area.

Returns:
void

See com.sabre.redapp.example3.web.customworkflow sample for implementation.