diff --git a/onboarding.php b/onboarding.php index 9fb857b..f7557ca 100644 --- a/onboarding.php +++ b/onboarding.php @@ -6,32 +6,56 @@ if (!isset($_SESSION['user_id'])) { } require_once 'db/config.php'; -// Template data from the React snippet -$templateTasks = [ - ['name' => "Setup Development Environment", 'status' => "in-progress", 'category' => "IT"], - ['name' => "Complete HR Documentation", 'status' => "completed", 'category' => "HR"], - ['name' => "Benefits Enrollment", 'status' => "completed", 'category' => "HR"], - ['name' => "Team Introduction Meeting", 'status' => "pending", 'category' => "Manager"], - ['name' => "Assign First Project", 'status' => "pending", 'category' => "Manager"], - ['name' => "Security Training", 'status' => "pending", 'category' => "IT"], - ['name' => "Code Review Process Training", 'status' => "pending", 'category' => "Manager"], - ['name' => "Setup Communication Tools", 'status' => "completed", 'category' => "IT"], +// --- Data based on the new text provided --- + +$employee = [ + 'name' => 'Emily Davis', + 'initials' => 'ED', + 'title' => 'Product Designer', + 'team' => 'Design Team', + 'start_date' => 'Dec 15, 2024', + 'manager' => 'Sarah Johnson', + 'day' => 3, + 'total_days' => 30, + 'avatar_url' => 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=400&fit=crop' ]; -$completedTasks = count(array_filter($templateTasks, function($t) { return $t['status'] === "completed"; })); -$progressPercent = ($completedTasks / count($templateTasks)) * 100; - -$status_map = [ - 'completed' => ['icon' => 'check-circle-2', 'color' => 'text-green-500', 'bg' => 'bg-green-100'], - 'in-progress' => ['icon' => 'clock', 'color' => 'text-blue-500', 'bg' => 'bg-blue-100'], - 'pending' => ['icon' => 'file-text', 'color' => 'text-gray-500', 'bg' => 'bg-gray-100'] +$tasks = [ + 'in_progress' => [ + ['title' => 'I-9 Form', 'description' => 'Verify employment eligibility documentation', 'due' => 'Dec 10, 2024', 'assignee' => 'Emily Davis'], + ['title' => 'Set Up Email Account', 'description' => 'Configure company email and Slack access', 'due' => 'Dec 11, 2024', 'assignee' => 'IT Team'], + ['title' => 'Equipment Setup', 'description' => 'Receive and configure laptop and peripherals', 'due' => 'Dec 12, 2024', 'assignee' => 'IT Team'], + ], + 'upcoming' => [ + ['title' => 'Benefits Enrollment', 'description' => 'Review and select health insurance options', 'due' => 'Dec 20, 2024'], + ['title' => 'Department Orientation', 'description' => 'Meet with design team and review processes', 'due' => 'Dec 22, 2024'], + ['title' => 'Security Training', 'description' => 'Complete online security awareness course', 'due' => 'Dec 27, 2024'], + ], + 'completed' => [ + ['title' => 'Sign Offer Letter', 'description' => 'Completed by Emily Davis on Dec 5, 2024'], + ['title' => 'Background Check', 'description' => 'Completed by HR Team on Dec 6, 2024'], + ['title' => 'Upload Profile Photo', 'description' => 'Completed by Emily Davis on Dec 7, 2024'], + ['title' => 'Emergency Contact Info', 'description' => 'Completed by Emily Davis on Dec 7, 2024'], + ] ]; -$category_map = [ - 'IT' => 'text-red-500', - 'HR' => 'text-blue-500', - 'Manager' => 'text-purple-500', -]; +// Numbers from the user's text for summary +$completed_count_from_text = 12; +$total_tasks_from_text = 20; +$progressPercent = ($completed_count_from_text / $total_tasks_from_text) * 100; + +function getStatusChip($status) { + switch ($status) { + case 'In Progress': + return 'In Progress'; + case 'Upcoming': + return 'Upcoming'; + case 'Completed': + return 'Completed'; + default: + return ''; + } +} ?> @@ -39,7 +63,7 @@ $category_map = [ - Onboarding - FinMox + Onboarding Tasks - FinMox @@ -47,94 +71,104 @@ $category_map = [
-
+
-

Onboarding Plan for Sarah Kim

-
- - -
- -
-

Welcome to the Team, Sarah!

-

We're thrilled to have you on board. This onboarding plan is designed to help you get up to speed quickly and smoothly. Please review the checklist and let your manager know if you have any questions.

-
+
+
+

Onboarding Tasks

+

Manage and track employee onboarding progress

- -
- -
-
-

- - Employee Information -

-
- Sarah Kim -
-

Sarah Kim

-

New Hire

-
-
-
-
- -
-

Position

-

Senior Full-Stack Engineer

-
-
-
- -
-

Email

-

sarah.kim@finmox.com

-
-
-
- -
-

Start Date

-

December 17, 2025

-
-
-
-
-
+
+ + +
- -
-
-

- - Onboarding Checklist -

-
-
- Progress - % -
-
-
-
-
-
- -
-
- -
+ +
+

In Progress ()

+
+ +
-

- +

+

+

Due:

+
+
+ Complete +

+ + +
+

Upcoming ()

+
+ +
+
+

+

+
+
+ Scheduled: +
+
+ +
+
+ + +
+

Completed ()

+
+ +
+

+

+
+ +
+
+ + +
+
+

Employee Overview

+
+
+ +
+
+

+

+
+
+
+

Start Date:

+

Manager:

+

Day of

+
+
+ +
+

Overall Progress

+
+ of tasks + % +
+
+
+
+
+
+
@@ -144,4 +178,4 @@ $category_map = [ lucide.createIcons(); - \ No newline at end of file +