Spree Stock Levels Panel (spree/stock-levels-panel.tsx)

spree · packages/dashboard/src/components/spree/stock-levels-panel.tsx · typescript · BSD-3-Clause
ui, payments, pos, lang:typescript, fw:react

Operator dashboard panel component for viewing and editing inventory stock levels inline. Reuse when building e-commerce admin inventory interfaces.

// Source: https://github.com/spree/spree | License: BSD-3-Clause | Copyright 2024-present, Vendo Sp. z o.o., Vendo Connect Inc
// Provided via justclaw.it.com; keep this notice with the code.
import type { StockLevel } from '@spree/admin-sdk'
import {
  Button,
  Collapsible,
  CollapsibleContent,
  CollapsibleTrigger,
  Input,
  Switch,
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from '@spree/dashboard-ui'
import { ChevronDownIcon, ChevronRightIcon } from '@spree/dashboard-ui/icons'
import { Link, useParams } from '@tanstack/react-router'
import { useEffect, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useStockLevels, useUpdateStockLevel } from '../../hooks/use-stock-levels'

/**
 * On-hand counts at one locatio

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key