Skip to content

✨ Expiration Date Tracking & Alerts #81

@fusion94

Description

@fusion94

Summary

Add optional expiration date tracking for inventory items with an alert system that warns users about upcoming expirations. This is particularly useful for ammunition shelf life, chemical supplies, and warranty periods.

Motivation

Certain inventory items have finite shelf lives — ammunition, cleaning solvents, first aid supplies, and warranties all expire. Without tracking, expired items may be used unknowingly or warranty claims may be missed. An expiration alert system, similar to the existing reorder point alerts, proactively surfaces items that need attention.

Proposed Implementation

  • Add an optional expiration_date column to the items table
  • Add expiration_warning_days to user preferences or system settings (default: 30 days)
  • Create an /api/items/expiring endpoint that returns items expiring within the warning threshold
  • Build a dashboard widget showing upcoming expirations (count + list)
  • Add expiration date field to ItemForm (date picker, optional)
  • Display expiration status on item detail page with visual indicator (green/yellow/red)
  • Add an expiration report page with filterable list of all items with expiration dates
  • Include expiration alerts in the existing alert/notification system
  • Support sorting items by expiration date (soonest first)

Acceptance Criteria

  • Items can have an optional expiration date set via ItemForm
  • Configurable warning threshold (days before expiry) in settings
  • Dashboard widget displays count and list of items expiring soon
  • Item detail page shows expiration status with visual color indicator
  • /api/items/expiring endpoint returns items within the warning window
  • Expiration report page lists all items with expiration dates, filterable and sortable
  • Expired items are visually distinguished from items approaching expiration
  • Items without expiration dates are unaffected by the feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions