feat: Enhance contract management with new features

- Implement comprehensive contract listing with filtering by
  status and type, and search functionality.
- Add contract cloning, sharing, and cancellation features.
- Improve contract details view with enhanced UI and activity
  timeline.
- Implement signer management with add/update/delete and status
  updates, including signature data handling and rejection.
- Introduce contract creation and editing functionalities with
  markdown support.
- Add error handling for contract not found scenarios.
- Implement reminder system for pending signatures with rate
  limiting and status tracking.
- Add API endpoint for retrieving contract statistics.
- Improve logging with more descriptive messages.
- Refactor code for better structure and maintainability.
This commit is contained in:
Mahmoud-Emad
2025-06-12 13:53:33 +03:00
parent 7e95391a9c
commit 464e253739
21 changed files with 6371 additions and 1173 deletions

View File

@@ -0,0 +1,125 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Not Found - Zanzibar Digital Freezone</title>
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
</head>
<body class="bg-light">
<div class="container-fluid min-vh-100 d-flex align-items-center justify-content-center">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6">
<div class="text-center py-5">
<!-- 404 Icon -->
<div class="mb-4">
<i class="bi bi-exclamation-triangle display-1 text-warning"></i>
</div>
<!-- Error Code -->
<h1 class="display-1 fw-bold text-muted">404</h1>
<!-- Error Message -->
<h2 class="mb-3">{% if error_title %}{{ error_title }}{% else %}Page Not Found{% endif %}</h2>
<p class="lead text-muted mb-4">
{% if error_message %}{{ error_message }}{% else %}The page you're looking for doesn't exist
or has
been moved.{% endif %}
</p>
<!-- Suggestions -->
<div class="card bg-light border-0 mb-4">
<div class="card-body">
<h6 class="card-title">What can you do?</h6>
<ul class="list-unstyled mb-0">
<li class="mb-2">
<i class="bi bi-arrow-left text-primary me-2"></i>
Go back to the previous page
</li>
<li class="mb-2">
<i class="bi bi-house text-primary me-2"></i>
Visit our homepage
</li>
<li class="mb-2">
<i class="bi bi-search text-primary me-2"></i>
Check the URL for typos
</li>
<li class="mb-2">
<i class="bi bi-arrow-clockwise text-primary me-2"></i>
Try refreshing the page
</li>
</ul>
</div>
</div>
<!-- Action Buttons -->
<div class="d-flex flex-column flex-sm-row gap-2 justify-content-center">
<button onclick="history.back()" class="btn btn-outline-primary">
<i class="bi bi-arrow-left me-1"></i> Go Back
</button>
<a href="/" class="btn btn-primary">
<i class="bi bi-house me-1"></i> Go Home
</a>
{% if return_url %}
<a href="{{ return_url }}" class="btn btn-outline-secondary">
<i class="bi bi-arrow-return-left me-1"></i> {% if return_text %}{{ return_text }}{%
else
%}Return{% endif %}
</a>
{% endif %}
</div>
<!-- Contact Support -->
<div class="mt-5 pt-4 border-top">
<p class="text-muted small">
Still having trouble?
<a href="/support" class="text-decoration-none">Contact Support</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="/static/js/bootstrap.bundle.min.js"></script>
<script>
// Auto-redirect after 10 seconds if no user interaction
let redirectTimer;
let countdown = 10;
function startAutoRedirect() {
redirectTimer = setInterval(() => {
countdown--;
if (countdown <= 0) {
clearInterval(redirectTimer);
window.location.href = '/';
}
}, 1000);
}
// Cancel auto-redirect on any user interaction
function cancelAutoRedirect() {
if (redirectTimer) {
clearInterval(redirectTimer);
redirectTimer = null;
}
}
// Start auto-redirect after 5 seconds of no interaction
setTimeout(startAutoRedirect, 5000);
// Cancel auto-redirect on mouse movement, clicks, or key presses
document.addEventListener('mousemove', cancelAutoRedirect);
document.addEventListener('click', cancelAutoRedirect);
document.addEventListener('keydown', cancelAutoRedirect);
</script>
</body>
</html>