Skip to content

Dead Stock Lookup

The <dead-stock-lookup> component displays dead stock information for parts, grouped by company and branch. It is a standalone part-lookup component with its own data loading.

Live Demo

Try a part number:


Usage

Bundle CDN

<script type="module"
  src="https://cdn.jsdelivr.net/npm/[email protected]/dist/shift-components/shift-components.esm.js">
</script>

<dead-stock-lookup
  base-url="https://your-api.com/"
  language="en">
</dead-stock-lookup>

With Mock Data (Development)

<dead-stock-lookup
  is-dev="true"
  mock-url="/path/to/part-lookup.json"
  language="en">
</dead-stock-lookup>

Properties

Property Attribute Type Default Description
isDev is-dev boolean false Enables development mode with mock data
mockUrl mock-url string '' URL to load mock JSON data from (used when isDev is true)
language language string 'en' Language code for localization
coreOnly core-only boolean false Renders a slim layout without the search input

Mock Data Format

When using is-dev="true" with mock-url, the JSON file should be a dictionary keyed by part number:

{
  "SU00302474": {
    "partNumber": "SU00302474",
    "partDescription": "CLAMP",
    "deadStock": [
      {
        "companyName": "City Auto",
        "branches": [
          {
            "branchName": "Downtown Branch",
            "quantity": 8
          }
        ]
      }
    ]
  }
}

See the standard-dealer and broker-dealer demo data files for complete examples.