{% extends 'base.html.twig' %}
{% block title %}{{ title }}{% endblock %}
{% block body %}
<div class="card">
<div class="card-header border-0 pt-6">
<div class="card-title"></div>
</div>
<div class="card-body pt-0">
<div class="pb-10 row g-6 g-xl-9">
<div class="col-md-4"></div>
<div class="col-md-4"><input id="logDate" type="text" class="form-control form-control-solid"
autocomplete="false"></div>
<div class="col-md-2"></div>
</div>
<!--begin::Wrapper-->
<div class="d-flex flex-stack flex-wrap mb-5">
<!--begin::Search-->
<div class="d-flex align-items-center position-relative my-1 mb-2 mb-md-0">
<!--begin::Svg Icon | path: icons/duotune/general/gen021.svg-->
<span class="svg-icon svg-icon-1 position-absolute ms-6">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.5" x="17.0365" y="15.1223" width="8.15546"
height="2" rx="1"
transform="rotate(45 17.0365 15.1223)"
fill="currentColor"/>
<path d="M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z"
fill="currentColor"/>
</svg>
</span>
<!--end::Svg Icon-->
<input type="text" data-table-filter="search" class="form-control form-control-solid w-250px ps-15"
placeholder="Search"/>
</div>
<!--end::Search-->
</div>
<!--end::Wrapper-->
<div class="dataTables_wrapper dt-bootstrap4 no-footer">
<div class="table-responsive">
<table id="kt_datatable_row_grouping"
class="table table-row-bordered gy-5 gs-7 border rounded w-100">
<thead>
<tr>
<th>ID</th>
<th>Mat</th>
<th>Nom Complet</th>
<th>SF</th>
<th>NE</th>
<th>Département</th>
<th>Poste</th>
<th>Prix</th>
<th>Nombre d'heures</th>
<th>Total</th>
<th>Statut</th>
</tr>
</thead>
<tbody>
{% if data.logs is defined %}
{% for logData in data.logs %}
<tr>
<td>{{ logData.employee.id }}</td>
<td>{{ logData.employee.registrationNumber }}</td>
<td>{{ logData.employee.fullName }}</td>
<td>{{ logData.employee.relationshipStatus.title }}</td>
<td>{{ logData.employee.numberOfChildrens }}</td>
<td>{{ logData.department }}</td>
<td>{{ logData.position }}</td>
<td>{{ logData.price }}</td>
<td>{{ logData.duration }}</td>
<td>{{ logData.total }}</td>
<td>{{ logData.status }}</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
<div class="d-flex flex-column flex-grow-1 pe-8">
<!--begin::Stats-->
<div class="d-flex flex-wrap">
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 me-6 mb-3">
<!--begin::Number-->
<div class="d-flex align-items-center">
<div class="fs-2 fw-bold counted" data-kt-countup="true"
data-kt-countup-value="{{ data.totalDuration|number_format(2, '.', ',') }}" data-kt-countup-prefix="H"
data-kt-initialized="1">{{ data.totalDuration|number_format(2, '.', ',') }} H
</div>
</div>
<!--end::Number-->
<!--begin::Label-->
<div class="fw-semibold fs-6 text-gray-400">Heures</div>
<!--end::Label-->
</div>
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 me-6 mb-3">
<!--begin::Number-->
<div class="d-flex align-items-center">
<!--begin::Svg Icon | path: icons/duotune/arrows/arr065.svg-->
<span class="svg-icon svg-icon-3 svg-icon-danger me-2">
<svg width="24" height="24"
viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.5" x="11" y="18"
width="13" height="2" rx="1"
transform="rotate(-90 11 18)"
fill="currentColor"></rect>
<path d="M11.4343 15.4343L7.25 11.25C6.83579 10.8358 6.16421 10.8358 5.75 11.25C5.33579 11.6642 5.33579 12.3358 5.75 12.75L11.2929 18.2929C11.6834 18.6834 12.3166 18.6834 12.7071 18.2929L18.25 12.75C18.6642 12.3358 18.6642 11.6642 18.25 11.25C17.8358 10.8358 17.1642 10.8358 16.75 11.25L12.5657 15.4343C12.2533 15.7467 11.7467 15.7467 11.4343 15.4343Z"
fill="currentColor"></path>
</svg>
</span>
<!--end::Svg Icon-->
<div class="fs-2 fw-bold counted" data-kt-countup="true" data-kt-countup-value="80"
data-kt-initialized="1">{{ data.totalPrice|number_format(2, '.', ',') }}
</div>
</div>
<!--end::Number-->
<!--begin::Label-->
<div class="fw-semibold fs-6 text-gray-400">Coût</div>
<!--end::Label-->
</div>
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 me-6 mb-3">
<!--begin::Number-->
<div class="d-flex align-items-center">
<!--begin::Svg Icon | path: icons/duotune/arrows/arr065.svg-->
<span class="svg-icon svg-icon-3 svg-icon-danger me-2">
<svg width="24" height="24"
viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.5" x="11" y="18"
width="13" height="2" rx="1"
transform="rotate(-90 11 18)"
fill="currentColor"></rect>
<path d="M11.4343 15.4343L7.25 11.25C6.83579 10.8358 6.16421 10.8358 5.75 11.25C5.33579 11.6642 5.33579 12.3358 5.75 12.75L11.2929 18.2929C11.6834 18.6834 12.3166 18.6834 12.7071 18.2929L18.25 12.75C18.6642 12.3358 18.6642 11.6642 18.25 11.25C17.8358 10.8358 17.1642 10.8358 16.75 11.25L12.5657 15.4343C12.2533 15.7467 11.7467 15.7467 11.4343 15.4343Z"
fill="currentColor"></path>
</svg>
</span>
<!--end::Svg Icon-->
<div class="fs-2 fw-bold counted" data-kt-countup="true" data-kt-countup-value="80"
data-kt-initialized="1">{{ data.totalEmployee|number_format(2, '.', ',') }}
</div>
</div>
<!--end::Number-->
<!--begin::Label-->
<div class="fw-semibold fs-6 text-gray-400">Nombre</div>
<!--end::Label-->
</div>
</div>
<!--end::Stats-->
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
<script>
window.startDate = '{{ startDate }}';
window.endDate = '{{ endDate }}';
var logDate = $('#logDate');
logDate.daterangepicker({
showDropdowns: true,
autoUpdateInput: true,
startDate: window.startDate,
endDate: window.endDate,
locale: {
format: "DD/MM/YYYY",
applyLabel: "Appliquer",
cancelLabel: "Annuler",
weekLabel: "W",
firstDay: 1,
}
});
logDate.on('apply.daterangepicker', function (ev, picker) {
let startDate = picker.startDate.format("DD/MM/YYYY");
let endDate = picker.endDate.format("DD/MM/YYYY");
$(this).val(picker.startDate.format('DD/MM/YYYY') + ' - ' + picker.endDate.format('DD/MM/YYYY'));
window.location.href = window.location.href.replace(/[\?#].*|$/, "?startDate=" + startDate + "&endDate=" + endDate);
});
logDate.on('cancel.daterangepicker', function (ev, picker) {
$(this).val(window.date);
});
</script>
{% endblock %}