Spaces:
Runtime error

dsahub / Queue /templates /queue.html
swetha-coding's picture
Added Flask DSA Hub project files
cf69cfa
Raw History Blame Contribute Delete
1.79 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Customer Service Queue</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light">
<div class="container mt-5">
<div class="card shadow-sm">
<div class="card-header bg-success text-white">
<h3 class="mb-0">Customer Service Queue</h3>
</div>
<div class="card-body">
<!-- Form to add customer -->
<form action="/queue/arrive" method="POST" class="d-flex mb-3">
<input type="text" name="name" class="form-control me-2" placeholder="Enter customer name" required>
<button type="submit" class="btn btn-primary">Join Queue</button>
</form>
<!-- Queue Display -->
<h5>📂 Current Queue:</h5>
<ul class="list-group mb-3">
{% for customer in queue %}
<li class="list-group-item">{{ customer }}</li>
{% else %}
<li class="list-group-item text-muted">No customers in queue</li>
{% endfor %}
</ul>
<!-- Next Customer -->
{% if next_customer %}
<div class="alert alert-info">
Next to be served: <strong>{{ next_customer }}</strong>
</div>
<a href="/queue/serve" class="btn btn-success">✅ Serve Customer</a>
{% else %}
<p class="text-muted">No customers waiting.</p>
{% endif %}
<div class="mt-3">
<a href="/" class="btn btn-secondary">Back to Hub</a>
</div>
</div>
</div>
</div>
</body>
</html>