eLabSDK2.Inventory.StorageUnit.StorageUnitList
Documentation for StorageUnitList
Hierarchy
-
↳
StorageUnitList
Methods
getSelectedStorageUnits
Static
getSelectedStorageUnits(): StorageUnitInterface
[]
getSelectedStorageUnits
Description
Retrieve selected storage units
Example
[
{
name: string;
notes: string;
updated: string;
storageLayerID: number;
storageID: number;
storageTypeID: number;
storageType: StorageType;
storageLayer?: StorageLayer;
instituteID: number;
groupID: number;
userID: number;
department: string;
address: string;
building: string;
floor: string;
room: string;
deviceType: string;
deviceTypeID: number;
deviceTypeName: string;
barcode: string;
status: DeviceStatus;
hasPlanner: boolean;
hasValidation: boolean;
hideFromBrowser: boolean;
},
...
];
Returns
StorageUnitInterface
[]
List of selected storage units
registerAction
Static
registerAction(action
): void
Register storage unit list bulk action
Description
Register storage unit list bulk action
Example
const storageUnitBulkActionButton: Action = {
id: "storageUnitBulkActionButton",
title: "My custom action",
label: "Storage Unit Action",
icon: "fa-cookie-bite", // font awesome icon, Optional
onClick: () => {
const storageUnits = eLabSDK2.Inventory.StorageUnit.StorageUnitList.getSelectedStorageUnits();
storageUnits.forEach((storageUnit) => {
console.log(storageUnit);
});
},
showCondition: () => {
return (
eLabSDK2.Inventory.StorageUnit.StorageUnitList.getSelectedStorageUnits()
.length > 0
);
},
};
eLabSDK2.Inventory.StorageUnit.StorageUnitList.registerAction(
storageUnitBulkActionButton
);
Parameters
Name | Type |
---|---|
action | Action |
Returns
void
© 2023 eLabNext
Updated about 1 month ago