Files
aiinvoice/templates/view_history.html
T
2026-10-07 17:31:08 +05:30

152 lines
7.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Full Invoice Extraction History — AI Infinite" />
<meta name="keywords" content="invoice history, AI Infinite, data extraction" />
<title>Invoice History — AI Infinite</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
<!-- AOS CSS -->
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
</head>
<body class="antialiased text-gray-800">
<!-- Navbar -->
<nav id="navbar" class="fixed top-0 left-0 w-full bg-[#f7f7f7] backdrop-blur shadow-md z-50">
<div class="container mx-auto px-6 py-4 flex items-center justify-between">
<a href="{{ url_for('index') }}" class="flex items-center space-x-2 hover:opacity-90">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite Logo"
class="h-12 md:h-16 w-auto" />
</a>
<div class="hidden md:flex space-x-8 items-center">
<a href="{{ url_for('invoice', doc_type='invoice') }}"
class="text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}"
class="text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="#features" class="text-gray-700 hover:text-blue-600 font-medium">Features</a>
<a href="{{ url_for('pricing') }}" class="text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="text-gray-700 hover:text-blue-600 font-medium">About</a>
</div>
<div class="hidden md:flex space-x-4 items-center">
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}"
class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold">Get Started</a>
{% endif %}
</div>
<button id="menu-btn" class="md:hidden text-gray-700 focus:outline-none">
<i class="fas fa-bars fa-2x"></i>
</button>
</div>
<div id="menu" class="hidden md:hidden bg-[#f7f7f7] backdrop-blur shadow-inner">
<div class="flex flex-col space-y-2 px-6 py-4">
<a href="{{ url_for('invoice', doc_type='invoice') }}"
class="block text-gray-700 hover:text-blue-600 font-medium">Invoice</a>
<a href="{{ url_for('passport', doc_type='passport') }}"
class="block text-gray-700 hover:text-blue-600 font-medium">Passport</a>
<a href="#features" class="block text-gray-700 hover:text-blue-600 font-medium">Features</a>
<a href="{{ url_for('pricing') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Pricing</a>
<a href="{{ url_for('about') }}" class="block text-gray-700 hover:text-blue-600 font-medium">About</a>
{% if logged_in %}
<a href="{{ url_for('dashboard') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Dashboard</a>
<a href="{{ url_for('logout') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Logout</a>
{% else %}
<a href="{{ url_for('login') }}" class="block text-gray-700 hover:text-blue-600 font-medium">Log in</a>
<a href="{{ url_for('login') }}"
class="block bg-blue-600 hover:bg-blue-700 text-white px-5 py-2 rounded-lg font-semibold text-center">Get
Started</a>
{% endif %}
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="pt-32 pb-12 bg-white text-center">
<div class="container mx-auto px-6" data-aos="fade-up">
<h1 class="text-4xl md:text-5xl font-bold mb-2">Full Extraction History</h1>
<p class="text-lg text-gray-600"> <span class="font-semibold">{{ username }}</span></p>
</div>
</section>
<!-- History Table -->
<section id="history" class="py-20 bg-gray-50">
<div class="container mx-auto px-6" data-aos="fade-up">
<div class="overflow-x-auto bg-white rounded-lg shadow">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Timestamp</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Image Name</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
{% if invoice_history %}
{% for entry in invoice_history %}
<tr class="hover:bg-gray-100">
<td class="px-6 py-4 whitespace-nowrap text-blue-600 font-semibold">{{ entry.timestamp_str }}</td>
<td>
<a href="{{ url_for('view_invoice', invoice_id=entry.id) }}">
{{ entry.image_name }}
</a>
</td>
<!-- <td class="px-6 py-4 whitespace-nowrap">{{ entry.image_name }}</td> -->
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="2" class="px-6 py-4 text-center text-gray-500">No history found.</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="text-center mt-8">
<a href="{{ url_for('dashboard') }}"
class="inline-block bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-lg transition">
Back to Dashboard
</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-800 text-gray-200 py-8">
<div class="container mx-auto px-6 text-center space-y-4">
<img src="{{ url_for('static', filename='logos/aiinfinite.png') }}" alt="AI Infinite" class="h-10 mx-auto" />
<p>
<a href="#" class="hover:underline mx-2">API Docs</a> |
<a href="#" class="hover:underline mx-2">Help Center</a> |
<a href="#" class="hover:underline mx-2">Blog</a> |
<a href="# class=" hover:underline mx-2">Careers</a>
</p>
<div class="space-x-4 text-lg">
<a href="https://twitter.com/AiIndia2?s=09" class="hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="https://www.linkedin.com/company/ai-india/" class="hover:text-white"><i
class="fab fa-linkedin"></i></a>
<a href="#" class="hover:text-white"><i class="fab fa-medium"></i></a>
</div>
<p class="text-sm">© 2025 AI Infinite Technologies Inc.</p>
</div>
</footer>
<!-- Scripts -->
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init({ duration: 800, once: true });
document.getElementById('menu-btn').addEventListener('click', () => {
document.getElementById('menu').classList.toggle('hidden');
});
</script>
</body>
</html>