implement governance and flow functionality
This commit is contained in:
114
actix_mvc_app/src/views/flows/my_flows.html
Normal file
114
actix_mvc_app/src/views/flows/my_flows.html
Normal file
@@ -0,0 +1,114 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}My Flows{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<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">My Flows</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-8">
|
||||
<h1 class="display-5 mb-0">My Flows</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
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Flows Table -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
{% if flows|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flow Name</th>
|
||||
<th>Type</th>
|
||||
<th>Status</th>
|
||||
<th>Progress</th>
|
||||
<th>Current Step</th>
|
||||
<th>Created</th>
|
||||
<th>Updated</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for flow in flows %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/flows/{{ flow.id }}">{{ flow.name }}</a>
|
||||
</td>
|
||||
<td>{{ flow.flow_type }}</td>
|
||||
<td>
|
||||
<span class="badge {% if flow.status == 'In Progress' %}bg-primary{% elif flow.status == 'Completed' %}bg-success{% elif flow.status == 'Stuck' %}bg-danger{% else %}bg-secondary{% endif %}">
|
||||
{{ flow.status }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress mb-2" style="height: 20px;">
|
||||
<div class="progress-bar {% if flow.status == 'Completed' %}bg-success{% elif flow.status == 'Stuck' %}bg-danger{% else %}bg-primary{% endif %}" role="progressbar" style="width: {{ flow.progress_percentage }}%;" aria-valuenow="{{ flow.progress_percentage }}" aria-valuemin="0" aria-valuemax="100">{{ flow.progress_percentage }}%</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{% set current = flow.current_step %}
|
||||
{% if current %}
|
||||
{{ current.name }}
|
||||
{% else %}
|
||||
{% if flow.status == 'Completed' %}
|
||||
All steps completed
|
||||
{% elif flow.status == 'Cancelled' %}
|
||||
Flow cancelled
|
||||
{% else %}
|
||||
No active step
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ flow.created_at | date(format="%Y-%m-%d") }}</td>
|
||||
<td>{{ flow.updated_at | date(format="%Y-%m-%d") }}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="/flows/{{ flow.id }}" class="btn btn-sm btn-primary">
|
||||
<i class="bi bi-eye"></i>
|
||||
</a>
|
||||
{% if flow.status == 'In Progress' %}
|
||||
<a href="/flows/{{ flow.id }}#advance" class="btn btn-sm btn-success">
|
||||
<i class="bi bi-arrow-right"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center py-5">
|
||||
<i class="bi bi-diagram-3 display-1 text-muted"></i>
|
||||
<h4 class="mt-3">You don't have any flows yet</h4>
|
||||
<p class="text-muted">Create a new flow to get started with tracking your processes.</p>
|
||||
<a href="/flows/create" class="btn btn-primary mt-2">
|
||||
<i class="bi bi-plus-circle me-1"></i> Create New Flow
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user