Add MySQL schema dump for phpMyAdmin

This commit is contained in:
Thomas
2025-10-28 14:08:03 +01:00
parent f956a735ca
commit 8e608d03ec
49 changed files with 1929 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
<?php $title = 'Login'; ob_start(); ?>
<div class="card" style="max-width: 420px; margin: 4rem auto;">
<h2 style="margin-top: 0;">Log ind</h2>
<p style="margin-top: 0; color: rgba(148, 163, 184, 0.75);">Adgang til TuxiNet kundeservice og udviklingsportalen.</p>
<?php if (!empty($error)): ?>
<div class="alert"><?= htmlspecialchars($error) ?></div>
<?php endif; ?>
<form method="POST" action="/login">
<div style="display: grid; gap: 1rem;">
<label>
<span style="display:block;margin-bottom:0.25rem;">Email</span>
<input type="email" name="email" required style="width:100%;padding:0.75rem;border-radius:0.75rem;border:1px solid rgba(148,163,184,0.2);background:rgba(15,23,42,0.65);color:#e2e8f0;">
</label>
<label>
<span style="display:block;margin-bottom:0.25rem;">Password</span>
<input type="password" name="password" required style="width:100%;padding:0.75rem;border-radius:0.75rem;border:1px solid rgba(148,163,184,0.2);background:rgba(15,23,42,0.65);color:#e2e8f0;">
</label>
<button type="submit" class="btn btn-primary">Login</button>
</div>
</form>
</div>
<?php $content = ob_get_clean(); include base_path('resources/views/layout/app.php'); ?>

View File

@@ -0,0 +1,39 @@
<?php $title = 'Dashboard'; ob_start(); ?>
<section class="grid grid-2">
<div class="card">
<h2 style="margin-top: 0;">Welcome back, <?= htmlspecialchars($user?->name ?? 'User') ?> 👋</h2>
<p style="color: rgba(148, 163, 184, 0.75);">
This is the foundation for the combined customer portal, bug tracker, and project management experience. Build out your
issue workflows, notifications, and reporting from here.
</p>
<ul style="margin: 1rem 0 0; padding-left: 1.2rem; color: rgba(148, 163, 184, 0.9);">
<li>Access your assigned issues from the navigation.</li>
<li>Switch between customers and projects seamlessly.</li>
<li>Upload assets and collaborate via the real-time activity feeds.</li>
</ul>
</div>
<div class="card">
<h3 style="margin-top:0;">System status</h3>
<table>
<tbody>
<tr>
<td>Environment</td>
<td><span class="badge"><?= htmlspecialchars(config('app.env')) ?></span></td>
</tr>
<tr>
<td>Uploads directory</td>
<td><?= htmlspecialchars(config('files.storage_path')) ?></td>
</tr>
<tr>
<td>Max upload size</td>
<td><?= (int) config('files.max_upload_mb') ?> MB</td>
</tr>
<tr>
<td>Allowed MIME types</td>
<td><?= htmlspecialchars(implode(', ', config('files.allowed_mime'))) ?></td>
</tr>
</tbody>
</table>
</div>
</section>
<?php $content = ob_get_clean(); include base_path('resources/views/layout/app.php'); ?>

View File

@@ -0,0 +1,115 @@
<?php
/** @var array $invoice */
$invoice = $invoice ?? [];
$lineItems = $invoice['items'] ?? [];
$customer = $invoice['customer'] ?? [];
$invoiceNumber = $invoice['number'] ?? '';
$title = 'Faktura #' . ($invoiceNumber !== '' ? $invoiceNumber : 'Udkast');
ob_start();
?>
<h2 style="margin-top:0;">Faktura <?= htmlspecialchars($invoiceNumber !== '' ? $invoiceNumber : 'Udkast') ?></h2>
<p style="margin:0 0 16px; color:rgba(148,163,184,0.85);">
Fakturadato: <?= htmlspecialchars($invoice['issued_at'] ?? date('Y-m-d')) ?> &middot;
Forfaldsdato: <?= htmlspecialchars($invoice['due_at'] ?? date('Y-m-d', strtotime('+14 days'))) ?>
</p>
<table class="meta">
<tr>
<th style="width:180px;">Kunde</th>
<td><?= htmlspecialchars($customer['name'] ?? 'Angiv kunde') ?></td>
</tr>
<tr>
<th>Kontaktperson</th>
<td><?= htmlspecialchars($customer['contact'] ?? $customer['email'] ?? 'Angiv kontakt') ?></td>
</tr>
<tr>
<th>Reference</th>
<td><?= htmlspecialchars($invoice['reference'] ?? 'Angiv reference') ?></td>
</tr>
</table>
<table style="width:100%; border-collapse:collapse;">
<thead>
<tr style="text-align:left; color:rgba(226,232,240,0.85);">
<th style="padding:12px 0; border-bottom:1px solid rgba(148,163,184,0.25);">Beskrivelse</th>
<th style="padding:12px 0; border-bottom:1px solid rgba(148,163,184,0.25); width:100px;">Antal</th>
<th style="padding:12px 0; border-bottom:1px solid rgba(148,163,184,0.25); width:140px;">Enhedspris</th>
<th style="padding:12px 0; border-bottom:1px solid rgba(148,163,184,0.25); width:140px;">Beløb</th>
</tr>
</thead>
<tbody>
<?php if (empty($lineItems)): ?>
<tr>
<td colspan="4" style="padding:24px 0; color:rgba(148,163,184,0.8); text-align:center;">Tilføj linjeelementer for at færdiggøre fakturaen.</td>
</tr>
<?php else: ?>
<?php foreach ($lineItems as $item): ?>
<?php $qty = (float) ($item['quantity'] ?? 0); $price = (float) ($item['unit_price'] ?? 0); ?>
<tr>
<td style="padding:16px 0; border-bottom:1px solid rgba(148,163,184,0.12);">
<strong><?= htmlspecialchars($item['name'] ?? 'Ydelse') ?></strong><br>
<span style="color:rgba(148,163,184,0.75); font-size:0.9rem;">
<?= nl2br(htmlspecialchars($item['description'] ?? 'Beskriv ydelsen.')) ?>
</span>
</td>
<td style="padding:16px 0; border-bottom:1px solid rgba(148,163,184,0.12);">
<?= number_format($qty, 2, ',', '.') ?>
</td>
<td style="padding:16px 0; border-bottom:1px solid rgba(148,163,184,0.12);">
<?= number_format($price, 2, ',', '.') ?> kr.
</td>
<td style="padding:16px 0; border-bottom:1px solid rgba(148,163,184,0.12); font-weight:600;">
<?= number_format($qty * $price, 2, ',', '.') ?> kr.
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
<div class="totals">
<?php
$subtotal = array_reduce($lineItems, fn ($carry, $item) => $carry + (float) ($item['quantity'] ?? 0) * (float) ($item['unit_price'] ?? 0), 0.0);
$vatRate = (float) ($invoice['vat_rate'] ?? 25);
$vatAmount = $subtotal * ($vatRate / 100);
$total = $subtotal + $vatAmount;
$paid = (float) ($invoice['paid'] ?? 0);
$balance = $total - $paid;
?>
<table>
<tr>
<td class="label">Subtotal</td>
<td><?= number_format($subtotal, 2, ',', '.') ?> kr.</td>
</tr>
<tr>
<td class="label">Moms (<?= number_format($vatRate, 0) ?>%)</td>
<td><?= number_format($vatAmount, 2, ',', '.') ?> kr.</td>
</tr>
<tr>
<td class="label">Total</td>
<td><?= number_format($total, 2, ',', '.') ?> kr.</td>
</tr>
<tr>
<td class="label">Betalt</td>
<td><?= number_format($paid, 2, ',', '.') ?> kr.</td>
</tr>
<tr>
<td class="label" style="font-weight:600;">Restbeløb</td>
<td style="font-weight:700; color:#facc15;">
<?= number_format($balance, 2, ',', '.') ?> kr.
</td>
</tr>
</table>
</div>
<?php if (!empty($invoice['notes'])): ?>
<section style="margin-top:32px;">
<h3 style="margin-bottom:8px;">Bemærkninger</h3>
<p style="color:rgba(148,163,184,0.85);"><?= nl2br(htmlspecialchars($invoice['notes'])) ?></p>
</section>
<?php endif; ?>
<?php if (!empty($invoice['payment_details'])): ?>
<section style="margin-top:32px;">
<h3 style="margin-bottom:8px;">Betalingsinformation</h3>
<p style="color:rgba(148,163,184,0.85);"><?= nl2br(htmlspecialchars($invoice['payment_details'])) ?></p>
</section>
<?php endif; ?>
<?php
$content = ob_get_clean();
include base_path('resources/views/documents/layout.php');

View File

@@ -0,0 +1,102 @@
<?php
$brand = [
'company' => config('branding.company'),
'domain' => config('branding.domain'),
'logo' => config('branding.logo_path'),
'email_signature' => config('branding.email_signature'),
];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?= htmlspecialchars($title ?? $brand['company'] . ' Document') ?></title>
<style>
:root {
color-scheme: dark;
font-family: 'Inter', system-ui, sans-serif;
}
body {
margin: 0;
padding: 48px 64px;
background-color: #0f172a;
color: #e2e8f0;
}
header {
display: flex;
align-items: center;
gap: 24px;
margin-bottom: 48px;
}
header img {
height: 72px;
width: auto;
border-radius: 16px;
background: rgba(15, 23, 42, 0.55);
padding: 0.45rem 0.65rem;
}
header h1 {
margin: 0;
font-size: 2.15rem;
}
header p {
margin: 0;
color: rgba(148, 163, 184, 0.9);
}
main {
background: rgba(30, 41, 59, 0.7);
border: 1px solid rgba(148, 163, 184, 0.18);
border-radius: 18px;
padding: 32px;
box-shadow: 0 24px 48px rgba(15, 23, 42, 0.45);
}
footer {
margin-top: 48px;
font-size: 0.85rem;
color: rgba(148, 163, 184, 0.75);
text-align: center;
}
table.meta {
width: 100%;
border-collapse: collapse;
margin-bottom: 32px;
}
table.meta th, table.meta td {
text-align: left;
padding: 8px 0;
border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.totals {
display: flex;
justify-content: flex-end;
margin-top: 32px;
}
.totals table {
border-collapse: collapse;
min-width: 240px;
}
.totals td {
padding: 8px 0;
}
.totals td.label {
color: rgba(148, 163, 184, 0.8);
padding-right: 24px;
}
</style>
</head>
<body>
<header>
<img src="<?= htmlspecialchars($brand['logo']) ?>" alt="<?= htmlspecialchars($brand['company']) ?> logo">
<div>
<h1><?= htmlspecialchars($brand['company']) ?></h1>
<p><?= htmlspecialchars($brand['domain']) ?></p>
</div>
</header>
<main>
<?= $content ?? '' ?>
</main>
<footer>
<?= nl2br(htmlspecialchars($brand['email_signature'])) ?>
</footer>
</body>
</html>

View File

@@ -0,0 +1,97 @@
<?php
/** @var array $offer */
$offer = $offer ?? [];
$lineItems = $offer['items'] ?? [];
$customer = $offer['customer'] ?? [];
$offerNumber = $offer['number'] ?? '';
$title = 'Tilbud #' . ($offerNumber !== '' ? $offerNumber : 'Udkast');
ob_start();
?>
<h2 style="margin-top:0;">Tilbud <?= htmlspecialchars($offerNumber !== '' ? $offerNumber : 'Udkast') ?></h2>
<p style="margin:0 0 16px; color:rgba(148,163,184,0.85);">
Udstedt: <?= htmlspecialchars($offer['issued_at'] ?? date('Y-m-d')) ?> &middot;
Gyldig til: <?= htmlspecialchars($offer['valid_until'] ?? date('Y-m-d', strtotime('+14 days'))) ?>
</p>
<table class="meta">
<tr>
<th style="width:180px;">Kunde</th>
<td><?= htmlspecialchars($customer['name'] ?? 'Angiv kunde') ?></td>
</tr>
<tr>
<th>Kontaktperson</th>
<td><?= htmlspecialchars($customer['contact'] ?? $customer['email'] ?? 'Angiv kontakt') ?></td>
</tr>
<tr>
<th>Projekt</th>
<td><?= htmlspecialchars($offer['project'] ?? 'Angiv projekt') ?></td>
</tr>
</table>
<table style="width:100%; border-collapse:collapse;">
<thead>
<tr style="text-align:left; color:rgba(226,232,240,0.85);">
<th style="padding:12px 0; border-bottom:1px solid rgba(148,163,184,0.25);">Beskrivelse</th>
<th style="padding:12px 0; border-bottom:1px solid rgba(148,163,184,0.25); width:100px;">Antal</th>
<th style="padding:12px 0; border-bottom:1px solid rgba(148,163,184,0.25); width:140px;">Enhedspris</th>
<th style="padding:12px 0; border-bottom:1px solid rgba(148,163,184,0.25); width:140px;">Beløb</th>
</tr>
</thead>
<tbody>
<?php if (empty($lineItems)): ?>
<tr>
<td colspan="4" style="padding:24px 0; color:rgba(148,163,184,0.8); text-align:center;">Tilføj linjeelementer for at færdiggøre tilbuddet.</td>
</tr>
<?php else: ?>
<?php foreach ($lineItems as $item): ?>
<?php $qty = (float) ($item['quantity'] ?? 0); $price = (float) ($item['unit_price'] ?? 0); ?>
<tr>
<td style="padding:16px 0; border-bottom:1px solid rgba(148,163,184,0.12);">
<strong><?= htmlspecialchars($item['name'] ?? 'Ydelse') ?></strong><br>
<span style="color:rgba(148,163,184,0.75); font-size:0.9rem;">
<?= nl2br(htmlspecialchars($item['description'] ?? 'Beskriv ydelsen.')) ?>
</span>
</td>
<td style="padding:16px 0; border-bottom:1px solid rgba(148,163,184,0.12);">
<?= number_format($qty, 2, ',', '.') ?>
</td>
<td style="padding:16px 0; border-bottom:1px solid rgba(148,163,184,0.12);">
<?= number_format($price, 2, ',', '.') ?> kr.
</td>
<td style="padding:16px 0; border-bottom:1px solid rgba(148,163,184,0.12); font-weight:600;">
<?= number_format($qty * $price, 2, ',', '.') ?> kr.
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
<div class="totals">
<?php
$subtotal = array_reduce($lineItems, fn ($carry, $item) => $carry + (float) ($item['quantity'] ?? 0) * (float) ($item['unit_price'] ?? 0), 0.0);
$vatRate = (float) ($offer['vat_rate'] ?? 25);
$vatAmount = $subtotal * ($vatRate / 100);
$total = $subtotal + $vatAmount;
?>
<table>
<tr>
<td class="label">Subtotal</td>
<td><?= number_format($subtotal, 2, ',', '.') ?> kr.</td>
</tr>
<tr>
<td class="label">Moms (<?= number_format($vatRate, 0) ?>%)</td>
<td><?= number_format($vatAmount, 2, ',', '.') ?> kr.</td>
</tr>
<tr>
<td class="label" style="font-weight:600;">Total</td>
<td style="font-weight:700;"><?= number_format($total, 2, ',', '.') ?> kr.</td>
</tr>
</table>
</div>
<?php if (!empty($offer['notes'])): ?>
<section style="margin-top:32px;">
<h3 style="margin-bottom:8px;">Bemærkninger</h3>
<p style="color:rgba(148,163,184,0.85);"><?= nl2br(htmlspecialchars($offer['notes'])) ?></p>
</section>
<?php endif; ?>
<?php
$content = ob_get_clean();
include base_path('resources/views/documents/layout.php');

View File

@@ -0,0 +1,123 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= htmlspecialchars(config('app.name')) ?><?= isset($title) ? ' - ' . htmlspecialchars($title) : '' ?></title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/modern-normalize/2.0.0/modern-normalize.min.css" integrity="sha512-jY8yKAGgwyUr0vbJIUKGwEuITdSb9VjA36TObgGJE0E7E5Wdl66iRS0LlwM651S01qmPvvrLpzjAU6YewsGmmw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<style>
:root {
color-scheme: dark;
font-family: 'Inter', system-ui, sans-serif;
background-color: #0f172a;
color: #e2e8f0;
}
body {
margin: 0;
min-height: 100vh;
background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}
a { color: #38bdf8; }
.container {
max-width: 1100px;
margin: 0 auto;
padding: 2rem 1.5rem 4rem;
}
header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 2rem;
}
nav a {
margin-left: 1rem;
text-decoration: none;
}
.card {
background: rgba(30, 41, 59, 0.85);
border: 1px solid rgba(148, 163, 184, 0.1);
border-radius: 16px;
padding: 1.5rem;
backdrop-filter: blur(10px);
box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
}
.grid {
display: grid;
gap: 1.5rem;
}
.grid-2 {
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 0.75rem 1rem;
border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.badge {
display: inline-flex;
align-items: center;
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.75rem;
background: rgba(56, 189, 248, 0.15);
color: #38bdf8;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.6rem 1rem;
border-radius: 0.75rem;
border: none;
cursor: pointer;
font-weight: 600;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
background: linear-gradient(135deg, #38bdf8, #6366f1);
color: #0f172a;
}
.btn-primary:hover {
transform: translateY(-1px);
box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}
.alert {
padding: 1rem 1.25rem;
border-radius: 0.75rem;
margin-bottom: 1.5rem;
border: 1px solid rgba(248, 113, 113, 0.25);
background: rgba(248, 113, 113, 0.1);
color: #fecaca;
}
</style>
</head>
<body>
<div class="container">
<header>
<div style="display:flex; align-items:center; gap:1rem;">
<img src="<?= htmlspecialchars(config('branding.logo_path')) ?>" alt="<?= htmlspecialchars(config('branding.company')) ?> logo" style="height:56px; width:auto; border-radius:12px; background:rgba(15,23,42,0.45); padding:0.35rem 0.5rem;" loading="lazy">
<div>
<h1 style="margin: 0; font-size: 1.75rem;"><?= htmlspecialchars(config('app.name')) ?></h1>
<p style="margin: 0; color: rgba(148, 163, 184, 0.8);"><?= htmlspecialchars(config('branding.domain')) ?> • Unified customer, project, and issue management</p>
</div>
</div>
<?php $auth = \App\Services\AuthService::getInstance(); ?>
<?php if ($auth->check()): ?>
<nav>
<a href="/">Dashboard</a>
<a href="/projects">Projects</a>
<a href="/customers">Customers</a>
<a href="/logout">Log out</a>
</nav>
<?php endif; ?>
</header>
<main>
<?= $content ?? '' ?>
</main>
</div>
</body>
</html>