This commit is contained in:
lubiana 2025-05-31 21:43:13 +02:00
parent e958163a4a
commit b8a5a1ff58
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
79 changed files with 15113 additions and 0 deletions

View file

@ -0,0 +1,145 @@
{% extends "layout.twig" %}
{% block title %}🏠 Dashboard 📊 - {{ parent() }}{% endblock %}
{% block content %}
<div class="dashboard">
<div class="row mb-4">
<div class="col">
<h2>🎉✨ WELCOME TO THE SUPER AMAZING DRINKS INVENTORY SYSTEM!!! 🍹🥂</h2>
</div>
</div>
<div class="row mb-4">
<!-- Main Dashboard Content -->
<div class="col-lg-8">
<!-- Low Stock Alerts -->
{% if showLowStockAlerts %}
{% include 'dashboard/low-stock-alerts.twig' %}
{% endif %}
<!-- Dashboard Summary Card -->
<div class="card mb-4">
<div class="card-header bg-rainbow text-white">
<h5 class="card-title mb-0">🌟 DASHBOARD SUMMARY 🌟</h5>
</div>
<div class="card-body">
<p>🚀 This AWESOME system helps you manage your drinks inventory 🍺, track stock levels 📊, and create orders 📝!!! 🌟</p>
<div class="row mt-4">
<div class="col-md-4 mb-3">
<div class="d-grid">
<a href="/drink-types" class="btn btn-primary btn-lg">
<i class="fas fa-cocktail me-2"></i>🍸 Manage Drink Types 🍹
</a>
</div>
</div>
<div class="col-md-4 mb-3">
<div class="d-grid">
<a href="/inventory" class="btn btn-success btn-lg">
<i class="fas fa-boxes me-2"></i>📦 Update Inventory 🔄
</a>
</div>
</div>
<div class="col-md-4 mb-3">
<div class="d-grid">
<a href="/orders" class="btn btn-warning btn-lg">
<i class="fas fa-shopping-cart me-2"></i>🛒 View Orders 📋
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Getting Started Card -->
<div class="card mb-4">
<div class="card-header bg-info text-white">
<h5 class="card-title mb-0">🚀 GETTING STARTED 🚀</h5>
</div>
<div class="card-body">
<ol class="list-group list-group-numbered mb-0">
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">🍹 Add drink types</div>
Define your products and set desired stock levels 🎯
</div>
<a href="/drink-types/create" class="btn btn-sm btn-primary">Add Now</a>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">📦 Update inventory</div>
Keep your stock levels accurate and up-to-date 🔄
</div>
<a href="/inventory/update" class="btn btn-sm btn-primary">Update</a>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">🛒 Create orders</div>
Order more drinks based on inventory needs 📝
</div>
<a href="/orders/create" class="btn btn-sm btn-primary">Order</a>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">📋 Track orders</div>
Update inventory when orders are fulfilled ✅
</div>
<a href="/orders" class="btn btn-sm btn-primary">View</a>
</li>
</ol>
</div>
</div>
</div>
<!-- Sidebar Content -->
<div class="col-lg-4">
<!-- Quick Update Form -->
{% if showQuickUpdateForm %}
{% include 'dashboard/quick-update-form.twig' %}
{% endif %}
<!-- Fun Facts Card -->
<div class="card mb-4">
<div class="card-header bg-success text-white">
<h5 class="card-title mb-0">💫 FUN FACTS ABOUT DRINKS!!! 💫</h5>
</div>
<div class="card-body">
<div class="list-group">
<div class="list-group-item">
<i class="fas fa-beer text-warning me-2"></i>🍺 Beer is one of the oldest and most widely consumed alcoholic drinks in the world! 🌍
</div>
<div class="list-group-item">
<i class="fas fa-wine-glass-alt text-danger me-2"></i>🍷 Wine has been produced for thousands of years! The earliest evidence of wine is from Georgia (6000 BC)! 🕰️
</div>
<div class="list-group-item">
<i class="fas fa-glass-martini-alt text-info me-2"></i>🍹 The world's most expensive cocktail is the "Diamonds Are Forever" martini, costing $22,600! 💎
</div>
<div class="list-group-item">
<i class="fas fa-glass-whiskey text-success me-2"></i>🥤 The average person will drink about 20,000 beverages in their lifetime! 😮
</div>
</div>
</div>
</div>
<!-- Motivation Card -->
<div class="card">
<div class="card-header bg-pride-purple text-white">
<h5 class="card-title mb-0">💪 MOTIVATION FOR TODAY!!! 💪</h5>
</div>
<div class="card-body">
<div class="alert alert-success">
<i class="fas fa-star me-2"></i>🌟 Keep your inventory STOCKED and your customers HAPPY! 😄 You're doing AMAZING work! 🎉
</div>
<div class="alert alert-info">
<i class="fas fa-rocket me-2"></i>🚀 Remember: Every bottle tracked is a problem solved! 🧠 Stay AWESOME and keep CRUSHING it! 💯
</div>
</div>
<div class="card-footer bg-light">
<p class="mb-0 text-center">✨ You're doing GREAT! Keep it up! ✨</p>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,49 @@
{# 🚨 Super Important Low Stock Alerts Component 🚨 #}
<div class="card mb-4">
<div class="card-header bg-warning text-white">
<h5 class="card-title mb-0">🚨 OMG!!! LOW STOCK ALERTS!!! 🚨</h5>
</div>
<div class="card-body">
{% if lowStockItems is empty %}
<p class="text-success">✅✅✅ WOOHOO!!! All stock levels are SUPER ADEQUATE!!! 🎉🎊 PARTY TIME!!! 🥳🍾</p>
{% else %}
<div class="alert alert-danger">
<h6>😱 OH NO!!! WE'RE RUNNING OUT OF DRINKS!!! 😱</h6>
<p>🆘 EMERGENCY SITUATION!!! 🆘 We need to restock ASAP!!! ⏰⏰⏰</p>
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>🍹 Drink Type 🍸</th>
<th>📉 Current Stock 📊</th>
<th>🎯 Desired Stock 🏆</th>
<th>⚠️ Difference ⚠️</th>
<th>🛠️ Actions 🛠️</th>
</tr>
</thead>
<tbody>
{% for item in lowStockItems %}
<tr>
<td>🥤 {{ item.drinkType.name }} 🥤</td>
<td>📉 {{ item.currentStock }} 📉</td>
<td>🎯 {{ item.desiredStock }} 🎯</td>
<td class="text-danger">⚠️ {{ item.currentStock - item.desiredStock }} ⚠️</td>
<td>
<a href="/inventory/update" class="btn btn-sm btn-primary">🔄 Update Stock NOW!!! 🔄</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="mt-3">
<a href="/orders/create-from-stock" class="btn btn-success btn-lg">🚚 CREATE EMERGENCY ORDER NOW!!! 🚨</a>
</div>
<div class="mt-2">
<p class="text-danger">⏰ Don't delay! Your customers are THIRSTY!!! 🥵 Act NOW before it's TOO LATE!!! ⏰</p>
</div>
{% endif %}
</div>
</div>

View file

@ -0,0 +1,48 @@
{# ⚡⚡⚡ SUPER FAST Quick Update Form Component ⚡⚡⚡ #}
{% import 'components/form.twig' as form %}
<div class="card mb-4">
<div class="card-header bg-primary text-white">
<h5 class="card-title mb-0">⚡ LIGHTNING FAST STOCK UPDATE!!! ⚡</h5>
</div>
<div class="card-body">
<form action="/inventory/update" method="post">
{{ form.errors(error) }}
<div class="alert alert-info">
<h6>🏎️ ZOOM ZOOM!!! 🏎️</h6>
<p>⏱️ Update your stock in SECONDS!!! ⏱️ SO FAST!!! SO EASY!!! 🤩</p>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="drink_type_id">🍹 CHOOSE YOUR DRINK!!! 🍸🥤</label>
<select id="drink_type_id" name="drink_type_id" class="form-control" required>
<option value="">-- 🔍 SELECT A SUPER AWESOME DRINK 🔎 --</option>
{% for drinkType in drinkTypes %}
<option value="{{ drinkType.id }}">🥂 {{ drinkType.name }} 🍾</option>
{% endfor %}
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="quantity">🔢 HOW MANY DO YOU HAVE??? 📊📈</label>
<input type="number" id="quantity" name="quantity" class="form-control" min="0" required>
</div>
</div>
</div>
<div class="form-group mt-3">
<button type="submit" class="btn btn-primary btn-lg">🚀 UPDATE STOCK NOW!!! 🚀</button>
</div>
</form>
</div>
<div class="card-footer">
<small class="text-muted">⚡ This AMAZING form updates the current stock level for the selected drink type IN SECONDS!!! ⚡ WOW!!! 😲</small>
</div>
<div class="card-footer bg-light">
<p class="mb-0 text-center">💯 PRODUCTIVITY TIP: Update your stock DAILY for MAXIMUM EFFICIENCY!!! 💯</p>
</div>
</div>