# Module Audit

This document lists the modules currently present in the TAF repository and notes whether they relate to Time & Attendance (T&A) or Procurement. Modules that are unrelated are marked for hiding via ACL so that only T&A and Procurement remain visible.

## Core Modules Kept
- Attendance & Time Tracking (`attendance`)
- Time Clock Locations (`time_clock_locations`)
- Payroll Management and Configuration (`payroll`, `payroll_config`)
- Requisition & Purchase Orders (`requisitions`)
- Vendor Management (`vendor`)

## Modules to Hide
The following modules appear in the frontend or models but are not part of the required T&A or Procurement scope and should be disabled for all roles using ACL:

- Finance (GL accounts, budgeting, cash management)
- Sales / Customer Management
- HR submodules other than attendance and payroll
- Recruiting (applications, open positions)
- Inventory / Supply Chain modules that are not part of procurement
- Production, Quality, POS, Market, Grants, Property Management, etc.

These modules remain in the codebase but their resources should be removed from group or role permissions so users cannot access them.

## Audit Log Fields
The `audit_logs` table now tracks additional actions:
- `metadata_change` for document metadata edits
- `workflow_execute` recording each workflow step execution

### Viewing Audit History

Use `/api/admin/auditlogs` or `/api/rateadmin/auditlogs` to fetch log entries.
Supported query parameters:

- `tenant` – filter by tenant ID
- `user` – filter by user ID
- `action` – action type
- `from` and `to` – date range (`YYYY-MM-DD`)
- `page` and `perPage` – paginate results
- `export=csv|pdf` – download logs in CSV or PDF
