feat: add Devis and BesoinInformatique modules
- Devis: CRUD complet, génération PDF (dompdf), paramètres (DevisSetting) - BesoinInformatique: CRUD complet avec gestion matériels/licences - Migrations pour les 3 nouvelles tables - Navigation mise à jour dans AuthenticatedLayout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
030d76af53
commit
7312c7640b
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('besoin_informatiques', function (Blueprint $table) {
|
||||
$table->id();
|
||||
// Entête
|
||||
$table->string('collectivite')->nullable();
|
||||
$table->string('nom_referent')->nullable();
|
||||
$table->text('descriptif_projet')->nullable();
|
||||
|
||||
// Service Support et Relations Usagers
|
||||
$table->json('materiels_support')->nullable(); // Liste PC / Portables / Ecran etc.
|
||||
$table->json('licences_bureautique')->nullable(); // Liste Licences Bureautique
|
||||
|
||||
// Infrastructures Système et Télécommunications
|
||||
$table->text('equipements_reseaux')->nullable();
|
||||
$table->text('cablage_reseau')->nullable();
|
||||
$table->text('telephonie_ip')->nullable();
|
||||
$table->text('nouveau_batiment')->nullable();
|
||||
|
||||
// Etudes Projets et Dématérialisation
|
||||
$table->text('logiciels_metiers')->nullable();
|
||||
$table->json('licences_projets')->nullable(); // Liste Renouvellement ou achat
|
||||
|
||||
// Validation
|
||||
$table->date('date_validation')->nullable();
|
||||
$table->string('validation_dgs')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('besoin_informatiques');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('devis', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('number')->unique();
|
||||
$table->string('title');
|
||||
$table->string('destinataire_type'); // 'commune', 'service_interne'
|
||||
$table->string('destinataire_nom');
|
||||
$table->string('referent')->nullable();
|
||||
$table->date('date_devis');
|
||||
$table->string('status')->default('draft'); // 'draft', 'sent', 'accepted', 'rejected'
|
||||
$table->json('items')->nullable(); // details of items (type, designation, quantity, unit_price, total_price)
|
||||
$table->decimal('total_ht', 15, 2)->default(0.00);
|
||||
$table->decimal('tva_rate', 5, 2)->default(20.00);
|
||||
$table->decimal('total_ttc', 15, 2)->default(0.00);
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('devis');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('devis_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('entity_name')->default("Direction des Systèmes d'Information");
|
||||
$table->string('entity_sub')->default("Communauté d'Agglomération Béziers Méditerranée");
|
||||
$table->string('email')->default("support.informatique@beziers-mediterranee.fr");
|
||||
$table->string('telephone')->default("04.67.01.60.00");
|
||||
$table->string('adresse')->nullable()->default("Béziers, France");
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
\DB::table('devis_settings')->insert([
|
||||
'entity_name' => "Direction des Systèmes d'Information",
|
||||
'entity_sub' => "Communauté d'Agglomération Béziers Méditerranée",
|
||||
'email' => "support.informatique@beziers-mediterranee.fr",
|
||||
'telephone' => "04.67.01.60.00",
|
||||
'adresse' => "Béziers, France",
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('devis_settings');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user