'', 'employee_email' => '', 'department' => 'Operations', 'leave_type' => 'Annual leave', 'start_date' => date('Y-m-d', strtotime('+1 day')), 'end_date' => date('Y-m-d', strtotime('+1 day')), 'reason' => '', ]; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $old = array_merge($old, $_POST); $result = createLeaveRequest($_POST); if (!empty($result['success'])) { flash('success', 'Leave request submitted and added to the tenant-scoped approval queue.'); redirectWithCompany('/leave_request.php', ['id' => (int)$result['id'], 'created' => 1]); } $errors = $result['errors'] ?? []; } renderPageStart( 'Create Leave Request', 'Submit a leave request with validation, tenant scoping, and approval-ready review status.', 'new' ); ?>
Request workflow

Submit leave for approval

Every request is stored with company_id and only appears inside the active tenant workspace.

Keep this short, factual, and audit-friendly. /500
Calculated duration
1 business days requested
Cancel
What this proves

Thin but complete SaaS slice

  • Tenant switcher demonstrates isolated data views.
  • Server-side validation protects the workflow.
  • Approval-ready status starts at pending.
  • Dashboard and list update immediately after submit.
Next modules

Planned expansion

AttendanceClock in/out + GPS capture
EmployeesDirectory, roles, and contracts
NotificationsEmail + database events
AI assistantNatural-language HR insights