Skip to content

feat: Add ability to archive bins #35

@akifbayram

Description

@akifbayram

Summary

Add the ability to archive bins. Archived bins should be hidden from the default bin list but remain accessible and restorable, unlike soft-deleted bins which are in the trash.

Motivation

Users accumulate bins over time that are no longer actively used but shouldn't be deleted. Archiving provides a middle ground between active and deleted — keeping data intact without cluttering the main view.

Proposed Behavior

  • Add an "Archive" action to the bin context menu / detail page
  • Archived bins are excluded from the default bin list
  • Add an "Archived" filter to view archived bins
  • Archived bins can be restored to active status
  • Scanning a QR code for an archived bin should still work (show the bin with an "archived" indicator)

Implementation Notes

  • New archived_at timestamp column on the bins table (similar to deleted_at for soft deletes)
  • Default bin queries filter WHERE archived_at IS NULL AND deleted_at IS NULL
  • API endpoints: POST /api/bins/:id/archive and POST /api/bins/:id/unarchive

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions