834 lines
32 KiB
PHP
834 lines
32 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
<title>Client Calls & Projects Hub | SingleLogin</title>
|
|
<!-- Google Fonts: Outfit & Inter -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
|
|
<script>
|
|
(function () {
|
|
const savedTheme = localStorage.getItem('theme') || 'dark';
|
|
if (savedTheme === 'light') {
|
|
document.documentElement.classList.add('light-mode');
|
|
} else {
|
|
document.documentElement.classList.remove('light-mode');
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
<style>
|
|
:root {
|
|
--bg-color: #0b0f19;
|
|
--card-bg: rgba(17, 24, 39, 0.6);
|
|
--card-border: rgba(255, 255, 255, 0.1);
|
|
--card-hover-border: rgba(99, 102, 241, 0.45);
|
|
--accent-primary: #4f46e5;
|
|
--accent-secondary: #06b6d4;
|
|
--accent-glow: rgba(99, 102, 241, 0.25);
|
|
--text-main: #f3f4f6;
|
|
--text-muted: #9ca3af;
|
|
--success-color: #10b981;
|
|
--warning-color: #f59e0b;
|
|
--danger-color: #ef4444;
|
|
--input-bg: rgba(255, 255, 255, 0.05);
|
|
--modal-bg: rgba(15, 23, 42, 0.95);
|
|
--modal-overlay: rgba(11, 15, 25, 0.85);
|
|
--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
|
|
}
|
|
|
|
:root.light-mode {
|
|
--bg-color: #f0f4f8;
|
|
--card-bg: rgba(255, 255, 255, 0.8);
|
|
--card-border: rgba(0, 0, 0, 0.08);
|
|
--card-hover-border: rgba(79, 70, 229, 0.4);
|
|
--accent-primary: #4f46e5;
|
|
--accent-secondary: #0284c7;
|
|
--accent-glow: rgba(79, 70, 229, 0.15);
|
|
--text-main: #1e293b;
|
|
--text-muted: #64748b;
|
|
--success-color: #059669;
|
|
--warning-color: #d97706;
|
|
--danger-color: #dc2626;
|
|
--input-bg: rgba(0, 0, 0, 0.03);
|
|
--modal-bg: rgba(255, 255, 255, 0.96);
|
|
--modal-overlay: rgba(240, 244, 248, 0.85);
|
|
--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
font-family: 'Inter', sans-serif;
|
|
background-color: var(--bg-color);
|
|
color: var(--text-main);
|
|
min-height: 100vh;
|
|
background-image:
|
|
radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
|
|
radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.12) 0%, transparent 45%);
|
|
background-attachment: fixed;
|
|
transition: background-color 0.3s ease, color 0.3s ease;
|
|
}
|
|
|
|
/* Glass Navbar */
|
|
.navbar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1rem 2rem;
|
|
background: rgba(11, 15, 25, 0.7);
|
|
backdrop-filter: blur(16px);
|
|
-webkit-backdrop-filter: blur(16px);
|
|
border-bottom: 1px solid var(--card-border);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 50;
|
|
}
|
|
:root.light-mode .navbar {
|
|
background: rgba(255, 255, 255, 0.82);
|
|
}
|
|
|
|
.brand-logo {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
text-decoration: none;
|
|
color: var(--text-main);
|
|
font-family: 'Outfit', sans-serif;
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
}
|
|
.brand-badge {
|
|
background: linear-gradient(135deg, #4f46e5, #06b6d4);
|
|
color: white;
|
|
font-size: 0.7rem;
|
|
padding: 3px 10px;
|
|
border-radius: 999px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.nav-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.nav-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 0.55rem 1.1rem;
|
|
border-radius: 10px;
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
border: 1px solid var(--card-border);
|
|
background: var(--card-bg);
|
|
color: var(--text-main);
|
|
backdrop-filter: blur(8px);
|
|
}
|
|
.nav-btn:hover {
|
|
transform: translateY(-2px);
|
|
border-color: var(--card-hover-border);
|
|
box-shadow: 0 4px 12px var(--accent-glow);
|
|
}
|
|
.nav-btn-primary {
|
|
background: linear-gradient(135deg, #4f46e5, #6366f1);
|
|
color: white !important;
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
|
|
}
|
|
.nav-btn-primary:hover {
|
|
box-shadow: 0 6px 20px rgba(79, 70, 229, 0.55);
|
|
}
|
|
.theme-toggle-btn {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--card-border);
|
|
color: var(--text-main);
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
font-size: 1.1rem;
|
|
transition: all 0.25s ease;
|
|
backdrop-filter: blur(8px);
|
|
}
|
|
.theme-toggle-btn:hover {
|
|
border-color: var(--card-hover-border);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
/* Container */
|
|
.main-container {
|
|
max-width: 1320px;
|
|
margin: 2rem auto;
|
|
padding: 0 1.5rem;
|
|
}
|
|
|
|
/* Alert */
|
|
.alert {
|
|
padding: 1rem 1.25rem;
|
|
border-radius: 12px;
|
|
margin-bottom: 1.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-size: 0.9rem;
|
|
backdrop-filter: blur(12px);
|
|
}
|
|
.alert-success {
|
|
background: rgba(16, 185, 129, 0.15);
|
|
border: 1px solid rgba(16, 185, 129, 0.35);
|
|
color: #34d399;
|
|
}
|
|
|
|
/* Stats Grid */
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
gap: 1.25rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
.stat-card {
|
|
background: var(--card-bg);
|
|
backdrop-filter: blur(16px);
|
|
-webkit-backdrop-filter: blur(16px);
|
|
border: 1px solid var(--card-border);
|
|
border-radius: 16px;
|
|
padding: 1.35rem 1.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.2rem;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: var(--glass-shadow);
|
|
}
|
|
.stat-card:hover {
|
|
border-color: var(--card-hover-border);
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 12px 28px var(--accent-glow);
|
|
}
|
|
.stat-icon {
|
|
width: 52px;
|
|
height: 52px;
|
|
border-radius: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.6rem;
|
|
background: rgba(99, 102, 241, 0.12);
|
|
color: #818cf8;
|
|
border: 1px solid rgba(99, 102, 241, 0.2);
|
|
}
|
|
.stat-icon.cyan {
|
|
background: rgba(6, 182, 212, 0.12);
|
|
color: #22d3ee;
|
|
border-color: rgba(6, 182, 212, 0.2);
|
|
}
|
|
.stat-icon.emerald {
|
|
background: rgba(16, 185, 129, 0.12);
|
|
color: #34d399;
|
|
border-color: rgba(16, 185, 129, 0.2);
|
|
}
|
|
.stat-val {
|
|
font-size: 1.75rem;
|
|
font-weight: 800;
|
|
font-family: 'Outfit', sans-serif;
|
|
color: var(--text-main);
|
|
line-height: 1.2;
|
|
}
|
|
.stat-label {
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
font-weight: 600;
|
|
letter-spacing: 0.5px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* Section Header */
|
|
.section-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1.5rem;
|
|
flex-wrap: wrap;
|
|
gap: 1rem;
|
|
}
|
|
.section-title {
|
|
font-family: 'Outfit', sans-serif;
|
|
font-size: 1.6rem;
|
|
font-weight: 700;
|
|
color: var(--text-main);
|
|
}
|
|
.section-desc {
|
|
font-size: 0.9rem;
|
|
color: var(--text-muted);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* Search & Filter Bar */
|
|
.filter-bar {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-bottom: 2rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
.search-box {
|
|
position: relative;
|
|
flex: 1;
|
|
min-width: 280px;
|
|
}
|
|
.search-icon {
|
|
position: absolute;
|
|
left: 14px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: var(--text-muted);
|
|
pointer-events: none;
|
|
}
|
|
.search-input {
|
|
width: 100%;
|
|
padding: 0.75rem 1rem 0.75rem 2.6rem;
|
|
background: var(--input-bg);
|
|
backdrop-filter: blur(8px);
|
|
border: 1px solid var(--card-border);
|
|
border-radius: 12px;
|
|
color: var(--text-main);
|
|
font-size: 0.9rem;
|
|
outline: none;
|
|
transition: all 0.2s ease;
|
|
}
|
|
.search-input:focus {
|
|
border-color: #6366f1;
|
|
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
|
|
}
|
|
|
|
/* Client Cards Grid */
|
|
.clients-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.clients-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
.navbar {
|
|
padding: 1rem;
|
|
}
|
|
}
|
|
|
|
.client-card {
|
|
background: var(--card-bg);
|
|
backdrop-filter: blur(16px);
|
|
-webkit-backdrop-filter: blur(16px);
|
|
border: 1px solid var(--card-border);
|
|
border-radius: 18px;
|
|
padding: 1.5rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
position: relative;
|
|
box-shadow: var(--glass-shadow);
|
|
}
|
|
.client-card:hover {
|
|
border-color: var(--card-hover-border);
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 16px 36px var(--accent-glow);
|
|
}
|
|
|
|
.client-card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 1rem;
|
|
}
|
|
.project-title {
|
|
font-family: 'Outfit', sans-serif;
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
color: var(--text-main);
|
|
margin-bottom: 4px;
|
|
line-height: 1.3;
|
|
}
|
|
.client-company {
|
|
font-size: 0.875rem;
|
|
color: var(--text-muted);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.client-info-list {
|
|
margin: 1.25rem 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
font-size: 0.875rem;
|
|
background: var(--input-bg);
|
|
padding: 12px 14px;
|
|
border-radius: 12px;
|
|
border: 1px solid var(--card-border);
|
|
}
|
|
.info-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
color: var(--text-muted);
|
|
}
|
|
.info-row span:last-child {
|
|
color: var(--text-main);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.responsible-badge {
|
|
background: rgba(99, 102, 241, 0.15);
|
|
color: #818cf8;
|
|
padding: 3px 10px;
|
|
border-radius: 8px;
|
|
font-size: 0.78rem;
|
|
font-weight: 600;
|
|
border: 1px solid rgba(99, 102, 241, 0.3);
|
|
}
|
|
|
|
.card-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-top: 1.25rem;
|
|
padding-top: 1.25rem;
|
|
border-top: 1px solid var(--card-border);
|
|
}
|
|
.btn-open-hub {
|
|
flex: 1;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 0.7rem 1.2rem;
|
|
border-radius: 10px;
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
|
|
color: #818cf8;
|
|
border: 1px solid rgba(99, 102, 241, 0.3);
|
|
transition: all 0.25s ease;
|
|
}
|
|
.btn-open-hub:hover {
|
|
background: linear-gradient(135deg, #4f46e5, #06b6d4);
|
|
color: white;
|
|
border-color: transparent;
|
|
box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Modal styling */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0; left: 0; right: 0; bottom: 0;
|
|
background: var(--modal-overlay);
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
display: none;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 100;
|
|
padding: 1.5rem;
|
|
}
|
|
.modal-card {
|
|
background: var(--modal-bg);
|
|
backdrop-filter: blur(20px);
|
|
-webkit-backdrop-filter: blur(20px);
|
|
border: 1px solid var(--card-border);
|
|
border-radius: 20px;
|
|
width: 100%;
|
|
max-width: 620px;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
|
|
padding: 2rem;
|
|
}
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
.modal-title {
|
|
font-family: 'Outfit', sans-serif;
|
|
font-size: 1.4rem;
|
|
font-weight: 700;
|
|
}
|
|
.modal-close {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 8px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
.modal-close:hover {
|
|
color: var(--text-main);
|
|
background: var(--input-bg);
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 1.25rem;
|
|
}
|
|
.form-label {
|
|
display: block;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
margin-bottom: 6px;
|
|
}
|
|
.form-control {
|
|
width: 100%;
|
|
padding: 0.75rem 1rem;
|
|
background: var(--input-bg);
|
|
border: 1px solid var(--card-border);
|
|
border-radius: 10px;
|
|
color: var(--text-main);
|
|
font-size: 0.9rem;
|
|
outline: none;
|
|
transition: all 0.2s ease;
|
|
}
|
|
.form-control:focus {
|
|
border-color: #6366f1;
|
|
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
|
|
}
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.team-members-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
gap: 8px;
|
|
max-height: 140px;
|
|
overflow-y: auto;
|
|
background: var(--input-bg);
|
|
border: 1px solid var(--card-border);
|
|
border-radius: 10px;
|
|
padding: 10px;
|
|
}
|
|
.member-checkbox-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 0.82rem;
|
|
cursor: pointer;
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 4rem 2rem;
|
|
background: var(--card-bg);
|
|
backdrop-filter: blur(16px);
|
|
border: 1px dashed var(--card-border);
|
|
border-radius: 20px;
|
|
}
|
|
|
|
/* Responsive Breakpoints */
|
|
@media (max-width: 900px) {
|
|
.navbar { padding: 0.85rem 1.25rem; }
|
|
.main-container { margin: 1.25rem auto; padding: 0 1rem; }
|
|
.form-row { grid-template-columns: 1fr; }
|
|
}
|
|
@media (max-width: 640px) {
|
|
.navbar { flex-direction: column; align-items: flex-start; gap: 12px; }
|
|
.nav-actions { width: 100%; justify-content: space-between; }
|
|
.section-header { flex-direction: column; align-items: flex-start; }
|
|
.filter-bar { flex-direction: column; }
|
|
.search-input, .filter-select { width: 100%; min-width: 100%; }
|
|
.modal-card { padding: 1.25rem; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Glass Navbar -->
|
|
<nav class="navbar">
|
|
<a href="{{ route('dashboard') }}" class="brand-logo">
|
|
<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: #6366f1;">
|
|
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>
|
|
</svg>
|
|
SingleLogin <span class="brand-badge">Client Calls</span>
|
|
</a>
|
|
<div class="nav-actions">
|
|
<!-- Theme Toggle -->
|
|
<button class="theme-toggle-btn" id="themeToggleBtn" onclick="toggleTheme()" title="Switch Light / Dark Theme">
|
|
🌙
|
|
</button>
|
|
<a href="{{ route('client-calls.logs') }}" class="nav-btn" style="border-color: rgba(6, 182, 212, 0.4); color: #22d3ee;">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>
|
|
Date-wise Call Logs
|
|
</a>
|
|
<button class="nav-btn-primary nav-btn" onclick="openAddClientModal()">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
|
|
Add Client & Project
|
|
</button>
|
|
<a href="{{ route('dashboard') }}" class="nav-btn">
|
|
Dashboard
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Main Content -->
|
|
<main class="main-container">
|
|
|
|
@if(session('success'))
|
|
<div class="alert alert-success">
|
|
<span>{{ session('success') }}</span>
|
|
<button style="background:transparent;border:none;color:inherit;cursor:pointer;font-size:1.1rem;" onclick="this.parentElement.remove()">✕</button>
|
|
</div>
|
|
@endif
|
|
|
|
<!-- Stats Overview -->
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<div class="stat-icon">📁</div>
|
|
<div>
|
|
<div class="stat-val">{{ $totalClients }}</div>
|
|
<div class="stat-label">Total Client Accounts</div>
|
|
</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-icon emerald">📞</div>
|
|
<div>
|
|
<div class="stat-val">{{ $totalMeetings }}</div>
|
|
<div class="stat-label">Total Meetings Logged</div>
|
|
</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-icon cyan">🚀</div>
|
|
<div>
|
|
<div class="stat-val">{{ $activeProjectsCount ?? $totalClients }}</div>
|
|
<div class="stat-label">Active Projects</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Section Header -->
|
|
<div class="section-header">
|
|
<div>
|
|
<h1 class="section-title">Client Projects & Meeting Hub</h1>
|
|
<p class="section-desc">Select any client project to inspect date-wise previous call details, AI meeting transcripts, expressions, and actionable tasks.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Search Bar -->
|
|
<div class="filter-bar">
|
|
<div class="search-box">
|
|
<svg class="search-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
|
|
<input type="text" id="searchInput" class="search-input" placeholder="Search by client name, project, company, or lead..." onkeyup="filterCards()">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Clients Grid -->
|
|
@if($clients->isEmpty())
|
|
<div class="empty-state">
|
|
<div style="font-size: 3.5rem; margin-bottom: 1rem;">💼</div>
|
|
<h3 style="font-size: 1.3rem; font-weight: 700; margin-bottom: 6px;">No Client Projects Found</h3>
|
|
<p style="color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem;">Get started by registering your first client and project profile.</p>
|
|
<button class="nav-btn-primary nav-btn" onclick="openAddClientModal()">
|
|
+ Add New Client & Project
|
|
</button>
|
|
</div>
|
|
@else
|
|
<div class="clients-grid" id="clientsGrid">
|
|
@foreach($clients as $client)
|
|
@php
|
|
$meetingsCount = $client->meetings->count();
|
|
$latestNote = $client->callNotes->first();
|
|
@endphp
|
|
|
|
<div class="client-card"
|
|
data-name="{{ strtolower($client->client_name) }}"
|
|
data-project="{{ strtolower($client->project_name) }}"
|
|
data-company="{{ strtolower($client->company_name ?? '') }}"
|
|
data-lead="{{ strtolower($client->responsibleUser->name ?? '') }}">
|
|
|
|
<div>
|
|
<div class="client-card-header">
|
|
<div>
|
|
<div class="project-title">{{ $client->project_name }}</div>
|
|
<div class="client-company">
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
|
|
{{ $client->client_name }} {{ $client->company_name ? "• " . $client->company_name : "" }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="client-info-list">
|
|
<div class="info-row">
|
|
<span>Client Email:</span>
|
|
<span>{{ $client->client_email }}</span>
|
|
</div>
|
|
<div class="info-row">
|
|
<span>Responsible Lead:</span>
|
|
<span class="responsible-badge">{{ $client->responsibleUser->name ?? 'Unassigned' }}</span>
|
|
</div>
|
|
<div class="info-row">
|
|
<span>Total Calls:</span>
|
|
<span>{{ $meetingsCount }} {{ $meetingsCount === 1 ? 'call' : 'calls' }}</span>
|
|
</div>
|
|
@if($latestNote)
|
|
<div class="info-row">
|
|
<span>Last Call Date:</span>
|
|
<span>{{ $latestNote->created_at->format('M d, Y') }}</span>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-actions">
|
|
<a href="{{ route('client-calls.show', $client->id) }}" target="_blank" class="btn-open-hub" title="Open Client Hub in new tab">
|
|
<span>Open Client Hub & Call Details</span>
|
|
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
|
|
</main>
|
|
|
|
<!-- Add Client & Project Modal -->
|
|
<div id="addClientModal" class="modal-overlay">
|
|
<div class="modal-card">
|
|
<div class="modal-header">
|
|
<h2 class="modal-title">Add New Client & Project</h2>
|
|
<button class="modal-close" onclick="closeAddClientModal()">×</button>
|
|
</div>
|
|
<form action="{{ route('client-calls.store') }}" method="POST">
|
|
@csrf
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label class="form-label">Client / Contact Name *</label>
|
|
<input type="text" name="client_name" class="form-control" placeholder="e.g. Robert Miller" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Client Email Address *</label>
|
|
<input type="email" name="client_email" class="form-control" placeholder="e.g. robert@acmecorp.com" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label class="form-label">Company / Organization</label>
|
|
<input type="text" name="company_name" class="form-control" placeholder="e.g. Acme Corp">
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Phone Number</label>
|
|
<input type="text" name="client_phone" class="form-control" placeholder="e.g. +1 555 019 283">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Project Name *</label>
|
|
<input type="text" name="project_name" class="form-control" placeholder="e.g. Enterprise Cloud ERP Migration" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Project Details / Scope</label>
|
|
<textarea name="project_details" class="form-control" rows="3" placeholder="Brief description of the deliverables, milestones, and client requirements..."></textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Responsible Person (PM / TL / Director in charge) *</label>
|
|
<select name="responsible_user_id" class="form-control" required>
|
|
@foreach($managersAndLeads as $manager)
|
|
<option value="{{ $manager->id }}" {{ Auth::id() === $manager->id ? 'selected' : '' }}>
|
|
{{ $manager->name }} ({{ $manager->role }})
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Assign Team Members (Optional)</label>
|
|
<div class="team-members-grid">
|
|
@foreach($allUsers as $userItem)
|
|
<label class="member-checkbox-label">
|
|
<input type="checkbox" name="assigned_team_members[]" value="{{ $userItem->id }}">
|
|
<span>{{ $userItem->name }}</span>
|
|
</label>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
<div style="display: flex; justify-content: flex-end; gap: 10px; margin-top: 1.5rem;">
|
|
<button type="button" class="nav-btn" onclick="closeAddClientModal()">Cancel</button>
|
|
<button type="submit" class="nav-btn-primary nav-btn">Create Client Profile</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function openAddClientModal() {
|
|
document.getElementById('addClientModal').style.display = 'flex';
|
|
}
|
|
function closeAddClientModal() {
|
|
document.getElementById('addClientModal').style.display = 'none';
|
|
}
|
|
|
|
function filterCards() {
|
|
const query = document.getElementById('searchInput').value.toLowerCase();
|
|
const cards = document.querySelectorAll('.client-card');
|
|
|
|
cards.forEach(card => {
|
|
const name = card.dataset.name || '';
|
|
const project = card.dataset.project || '';
|
|
const company = card.dataset.company || '';
|
|
const lead = card.dataset.lead || '';
|
|
|
|
const matchesQuery = name.includes(query) || project.includes(query) || company.includes(query) || lead.includes(query);
|
|
|
|
if (matchesQuery) {
|
|
card.style.display = 'flex';
|
|
} else {
|
|
card.style.display = 'none';
|
|
}
|
|
});
|
|
}
|
|
|
|
function toggleTheme() {
|
|
const isLight = document.documentElement.classList.toggle('light-mode');
|
|
localStorage.setItem('theme', isLight ? 'light' : 'dark');
|
|
const btn = document.getElementById('themeToggleBtn');
|
|
if (btn) btn.innerText = isLight ? '☀️' : '🌙';
|
|
}
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const isLight = document.documentElement.classList.contains('light-mode');
|
|
const btn = document.getElementById('themeToggleBtn');
|
|
if (btn) btn.innerText = isLight ? '☀️' : '🌙';
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|