PhoenixKitWarehouse.ActivityLog (PhoenixKitWarehouse v0.1.0)

Copy Markdown View Source

Single entry point for warehouse module activities.

Wraps PhoenixKit.Activity.log/1, swallows errors, and respects the :inventory_activity_logging runtime kill switch.

Summary

Functions

Logs a content correction with a compact summary of changed fields.

Logs the creation of an inventory document.

Logs a draft save with a compact summary of changed fields.

Logs the posting of an inventory document.

Logs a repost (re-application of stock quantities).

Logs a responsibility change (created_by / performed_by).

Functions

log_corrected(doc, changes, opts)

Logs a content correction with a compact summary of changed fields.

log_created(doc, opts)

Logs the creation of an inventory document.

log_draft_saved(doc, changes, opts)

Logs a draft save with a compact summary of changed fields.

log_posted(doc, opts)

Logs the posting of an inventory document.

log_reposted(doc, opts)

Logs a repost (re-application of stock quantities).

log_responsibility_changed(doc, changes, opts)

Logs a responsibility change (created_by / performed_by).

changes is a map with optional keys :created_by and :performed_by, each carrying a {from, to} tuple of UUID strings (or nil).

Example:

%{created_by: {"old-uuid", "new-uuid"}, performed_by: {nil, "new-uuid"}}