eLabSDK2.Inventory.Equipment.EquipmentList

Documentation for EquipmentList

Hierarchy

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

NameType
actionAction

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

NameType
visibilityboolean

Returns

void


© 2023 eLabNext