eLabSDK2.Inventory.Equipment.EquipmentList
Documentation for EquipmentList
Hierarchy
-
↳
EquipmentList
Methods
getSelectedEquipment
Static
getSelectedEquipment(): StorageUnit
[]
getSelectedEquipment
Description
Retrieve selected equipment
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
StorageUnit
[]
List of selected equipment
registerAction
Static
registerAction(action
): void
Register equipment list bulk action
Description
Register equipment list bulk action
Example
const equipmentBulkActionButton: Action = {
id: "equipmentBulkActionButton",
title: "My custom action",
label: "Equipment Action",
icon: "fa-cookie-bite", // font awesome icon, Optional
onClick: () => {
const equipment = eLabSDK2.Inventory.Equipment.EquipmentList.getSelectedEquipment();
equipment.forEach((equipment) => {
console.log(equipment);
});
},
showCondition: () => {
return (
eLabSDK2.Inventory.Equipment.EquipmentList.getSelectedEquipment()
.length > 0
);
},
};
eLabSDK2.Inventory.Equipment.EquipmentList.registerAction(
equipmentBulkActionButton
);
Parameters
Name | Type |
---|---|
action | Action |
Returns
void
setAddEquipmentButtonVisibility
Static
setAddEquipmentButtonVisibility(visibility
): void
Configure whether the 'Add Equipment' button should be displayed
on the equipment overview page.
Example
eLabSDK2.Inventory.Equipment.EquipmentList.setAddEquipmentButtonVisibility(true);
Parameters
Name | Type |
---|---|
visibility | boolean |
Returns
void
© 2023 eLabNext
Updated about 1 month ago