This commit is contained in:
2025-04-22 10:39:29 +04:00
parent 15b05cb599
commit 34594b95fa
10 changed files with 208 additions and 299 deletions

View File

@@ -7,18 +7,44 @@
<div class="col-md-8">
<div class="card border-danger">
<div class="card-header bg-danger text-white">
<h4 class="mb-0"><i class="bi bi-exclamation-triangle-fill me-2"></i>Error</h4>
<h4 class="mb-0"><i class="bi bi-exclamation-triangle-fill me-2"></i>Template Rendering Error</h4>
</div>
<div class="card-body">
<h5 class="card-title">Something went wrong</h5>
<p class="card-text">{{ error }}</p>
<h5 class="card-title">Something went wrong while rendering the template</h5>
<div class="alert alert-danger">
<p class="mb-2"><strong>Error Message:</strong></p>
<pre class="p-3 bg-light border rounded"><code>{{ error | default(value="Unknown error") }}</code></pre>
</div>
{% if error_details is defined and error_details %}
<div class="mt-3">
<p class="mb-2"><strong>Error Details:</strong></p>
<pre class="p-3 bg-light border rounded"><code>{{ error_details }}</code></pre>
</div>
{% endif %}
{% if error_location is defined and error_location %}
<div class="mt-3">
<p class="mb-2"><strong>Error Location:</strong></p>
<p>{{ error_location }}</p>
</div>
{% endif %}
<div class="alert alert-info mt-3">
<p class="mb-0"><i class="bi bi-info-circle me-2"></i>This error is visible only in development mode. In production, a generic error page will be shown.</p>
</div>
<div class="mt-4">
<a href="/" class="btn btn-primary me-2">
<i class="bi bi-house-door me-1"></i>Go to Home
</a>
<a href="javascript:history.back()" class="btn btn-outline-secondary">
<a href="javascript:history.back()" class="btn btn-outline-secondary me-2">
<i class="bi bi-arrow-left me-1"></i>Go Back
</a>
<button onclick="window.location.reload()" class="btn btn-outline-primary">
<i class="bi bi-arrow-clockwise me-1"></i>Reload Page
</button>
</div>
</div>
</div>

View File

@@ -1,14 +1,14 @@
{% extends "base.html" %}
{% block title %}All Flows{% endblock %}
{% block title %}Freezone Workflows{% endblock %}
{% block content %}
<div class="row mb-4">
<div class="col-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/flows">Flows</a></li>
<li class="breadcrumb-item active" aria-current="page">All Flows</li>
<li class="breadcrumb-item"><a href="/flows">Workflows</a></li>
<li class="breadcrumb-item active" aria-current="page">Freezone Workflows</li>
</ol>
</nav>
</div>
@@ -16,11 +16,11 @@
<div class="row mb-4">
<div class="col-md-8">
<h1 class="display-5 mb-0">All Flows</h1>
<h1 class="display-5 mb-0">Freezone Workflow Management</h1>
</div>
<div class="col-md-4 text-md-end">
<a href="/flows/create" class="btn btn-primary">
<i class="bi bi-plus-circle me-1"></i> Create New Flow
<i class="bi bi-plus-circle me-1"></i> Create New Workflow
</a>
</div>
</div>
@@ -31,7 +31,7 @@
<div class="card">
<div class="card-body">
<form class="row g-3" action="/flows/list" method="get">
<div class="col-md-4">
<div class="col-md-3">
<label for="status" class="form-label">Status</label>
<select class="form-select" id="status" name="status">
<option value="all" selected>All</option>
@@ -41,19 +41,34 @@
<option value="cancelled">Cancelled</option>
</select>
</div>
<div class="col-md-4">
<label for="type" class="form-label">Type</label>
<!-- Freezone filter - for UI demonstration only -->
<div class="col-md-3">
<label for="freezone" class="form-label">Freezone</label>
<select class="form-select" id="freezone" name="freezone" disabled>
<option value="all" selected>All Freezones</option>
<option value="dubai_multi_commodities_centre">DMCC</option>
<option value="dubai_international_financial_centre">DIFC</option>
<option value="jebel_ali_free_zone">JAFZA</option>
<option value="dubai_silicon_oasis">DSO</option>
<option value="dubai_internet_city">DIC</option>
<option value="dubai_media_city">DMC</option>
<option value="abu_dhabi_global_market">ADGM</option>
</select>
<div class="form-text">Coming soon</div>
</div>
<div class="col-md-3">
<label for="type" class="form-label">Workflow Type</label>
<select class="form-select" id="type" name="type">
<option value="all" selected>All</option>
<option value="company_registration">Company Registration</option>
<option value="user_onboarding">User Onboarding</option>
<option value="service_activation">Service Activation</option>
<option value="company_registration">Company Incorporation</option>
<option value="user_onboarding">KYC Verification</option>
<option value="service_activation">License Activation</option>
<option value="payment_processing">Payment Processing</option>
</select>
</div>
<div class="col-md-4">
<div class="col-md-3">
<label for="search" class="form-label">Search</label>
<input type="text" class="form-control" id="search" name="search" placeholder="Search flows...">
<input type="text" class="form-control" id="search" name="search" placeholder="Search workflows...">
</div>
<div class="col-12 text-end">
<button type="submit" class="btn btn-primary">
@@ -79,14 +94,14 @@
<table class="table table-hover">
<thead>
<tr>
<th>Flow Name</th>
<th>Workflow Name</th>
<th>Type</th>
<th>Status</th>
<th>Owner</th>
<th>Assignee</th>
<th>Progress</th>
<th>Created</th>
<th>Updated</th>
<th>Current Step</th>
<th>Initiated</th>
<th>Last Updated</th>
<th>Current Stage</th>
<th>Actions</th>
</tr>
</thead>
@@ -120,21 +135,21 @@
{{ current.name }}
{% else %}
{% if flow.status == 'Completed' %}
All steps completed
<span class="text-success">All stages completed</span>
{% elif flow.status == 'Cancelled' %}
Flow cancelled
<span class="text-secondary">Workflow cancelled</span>
{% else %}
No active step
<span class="text-muted">No active stage</span>
{% endif %}
{% endif %}
</td>
<td>
<div class="btn-group">
<a href="/flows/{{ flow.id }}" class="btn btn-sm btn-primary">
<a href="/flows/{{ flow.id }}" class="btn btn-sm btn-primary" title="View Details">
<i class="bi bi-eye"></i>
</a>
{% if flow.status == 'In Progress' %}
<a href="/flows/{{ flow.id }}#advance" class="btn btn-sm btn-success">
<a href="/flows/{{ flow.id }}#advance" class="btn btn-sm btn-success" title="Advance to Next Stage">
<i class="bi bi-arrow-right"></i>
</a>
{% endif %}
@@ -146,7 +161,11 @@
</table>
</div>
{% else %}
<p class="text-center">No flows found matching your criteria.</p>
<div class="text-center py-4">
<i class="bi bi-search display-1 text-muted"></i>
<p class="lead mt-3">No workflows found matching your criteria.</p>
<p class="text-muted">Try adjusting your filters or create a new workflow.</p>
</div>
{% endif %}
</div>
</div>