Skip to content

Audit log — who changed what, and when

The system records every meaningful change made through the admin interface. The owner can see a list of these changes per item, or a venue-wide feed. Used by the owner when they need to understand who made a particular change, when, and what was different about it.

What it does

Until now, when something in the menu, inventory or supplier list changed unexpectedly, there was no way to know who did it. You’d ask in the kitchen WhatsApp group and hope someone remembered. Now the system keeps a clean record of every save.

For every change to a recipe, inventory item, supplier product, or related entity, the system writes one entry that records:

  • The person who made the change (name + role)
  • The time of the change
  • The entity affected (the recipe, item, etc.)
  • The action taken — created, edited, removed, merged into another, etc.
  • For edits, the list of fields that changed, with their old and new values.

Entries are kept for 12 months, then automatically pruned (so the log doesn’t grow forever). This is also a privacy safeguard — staff actions don’t sit in the database indefinitely.

How to use it

There are two places to find the log.

On a single item’s detail page

Open any inventory item. Above the action buttons there’s a row of tabs (Overview, Suppliers, Recipes & BOM, …). The last one is 📜 Storia. Click it.

You’ll see every entry that touched that specific item, newest first. Each entry shows who, when, what action, and — if it was an edit — a “Show 3 fields” link that expands the per-field changes.

Venue-wide feed

In the sidebar, under Settings, click 📜 Audit log. You land on /admin/audit — a paginated table of every entry across the whole venue. Four filters at the top:

  • Actor — filter by a specific person
  • Entity — recipes / inventory items / supplier products / POS menu items / modifiers
  • Action — create / update / remove / merge
  • Search — free-text search across actor name, entity name, and the entry’s summary

Combine filters freely. “Show me everything Maria edited on inventory items last week” → pick Maria as actor + Inventory items as entity. Click Load more at the bottom to keep going past the first 30 results.

What happens behind the scenes

Whenever someone clicks Save on a recipe, an inventory item, etc., the server records what was on the screen before the save and what’s there after. It compares the two and writes one log entry with the list of fields that actually changed.

This is one extra small write per save — invisible to the operator, no slowdown.

If someone saves the form without actually changing anything, no entry is written — the log stays clean of empty saves.

For two-sided actions like merging two inventory rows into one, the log writes two entries — one on the survivor’s history (“Absorbed X”), one on the archived source’s (“Merged into Y”). That way both detail pages show the merge from their point of view.

After 12 months, a daily background task quietly deletes entries older than that.

Examples

  • 🍝 “Why is Carbonara’s yield wrong?” — Open the recipe, 📜 Storia tab. You see Maria edited yieldQty from 4 kg to 4.5 kg yesterday at 17:30. Conversation with Maria takes 20 seconds instead of half an hour.

  • 🥫 “Two items disappeared from the inventory list overnight.” — Go to /admin/audit. Filter Action: Remove. Date range: yesterday. You see exactly when each item was archived and who archived it. If it was a mistake, restore them.

  • 🔀 “Who decided to merge the Mutti pomodoro into the generic Pomodori pelati?” — Open the surviving generic row, 📜 Storia tab. The first entry is Danilo absorbed “Mutti pomodoro pelato 400g”. Moved 1 supplier product, transferred 4 kg of stock.

  • 👤 “Did the new manager edit anything during their first week?”/admin/audit, Actor filter: that manager’s name. You see their full activity at a glance.

  • ⚠️ “I can’t see the Audit log button anywhere.” — Audit log is owner-only in v1. Manager and other roles don’t see it. If you should have access and don’t, ask the owner.