ricardo-everysys's picture
modernizar e corrigir bugs
6f719f6 verified
Raw History Blame Contribute Delete
15.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ProFlow Manager | User Management</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
},
secondary: {
50: '#fdf4ff',
100: '#fae8ff',
200: '#f5d0fe',
300: '#f0abfc',
400: '#e879f9',
500: '#d946ef',
600: '#c026d3',
700: '#a21caf',
800: '#86198f',
900: '#701a75',
}
}
}
}
}
</script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body class="bg-gray-50 text-gray-800">
<custom-navbar></custom-navbar>
<custom-sidebar></custom-sidebar>
<main class="md:ml-64 p-4 pt-20">
<div class="max-w-7xl mx-auto">
<!-- Header with Actions -->
<div class="flex flex-col md:flex-row md:items-center justify-between mb-8">
<div>
<h1 class="text-3xl font-bold text-gray-800">User Management</h1>
<p class="text-gray-600">Manage team members, roles, and permissions</p>
</div>
<button onclick="ModalManager.open('addUserModal')"
class="mt-4 md:mt-0 btn btn-primary flex items-center">
<i data-feather="user-plus" class="mr-2 w-4 h-4"></i>
Add New User
</button>
</div>
<!-- User Filters -->
<div class="bg-white rounded-xl shadow-md p-6 mb-8">
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div>
<label class="form-label">Role</label>
<select class="form-select">
<option value="">All Roles</option>
<option value="admin">Administrator</option>
<option value="manager">Manager</option>
<option value="analyst">Analyst</option>
</select>
</div>
<div>
<label class="form-label">Status</label>
<select class="form-select">
<option value="">All Status</option>
<option value="active">Active</option>
<option value="pending">Pending Invitation</option>
<option value="inactive">Inactive</option>
</select>
</div>
<div>
<label class="form-label">Department</label>
<select class="form-select">
<option value="">All Departments</option>
<option value="development">Development</option>
<option value="design">Design</option>
<option value="qa">Quality Assurance</option>
<option value="pm">Project Management</option>
</select>
</div>
<div class="flex items-end">
<button class="btn btn-primary w-full">
<i data-feather="filter" class="mr-2 w-4 h-4"></i>
Apply Filters
</button>
</div>
</div>
</div>
<!-- Users Table -->
<div class="bg-white rounded-xl shadow-md overflow-hidden">
<div class="table-container">
<table class="table" id="usersTable" data-table="searchable">
<thead>
<tr>
<th class="w-16">Avatar</th>
<th>Name & Email</th>
<th>Role</th>
<th>Department</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="http://static.photos/people/200x200/1"
alt="User"
class="w-10 h-10 rounded-full">
</td>
<td>
<div class="font-medium text-gray-900">John Doe</div>
<div class="text-sm text-gray-500">john@proflow.com</div>
</td>
<td>
<span class="role-admin role-badge">Administrator</span>
</td>
<td class="text-gray-700">Development</td>
<td>
<span class="status-badge status-active">Active</span>
</td>
<td>
<div class="flex space-x-2">
<button class="text-primary-600 hover:text-primary-700">
<i data-feather="edit" class="w-4 h-4"></i>
</button>
<button class="text-gray-600 hover:text-gray-700">
<i data-feather="eye" class="w-4 h-4"></i>
</button>
<button class="text-red-600 hover:text-red-700">
<i data-feather="trash-2" class="w-4 h-4"></i>
</button>
</div>
</td>
</tr>
<tr>
<td>
<img src="http://static.photos/people/200x200/2"
alt="User"
class="w-10 h-10 rounded-full">
</td>
<td>
<div class="font-medium text-gray-900">Jane Smith</div>
<div class="text-sm text-gray-500">jane@proflow.com</div>
</td>
<td>
<span class="role-manager role-badge">Manager</span>
</td>
<td class="text-gray-700">Project Management</td>
<td>
<span class="status-badge status-active">Active</span>
</td>
<td>
<div class="flex space-x-2">
<button class="text-primary-600 hover:text-primary-700">
<i data-feather="edit" class="w-4 h-4"></i>
</button>
<button class="text-gray-600 hover:text-gray-700">
<i data-feather="eye" class="w-4 h-4"></i>
</button>
</div>
</td>
</tr>
<tr>
<td>
<img src="http://static.photos/people/200x200/3"
alt="User"
class="w-10 h-10 rounded-full">
</td>
<td>
<div class="font-medium text-gray-900">Mike Johnson</div>
<div class="text-sm text-gray-500">mike@proflow.com</div>
</td>
<td>
<span class="role-analyst role-badge">Analyst</span>
</td>
<td class="text-gray-700">Quality Assurance</td>
<td>
<span class="status-badge status-pending">Pending</span>
</td>
<td>
<div class="flex space-x-2">
<button class="text-primary-600 hover:text-primary-700">
<i data-feather="edit" class="w-4 h-4"></i>
</button>
<button class="text-green-600 hover:text-green-700">
<i data-feather="check" class="w-4 h-4"></i>
</button>
<button class="text-red-600 hover:text-red-700">
<i data-feather="x" class="w-4 h-4"></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
<!-- Add User Modal -->
<div id="addUserModal" class="modal-overlay hidden">
<div class="modal-content">
<div class="card">
<div class="card-header flex justify-between items-center">
<h2 class="card-title">Add New User</h2>
<button data-modal-close="addUserModal" class="text-gray-400 hover:text-gray-600">
<i data-feather="x" class="w-6 h-6"></i>
</button>
</div>
<div class="card-body">
<form id="addUserForm" class="space-y-6">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="form-group">
<label class="form-label">First Name</label>
<input type="text" class="form-input" required>
</div>
<div class="form-group">
<label class="form-label">Last Name</label>
<input type="text" class="form-input" required>
</div>
</div>
<div class="form-group">
<label class="form-label">Email Address</label>
<input type="email" class="form-input" required>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="form-group">
<label class="form-label">Role</label>
<select class="form-select" required>
<option value="">Select Role</option>
<option value="admin">Administrator</option>
<option value="manager">Manager</option>
<option value="analyst">Analyst</option>
</select>
</div>
<div class="form-group">
<label class="form-label">Department</label>
<select class="form-select" required>
<option value="">Select Department</option>
<option value="development">Development</option>
<option value="design">Design</option>
<option value="qa">Quality Assurance</option>
<option value="pm">Project Management</option>
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">Skills & Expertise</label>
<textarea class="form-input h-32" placeholder="List relevant skills, certifications, or expertise..."></textarea>
</div>
<div class="form-group">
<label class="form-label">Banking Information (Optional)</label>
<input type="text" class="form-input" placeholder="Bank account details">
</div>
<div class="flex justify-end space-x-3 pt-6 border-t">
<button type="button" data-modal-close="addUserModal" class="btn btn-outline">
Cancel
</button>
<button type="submit" class="btn btn-primary">
<i data-feather="send" class="mr-2 w-4 h-4"></i>
Send Invitation
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="components/navbar.js"></script>
<script src="components/sidebar.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
// Form submission
document.getElementById('addUserForm')?.addEventListener('submit', function(e) {
e.preventDefault();
NotificationManager.showSuccess('Invitation sent successfully!');
ModalManager.close('addUserModal');
this.reset();
});
</script>
</body>
</html>