eLabSDK2.Inventory.Sample.SampleDetail

Hierarchy

Methods

addSection

Static addSection(section): void

Add a custom section to the sample detail page

Parameters

NameType
sectionunknown

Returns

void


addStorageUnitTreeNodeAddition

Static addStorageUnitTreeNodeAddition(treeNodeAddition): void

Register a custom action on a single sample

Parameters

NameType
treeNodeAdditionTreeNodeAddition

Returns

void


addTab

Static addTab(tabConfig): void

Display a custom tab on the Sample Detail page
tabConfig.type can be either 'table' or 'custom'. Where
'table' is rendering the content in a (paged) table layout.
If type is set to 'table', the 'content' field should be of type
:SDKTableConfig
The 'custom' type allows for custom html injection.

If a custom tab with the given id already exists, the section is updated.

Example tabConfig:
{
id: myCustomTab,
title: My Tab Title,
type: 'table',
content: {
columns: ['id', 'name'],
data: [ [1, 'foo'], [2, 'bar']],
paging: {
showPager: true,
currentPage: 3,
recordCount: 25,
totalCount: 100,
handlePage: myCallBackFunction // signature: function(recordsPerPage, currentPage) {}
}
}
}

Parameters

NameType
tabConfigCustomTab

Returns

void


addTopNotice

Static addTopNotice(notice): void

Add notice information to the top of a sample detail page

Parameters

NameType
noticeBoxNotice

Returns

void


getCurrentTabTitle

Static getCurrentTabTitle(): string

Retrieve the currently active tab in a sample/series detail page.

Returns

string

title of the tab that is currently active for the user.


getParentSampleID

Static getParentSampleID(): number

Returns

number

Parent Sample ID of the currently loaded sample (if set),
or null otherwise.


getSample

Static getSample(): SampleInterface

Retrieve the currently loaded sample information

Returns

SampleInterface

sample: SampleInterface


getSampleDetail

Static getSampleDetail(): SampleDetailInterface

Get the details of the selected sample.

Returns

SampleDetailInterface

An object with sample details.


getSampleID

Static getSampleID(): number

Retrieve the sampleID of the sample currently loaded in the
detail view of the inventory browser (if any).

Returns

number

sampleID - Number or null if not present


getSampleSeriesID

Static getSampleSeriesID(): number

Returns

number

Series ID of series containing the currently loaded sample,
or null if not set.


getSampleTypeDetail

Static getSampleTypeDetail(): any

Get the sample type detail of the current selected sample.

Returns

any

An object with the sample type details.


getSeriesDetail

Static getSeriesDetail(): SeriesDetailInterface

Get the details of the selected series sample.

Returns

SeriesDetailInterface

An object with the series sample details.


getSeriesID

Static getSeriesID(): any

Returns

any

Series ID of series containing the currently loaded series,
or null if not set.


isSeries

Static isSeries(): boolean

Determine whether or not the currently active sample is part of a series.

Returns

boolean

true if the currently active sample is part of a series


onSampleDetailReady

Static onSampleDetailReady(callback, id): void

Triggers the given callback function when all sample information
is loaded in the sample detail page.

Parameters

NameTypeDescription
callback(event: CustomEvent<SampleDetailInterface>) => voidCallback function to call when the sample is ready.
idstring-

Returns

void


registerAction

Static registerAction(action): void

Register a custom action on a single sample

Parameters

NameType
actionAction

Returns

void


reloadSample

Static reloadSample(): void

Reload the currently active sample.

Returns

void


reloadSampleChildren

Static reloadSampleChildren(): void

Reload the currently active sample children.

Returns

void


reloadSampleMeta

Static reloadSampleMeta(): Promise<SampleInterface>

Reload the currently active sample meta.

Returns

Promise<SampleInterface>

A promise when resolved contains the sample meta data of the currently selected sample.


reloadSampleQuantity

Static reloadSampleQuantity(): Promise<SampleInterface>

Reload the currently active sample quantity.

Returns

Promise<SampleInterface>

A promise when resolved contains the sample quantity of the currently selected sample.


reloadSampleSeries

Static reloadSampleSeries(): void

Reload the currently active sample series if the sample is part of the series.

Returns

void


reloadSampleShoppingItem

Static reloadSampleShoppingItem(): void

Reload the currently active sample shopping item.

Returns

void


updateCustomList

Static updateCustomList(): void

Update the SDK list in SampleDetails. This triggers a call to the handlePage config of the Tab configuration.

Returns

void


© 2023 eLabNext