Skip to content

Activity Log

Overview

The Activity Log tracks all changes made in the backoffice. See who changed what and when for audit and troubleshooting purposes.

Key Purpose: Track and audit all system changes.

Purpose

This page lets you browse, filter, and search all recorded changes made by team members in the backoffice for auditing, troubleshooting, and compliance purposes.

Key Concepts

  • Log Entry: A record capturing who performed an action, what resource was affected, the type of action (created, updated, deleted, etc.), and the old vs. new values for updates.
  • Resource Types: The system logs changes across items, categories, modifiers, menus, locations, users, offers, coupons, orders, and settings.
  • Data Table Pagination: The ActivityLogService exposes log entries via a paginated dataTable method backed by the ActivityLogRepository, supporting filtering and sorting.
  • Change Diff: For update actions, the changes field stores a JSON object with field names as keys, each containing old and new values for comparison.
  • Read-Only Log: The activity log is append-only; entries cannot be edited or deleted by users, ensuring an immutable audit trail.

Actions

Browse Activity Log

View a chronological list of all backoffice actions with timestamp, user, action type, and affected resource.

Filter Log Entries

Narrow results by user, action type, resource type, date range, or location to find specific changes quickly.

Inspect Change Details

Expand a log entry to see the exact fields that changed, including their previous and new values.

Location

  • Backoffice Route: /settings/activity-log
  • Backend Controller: app/Http/Controllers/Api/ActivityLogController.php
  • Vue Component: src/views/settings/ActivityLogComponent.vue

Log Entry Fields

Timestamp

PropertyValue
Field IDcreated_at
LabelDate & Time
TypeDateTime

Description: When the action occurred.


User

PropertyValue
Field IDuser
LabelUser
TypeObject

Description: Who performed the action.

Fields:

  • id - User ID
  • name - User name
  • email - User email

Action

PropertyValue
Field IDaction
LabelAction
TypeString

Description: Type of action performed.

Actions:

  • created - New record created
  • updated - Record modified
  • deleted - Record removed
  • enabled - Feature/item enabled
  • disabled - Feature/item disabled
  • login - User logged in
  • logout - User logged out

Resource Type

PropertyValue
Field IDresource_type
LabelType
TypeString

Description: What type of resource was affected.

Types:

  • item - Menu item
  • category - Menu category
  • modifier - Modifier group
  • menu - Menu
  • location - Location
  • user - Team member
  • offer - Promotion
  • coupon - Coupon
  • order - Transaction
  • settings - System settings

Resource ID

PropertyValue
Field IDresource_id
LabelResource ID
TypeString

Description: ID of the affected resource.


Resource Name

PropertyValue
Field IDresource_name
LabelResource
TypeString

Description: Human-readable name of the resource.


Changes

PropertyValue
Field IDchanges
LabelChanges
TypeObject

Description: What was changed (for updates).

Structure:

json
{
  "field_name": {
    "old": "previous value",
    "new": "new value"
  }
}

IP Address

PropertyValue
Field IDip_address
LabelIP Address
TypeString

Description: IP address of the user.


Location

PropertyValue
Field IDlocation_id
LabelLocation
TypeString

Description: Which location the change affects (if applicable).


Filtering

By User

Filter logs by specific team member.

By Action

Filter by action type (created, updated, deleted, etc.).

By Resource Type

Filter by what was changed (items, settings, etc.).

By Date Range

Filter by time period.

By Location

Filter by affected location.


Business Logic

Logging Flow

User performs action in backoffice


System captures:
├── User info
├── Action type
├── Resource details
├── Changes (old vs new)
├── Timestamp
└── IP address


Store in activity log


Available for viewing/search

What Gets Logged

CategoryLogged Actions
Menu ItemsCreate, update, delete, availability change
CategoriesCreate, update, delete, visibility change
ModifiersCreate, update, delete
MenusCreate, update, delete, assignment
LocationsCreate, update, settings changes
TeamAdd user, remove user, role change
OffersCreate, update, delete, activate/deactivate
SettingsAny settings change
OrdersStatus change, refund, cancel

What's NOT Logged

  • Read/view actions (no changes)
  • Customer actions (separate customer log)
  • System automated actions (some)

Use Cases

Audit Trail

  • Who changed the price?
  • When was this item disabled?
  • Who deleted the category?

Troubleshooting

  • What changed before the issue started?
  • Did someone modify settings?
  • When was the last update?

Compliance

  • Track all data changes
  • User accountability
  • Change history

Training

  • See what new staff are doing
  • Identify mistakes
  • Guide best practices

Relations

Depends On

  • Team: User information
  • All Features: Changes to any feature logged

Affects

  • Audit compliance
  • Troubleshooting capability

Business Rules

  • The activity log is append-only; entries cannot be edited, deleted, or tampered with by any user, ensuring an immutable audit trail.
  • The ActivityLogService delegates all data retrieval to ActivityLogRepository.dataTable, which supports pagination, filtering by user/action/resource/date/location, and sorting.
  • Read-only actions (viewing pages, browsing data) are not logged; only state-changing actions (create, update, delete, enable, disable, login, logout) generate entries.
  • Customer-facing actions are tracked separately from backoffice actions; the activity log only covers changes made by team members in the backoffice.
  • Each log entry captures the acting user's ID, name, and email along with their IP address, the affected resource type and ID, the action type, and for updates a JSON diff of old vs. new field values.

FAQs

  • "Can I delete activity log entries?" No, the log is immutable; entries cannot be modified or removed to preserve audit integrity.
  • "Are customer actions recorded in this log?" No, customer actions (placing orders, updating profiles) are tracked in a separate customer log; this log covers backoffice team actions only.
  • "Why is a change I made not showing up?" Verify the correct filters are applied, expand the date range, and confirm the action type is one that gets logged (read-only actions like viewing a page are not recorded).
  • "Can I export the activity log?" The log is viewable and filterable in the backoffice; export functionality depends on whether the reports export permission is available for your role.
  • "Does the log record which location was affected?" Yes, when a change is location-specific the location_id field is populated, allowing filtering by location.

Troubleshooting

Problem: Can't find specific change

Causes:

  1. Wrong filters applied
  2. Date range too narrow
  3. Change not logged
  4. Different user made change

Solutions:

  1. Clear filters
  2. Expand date range
  3. Check if action type is logged
  4. Search by resource instead

Problem: Log entries missing

Causes:

  1. Logging disabled
  2. System error
  3. Action not tracked

Solutions:

  1. Verify logging is enabled
  2. Check system logs
  3. Some actions may not be tracked

Examples

Item Price Change

json
{
  "created_at": "2024-01-15T14:30:00Z",
  "user": {
    "id": "user-123",
    "name": "Jan Manager",
    "email": "jan@restaurant.com"
  },
  "action": "updated",
  "resource_type": "item",
  "resource_id": "item-456",
  "resource_name": "Margherita Pizza",
  "changes": {
    "price": {
      "old": 12.50,
      "new": 13.50
    }
  },
  "ip_address": "192.168.1.100",
  "location_id": "loc-789"
}

Item Created

json
{
  "created_at": "2024-01-15T10:15:00Z",
  "user": {
    "id": "user-123",
    "name": "Jan Manager",
    "email": "jan@restaurant.com"
  },
  "action": "created",
  "resource_type": "item",
  "resource_id": "item-789",
  "resource_name": "New Special Burger",
  "changes": null,
  "ip_address": "192.168.1.100"
}

Settings Change

json
{
  "created_at": "2024-01-15T09:00:00Z",
  "user": {
    "id": "user-001",
    "name": "Owner",
    "email": "owner@restaurant.com"
  },
  "action": "updated",
  "resource_type": "settings",
  "resource_id": "online-ordering",
  "resource_name": "Online Ordering Settings",
  "changes": {
    "minimum_order_amount": {
      "old": 15.00,
      "new": 20.00
    },
    "delivery_enabled": {
      "old": true,
      "new": false
    }
  }
}

User Login

json
{
  "created_at": "2024-01-15T08:30:00Z",
  "user": {
    "id": "user-123",
    "name": "Jan Manager",
    "email": "jan@restaurant.com"
  },
  "action": "login",
  "resource_type": "session",
  "resource_id": null,
  "resource_name": null,
  "ip_address": "192.168.1.100"
}

Activity Log View

═══════════════════════════════════════════════════════════════
                    ACTIVITY LOG
═══════════════════════════════════════════════════════════════

Jan 15, 2024

14:30  Jan Manager    Updated  Margherita Pizza
       └─ price: €12.50 → €13.50

14:15  Jan Manager    Disabled  Summer Special Salad
       └─ available: true → false

12:00  Jan Manager    Created   New Special Burger
       └─ New item added to Burgers category

10:30  Owner          Updated   Online Ordering Settings
       └─ minimum_order_amount: €15.00 → €20.00
       └─ delivery_enabled: true → false

09:45  Jan Manager    Deleted   Old Promo Code
       └─ Coupon "OLDCODE" removed

08:30  Jan Manager    Login
       └─ IP: 192.168.1.100

───────────────────────────────────────────────────────────────
Showing 6 of 156 entries  [Load More]