Premier commit
This commit is contained in:
30
resources/views/municipalities/index.blade.php
Normal file
30
resources/views/municipalities/index.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<h2 class="mb-4">Communes de l'Agglomération</h2>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-3 g-4">
|
||||
@foreach($municipalities as $municipality)
|
||||
<div class="col">
|
||||
<div class="card h-100 shadow-sm hover-shadow">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ $municipality->name }}</h5>
|
||||
<p class="card-text text-muted">{{ $municipality->zip_code }}</p>
|
||||
</div>
|
||||
<div class="card-footer bg-white border-top-0">
|
||||
<a href="{{ route('municipalities.show', $municipality) }}" class="btn btn-primary w-100">Voir la fiche</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.hover-shadow:hover {
|
||||
box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
|
||||
transition: box-shadow 0.3s ease-in-out;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
90
resources/views/municipalities/show.blade.php
Normal file
90
resources/views/municipalities/show.blade.php
Normal file
@@ -0,0 +1,90 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="mb-4 d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<h2 class="mb-0">{{ $municipality->name }} <span class="text-muted fs-4">({{ $municipality->zip_code }})</span></h2>
|
||||
<p class="text-muted">Fiche de synthèse</p>
|
||||
</div>
|
||||
<a href="{{ route('municipalities.index') }}" class="btn btn-outline-secondary">
|
||||
<i class="bi bi-arrow-left"></i> Retour
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- M365 Statistics Card -->
|
||||
<div class="card shadow-sm mb-5 border-primary">
|
||||
<div class="card-header bg-primary text-white d-flex align-items-center">
|
||||
<i class="bi bi-microsoft fs-4 me-2"></i>
|
||||
<h5 class="mb-0">Licences Microsoft 365</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row text-center">
|
||||
@foreach($m365Stats as $level => $count)
|
||||
@if($count > 0)
|
||||
<div class="col-md-2 mb-3">
|
||||
<div class="p-3 border rounded bg-light">
|
||||
<div class="text-muted small text-uppercase fw-bold mb-1">{{ $level }}</div>
|
||||
<div class="fs-2 fw-bold text-primary">{{ $count }}</div>
|
||||
<div class="small text-muted">Licences</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@if(array_sum($m365Stats) == 0)
|
||||
<p class="text-center text-muted my-3">Aucune licence Microsoft 365 associée pour le moment.</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- All Contracts List -->
|
||||
<h4 class="mb-3">Liste des contrats</h4>
|
||||
|
||||
@if($contracts->isEmpty())
|
||||
<div class="alert alert-info">
|
||||
Aucun contrat associé à cette commune.
|
||||
</div>
|
||||
@else
|
||||
<div class="card shadow-sm">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Fournisseur</th>
|
||||
<th>Type</th>
|
||||
<th>État</th>
|
||||
<th>Date fin</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($contracts as $contract)
|
||||
<tr>
|
||||
<td>{{ $contract->name }}</td>
|
||||
<td>{{ $contract->provider }}</td>
|
||||
<td><span class="badge bg-secondary">{{ $contract->type }}</span></td>
|
||||
<td>
|
||||
@if($contract->status == 'active')
|
||||
<span class="badge bg-success">Actif</span>
|
||||
@elseif($contract->status == 'expired')
|
||||
<span class="badge bg-danger">Expiré</span>
|
||||
@else
|
||||
<span class="badge bg-warning text-dark">{{ $contract->status }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $contract->end_date ? $contract->end_date->format('d/m/Y') : '-' }}</td>
|
||||
<td>
|
||||
<a href="{{ route('contracts.show', $contract) }}" class="btn btn-sm btn-outline-primary">Voir</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user