Function inventoryStatusColumn

Function that creates the status column for inventories. Should be used with the DataTable component.

  • Parameters

    • statusLabel: string

      Localized label for the status column

    • approvedItems: string[]

      Array of approved items, typically as defined in Settings.xml

    • onApprovedItemsChange: (items: string[]) => void

      Callback function that stores the updated list of approved items

    • unapprovedItems: string[]

      Array of unapproved items, typically as defined in Settings.xml

    • onUnapprovedItemsChange: (items: string[]) => void

      Callback function that stores the updated list of unapproved items

    Returns ColumnDef<InventoryTableData>

    Column that shows the status buttons for the related inventory item. The button for the current status of the item is selected