Voile.Schema.StockOpname.Item (Voile v0.1.31)

Copy Markdown View Source

Summary

Functions

Get check status badge color for UI

Returns check status options for display

Create minimal item record for stock opname initialization. Only stores item_id and collection_id - changes recorded later by librarian.

Record changes found by librarian during checking. Only stores the changed fields in JSONB.

Functions

check_status_color(status)

Get check status badge color for UI

check_status_options()

Returns check status options for display

minimal_item_attrs(item_id, collection_id, session_id)

Create minimal item record for stock opname initialization. Only stores item_id and collection_id - changes recorded later by librarian.

record_changes_changeset(opname_item, changes, checked_by_id)

Record changes found by librarian during checking. Only stores the changed fields in JSONB.

Example changes: %{ "status" => "damaged", "condition" => "poor", "location" => "Storage Room", "availability" => "unavailable" }