67a0e674ca
Marine maintenance management: work orders with photos, ISM/SWP procedures, MSDS, inventory, RFQ/purchases, vessel history, bilingual PDF reports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
379 lines
17 KiB
HTML
379 lines
17 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Marine Maintenance{% endblock %}</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700&family=Barlow:wght@300;400;500;600&display=swap" rel="stylesheet">
|
|
<style>
|
|
:root {
|
|
--navy: #0a1628;
|
|
--navy2: #0f2040;
|
|
--steel: #1a3a5c;
|
|
--ocean: #1e5f8a;
|
|
--cyan: #00b4d8;
|
|
--foam: #90e0ef;
|
|
--white: #f0f4f8;
|
|
--gray: #8a9bb0;
|
|
--warn: #f4a261;
|
|
--danger: #e63946;
|
|
--success: #2ec4b6;
|
|
--sidebar-w: 230px;
|
|
}
|
|
* { margin:0; padding:0; box-sizing:border-box; }
|
|
body {
|
|
font-family: 'Barlow', sans-serif;
|
|
background: var(--navy);
|
|
color: var(--white);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
}
|
|
/* SIDEBAR */
|
|
.sidebar {
|
|
width: var(--sidebar-w);
|
|
min-height: 100vh;
|
|
background: var(--navy2);
|
|
border-right: 1px solid rgba(0,180,216,0.15);
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: fixed;
|
|
top: 0; left: 0; bottom: 0;
|
|
z-index: 100;
|
|
}
|
|
.sidebar-logo {
|
|
padding: 24px 20px 20px;
|
|
border-bottom: 1px solid rgba(0,180,216,0.15);
|
|
}
|
|
.sidebar-logo .logo-icon {
|
|
font-size: 28px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.sidebar-logo h1 {
|
|
font-family: 'Barlow Condensed', sans-serif;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: var(--cyan);
|
|
letter-spacing: 1px;
|
|
line-height: 1.2;
|
|
}
|
|
.sidebar-logo span {
|
|
font-size: 11px;
|
|
color: var(--gray);
|
|
letter-spacing: 2px;
|
|
text-transform: uppercase;
|
|
}
|
|
.sidebar-nav { flex: 1; padding: 16px 0; }
|
|
.nav-section {
|
|
padding: 8px 16px 4px;
|
|
font-size: 10px;
|
|
letter-spacing: 2px;
|
|
text-transform: uppercase;
|
|
color: var(--gray);
|
|
margin-top: 8px;
|
|
}
|
|
.nav-link {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 20px;
|
|
color: var(--gray);
|
|
text-decoration: none;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
transition: all 0.2s;
|
|
border-left: 3px solid transparent;
|
|
}
|
|
.nav-link:hover { color: var(--white); background: rgba(0,180,216,0.08); }
|
|
.nav-link.active {
|
|
color: var(--cyan);
|
|
background: rgba(0,180,216,0.12);
|
|
border-left-color: var(--cyan);
|
|
}
|
|
.nav-link .icon { font-size: 18px; width: 22px; text-align: center; }
|
|
.sidebar-footer {
|
|
padding: 16px 20px;
|
|
border-top: 1px solid rgba(0,180,216,0.15);
|
|
font-size: 11px;
|
|
color: var(--gray);
|
|
}
|
|
/* MAIN */
|
|
.main {
|
|
margin-left: var(--sidebar-w);
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
}
|
|
.topbar {
|
|
background: var(--navy2);
|
|
border-bottom: 1px solid rgba(0,180,216,0.15);
|
|
padding: 14px 28px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
position: sticky; top: 0; z-index: 50;
|
|
}
|
|
.topbar h2 {
|
|
font-family: 'Barlow Condensed', sans-serif;
|
|
font-size: 22px;
|
|
font-weight: 600;
|
|
letter-spacing: 1px;
|
|
}
|
|
.topbar-actions { display: flex; gap: 10px; align-items: center; }
|
|
.content { padding: 28px; flex: 1; }
|
|
/* BUTTONS */
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
padding: 8px 18px; border-radius: 6px; border: none;
|
|
font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 600;
|
|
cursor: pointer; text-decoration: none; transition: all 0.2s;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
.btn-primary { background: var(--cyan); color: var(--navy); }
|
|
.btn-primary:hover { background: var(--foam); }
|
|
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--white); border: 1px solid rgba(255,255,255,0.15); }
|
|
.btn-secondary:hover { background: rgba(255,255,255,0.14); }
|
|
.btn-danger { background: var(--danger); color: white; }
|
|
.btn-warning { background: var(--warn); color: var(--navy); }
|
|
.btn-success { background: var(--success); color: var(--navy); }
|
|
.btn-sm { padding: 5px 12px; font-size: 12px; }
|
|
/* CARDS */
|
|
.card {
|
|
background: var(--navy2);
|
|
border: 1px solid rgba(0,180,216,0.12);
|
|
border-radius: 10px;
|
|
padding: 20px;
|
|
}
|
|
.card-header {
|
|
font-family: 'Barlow Condensed', sans-serif;
|
|
font-size: 16px; font-weight: 600; letter-spacing: 1px;
|
|
color: var(--cyan); margin-bottom: 16px;
|
|
text-transform: uppercase;
|
|
}
|
|
/* STATS */
|
|
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
|
|
.stat-card {
|
|
background: var(--navy2);
|
|
border: 1px solid rgba(0,180,216,0.12);
|
|
border-radius: 10px; padding: 20px;
|
|
display: flex; flex-direction: column; gap: 4px;
|
|
}
|
|
.stat-label { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 1.5px; }
|
|
.stat-value { font-family: 'Barlow Condensed', sans-serif; font-size: 36px; font-weight: 700; color: var(--cyan); }
|
|
.stat-sub { font-size: 12px; color: var(--gray); }
|
|
/* TABLES */
|
|
.table-wrap { overflow-x: auto; }
|
|
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
th { text-align: left; padding: 10px 14px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray); border-bottom: 1px solid rgba(0,180,216,0.15); font-weight: 600; }
|
|
td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
|
tr:hover td { background: rgba(0,180,216,0.04); }
|
|
tr:last-child td { border-bottom: none; }
|
|
/* BADGES */
|
|
.badge {
|
|
display: inline-block; padding: 2px 10px; border-radius: 20px;
|
|
font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
|
|
}
|
|
.badge-open { background: rgba(0,180,216,0.2); color: var(--cyan); }
|
|
.badge-in_progress { background: rgba(244,162,97,0.2); color: var(--warn); }
|
|
.badge-completed { background: rgba(46,196,182,0.2); color: var(--success); }
|
|
.badge-cancelled { background: rgba(255,255,255,0.1); color: var(--gray); }
|
|
.badge-warn { background: rgba(244,162,97,0.2); color: var(--warn); }
|
|
.badge-danger { background: rgba(230,57,70,0.2); color: var(--danger); }
|
|
/* FORMS */
|
|
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
|
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
|
|
.form-group { display: flex; flex-direction: column; gap: 6px; }
|
|
.form-group.full { grid-column: 1 / -1; }
|
|
label { font-size: 12px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
|
|
input, select, textarea {
|
|
background: rgba(255,255,255,0.06); border: 1px solid rgba(0,180,216,0.2);
|
|
border-radius: 6px; padding: 9px 12px; color: var(--white);
|
|
font-family: 'Barlow', sans-serif; font-size: 14px;
|
|
transition: border-color 0.2s;
|
|
}
|
|
input:focus, select:focus, textarea:focus {
|
|
outline: none; border-color: var(--cyan);
|
|
background: rgba(0,180,216,0.08);
|
|
}
|
|
select option { background: var(--navy2); }
|
|
textarea { resize: vertical; min-height: 80px; }
|
|
/* ALERTS */
|
|
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
|
|
.alert-warn { background: rgba(244,162,97,0.15); border: 1px solid rgba(244,162,97,0.3); color: var(--warn); }
|
|
.alert-danger { background: rgba(230,57,70,0.15); border: 1px solid rgba(230,57,70,0.3); color: var(--danger); }
|
|
/* GRID LAYOUTS */
|
|
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
|
|
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
|
|
/* PHOTO GRID */
|
|
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
|
|
.photo-card {
|
|
background: rgba(255,255,255,0.04); border-radius: 8px; overflow: hidden;
|
|
border: 1px solid rgba(0,180,216,0.15); position: relative;
|
|
}
|
|
.photo-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
|
|
.photo-card .photo-label {
|
|
padding: 6px 10px; font-size: 11px; font-weight: 600;
|
|
letter-spacing: 1px; text-transform: uppercase;
|
|
}
|
|
.photo-card.before .photo-label { color: var(--warn); }
|
|
.photo-card.after .photo-label { color: var(--success); }
|
|
.photo-del {
|
|
position: absolute; top: 6px; right: 6px;
|
|
background: rgba(0,0,0,0.7); border: none; color: white;
|
|
border-radius: 50%; width: 24px; height: 24px;
|
|
cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
|
|
}
|
|
/* MISC */
|
|
.text-cyan { color: var(--cyan); }
|
|
.text-warn { color: var(--warn); }
|
|
.text-danger { color: var(--danger); }
|
|
.text-success { color: var(--success); }
|
|
.text-gray { color: var(--gray); }
|
|
.mt-4 { margin-top: 16px; }
|
|
.mt-6 { margin-top: 24px; }
|
|
.mb-4 { margin-bottom: 16px; }
|
|
.flex { display: flex; align-items: center; }
|
|
.gap-2 { gap: 8px; }
|
|
.gap-3 { gap: 12px; }
|
|
.justify-between { justify-content: space-between; }
|
|
.section-title {
|
|
font-family: 'Barlow Condensed', sans-serif;
|
|
font-size: 18px; font-weight: 600; letter-spacing: 1px;
|
|
color: var(--cyan); margin-bottom: 14px; text-transform: uppercase;
|
|
}
|
|
/* Mobile */
|
|
@media (max-width: 768px) {
|
|
.sidebar {
|
|
transform: translateX(-100%);
|
|
transition: transform 0.25s ease;
|
|
z-index: 999;
|
|
}
|
|
.sidebar.open { transform: translateX(0); }
|
|
.main { margin-left: 0; }
|
|
.stats-grid { grid-template-columns: 1fr 1fr; }
|
|
.form-grid { grid-template-columns: 1fr; }
|
|
.grid-2, .grid-3 { grid-template-columns: 1fr; }
|
|
.hamburger {
|
|
display: flex !important;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 38px; height: 38px;
|
|
background: rgba(0,180,216,0.15);
|
|
border: 1px solid rgba(0,180,216,0.3);
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 18px;
|
|
color: var(--cyan);
|
|
flex-shrink: 0;
|
|
}
|
|
.overlay {
|
|
display: none;
|
|
position: fixed; inset: 0;
|
|
background: rgba(0,0,0,0.5);
|
|
z-index: 998;
|
|
}
|
|
.overlay.open { display: block; }
|
|
}
|
|
.hamburger { display: none; }
|
|
</style>
|
|
{% block head %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<nav class="sidebar">
|
|
<div class="sidebar-logo">
|
|
<div class="logo-icon">⚓</div>
|
|
<h1>MARINE<br>MAINTENANCE</h1>
|
|
<span>v1.0</span>
|
|
</div>
|
|
<div class="sidebar-nav">
|
|
<div class="nav-section">Principal</div>
|
|
<a href="{{ url_for('dashboard') }}" class="nav-link {% if request.endpoint=='dashboard' %}active{% endif %}">
|
|
<span class="icon">📊</span> Dashboard
|
|
</a>
|
|
<div class="nav-section">Operaciones</div>
|
|
<a href="{{ url_for('vessels') }}" class="nav-link {% if 'vessel' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">🚢</span> Embarcaciones
|
|
</a>
|
|
<a href="{{ url_for('work_orders') }}" class="nav-link {% if 'work_order' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">🔧</span> Órdenes de Trabajo
|
|
</a>
|
|
<a href="{{ url_for('systems') }}" class="nav-link {% if 'system' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">🔩</span> Sistemas
|
|
</a>
|
|
<a href="{{ url_for('ism_index') }}" class="nav-link {% if 'swp' in request.endpoint or 'msds' in request.endpoint or 'ism' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">🛡️</span> ISM / SWP
|
|
</a>
|
|
<div class="nav-section">Inventario</div>
|
|
<a href="{{ url_for('inventory') }}" class="nav-link {% if 'inventory' in request.endpoint or 'part_' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">📦</span> Repuestos
|
|
</a>
|
|
<a href="{{ url_for('purchases') }}" class="nav-link {% if 'purchase' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">🛒</span> Compras
|
|
</a>
|
|
<a href="{{ url_for('suppliers') }}" class="nav-link {% if 'supplier' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">🏪</span> Proveedores
|
|
</a>
|
|
{% if current_user and current_user.role in ('superadmin', 'admin') %}
|
|
<div class="nav-section">Administración</div>
|
|
<a href="{{ url_for('companies') }}" class="nav-link {% if 'compan' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">🏢</span> Compañías
|
|
</a>
|
|
<a href="{{ url_for('users') }}" class="nav-link {% if 'user' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">👥</span> Usuarios
|
|
</a>
|
|
<a href="{{ url_for('email_settings') }}" class="nav-link {% if 'email' in request.endpoint %}active{% endif %}">
|
|
<span class="icon">✉️</span> Config. Email
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
<div class="sidebar-footer">
|
|
<div style="font-size:12px;color:var(--white);font-weight:600;margin-bottom:2px">
|
|
{{ current_user.full_name if current_user else '—' }}
|
|
</div>
|
|
<div style="font-size:11px;color:var(--cyan);margin-bottom:10px">
|
|
{% if current_user %}
|
|
{% if current_user.role == 'superadmin' %}⭐ Super Admin
|
|
{% elif current_user.role == 'admin' %}🔑 Admin
|
|
{% else %}🔧 Técnico{% endif %}
|
|
{% if current_user.company_name %} · {{ current_user.company_name }}{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
<a href="{{ url_for('auth_logout') }}" class="btn btn-secondary btn-sm" style="width:100%;text-align:center">
|
|
🚪 Cerrar Sesión
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
<div class="overlay" id="sideOverlay" onclick="closeSidebar()"></div>
|
|
<div class="main">
|
|
<div class="topbar">
|
|
<div style="display:flex;align-items:center;gap:10px">
|
|
<button class="hamburger" id="hamburger" onclick="toggleSidebar()">☰</button>
|
|
<h2>{% block page_title %}Dashboard{% endblock %}</h2>
|
|
</div>
|
|
<div class="topbar-actions">{% block topbar_actions %}{% endblock %}</div>
|
|
</div>
|
|
<div class="content">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
<script>
|
|
function toggleSidebar() {
|
|
document.querySelector('.sidebar').classList.toggle('open');
|
|
document.getElementById('sideOverlay').classList.toggle('open');
|
|
}
|
|
function closeSidebar() {
|
|
document.querySelector('.sidebar').classList.remove('open');
|
|
document.getElementById('sideOverlay').classList.remove('open');
|
|
}
|
|
// Close sidebar when nav link clicked on mobile
|
|
document.querySelectorAll('.nav-link').forEach(function(link) {
|
|
link.addEventListener('click', function() {
|
|
if (window.innerWidth <= 768) closeSidebar();
|
|
});
|
|
});
|
|
</script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|