Comprehensive audit trail system that integrates QMS and HRM modules for complete traceability, performance management, and employee involvement tracking.
Track every action across QMS and HRM modules with detailed audit trails including user actions, timestamps, and data changes.
Integrate QMS KPIs into HRM performance appraisals with automated scoring and comprehensive evaluation systems.
Track employee participation in quality improvement teams and manage suggestion systems for continuous improvement.
| Field | Type | Description |
|---|---|---|
| id | BigInt | Primary key |
| module | String | QMS, HRM, PERFORMANCE, etc. |
| action | String | CREATE, UPDATE, DELETE, APPROVE |
| entity_type | String | SOP, TrainingPathway, Employee, etc. |
| entity_id | BigInt | ID of the affected entity |
| entity_name | String | Human readable entity name |
| user_id | BigInt | User who performed the action |
| department_id | BigInt | Related department |
| old_values | JSON | Previous state |
| new_values | JSON | New state |
| description | Text | Human readable description |
| ip_address | String | User's IP address |
| performed_at | Timestamp | When action was performed |
Run the migrations to create all necessary tables:
php artisan migrate
This creates:
Add audit trail logging to your controllers:
use Workdo\Qms\Services\AuditTrailService;
// Log QMS activity
AuditTrailService::logQms(
'CREATE',
'SOP',
$sop->id,
$sop->title,
null,
$sop->toArray(),
'Created new SOP',
$sop->department_id
);
// Log HRM activity
AuditTrailService::logHrm(
'UPDATE',
'Employee',
$employee->id,
$employee->name,
$oldValues,
$newValues,
'Updated employee information'
);
Create performance reviews with QMS KPI integration:
// Create performance review
$performance = PerformanceManagement::create([
'employee_id' => $employeeId,
'department_id' => $departmentId,
'review_period' => 'Quarterly',
'review_date' => now(),
'next_review_date' => now()->addMonths(3),
'overall_rating' => 'Good',
'overall_score' => 85.5
]);
// Add QMS KPIs
$kpi = PerformanceKPI::create([
'performance_id' => $performance->id,
'kpi_name' => 'SOP Compliance Rate',
'kpi_category' => 'Quality',
'target_value' => 95.0,
'actual_value' => 92.5,
'achievement_percentage' => 97.4,
'weight' => 20.0
]);
Set up quality improvement teams:
// Create quality team
$team = QualityImprovementTeam::create([
'team_name' => 'Process Improvement Team',
'department_id' => $departmentId,
'project_name' => 'Reduce Defect Rate',
'start_date' => now(),
'target_completion_date' => now()->addMonths(6),
'status' => 'Active'
]);
// Add team members
TeamMember::create([
'team_id' => $team->id,
'employee_id' => $employeeId,
'role' => 'Team Leader',
'joined_date' => now()
]);
Meet regulatory requirements with complete audit trails and documentation.
Improve employee performance through integrated KPI tracking and feedback.
Increase employee engagement through quality improvement participation.
Foster innovation through employee suggestion systems and continuous improvement.