roofsync-pro-crm / projects.html
Ninjalegends's picture
make the rest of the app functional with all buttons and features working
288bfda verified
Raw History Blame Contribute Delete
22.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RoofSync CRM - Projects</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<style>
.project-card:hover {
transform: translateY(-3px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.status-badge {
padding: 0.25rem 0.5rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 500;
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<div class="flex h-screen">
<!-- Sidebar (same as index.html) -->
<div class="sidebar bg-white w-64 shadow-lg flex-shrink-0">
<div class="p-4 border-b border-gray-200">
<div class="flex items-center space-x-3">
<div class="bg-blue-500 text-white p-2 rounded-lg">
<i data-feather="home"></i>
</div>
<h1 class="text-xl font-bold text-gray-800">RoofSync CRM</h1>
</div>
</div>
<nav class="p-4">
<ul class="space-y-2">
<li>
<a href="index.html" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="activity"></i>
<span>Dashboard</span>
</a>
</li>
<li>
<a href="clients.html" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="users"></i>
<span>Clients</span>
</a>
</li>
<li>
<a href="projects.html" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="clipboard"></i>
<span>Projects</span>
</a>
</li>
<li>
<a href="schedule.html" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="calendar"></i>
<span>Schedule</span>
</a>
</li>
<li>
<a href="estimates.html" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="dollar-sign"></i>
<span>Estimates</span>
</a>
</li>
<li>
<a href="invoices.html" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="file-text"></i>
<span>Invoices</span>
</a>
</li>
<li>
<a href="reports.html" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="bar-chart-2"></i>
<span>Reports</span>
</a>
</li>
</ul>
</nav>
<div class="absolute bottom-0 w-full p-4 border-t border-gray-200">
<div class="flex items-center space-x-3">
<img src="http://static.photos/people/200x200/1" class="w-10 h-10 rounded-full" alt="User">
<div>
<p class="font-medium">John Roofmaster</p>
<p class="text-sm text-gray-500">Admin</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 overflow-auto">
<!-- Header (same as index.html) -->
<header class="bg-white shadow-sm p-4 flex justify-between items-center">
<div class="flex items-center space-x-4">
<button class="text-gray-500">
<i data-feather="menu"></i>
</button>
<div class="relative">
<input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<i data-feather="search" class="absolute left-3 top-2.5 text-gray-400"></i>
</div>
</div>
<div class="flex items-center space-x-4">
<button class="p-2 rounded-full hover:bg-gray-100">
<i data-feather="bell"></i>
</button>
<button class="p-2 rounded-full hover:bg-gray-100">
<i data-feather="mail"></i>
</button>
</div>
</header>
<!-- Projects Content -->
<main class="p-6">
<div class="mb-6 flex justify-between items-center">
<div>
<h2 class="text-2xl font-bold text-gray-800">Projects</h2>
<p class="text-gray-600">Manage all your roofing projects in one place</p>
</div>
<div class="flex space-x-3">
<div class="relative">
<select class="appearance-none border rounded-lg px-4 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<option>All Status</option>
<option>Pending</option>
<option>Scheduled</option>
<option>In Progress</option>
<option>Completed</option>
</select>
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
<i data-feather="chevron-down" class="w-4 h-4"></i>
</div>
</div>
<button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center space-x-2">
<i data-feather="plus"></i>
<span>New Project</span>
</button>
</div>
</div>
<!-- Projects Grid -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Project Card 1 -->
<div class="project-card bg-white rounded-xl shadow-md overflow-hidden transition-all">
<div class="h-40 bg-cover bg-center" style="background-image: url('http://static.photos/house/640x360/1')"></div>
<div class="p-5">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-lg">Johnson Residence</h3>
<span class="status-badge bg-blue-100 text-blue-700">Scheduled</span>
</div>
<p class="text-gray-600 text-sm mb-4">Complete roof replacement with new shingles</p>
<div class="flex justify-between items-center text-sm">
<div>
<p class="text-gray-500">Start Date</p>
<p class="font-medium">Jun 10, 2023</p>
</div>
<div class="text-right">
<p class="text-gray-500">Amount</p>
<p class="font-medium">$8,500</p>
</div>
</div>
<div class="mt-4 pt-4 border-t border-gray-100 flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white" src="http://static.photos/people/200x200/2" alt="Team member">
<img class="w-8 h-8 rounded-full border-2 border-white" src="http://static.photos/people/200x200/3" alt="Team member">
</div>
<button class="text-blue-500 hover:text-blue-700 text-sm font-medium flex items-center">
<span>View Details</span>
<i data-feather="chevron-right" class="w-4 h-4 ml-1"></i>
</button>
</div>
</div>
</div>
<!-- Project Card 2 -->
<div class="project-card bg-white rounded-xl shadow-md overflow-hidden transition-all">
<div class="h-40 bg-cover bg-center" style="background-image: url('http://static.photos/house/640x360/2')"></div>
<div class="p-5">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-lg">Smith Roof Repair</h3>
<span class="status-badge bg-green-100 text-green-700">In Progress</span>
</div>
<p class="text-gray-600 text-sm mb-4">Partial repair after storm damage</p>
<div class="flex justify-between items-center text-sm">
<div>
<p class="text-gray-500">Start Date</p>
<p class="font-medium">May 28, 2023</p>
</div>
<div class="text-right">
<p class="text-gray-500">Amount</p>
<p class="font-medium">$5,200</p>
</div>
</div>
<div class="mt-4 pt-4 border-t border-gray-100 flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white" src="http://static.photos/people/200x200/4" alt="Team member">
</div>
<button class="text-blue-500 hover:text-blue-700 text-sm font-medium flex items-center">
<span>View Details</span>
<i data-feather="chevron-right" class="w-4 h-4 ml-1"></i>
</button>
</div>
</div>
</div>
<!-- Project Card 3 -->
<div class="project-card bg-white rounded-xl shadow-md overflow-hidden transition-all">
<div class="h-40 bg-cover bg-center" style="background-image: url('http://static.photos/house/640x360/3')"></div>
<div class="p-5">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-lg">Anderson Roof Replacement</h3>
<span class="status-badge bg-yellow-100 text-yellow-700">Pending</span>
</div>
<p class="text-gray-600 text-sm mb-4">Full tear-off and replacement with metal roofing</p>
<div class="flex justify-between items-center text-sm">
<div>
<p class="text-gray-500">Start Date</p>
<p class="font-medium">-</p>
</div>
<div class="text-right">
<p class="text-gray-500">Amount</p>
<p class="font-medium">$12,300</p>
</div>
</div>
<div class="mt-4 pt-4 border-t border-gray-100 flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white" src="http://static.photos/people/200x200/5" alt="Team member">
<img class="w-8 h-8 rounded-full border-2 border-white" src="http://static.photos/people/200x200/6" alt="Team member">
</div>
<button class="text-blue-500 hover:text-blue-700 text-sm font-medium flex items-center">
<span>View Details</span>
<i data-feather="chevron-right" class="w-4 h-4 ml-1"></i>
</button>
</div>
</div>
</div>
<!-- Project Card 4 -->
<div class="project-card bg-white rounded-xl shadow-md overflow-hidden transition-all">
<div class="h-40 bg-cover bg-center" style="background-image: url('http://static.photos/house/640x360/4')"></div>
<div class="p-5">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-lg">Wilson Emergency Repair</h3>
<span class="status-badge bg-purple-100 text-purple-700">Completed</span>
</div>
<p class="text-gray-600 text-sm mb-4">Emergency leak repair after tree damage</p>
<div class="flex justify-between items-center text-sm">
<div>
<p class="text-gray-500">Start Date</p>
<p class="font-medium">May 15, 2023</p>
</div>
<div class="text-right">
<p class="text-gray-500">Amount</p>
<p class="font-medium">$3,750</p>
</div>
</div>
<div class="mt-4 pt-4 border-t border-gray-100 flex justify-between items-center">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white" src="http://static.photos/people/200x200/7" alt="Team member">
</div>
<button class="text-blue-500 hover:text-blue-700 text-sm font-medium flex items-center">
<span>View Details</span>
<i data-feather="chevron-right" class="w-4 h-4 ml-1"></i>
</button>
</div>
</div>
</div>
<!-- Project Card 5 -->
<div class="project-card bg-white rounded-xl shadow-md overflow-hidden transition-all">
<div class="h-40 bg-cover bg-center" style="background-image: url('http://static.photos/house/640x360/5')"></div>
<div class="p-5">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-lg">Davis Roof Inspection</h3>
<span class="status-badge bg-gray-100 text-gray-700">On Hold</span>
</div>
<p class="text-gray-600 text-sm mb-4">Comprehensive roof inspection and report</p>
<div class="flex justify-between items-center text-sm">
<div>
<p class="text-gray-500">Start Date</p>
<p class="font-medium">-</p>
</div>
<div class="text-right">
<p class="text-gray-500">Amount</p>
<p class="font-medium">$450</p>
</div>
</div>
<div class="mt-4 pt-4 border-t border-gray-100 flex justify-between items-center">
<div class="flex -space-x-2"></div>
<button class="text-blue-500 hover:text-blue-700 text-sm font-medium flex items-center">
<span>View Details</span>
<i data-feather="chevron-right" class="w-4 h-4 ml-1"></i>
</button>
</div>
</div>
</div>
<!-- New Project Card -->
<div class="project-card bg-white rounded-xl shadow-md overflow-hidden transition-all border-2 border-dashed border-gray-300 hover:border-blue-500 flex items-center justify-center">
<button class="text-center p-6 w-full h-full flex flex-col items-center justify-center text-blue-500 hover:text-blue-700">
<div class="bg-blue-100 p-3 rounded-full mb-3">
<i data-feather="plus" class="w-6 h-6"></i>
</div>
<h3 class="font-medium">Add New Project</h3>
</button>
</div>
</div>
</main>
</div>
</div>
<script>
// Initialize feather icons
feather.replace();
// Make project cards clickable
const projectCards = document.querySelectorAll('.project-card');
projectCards.forEach(card => {
card.addEventListener('click', function(e) {
// Don't trigger if clicking on buttons inside the card
if (!e.target.closest('button')) {
const projectName = this.querySelector('h3').textContent;
alert('Opening detailed view for: ' + projectName);
}
});
}
// Make "View Details" buttons functional
const viewDetailsBtns = document.querySelectorAll('button.text-blue-500');
viewDetailsBtns.forEach(btn => {
btn.addEventListener('click', function(e) {
e.stopPropagation();
const projectName = this.closest('.project-card').querySelector('h3').textContent;
alert('Showing detailed information for: ' + projectName);
});
}
// Make "New Project" button functional
const newProjectBtn = document.querySelector('.bg-blue-500');
if (newProjectBtn) {
newProjectBtn.addEventListener('click', function() {
const statusFilter = document.querySelector('select').value;
alert('Opening new project form. Status filter: ' + statusFilter);
});
// Make status filter functional
const statusFilter = document.querySelector('select');
if (statusFilter) {
statusFilter.addEventListener('change', function() {
const selectedStatus = this.value;
const projectCards = document.querySelectorAll('.project-card');
projectCards.forEach(card => {
const cardStatus = card.querySelector('.status-badge').textContent.toLowerCase();
if (selectedStatus === 'All Status' ||
(selectedStatus === 'Pending' && cardStatus === 'pending') ||
(selectedStatus === 'Scheduled' && cardStatus === 'scheduled') ||
(selectedStatus === 'In Progress' && cardStatus === 'in progress') ||
(selectedStatus === 'Completed' && cardStatus === 'completed')) {
card.style.display = 'block';
} else {
card.style.display = 'none';
}
});
});
}
// Make "Add New Project" card functional
const addNewCard = document.querySelector('.border-dashed');
if (addNewCard) {
addNewCard.addEventListener('click', function() {
alert('Opening new project creation wizard...');
});
}
// Add search functionality
const searchInput = document.querySelector('input[type="text"]');
if (searchInput) {
searchInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
const searchTerm = this.value.toLowerCase();
const projectCards = document.querySelectorAll('.project-card');
projectCards.forEach(card => {
const projectName = card.querySelector('h3').textContent.toLowerCase();
if (projectName.includes(searchTerm)) {
card.style.display = 'block';
} else {
card.style.display = 'none';
}
});
});
}
// Add notification functionality
const notificationBtns = document.querySelectorAll('button.p-2');
notificationBtns.forEach(btn => {
btn.addEventListener('click', function() {
alert('Notification center would open here with recent alerts and messages.');
});
}
</script>
</body>
</html>