{% extends 'base.html.twig' %}
{% block title %}Dashboard
{% endblock %}
{% block breadcrumb %}
<li class="breadcrumb-item active">{% trans %}
Dashboard
{% endtrans %}</li>
{% endblock %}
{% block pagetitle %}
{% trans %}
Dashboard{% endtrans %}
{% endblock %}
{% block body %}
<div class="row">
<div class="col-12 col-sm-6 col-md-3">
<div class="info-box">
<span class="info-box-icon bg-info elevation-1">
<i class="fas fa-project-diagram"></i>
</span>
<div class="info-box-content">
<span class="info-box-text">Completed Projects</span>
<span class="info-box-number"> {{ closed_project|length }}
</span>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-3">
<div class="info-box mb-3">
<span class="info-box-icon bg-danger elevation-1">
<i class="fas fa-project-diagram"></i>
</span>
<div class="info-box-content">
<span class="info-box-text">Ongoing Projects</span>
<span class="info-box-number"> {{ active_project|length }}
</span>
</div>
</div>
</div>
<div class="clearfix hidden-md-up"></div>
<div class="col-12 col-sm-6 col-md-3">
<div class="info-box mb-3">
<span class="info-box-icon bg-success elevation-1">
<i class="fas fa-tasks"></i>
</span>
<div class="info-box-content">
<span class="info-box-text">Completed Tasks</span>
<span class="info-box-number">20</span>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-3">
<div class="info-box mb-3">
<span class="info-box-icon bg-warning elevation-1">
<i class="fas fa-tasks"></i>
</span>
<div class="info-box-content">
<span class="info-box-text">Pending Tasks</span>
<span class="info-box-number">7</span>
</div>
</div>
</div>
</div><br>
<div class="row">
<div class="col-md-8">
<div class="card">
<div class="card-header border-0">
<h3 class="card-title">My Projects</h3>
<div class="card-tools">
<a href="#" class="btn btn-tool btn-sm">
<i class="fas fa-bars"></i>
</a>
</div>
</div>
<div class="card-body table-responsive p-0">
<table class="table table-striped table-valign-middle">
<thead>
<tr>
<th>Name</th>
<th>Amount</th>
<th>Start Date</th>
<th>End Date</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody>
{% for project in projects %}
<tr>
<td>
<a href="{{ path('project_dashboard', {'id': project.id })}}">{{ project.name }}</a>
</td>
<td>{{ project.currency.abbreviation }} {{ project.amount }}</td>
<td>{{ project.startDate ? project.startDate|date('Y-m-d') : '' }}</td>
<td>{{ project.endDate ? project.endDate|date('Y-m-d') : '' }}</td>
<td class="text-center">
<a href="{{path('project_activity_index', {'project': project.id})}}" class="btn btn-sm btn-primary mr-2">{% trans %}Activity{% endtrans %}</a>
<a href="{{ path('project_milestone_index', {'project': project.id })}}" class="btn btn-sm btn-success mr-2">{% trans %}Milestone{% endtrans %}</a>
<a href="{{ path('project_members_index', {'project': project.id })}}" class="btn btn-sm btn-warning text-white">{% trans %}Members{% endtrans %}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card bg-gradient-success">
<div class="card-header border-0">
<h3 class="card-title">
<i class="far fa-calendar-alt"></i>
Calendar
</h3>
<div class="card-tools">
<button type="button" class="btn btn-success btn-sm" data-card-widget="collapse">
<i class="fas fa-minus"></i>
</button>
</div>
</div>
<div class="card-body pt-0 text-center">
<div id="calendar" style="width: 100%"></div>
</div>
</div>
</div>
</div><br>
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header border-0">
<h3 class="card-title">Overdue Tasks</h3>
<div class="card-tools">
<a href="#" class="btn btn-tool btn-sm">
<i class="fas fa-bars"></i>
</a>
</div>
</div>
<div class="card-body table-responsive p-0">
<table class="table table-striped table-valign-middle">
<thead>
<tr>
<th>Project</th>
<th>Task</th>
<th class="text-center">Overdue Days</th>
</tr>
</thead>
<tbody>
<tr>
<td>
City Portal
</td>
<td>UI/UX Implementation</td>
<td class="text-center">
<span class="text-danger">
12
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header border-0">
<h3 class="card-title">Upcoming Tasks</h3>
<div class="card-tools">
<a href="#" class="btn btn-tool btn-sm">
<i class="fas fa-bars"></i>
</a>
</div>
</div>
<div class="card-body table-responsive p-0">
<table class="table table-striped table-valign-middle">
<thead>
<tr>
<th>Project</th>
<th>Task</th>
<th class="text-center">Due Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Demo
</td>
<td>Task Name</td>
<td class="text-center">
<span class="bg-warning p-2">
August 18, 2021
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
<script src="{{ asset('assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js')}}"></script>
<script>
$('#calendar').datetimepicker({
format: 'L',
inline: true
})
</script>
{% endblock %}