14 Commits

Author SHA1 Message Date
jeremy bayse
7c01803f46 feat: localize errors, translate profile, refine jobs UI 2026-05-08 12:20:30 +02:00
jeremy bayse
fd4a39a703 fix: update interview max score to 25 and recalculate weighted_score 2026-05-08 11:43:47 +02:00
jeremy bayse
29c274b23b feat: implement candidate security honeypots and redesign authenticated layout 2026-05-08 11:13:29 +02:00
mrKamoo
d076fd7d7a Add interactive map to visualize candidates provenance using Leaflet 2026-04-22 16:29:08 +02:00
mrKamoo
6f00da6d10 Enhance candidates management: add city field, drag-and-drop ranking persistence, AI analysis popover, and CV preview 2026-04-22 15:26:15 +02:00
jeremy bayse
174f229b5d Fix layout stability: sticky sidebar in Show and sticky filters in Index with layout height correction 2026-04-21 06:50:32 +02:00
jeremy bayse
2216de1a02 Refactoring AI candidate analysis: UI improvements, data normalization, provider management and real-time score clamping 2026-04-21 06:41:37 +02:00
jeremy bayse
abfe01190b feat: add AI service configuration and candidate dossier PDF template 2026-04-19 21:44:49 +02:00
jeremy bayse
d924765b94 feat(ai): refactor AI prompts and add bypass option to Job Positions 2026-04-19 21:24:56 +02:00
jeremy bayse
205c24182d feat: implementation des logs de connexion et correction du chemin de stockage des documents 2026-04-19 17:28:13 +02:00
jeremy bayse
f3d630d741 feat: implementation des dossiers candidats PDF, gestion des entretiens et optimisation de l'analyse IA 2026-04-19 15:35:16 +02:00
jeremy bayse
4017e3d9c5 feat(ai): optimize candidate analysis and implement batch processing 2026-04-19 08:28:28 +02:00
jeremy bayse
b728686605 docs: generate comprehensive README.md with project features 2026-04-18 08:41:55 +02:00
jeremy bayse
589e9956f9 UI: lock application to light mode globally (disabled dark mode detection) 2026-04-16 19:16:48 +02:00
90 changed files with 9266 additions and 1815 deletions

109
.claude/settings.local.json Normal file
View File

@@ -0,0 +1,109 @@
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(npm --version)",
"Bash(npx --version)",
"Bash(npx --yes create-next-app@latest . --typescript --tailwind --app --src-dir --import-alias \"@/*\" --use-npm --eslint --no-turbopack --yes)",
"Bash(npm install *)",
"Bash(npx prisma *)",
"Bash(curl -s -o /dev/null -w '%{http_code}' http://localhost:3000__TRACKED_VAR__)",
"Bash(curl -s -X POST http://localhost:3000/api/readings -H \"Content-Type: application/json\" -d '{\"moment\":\"FASTING\",\"value\":1.05,\"notes\":\"Test smoke\"}')",
"Bash(curl -s \"http://localhost:3000/api/stats\")",
"Bash(curl -s -X DELETE http://localhost:3000/api/readings/91)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" http://localhost:3000/api/export)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" http://localhost:3000/profil)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" http://localhost:3000/api/patient)",
"Bash(curl -s -X PUT http://localhost:3000/api/patient -H \"Content-Type: application/json\" -d '{\"firstName\":\"Jeremy\",\"lastName\":\"Bayse\",\"email\":\"jeremy.bayse@gmail.com\",\"birthDate\":\"1985-06-15\",\"heightCm\":180,\"weightKg\":78.5}')",
"Bash(curl -s http://localhost:3000/api/patient)",
"Bash(taskkill //PID 40172 //F)",
"Bash(curl -s -o /dev/null -w \"GET /profil %{http_code}\\\\n\" http://localhost:3000/profil)",
"Bash(curl -s -o /dev/null -w \"GET /api/patient %{http_code}\\\\n\" http://localhost:3000/api/patient)",
"Bash(curl -s http://localhost:3000/)",
"Bash(curl -s -X PUT http://localhost:3000/api/patient -H \"Content-Type: application/json\" -d '{\"firstName\":\"Jeremy\",\"lastName\":\"Bayse\",\"email\":\"jeremy.bayse@gmail.com\",\"birthDate\":\"1985-06-15\",\"heightCm\":180,\"weightKg\":78.5,\"sex\":\"M\",\"diabetesType\":\"TYPE_2\",\"treatment\":\"Metformine 1000 mg matin et soir\"}')",
"Bash(curl -s -X PUT http://localhost:3000/api/patient -H \"Content-Type: application/json\" -d '{\"firstName\":\"Jeremy\",\"lastName\":\"Bayse\",\"sex\":\"INVALID\"}')",
"Bash(curl -s http://localhost:3000/profil)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" http://localhost:3001/profil)",
"Bash(curl -s -X PUT http://localhost:3001/api/patient -H \"Content-Type: application/json\" -d '{\"firstName\":\"Jeremy\",\"lastName\":\"Bayse\",\"email\":\"jeremy.bayse@gmail.com\",\"birthDate\":\"1985-06-15\",\"heightCm\":180,\"weightKg\":78.5,\"sex\":\"M\",\"diabetesType\":\"TYPE_2\",\"treatment\":\"Metformine 1000 mg matin et soir\"}')",
"Bash(curl -s http://localhost:3001/api/patient)",
"Bash(curl -s http://localhost:3001/)",
"Bash(grep -oE \"Diab.{1,30}\")",
"Bash(taskkill //PID 37932 //F)",
"Bash(curl -s -X POST http://localhost:3001/api/chat -H \"Content-Type: application/json\" -d '{\"message\":\"Bonjour, comment se passe mon suivi cette semaine ?\",\"history\":[]}' --max-time 30)",
"Bash(curl -s \"https://generativelanguage.googleapis.com/v1beta/models?key=AIzaSyD7ltywmUmEooMOBiMkfyhQygCEU06LbR4\")",
"Bash(curl -s -X POST \"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=AIzaSyD7ltywmUmEooMOBiMkfyhQygCEU06LbR4\" -H \"Content-Type: application/json\" -d '{\"contents\":[{\"parts\":[{\"text\":\"Dis bonjour en une phrase.\"}]}]}')",
"Bash(curl -s -X POST \"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=AIzaSyD7ltywmUmEooMOBiMkfyhQygCEU06LbR4\" -H \"Content-Type: application/json\" -d '{\"contents\":[{\"parts\":[{\"text\":\"Dis bonjour en une phrase.\"}]}]}')",
"Bash(curl -s -X POST http://localhost:3001/api/chat -H \"Content-Type: application/json\" -d '{\"message\":\"Comment se passe mon suivi cette semaine ?\",\"history\":[]}' --max-time 30)",
"Bash(curl -s http://localhost:3001/api/daily-analysis --max-time 30)",
"Bash(taskkill //PID 42196 //F)",
"Bash(curl -s http://localhost:3001/api/daily-analysis --max-time 35)",
"Bash(curl -s http://localhost:3001/api/daily-analysis --max-time 10)",
"Bash(python -c \"import sys,json; d=json.load\\(sys.stdin\\); print\\('fresh:', d.get\\('fresh'\\), '| generatedAt:', d.get\\('generatedAt'\\)\\)\")",
"Bash(taskkill //PID 33804 //F)",
"Bash(curl -s http://localhost:3000/mobile)",
"Bash(curl -s http://localhost:3001/mobile)",
"Bash(npx tsc *)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3000/)",
"Bash(curl -s http://localhost:3001/dashboard)",
"Bash(curl -sv http://localhost:3001/dashboard)",
"Bash(python3 -c \"import sys; data=sys.stdin.read\\(\\); print\\(data[data.find\\('Error'\\):data.find\\('Error'\\)+500] if 'Error' in data else data[:500]\\)\")",
"Bash(node -e \"console.log\\(require\\('./node_modules/next/package.json'\\).version\\)\")",
"Bash(rm -rf .next)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3001/)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3001/dashboard)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3002/)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3002/dashboard)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3002/auth/login)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3002/pricing)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3002/auth/register)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3002/auth/verify-pending)",
"Bash(taskkill //F //IM node.exe)",
"Bash(curl -s -X POST http://localhost:3000/api/auth/register -H 'Content-Type: application/json' -d '{\"name\":\"Test User\",\"email\":\"test@test.com\",\"password\":\"password123\"}')",
"Bash(curl -s -X POST http://localhost:3000/api/auth/register -H 'Content-Type: application/json' -d '{\"name\":\"Jean Dupont\",\"email\":\"jean__CMDSUB_OUTPUT__@example.com\",\"password\":\"motdepasse123\"}')",
"mcp__Claude_in_Chrome__tabs_context_mcp",
"mcp__Claude_in_Chrome__browser_batch",
"mcp__Claude_in_Chrome__switch_browser",
"mcp__Claude_in_Chrome__list_connected_browsers",
"mcp__Claude_in_Chrome__select_browser",
"Bash(taskkill /F /IM node.exe)",
"PowerShell(Stop-Process -Name node -Force -ErrorAction SilentlyContinue)",
"Bash(curl -s http://localhost:3000/pricing)",
"Bash(cat)",
"Bash(chmod +x test-stripe.sh)",
"Bash(./test-stripe.sh)",
"Bash(curl -s http://localhost:3000/pricing -X POST -H \"Content-Type: application/json\")",
"Bash(pkill -9 node)",
"mcp__Claude_in_Chrome__navigate",
"mcp__Claude_in_Chrome__computer",
"mcp__Claude_in_Chrome__form_input",
"Bash(sqlite3 prisma/dev.db \"SELECT id, email, plan FROM User LIMIT 5;\")",
"Bash(node -e ' *)",
"Bash(npm exec *)",
"Bash(node test-cancel-subscription.mjs)",
"Bash(pkill -f \"next dev\")",
"mcp__Claude_in_Chrome__find",
"Bash(curl -s http://localhost:3000)",
"Bash(node add_readings.js)",
"mcp__Claude_in_Chrome__read_network_requests",
"mcp__Claude_in_Chrome__read_console_messages",
"Bash(taskkill /PID 54104 /F)",
"Bash(file ~/Downloads/rapport_glycemie*.pdf)",
"Bash(pdftotext ~/Downloads/rapport_glycemie_2026-04*.pdf -)",
"Bash(node /tmp/check_pdf.js)",
"Bash(tasklist)",
"Bash(curl -s http://localhost:3000/dashboard/rapports -c /tmp/cookies.txt)",
"Bash(curl -s \"http://localhost:3000/api/reports/generate-pdf?month=2026-04-01\" -H \"Cookie: $\\(curl -s http://localhost:3000/dashboard/rapports -c /tmp/cookies.txt)",
"Bash(grep -o '[^ ]*$')",
"Bash(chmod +x /tmp/deploy-setup.sh)",
"Bash(git remote *)",
"Bash(git add *)",
"Bash(git commit -m ' *)",
"Bash(git push *)",
"Bash(tar -czf diabetix-build.tar.gz .next/ node_modules/ package.json package-lock.json public/ prisma/ src/ .env.production next.config.js tsconfig.json)",
"Bash(rm diabetix-build.tar.gz)",
"Bash(tar -czf diabetix-build.tar.gz .next/ node_modules/ package.json package-lock.json public/ prisma/schema.prisma prisma/migrations/ src/ next.config.ts tsconfig.json)",
"Bash(scp diabetix-build.tar.gz root@192.168.20.28:/tmp/)",
"Bash(sshpass -p \"Lucas1978!\" scp -o StrictHostKeyChecking=no diabetix-build.tar.gz root@192.168.20.28:/tmp/)"
]
}
}

View File

@@ -1,65 +0,0 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database
# PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12
LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
CACHE_STORE=database
# CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}"

5
.gitignore vendored
View File

@@ -22,3 +22,8 @@
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
Thumbs.db Thumbs.db
# Debug & temporary scripts (never commit these)
fix_*.php
test-*.php
scratch/

View File

@@ -1,58 +1,79 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p> # 🚀 RecruIT - QuizzCabm
<p align="center"> **RecruIT** (also known as QuizzCabm) is a high-performance, multi-tenant SaaS application designed to streamline and revolutionize the recruitment process through automated assessments, AI analysis, and data-driven decision making.
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
## About Laravel ## ✨ Main Features
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: ### 🏢 Multi-Tenant Architecture
* **Organizational Isolation**: Manage multiple independent companies (tenants) within a single instance.
* **Custom Environments**: Each tenant has its own isolated set of candidates, job positions, and quizzes.
- [Simple, fast routing engine](https://laravel.com/docs/routing). ### 👤 Advanced Candidate Management
- [Powerful dependency injection container](https://laravel.com/docs/container). * **Centralized Tracking**: Monitor candidate progression from application to final selection.
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. * **Rich Profiles**: Linked profiles with CVs, LinkedIn URLs, phone numbers, and internal recruiter notes.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). * **Status Management**: Dynamic statuses and a selection toggle (`is_selected`) for "Shortlisted" candidates.
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, powerful, and provides tools required for large, robust applications. ### 🎓 Dynamic Quiz System
* **Automated Skill Assessment**: Create and manage customizable quizzes for specific job positions.
* **Real-time Scoring**: Automatic calculation of quiz scores with support for manual adjusted scoring if needed.
* **Attempt Tracking**: Monitor when candidates start and finish their assessments.
## Learning Laravel ### 🤖 AI-Powered Analysis
* **Automated Screening**: Integrated AI analysis to evaluate candidate profiles and documents.
* **Smart Insights**: Get data-driven summaries of candidate strengths and weaknesses.
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. ### 📊 Precision Scoring System
* **Weighted Global Score**: A proprietary algorithm calculates a score out of 20 by balancing:
* **CV Evaluation** (20 pts)
* **Motivation** (10 pts)
* **Interview Performance** (30 pts)
* **Best Quiz Attempt** (20 pts)
* **Comparative Dashboard**: Visual tools to compare candidates side-by-side.
In addition, [Laracasts](https://laracasts.com) contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. ### 🛠️ Administrative Excellence
* **Dashboard Analytics**: High-level statistics on candidate throughput, average scores, and top performers.
* **User & Role Management**: Secure access control for administrators and recruiters.
* **Data Integrity**: Built-in backup systems and audit logs of administrative actions.
You can also watch bite-sized lessons with real-world projects on [Laravel Learn](https://laravel.com/learn), where you will be guided through building a Laravel application from scratch while learning PHP fundamentals. ## 💻 Tech Stack
## Agentic Development * **Backend**: [Laravel 13+](https://laravel.com) (PHP 8.3+)
* **Frontend**: [Vue 3](https://vuejs.org/) via [Inertia.js](https://inertiajs.com/)
* **Styling**: [Tailwind CSS](https://tailwindcss.com/)
* **Interactivity**: [Ziggy](https://github.com/tighten/ziggy) for Laravel routing in JS
* **Parsing**: [PDFParser](https://www.pdfparser.org/) for automated document reading
Laravel's predictable structure and conventions make it ideal for AI coding agents like Claude Code, Cursor, and GitHub Copilot. Install [Laravel Boost](https://laravel.com/docs/ai) to supercharge your AI workflow: ## 🚀 Getting Started
```bash ### Prerequisites
composer require laravel/boost --dev * PHP 8.3+
* Composer
* Node.js & NPM
php artisan boost:install ### Installation
```
Boost provides your agent 15+ tools and skills that help agents build Laravel applications while following best practices. 1. **Clone the repository**
```bash
git clone <repository-url>
cd QuizzCabm
```
## Contributing 2. **Run Initialization Script**
RecruIT comes with a built-in setup command:
```bash
composer run setup
```
*This command will install dependencies (PHP & NPM), generate the application key, run migrations, and build assets.*
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). 3. **Environment Configuration**
Edit your `.env` file to configure your database and other service providers.
## Code of Conduct 4. **Start the Development Server**
```bash
composer run dev
```
*This starts the Laravel server, Vite dev server, and the queue listener concurrently.*
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). ## 📜 License
## Security Vulnerabilities This project is licensed under the MIT License.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
use App\Models\LoginLog;
#[Signature('app:cleanup-login-logs')]
#[Description('Supprime les logs de connexion datant de plus de 1 mois')]
class CleanupLoginLogs extends Command
{
/**
* Execute the console command.
*/
public function handle()
{
$count = LoginLog::where('login_at', '<', now()->subMonth())->delete();
$this->info("{$count} logs de connexion supprimés.");
}
}

View File

@@ -23,8 +23,8 @@ class AIAnalysisController extends Controller
} }
// Restriction: Une analyse tous les 7 jours maximum par candidat // Restriction: Une analyse tous les 7 jours maximum par candidat
// Le super_admin peut outrepasser cette restriction via le paramètre 'force' // Tout admin peut outrepasser cette restriction s'il utilise l'option 'force'
$shouldCheckRestriction = !($request->force && auth()->user()->isSuperAdmin()); $shouldCheckRestriction = !$request->input('force', false);
if ($shouldCheckRestriction && $candidate->ai_analysis && isset($candidate->ai_analysis['analyzed_at'])) { if ($shouldCheckRestriction && $candidate->ai_analysis && isset($candidate->ai_analysis['analyzed_at'])) {
$lastAnalysis = Carbon::parse($candidate->ai_analysis['analyzed_at']); $lastAnalysis = Carbon::parse($candidate->ai_analysis['analyzed_at']);

View File

@@ -0,0 +1,131 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Candidate;
use Barryvdh\DomPDF\Facade\Pdf;
use Illuminate\Http\Request;
class CandidateExportController extends Controller
{
public function exportDossier(Candidate $candidate)
{
$candidate->load([
'user',
'jobPosition',
'tenant',
'attempts.quiz.questions',
'attempts.answers.option',
'attempts.answers.question',
'documents'
]);
$filename = 'Dossier_' . str_replace(' ', '_', $candidate->user->name) . '_' . date('Ymd') . '.pdf';
// 1. Generate Main Report with DomPDF
$pdfReport = Pdf::loadView('pdfs.candidate-dossier', [
'candidate' => $candidate
]);
$reportBinary = $pdfReport->output();
// 2. Setup FPDI for merging
$mergedPdf = new \setasign\Fpdi\Fpdi();
// Add Main Report Pages
$reportTmp = tempnam(sys_get_temp_dir(), 'pdf_report_');
file_put_contents($reportTmp, $reportBinary);
try {
$pageCount = $mergedPdf->setSourceFile($reportTmp);
for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) {
$templateId = $mergedPdf->importPage($pageNo);
$size = $mergedPdf->getTemplateSize($templateId);
$mergedPdf->AddPage($size['orientation'], [$size['width'], $size['height']]);
$mergedPdf->useTemplate($templateId);
}
} catch (\Exception $e) {
\Log::error('FPDI Error on report: ' . $e->getMessage());
}
@unlink($reportTmp);
// 3. Append Candidate Documents (CV, Letter)
foreach ($candidate->documents as $doc) {
if (\Storage::disk('local')->exists($doc->file_path)) {
$filePath = \Storage::disk('local')->path($doc->file_path);
try {
$pageCount = $mergedPdf->setSourceFile($filePath);
for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) {
$templateId = $mergedPdf->importPage($pageNo);
$size = $mergedPdf->getTemplateSize($templateId);
$mergedPdf->AddPage($size['orientation'], [$size['width'], $size['height']]);
$mergedPdf->useTemplate($templateId);
}
} catch (\Exception $e) {
\Log::warning('Could not merge document ID ' . $doc->id . ': ' . $e->getMessage());
// Add a professional placeholder page for unmergable documents
$mergedPdf->AddPage('P', 'A4');
$mergedPdf->SetFont('Arial', 'B', 16);
$mergedPdf->SetTextColor(0, 79, 130); // Primary color
$mergedPdf->Ln(50);
$mergedPdf->Cell(0, 20, utf8_decode("DOCUMENT JOINT : " . strtoupper($doc->type)), 0, 1, 'C');
$mergedPdf->SetFont('Arial', 'I', 12);
$mergedPdf->Cell(0, 10, utf8_decode($doc->original_name), 0, 1, 'C');
$mergedPdf->Ln(30);
$mergedPdf->SetFont('Arial', '', 11);
$mergedPdf->SetTextColor(100, 100, 100);
$mergedPdf->MultiCell(0, 8, utf8_decode("Ce document n'a pas pu être fusionné automatiquement au dossier car son format est trop récent (PDF 1.5+).\n\nPour garantir l'intégrité de la mise en page, veuillez consulter ce document séparément via l'interface du tableau de bord candidat."), 0, 'C');
$mergedPdf->Ln(20);
$mergedPdf->SetDrawColor(224, 176, 76); // Highlight color
$mergedPdf->Line(60, $mergedPdf->GetY(), 150, $mergedPdf->GetY());
}
}
}
return response($mergedPdf->Output('S'), 200, [
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="' . $filename . '"',
'Cache-Control' => 'no-cache, no-store, must-revalidate',
'Pragma' => 'no-cache',
'Expires' => '0',
]);
}
public function exportZip(Candidate $candidate)
{
$candidate->load(['user', 'jobPosition', 'tenant', 'attempts.quiz.questions', 'attempts.answers.option', 'attempts.answers.question', 'documents']);
$baseName = 'Dossier_' . str_replace(' ', '_', $candidate->user->name) . '_' . date('Ymd');
$zipPath = tempnam(sys_get_temp_dir(), 'candidate_zip_');
$zip = new \ZipArchive();
if ($zip->open($zipPath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE) !== true) {
return back()->with('error', 'Impossible de créer le fichier ZIP.');
}
// 1. Add the main report (Rapport CABM)
$pdfReport = Pdf::loadView('pdfs.candidate-dossier', [
'candidate' => $candidate
]);
$zip->addFromString($baseName . '/Rapport_Synthese_CABM.pdf', $pdfReport->output());
// 2. Add original documents
foreach ($candidate->documents as $doc) {
if (\Storage::disk('local')->exists($doc->file_path)) {
$content = \Storage::disk('local')->get($doc->file_path);
// Sanitize original name or use type
$ext = pathinfo($doc->original_name, PATHINFO_EXTENSION);
$fileName = strtoupper($doc->type) . '_' . $doc->original_name;
$zip->addFromString($baseName . '/Documents_Originaux/' . $fileName, $content);
}
}
$zip->close();
return response()->download($zipPath, $baseName . '.zip')->deleteFileAfterSend(true);
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\LoginLog;
use Inertia\Inertia;
class LoginLogController extends Controller
{
public function index()
{
if (!auth()->user()->isSuperAdmin()) {
abort(403, 'Unauthorized. Super Admin only.');
}
$logs = LoginLog::with('user.tenant')
->orderBy('login_at', 'desc')
->paginate(50);
return Inertia::render('Admin/Logs', [
'logs' => $logs
]);
}
}

View File

@@ -0,0 +1,55 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class CandidateHoneypotController extends Controller
{
public function logDirectoryTraversal(Request $request)
{
$this->logSecurityAlert('directory_traversal', $request);
// Fausse réponse pour faire croire que le serveur est vulnérable
return response(
"<html><body><h1>Index of /documents/private</h1><ul><li><a href='../'>../</a></li><li><a href='reponses_tests_2026.pdf'>reponses_tests_2026.pdf</a></li><li><a href='backup_db.sql'>backup_db.sql</a></li></ul></body></html>",
200
)->header('Content-Type', 'text/html');
}
public function logMassAssignment(Request $request)
{
$this->logSecurityAlert('mass_assignment', $request);
// Faire croire que l'opération a réussi mais renvoyer une erreur 403 discrètement
return response()->json([
'status' => 'success',
'message' => 'Profil mis à jour.',
'debug' => 'Attempt logged.'
], 403);
}
public function downloadFakeFile(Request $request, $filename)
{
$this->logSecurityAlert('file_exfiltration', $request, ['filename' => $filename]);
// Faux contenu
$content = "Ceci est un honeypot de sécurité. Votre action a été journalisée.";
return response($content, 200)
->header('Content-Type', 'text/plain')
->header('Content-Disposition', 'attachment; filename="' . $filename . '"');
}
private function logSecurityAlert(string $type, Request $request, array $extraPayload = [])
{
\App\Models\SecurityAlert::create([
'user_id' => auth()->id(),
'type' => $type,
'endpoint' => $request->path(),
'payload' => array_merge($request->all(), $extraPayload),
'ip_address' => $request->ip(),
'user_agent' => $request->userAgent(),
]);
}
}

View File

@@ -90,12 +90,23 @@ class AttemptController extends Controller
public function saveAnswer(Request $request, Attempt $attempt) public function saveAnswer(Request $request, Attempt $attempt)
{ {
// Security: Verify the authenticated user owns this attempt
$candidate = auth()->user()->candidate;
if (!$candidate || $attempt->candidate_id !== $candidate->id) {
abort(403, 'You are not authorized to submit answers for this attempt.');
}
$request->validate([ $request->validate([
'question_id' => 'required|exists:questions,id', 'question_id' => 'required|exists:questions,id',
'option_id' => 'nullable|exists:options,id', 'option_id' => 'nullable|exists:options,id',
'text_content' => 'nullable|string', 'text_content' => 'nullable|string',
]); ]);
// Extra guard: prevent answering a finished attempt
if ($attempt->finished_at) {
return response()->json(['error' => 'This attempt is already finished.'], 403);
}
Answer::updateOrCreate( Answer::updateOrCreate(
[ [
'attempt_id' => $attempt->id, 'attempt_id' => $attempt->id,
@@ -112,6 +123,12 @@ class AttemptController extends Controller
public function finish(Attempt $attempt) public function finish(Attempt $attempt)
{ {
// Security: Verify the authenticated user owns this attempt
$candidate = auth()->user()->candidate;
if (!$candidate || $attempt->candidate_id !== $candidate->id) {
abort(403, 'You are not authorized to finish this attempt.');
}
if ($attempt->finished_at) { if ($attempt->finished_at) {
return redirect()->route('dashboard'); return redirect()->route('dashboard');
} }
@@ -132,7 +149,7 @@ class AttemptController extends Controller
$this->authorizeAdmin(); $this->authorizeAdmin();
$request->validate([ $request->validate([
'score' => 'required|numeric|min:0' 'score' => 'required|numeric|min:0|max:' . $answer->question->points
]); ]);
$answer->update(['score' => $request->score]); $answer->update(['score' => $request->score]);

View File

@@ -11,6 +11,11 @@ class BackupController extends Controller
{ {
public function download() public function download()
{ {
// Security: Only super admins can download backups containing all tenant data
if (!auth()->user()->isSuperAdmin()) {
abort(403, 'Seuls les super administrateurs peuvent télécharger des sauvegardes.');
}
$databaseName = env('DB_DATABASE'); $databaseName = env('DB_DATABASE');
$userName = env('DB_USERNAME'); $userName = env('DB_USERNAME');
$password = env('DB_PASSWORD'); $password = env('DB_PASSWORD');

View File

@@ -39,6 +39,57 @@ class CandidateController extends Controller
]); ]);
} }
public function selectedCandidates()
{
$candidates = Candidate::with(['user', 'jobPosition', 'attempts.quiz', 'documents'])
->where('is_selected', true)
->orderBy('sort_order')
->get()
->map(function($candidate) {
$candidate->weighted_score = $candidate->weighted_score;
return $candidate;
});
return \Inertia\Inertia::render('Admin/Candidates/Selected', [
'candidates' => $candidates
]);
}
public function map()
{
$candidates = Candidate::with(['user', 'jobPosition'])
->whereNotNull('city')
->where('city', '!=', '')
->get()
->map(function($c) {
return [
'id' => $c->id,
'name' => $c->user->name,
'city' => $c->city,
'job' => $c->jobPosition?->title,
'score' => $c->weighted_score
];
});
return \Inertia\Inertia::render('Admin/Candidates/Map', [
'candidates' => $candidates
]);
}
public function updateOrder(Request $request)
{
$request->validate([
'ids' => 'required|array',
'ids.*' => 'exists:candidates,id',
]);
foreach ($request->ids as $index => $id) {
Candidate::where('id', $id)->update(['sort_order' => $index]);
}
return back()->with('success', 'Classement enregistré.');
}
public function store(Request $request) public function store(Request $request)
{ {
$request->validate([ $request->validate([
@@ -46,6 +97,7 @@ class CandidateController extends Controller
'email' => 'required|string|email|max:255|unique:users', 'email' => 'required|string|email|max:255|unique:users',
'phone' => 'nullable|string|max:20', 'phone' => 'nullable|string|max:20',
'linkedin_url' => 'nullable|url|max:255', 'linkedin_url' => 'nullable|url|max:255',
'city' => 'nullable|string|max:255',
'cv' => 'nullable|mimes:pdf|max:5120', 'cv' => 'nullable|mimes:pdf|max:5120',
'cover_letter' => 'nullable|mimes:pdf|max:5120', 'cover_letter' => 'nullable|mimes:pdf|max:5120',
'tenant_id' => 'nullable|exists:tenants,id', 'tenant_id' => 'nullable|exists:tenants,id',
@@ -65,6 +117,7 @@ class CandidateController extends Controller
$candidate = $user->candidate()->create([ $candidate = $user->candidate()->create([
'phone' => $request->phone, 'phone' => $request->phone,
'linkedin_url' => $request->linkedin_url, 'linkedin_url' => $request->linkedin_url,
'city' => $request->city,
'status' => 'en_attente', 'status' => 'en_attente',
'tenant_id' => auth()->user()->isSuperAdmin() ? $request->tenant_id : auth()->user()->tenant_id, 'tenant_id' => auth()->user()->isSuperAdmin() ? $request->tenant_id : auth()->user()->tenant_id,
'job_position_id' => $request->job_position_id, 'job_position_id' => $request->job_position_id,
@@ -79,7 +132,7 @@ class CandidateController extends Controller
public function show(Candidate $candidate) public function show(Candidate $candidate)
{ {
$candidate->load([ $candidate->load([
'user', 'user.securityAlerts',
'documents', 'documents',
'jobPosition', 'jobPosition',
'tenant' 'tenant'
@@ -103,12 +156,12 @@ class CandidateController extends Controller
'jobPositions' => \App\Models\JobPosition::all(), 'jobPositions' => \App\Models\JobPosition::all(),
'ai_config' => [ 'ai_config' => [
'default' => env('AI_DEFAULT_PROVIDER', 'ollama'), 'default' => env('AI_DEFAULT_PROVIDER', 'ollama'),
'enabled_providers' => array_filter([ 'providers' => array_keys(array_filter([
'ollama' => true, // Toujours dispo car local ou simulé 'ollama' => true,
'openai' => !empty(env('OPENAI_API_KEY')), 'openai' => !empty(env('OPENAI_API_KEY')),
'anthropic' => !empty(env('ANTHROPIC_API_KEY')), 'anthropic' => !empty(env('ANTHROPIC_API_KEY')),
'gemini' => !empty(env('GEMINI_API_KEY')), 'gemini' => !empty(env('GEMINI_API_KEY')),
], function($v) { return $v; }) ])),
] ]
]; ];
@@ -139,8 +192,21 @@ class CandidateController extends Controller
$request->validate([ $request->validate([
'cv' => 'nullable|file|mimes:pdf|max:5120', 'cv' => 'nullable|file|mimes:pdf|max:5120',
'cover_letter' => 'nullable|file|mimes:pdf|max:5120', 'cover_letter' => 'nullable|file|mimes:pdf|max:5120',
'name' => 'nullable|string|max:255',
'email' => 'nullable|string|email|max:255|unique:users,email,' . $candidate->user_id,
'phone' => 'nullable|string|max:255',
'linkedin_url' => 'nullable|url|max:255',
'city' => 'nullable|string|max:255',
]); ]);
// Update User info if name or email present
if ($request->has('name') || $request->has('email')) {
$candidate->user->update($request->only(['name', 'email']));
}
// Update Candidate info
$candidate->update($request->only(['phone', 'linkedin_url', 'city']));
if ($request->hasFile('cv')) { if ($request->hasFile('cv')) {
$this->replaceDocument($candidate, $request->file('cv'), 'cv'); $this->replaceDocument($candidate, $request->file('cv'), 'cv');
} }
@@ -149,20 +215,24 @@ class CandidateController extends Controller
$this->replaceDocument($candidate, $request->file('cover_letter'), 'cover_letter'); $this->replaceDocument($candidate, $request->file('cover_letter'), 'cover_letter');
} }
return back()->with('success', 'Documents mis à jour avec succès.'); return back()->with('success', 'Profil mis à jour avec succès.');
} }
public function updateNotes(Request $request, Candidate $candidate) public function updateNotes(Request $request, Candidate $candidate)
{ {
$request->validate([ $request->validate([
'notes' => 'nullable|string', 'notes' => 'nullable|string',
'interview_details' => 'nullable|array',
'interview_score' => 'nullable|numeric|min:0|max:25',
]); ]);
$candidate->update([ $candidate->update([
'notes' => $request->notes, 'notes' => $request->notes,
'interview_details' => $request->interview_details,
'interview_score' => $request->has('interview_score') ? $request->interview_score : $candidate->interview_score,
]); ]);
return back()->with('success', 'Notes mises à jour avec succès.'); return back()->with('success', 'Entretien mis à jour avec succès.');
} }
public function updateScores(Request $request, Candidate $candidate) public function updateScores(Request $request, Candidate $candidate)
@@ -170,7 +240,7 @@ class CandidateController extends Controller
$request->validate([ $request->validate([
'cv_score' => 'nullable|numeric|min:0|max:20', 'cv_score' => 'nullable|numeric|min:0|max:20',
'motivation_score' => 'nullable|numeric|min:0|max:10', 'motivation_score' => 'nullable|numeric|min:0|max:10',
'interview_score' => 'nullable|numeric|min:0|max:30', 'interview_score' => 'nullable|numeric|min:0|max:25',
]); ]);
$candidate->update($request->only(['cv_score', 'motivation_score', 'interview_score'])); $candidate->update($request->only(['cv_score', 'motivation_score', 'interview_score']));
@@ -237,6 +307,8 @@ class CandidateController extends Controller
$this->storeDocument($candidate, $file, $type); $this->storeDocument($candidate, $file, $type);
} }
public function toggleSelection(Candidate $candidate) public function toggleSelection(Candidate $candidate)
{ {
$candidate->update([ $candidate->update([

View File

@@ -28,6 +28,7 @@ class JobPositionController extends Controller
'description' => 'required|string', 'description' => 'required|string',
'requirements' => 'nullable|array', 'requirements' => 'nullable|array',
'ai_prompt' => 'nullable|string', 'ai_prompt' => 'nullable|string',
'ai_bypass_base_prompt' => 'boolean',
'tenant_id' => 'nullable|exists:tenants,id', 'tenant_id' => 'nullable|exists:tenants,id',
'quiz_ids' => 'nullable|array', 'quiz_ids' => 'nullable|array',
'quiz_ids.*' => 'exists:quizzes,id', 'quiz_ids.*' => 'exists:quizzes,id',
@@ -38,6 +39,7 @@ class JobPositionController extends Controller
'description' => $request->description, 'description' => $request->description,
'requirements' => $request->requirements, 'requirements' => $request->requirements,
'ai_prompt' => $request->ai_prompt, 'ai_prompt' => $request->ai_prompt,
'ai_bypass_base_prompt' => $request->boolean('ai_bypass_base_prompt'),
'tenant_id' => auth()->user()->isSuperAdmin() ? $request->tenant_id : auth()->user()->tenant_id, 'tenant_id' => auth()->user()->isSuperAdmin() ? $request->tenant_id : auth()->user()->tenant_id,
]); ]);
@@ -55,6 +57,7 @@ class JobPositionController extends Controller
'description' => 'required|string', 'description' => 'required|string',
'requirements' => 'nullable|array', 'requirements' => 'nullable|array',
'ai_prompt' => 'nullable|string', 'ai_prompt' => 'nullable|string',
'ai_bypass_base_prompt' => 'boolean',
'tenant_id' => 'nullable|exists:tenants,id', 'tenant_id' => 'nullable|exists:tenants,id',
'quiz_ids' => 'nullable|array', 'quiz_ids' => 'nullable|array',
'quiz_ids.*' => 'exists:quizzes,id', 'quiz_ids.*' => 'exists:quizzes,id',
@@ -65,6 +68,7 @@ class JobPositionController extends Controller
'description' => $request->description, 'description' => $request->description,
'requirements' => $request->requirements, 'requirements' => $request->requirements,
'ai_prompt' => $request->ai_prompt, 'ai_prompt' => $request->ai_prompt,
'ai_bypass_base_prompt' => $request->boolean('ai_bypass_base_prompt'),
'tenant_id' => auth()->user()->isSuperAdmin() ? $request->tenant_id : auth()->user()->tenant_id, 'tenant_id' => auth()->user()->isSuperAdmin() ? $request->tenant_id : auth()->user()->tenant_id,
]); ]);

View File

@@ -0,0 +1,91 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\JobPosition;
use App\Models\Candidate;
use App\Models\User;
use App\Models\Document;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
use Inertia\Inertia;
use Illuminate\Support\Facades\Auth;
class PublicJobApplicationController extends Controller
{
public function index()
{
$jobs = JobPosition::with('tenant')->orderBy('created_at', 'desc')->get();
return Inertia::render('Public/Jobs/Index', [
'jobs' => $jobs
]);
}
public function show(JobPosition $jobPosition)
{
return Inertia::render('Public/Jobs/Show', [
'jobPosition' => $jobPosition
]);
}
public function store(Request $request, JobPosition $jobPosition)
{
$request->validate([
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'phone' => 'nullable|string|max:20',
'linkedin_url' => 'nullable|url|max:255',
'city' => 'nullable|string|max:255',
'cv' => 'nullable|mimes:pdf|max:5120',
'cover_letter' => 'nullable|mimes:pdf|max:5120',
]);
$password = Str::random(10);
$user = User::create([
'name' => $request->name,
'email' => $request->email,
'password' => Hash::make($password),
'role' => 'candidate',
'tenant_id' => $jobPosition->tenant_id,
]);
$candidate = $user->candidate()->create([
'phone' => $request->phone,
'linkedin_url' => $request->linkedin_url,
'city' => $request->city,
'status' => 'en_attente',
'tenant_id' => $jobPosition->tenant_id,
'job_position_id' => $jobPosition->id,
]);
if ($request->hasFile('cv')) {
$this->storeDocument($candidate, $request->file('cv'), 'cv');
}
if ($request->hasFile('cover_letter')) {
$this->storeDocument($candidate, $request->file('cover_letter'), 'cover_letter');
}
// Auto-login the candidate so they can take the quiz immediately if they want
Auth::login($user);
return redirect()->route('dashboard')->with('success', 'Votre candidature a bien été enregistrée. Voici votre mot de passe temporaire pour vous reconnecter : ' . $password);
}
private function storeDocument(Candidate $candidate, $file, string $type)
{
if (!$file) {
return;
}
$path = $file->store('private/documents/' . $candidate->id, 'local');
Document::create([
'candidate_id' => $candidate->id,
'type' => $type,
'file_path' => $path,
'original_name' => $file->getClientOriginalName(),
]);
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Listeners;
use Illuminate\Auth\Events\Login;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use App\Models\LoginLog;
use Illuminate\Http\Request;
class LogSuccessfulLogin
{
protected $request;
public function __construct(Request $request)
{
$this->request = $request;
}
public function handle(Login $event): void
{
LoginLog::create([
'user_id' => $event->user->id,
'ip_address' => $this->request->ip(),
'user_agent' => $this->request->userAgent(),
'login_at' => now(),
]);
}
}

View File

@@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Traits\BelongsToTenant; use App\Traits\BelongsToTenant;
#[Fillable(['user_id', 'job_position_id', 'phone', 'linkedin_url', 'status', 'is_selected', 'notes', 'cv_score', 'motivation_score', 'interview_score', 'ai_analysis', 'tenant_id'])] #[Fillable(['user_id', 'job_position_id', 'phone', 'linkedin_url', 'city', 'status', 'is_selected', 'sort_order', 'notes', 'cv_score', 'motivation_score', 'interview_score', 'interview_details', 'ai_analysis', 'tenant_id'])]
class Candidate extends Model class Candidate extends Model
{ {
use HasFactory, BelongsToTenant; use HasFactory, BelongsToTenant;
@@ -31,6 +31,7 @@ class Candidate extends Model
protected $casts = [ protected $casts = [
'ai_analysis' => 'array', 'ai_analysis' => 'array',
'is_selected' => 'boolean', 'is_selected' => 'boolean',
'interview_details' => 'array',
]; ];
public function jobPosition(): BelongsTo public function jobPosition(): BelongsTo
@@ -52,7 +53,7 @@ class Candidate extends Model
})->max() ?? 0; })->max() ?? 0;
$totalPoints = $cv + $motivation + $interview + $bestAttempt; $totalPoints = $cv + $motivation + $interview + $bestAttempt;
$maxPoints = 20 + 10 + 30 + 20; // Total potentiel = 80 $maxPoints = 20 + 10 + 25 + 20; // Total potentiel = 75
return round(($totalPoints / $maxPoints) * 20, 2); return round(($totalPoints / $maxPoints) * 20, 2);
} }

View File

@@ -9,13 +9,15 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Traits\BelongsToTenant; use App\Traits\BelongsToTenant;
#[Fillable(['title', 'description', 'requirements', 'ai_prompt', 'tenant_id'])] #[Fillable(['title', 'description', 'requirements', 'ai_prompt', 'ai_bypass_base_prompt', 'gemini_cache_id', 'gemini_cache_expires_at', 'tenant_id'])]
class JobPosition extends Model class JobPosition extends Model
{ {
use HasFactory, BelongsToTenant; use HasFactory, BelongsToTenant;
protected $casts = [ protected $casts = [
'requirements' => 'array', 'requirements' => 'array',
'ai_bypass_base_prompt' => 'boolean',
'gemini_cache_expires_at' => 'datetime',
]; ];
public function candidates(): HasMany public function candidates(): HasMany

16
app/Models/LoginLog.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Attributes\Fillable;
#[Fillable(['user_id', 'ip_address', 'user_agent', 'login_at'])]
class LoginLog extends Model
{
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SecurityAlert extends Model
{
protected $fillable = [
'user_id',
'type',
'endpoint',
'payload',
'ip_address',
'user_agent',
];
protected $casts = [
'payload' => 'array',
];
public function user()
{
return $this->belongsTo(User::class);
}
}

View File

@@ -42,6 +42,11 @@ class User extends Authenticatable
return $this->belongsTo(Tenant::class); return $this->belongsTo(Tenant::class);
} }
public function securityAlerts()
{
return $this->hasMany(SecurityAlert::class);
}
/** /**
* Get the attributes that should be cast. * Get the attributes that should be cast.
* *

View File

@@ -73,53 +73,174 @@ class AIAnalysisService
} }
/** /**
* Call the AI API (using a placeholder for now, or direct Http call). * Call the AI API.
*/ */
protected function callAI(Candidate $candidate, string $cvText, ?string $letterText, ?string $provider = null) protected function callAI(Candidate $candidate, string $cvText, ?string $letterText, ?string $provider = null)
{ {
$provider = $provider ?: env('AI_DEFAULT_PROVIDER', 'ollama'); $provider = $provider ?: env('AI_DEFAULT_PROVIDER', 'ollama');
$jobTitle = $candidate->jobPosition->title; $job = $candidate->jobPosition;
$jobDesc = $candidate->jobPosition->description;
$requirements = implode(", ", $candidate->jobPosition->requirements ?? []);
$prompt = "Tu es un expert en recrutement technique. Analyse le CV (et la lettre de motivation si présente) d'un candidat pour le poste de '{$jobTitle}' attache une grande importance aux compétences techniques et à l'expérience du candidat, mais aussi à sa capacité à s'intégrer dans une équipe et à sa motivation. // --- BYPASS LOGIC ---
if ($job->ai_bypass_base_prompt && !empty($job->ai_prompt)) {
$staticPrompt = $job->ai_prompt;
// We still append the JSON requirement to ensure the frontend doesn't crash,
// unless the user specifically asked for "pure" takeover.
// Most users want to control the "logic" not the "serialization format".
if (!str_contains(strtolower($staticPrompt), 'json')) {
$staticPrompt .= "\n\nRéponds UNIQUEMENT en JSON pur. Format attendu:\n" . config('ai.defaults.json_format');
}
} else {
// --- STANDARD LOGIC ---
// Base instructions from config
$baseInstruction = config('ai.defaults.base_instruction');
$jsonFormat = config('ai.defaults.json_format');
DESCRIPTION DU POSTE: $staticPrompt = "{$baseInstruction} Ton rôle est d'analyser le profil d'un candidat pour le poste de '{$job->title}'.\n\n";
{$jobDesc}
COMPÉTENCES REQUISES: $staticPrompt .= "DESCRIPTION DU POSTE:\n{$job->description}\n\n";
{$requirements}
CONTENU DU CV: if (!empty($job->requirements)) {
{$cvText} $staticPrompt .= "COMPÉTENCES REQUISES:\n" . implode(", ", $job->requirements) . "\n\n";
CONTENU DE LA LETTRE DE MOTIVATION: }
" . ($letterText ?? "Non fournie") . "
CONTEXTE ADDITIONNEL & INSTRUCTIONS PARTICULIÈRES: if (!$job->ai_prompt) {
" . ($candidate->jobPosition->ai_prompt ?? "Aucune instruction spécifique.") . " // Default generalist analysis instructions
$staticPrompt .= "CONSIGNES D'ANALYSE:\n" . config('ai.defaults.analysis_instructions') . "\n\n";
} else {
// Specific instructions from the job position
$staticPrompt .= "CONSIGNES D'ANALYSE SPÉCIFIQUES:\n" . $job->ai_prompt . "\n\n";
}
Fournis une analyse structurée en JSON avec les clés suivantes: $staticPrompt .= "FORMAT DE RÉPONSE ATTENDU:\n{$jsonFormat}\n";
- match_score: note de 0 à 100 }
- summary: résumé de 3-4 phrases sur le profil et la ville d'origine du candidat
- strengths: liste des points forts par rapport au poste
- gaps: liste des compétences manquantes ou points de vigilance
- verdict: une conclusion (Favorable, Très Favorable, Réservé, Défavorable)
Réponds UNIQUEMENT en JSON pur."; $staticPrompt .= "\nRéponds UNIQUEMENT en JSON pur, sans texte avant ou après. Assure-toi que le JSON est valide.";
// Dynamic Part: The candidate data (Not cached)
$dynamicPrompt = "CONTENU DU CV DU CANDIDAT:\n{$cvText}\n\nCONTENU DE LA LETTRE DE MOTIVATION:\n" . ($letterText ?? "Non fournie");
// Full prompt for providers not using context caching
$fullPrompt = $staticPrompt . "\n\n" . $dynamicPrompt;
$analysis = match ($provider) { $analysis = match ($provider) {
'openai' => $this->callOpenAI($prompt), 'openai' => $this->callOpenAI($fullPrompt),
'anthropic' => $this->callAnthropic($prompt), 'anthropic' => $this->callAnthropic($fullPrompt),
'gemini' => $this->callGemini($prompt), 'gemini' => $this->callGemini($dynamicPrompt, $staticPrompt, $job),
default => $this->callOllama($prompt), default => $this->callOllama($fullPrompt),
}; };
// Inject metadata for display and tracking // Normalize keys for frontend compatibility
$analysis['provider'] = $provider; $normalized = $this->normalizeAnalysis($analysis);
$analysis['analyzed_at'] = now()->toIso8601String();
return $analysis; // Inject metadata
$normalized['provider'] = $provider;
$normalized['analyzed_at'] = now()->toIso8601String();
return $normalized;
}
/**
* Normalize the AI response keys to ensure frontend compatibility.
*/
protected function normalizeAnalysis(array $data): array
{
$normalized = $data;
// Map custom keys to standard keys if they exist
if (isset($data['score_global']) && !isset($data['match_score'])) {
$normalized['match_score'] = $data['score_global'];
}
if (isset($data['score']) && !isset($data['match_score'])) {
$normalized['match_score'] = $data['score'];
}
if (isset($data['points_forts']) && !isset($data['strengths'])) {
$normalized['strengths'] = $data['points_forts'];
}
if (isset($data['points_faibles']) && !isset($data['gaps'])) {
$normalized['gaps'] = $data['points_faibles'];
}
if (isset($data['recommandation']) && !isset($data['verdict'])) {
$normalized['verdict'] = $data['recommandation'];
}
if (isset($data['synthese']) && !isset($data['summary'])) {
$normalized['summary'] = $data['synthese'];
}
// List-specific normalization (handle list of objects or strings)
$cleanList = function($list) {
if (!is_array($list)) return [];
return array_map(function($item) {
if (is_array($item)) {
$type = $item['type'] ?? $item['title'] ?? $item['category'] ?? null;
$desc = $item['description'] ?? $item['value'] ?? $item['content'] ?? null;
if ($type && $desc) return "{$type} : {$desc}";
if ($desc) return $desc;
if ($type) return $type;
return json_encode($item);
}
return (string) $item;
}, $list);
};
if (isset($normalized['strengths'])) {
$normalized['strengths'] = $cleanList($normalized['strengths']);
}
if (isset($normalized['gaps'])) {
$normalized['gaps'] = $cleanList($normalized['gaps']);
}
if (isset($normalized['elements_bloquants'])) {
$normalized['elements_bloquants'] = $cleanList($normalized['elements_bloquants']);
}
// Ensure match_score is a numeric value and handle common AI formatting quirks
if (isset($normalized['match_score'])) {
$scoreValue = $normalized['match_score'];
if (is_string($scoreValue)) {
// If AI returns something like "18/20", take the first part
if (str_contains($scoreValue, '/')) {
$scoreValue = explode('/', $scoreValue)[0];
}
// Convert comma to dot for European decimals
$scoreValue = str_replace(',', '.', $scoreValue);
// Keep only digits and the first decimal point
$scoreValue = preg_replace('/[^0-9.]/', '', $scoreValue);
}
$num = (float)$scoreValue;
// If the AI returned a ratio beneath 1 (e.g. 0.85 for 85%), scale it up
if ($num > 0 && $num < 1.1 && !is_int($normalized['match_score'])) {
// But be careful: a score of "1" might honestly be 1/100
// but 0.95 is almost certainly a ratio.
if ($num < 1 || str_contains((string)$normalized['match_score'], '.')) {
$num *= 100;
}
}
// Cap at 100
$normalized['match_score'] = (int) min(100, round($num));
}
// Ensure default keys exist even if empty
$normalized['match_score'] = $normalized['match_score'] ?? 0;
$normalized['summary'] = $normalized['summary'] ?? "Pas de résumé généré.";
$normalized['verdict'] = $normalized['verdict'] ?? "Indéterminé";
$normalized['strengths'] = $normalized['strengths'] ?? [];
$normalized['gaps'] = $normalized['gaps'] ?? [];
$normalized['scores_detailles'] = $normalized['scores_detailles'] ?? null;
$normalized['elements_bloquants'] = $normalized['elements_bloquants'] ?? [];
$normalized['questions_entretien_suggerees'] = $normalized['questions_entretien_suggerees'] ?? [];
return $normalized;
} }
protected function callOllama(string $prompt) protected function callOllama(string $prompt)
@@ -181,7 +302,7 @@ class AIAnalysisService
'content-type' => 'application/json' 'content-type' => 'application/json'
])->timeout(60)->post('https://api.anthropic.com/v1/messages', [ ])->timeout(60)->post('https://api.anthropic.com/v1/messages', [
'model' => 'claude-3-5-sonnet-20240620', 'model' => 'claude-3-5-sonnet-20240620',
'max_tokens' => 1024, 'max_tokens' => 2048,
'messages' => [['role' => 'user', 'content' => $prompt]] 'messages' => [['role' => 'user', 'content' => $prompt]]
]); ]);
@@ -196,29 +317,122 @@ class AIAnalysisService
return $this->getSimulatedAnalysis(); return $this->getSimulatedAnalysis();
} }
protected function callGemini(string $prompt) protected function callGemini(string $dynamicPrompt, ?string $staticPrompt = null, ?\App\Models\JobPosition $job = null)
{ {
$apiKey = env('GEMINI_API_KEY'); $apiKey = env('GEMINI_API_KEY');
if (!$apiKey) return $this->getSimulatedAnalysis(); if (!$apiKey) return $this->getSimulatedAnalysis();
// Models to try in order (Updated for 2026 models)
$models = [
'gemini-3.1-flash-lite-preview',
'gemini-3-flash-preview',
'gemini-1.5-flash-latest'
];
foreach ($models as $model) {
try { try {
$response = Http::timeout(60)->post("https://generativelanguage.googleapis.com/v1/models/gemini-2.5-flash:generateContent?key=" . $apiKey, [ $version = (str_contains($model, '2.0') || str_contains($model, '3.')) ? 'v1beta' : 'v1';
'contents' => [['parts' => [['text' => $prompt]]]] $url = "https://generativelanguage.googleapis.com/{$version}/models/{$model}:generateContent?key=" . $apiKey;
]);
$generationConfig = [
'temperature' => 0.2,
'responseMimeType' => 'application/json'
];
$payload = [
'generationConfig' => $generationConfig,
'contents' => [
['role' => 'user', 'parts' => [['text' => $dynamicPrompt]]]
]
];
// Attempt to use Context Caching if static prompt and job are provided
if ($staticPrompt && $job && $version === 'v1beta') {
$cacheId = $this->getOrCreateContextCache($job, $staticPrompt, $model);
if ($cacheId) {
$payload['cachedContent'] = $cacheId;
// When using cache, the static part is already in the cache
} else {
// Fallback: prepend static part if cache fails
$payload['contents'][0]['parts'][0]['text'] = $staticPrompt . "\n\n" . $dynamicPrompt;
}
} else if ($staticPrompt) {
// Non-cached fallback
$payload['contents'][0]['parts'][0]['text'] = $staticPrompt . "\n\n" . $dynamicPrompt;
}
$response = Http::timeout(60)->post($url, $payload);
if ($response->successful()) { if ($response->successful()) {
$text = $response->json('candidates.0.content.parts.0.text'); $candidate = $response->json('candidates.0');
return json_decode($this->extractJson($text), true); if (isset($candidate['finishReason']) && $candidate['finishReason'] !== 'STOP') {
Log::warning("Gemini warning: Analysis finished with reason " . $candidate['finishReason']);
}
$text = $candidate['content']['parts'][0]['text'] ?? null;
if ($text) {
$json = $this->extractJson($text);
$decoded = json_decode($json, true);
if ($decoded) return $decoded;
}
} else { } else {
Log::error("Gemini API Error: " . $response->status() . " - " . $response->body()); Log::error("Gemini API Error ($model): " . $response->status() . " - " . $response->body());
} }
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error("Gemini Connection Failed: " . $e->getMessage()); Log::error("Gemini Connection Failed ($model): " . $e->getMessage());
}
} }
return $this->getSimulatedAnalysis(); return $this->getSimulatedAnalysis();
} }
/**
* Get or create a Gemini Context Cache for a specific Job Position.
*/
protected function getOrCreateContextCache(\App\Models\JobPosition $job, string $staticPrompt, string $model)
{
if (strlen($staticPrompt) < 120000) {
return null;
}
// Check if we already have a valid cache for this job
if ($job->gemini_cache_id && $job->gemini_cache_expires_at && $job->gemini_cache_expires_at->isFuture()) {
// Basic verification: the cache is tied to a specific model
// We assume the stored cache is for the primary model
return $job->gemini_cache_id;
}
$apiKey = env('GEMINI_API_KEY');
try {
// Create Context Cache (TTL of 1 hour)
$response = Http::timeout(30)->post("https://generativelanguage.googleapis.com/v1beta/cachedContents?key=" . $apiKey, [
'model' => "models/{$model}",
'contents' => [
['role' => 'user', 'parts' => [['text' => $staticPrompt]]]
],
'ttl' => '3600s'
]);
if ($response->successful()) {
$cacheId = $response->json('name');
$job->update([
'gemini_cache_id' => $cacheId,
'gemini_cache_expires_at' => now()->addHour()
]);
return $cacheId;
}
// Log l'erreur pour comprendre pourquoi le cache a été refusé
Log::warning("Gemini Cache Refused: " . $response->body());
} catch (\Exception $e) {
Log::error("Gemini Cache Lifecycle Error: " . $e->getMessage());
}
return null;
}
private function extractJson($string) private function extractJson($string)
{ {
preg_match('/\{.*\}/s', $string, $matches); preg_match('/\{.*\}/s', $string, $matches);
@@ -229,7 +443,7 @@ class AIAnalysisService
{ {
return [ return [
'match_score' => 75, 'match_score' => 75,
'summary' => "Analyse simulée (IA non connectée ou erreur API). Le candidat semble avoir une solide expérience mais certains points techniques doivent être vérifiés.", 'summary' => "Analyse simulée (IA non connectée ou erreur API). Le candidat peut avoir un profil intéressant mais une vérification manuelle est nécessaire.",
'strengths' => ["Expérience pertinente", "Bonne présentation"], 'strengths' => ["Expérience pertinente", "Bonne présentation"],
'gaps' => ["Compétences spécifiques à confirmer"], 'gaps' => ["Compétences spécifiques à confirmer"],
'verdict' => "Favorable" 'verdict' => "Favorable"

View File

@@ -18,12 +18,9 @@ trait BelongsToTenant
return; return;
} }
// Candidates don't have a tenant_id but must access // All other users (admins and candidates) are filtered by their tenant.
// quizzes/job positions linked to their position // This includes candidates, who must only see data from their own organization.
if ($user->role === 'candidate') { // Resources with a null tenant_id are considered global and always visible.
return;
}
if ($user->tenant_id) { if ($user->tenant_id) {
$builder->where(function ($query) use ($user) { $builder->where(function ($query) use ($user) {
$query->where('tenant_id', $user->tenant_id) $query->where('tenant_id', $user->tenant_id)

View File

@@ -7,15 +7,20 @@
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.3", "php": "^8.3",
"barryvdh/laravel-dompdf": "^3.1",
"fpdf/fpdf": "^1.86",
"inertiajs/inertia-laravel": "^2.0", "inertiajs/inertia-laravel": "^2.0",
"laravel/framework": "^13.0", "laravel/framework": "^13.0",
"laravel/sanctum": "^4.0", "laravel/sanctum": "^4.0",
"laravel/tinker": "^3.0", "laravel/tinker": "^3.0",
"setasign/fpdi": "2.6",
"smalot/pdfparser": "^2.12", "smalot/pdfparser": "^2.12",
"tecnickcom/tcpdf": "^6.11",
"tightenco/ziggy": "^2.0" "tightenco/ziggy": "^2.0"
}, },
"require-dev": { "require-dev": {
"fakerphp/faker": "^1.23", "fakerphp/faker": "^1.23",
"laravel-lang/common": "^6.8",
"laravel/breeze": "^2.4", "laravel/breeze": "^2.4",
"laravel/pail": "^1.2.5", "laravel/pail": "^1.2.5",
"laravel/pint": "^1.27", "laravel/pint": "^1.27",

2657
composer.lock generated

File diff suppressed because it is too large Load Diff

37
config/ai.php Normal file
View File

@@ -0,0 +1,37 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| AI Service Configuration
|--------------------------------------------------------------------------
|
| This file contains the default prompts and settings for the AI analysis.
|
*/
'defaults' => [
'base_instruction' => "Tu es un expert en recrutement expérimenté. Ton rôle est d'analyser le profil d'un candidat avec impartialité et précision.",
'analysis_instructions' => "Attache une grande importance à l'adéquation entre le parcours du candidat et les besoins du poste, tant sur le plan technique que sur les savoir-être.",
'json_format' => "Fournis une analyse structurée en JSON avec les clés suivantes impérativement:
- match_score: note de 0 à 100 (nombre entier)
- summary: résumé de 3-4 phrases sur le profil
- strengths: liste des points forts par rapport au poste
- gaps: liste des compétences manquantes ou points de vigilance
- verdict: une conclusion (Favorable, Très Favorable, Réservé, Défavorable)
- scores_detailles: un objet avec des clés (ex: technique, experience, soft_skills) contenant 'score' (0-100) et 'justification'
- elements_bloquants: liste des points critiques qui pourraient invalider la candidature (ou liste vide si aucun)
- questions_entretien_suggerees: liste de 5 questions pertinentes à poser au candidat lors de l'entretien",
],
'providers' => [
'default' => env('AI_DEFAULT_PROVIDER', 'ollama'),
'ollama' => [
'url' => env('OLLAMA_URL', 'http://localhost:11434/api/generate'),
'model' => env('OLLAMA_MODEL', 'mistral'),
],
// ...
]
];

View File

@@ -78,7 +78,7 @@ return [
| |
*/ */
'locale' => env('APP_LOCALE', 'en'), 'locale' => 'fr',
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),

View File

@@ -32,7 +32,7 @@ return [
'local' => [ 'local' => [
'driver' => 'local', 'driver' => 'local',
'root' => storage_path('app/private'), 'root' => storage_path('app'),
'serve' => true, 'serve' => true,
'throw' => false, 'throw' => false,
'report' => false, 'report' => false,

View File

@@ -0,0 +1,29 @@
<?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::table('job_positions', function (Blueprint $table) {
$table->string('gemini_cache_id')->nullable()->after('ai_prompt');
$table->timestamp('gemini_cache_expires_at')->nullable()->after('gemini_cache_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('job_positions', function (Blueprint $table) {
$table->dropColumn(['gemini_cache_id', 'gemini_cache_expires_at']);
});
}
};

View File

@@ -0,0 +1,28 @@
<?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::table('candidates', function (Blueprint $table) {
$table->json('interview_details')->nullable()->after('interview_score');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('candidates', function (Blueprint $table) {
$table->dropColumn('interview_details');
});
}
};

View File

@@ -0,0 +1,31 @@
<?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('login_logs', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->onDelete('cascade');
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->timestamp('login_at')->useCurrent();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('login_logs');
}
};

View File

@@ -0,0 +1,28 @@
<?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::table('job_positions', function (Blueprint $table) {
$table->boolean('ai_bypass_base_prompt')->default(false)->after('ai_prompt');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('job_positions', function (Blueprint $table) {
$table->dropColumn('ai_bypass_base_prompt');
});
}
};

View File

@@ -0,0 +1,28 @@
<?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::table('candidates', function (Blueprint $table) {
$table->integer('sort_order')->default(0)->after('is_selected');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('candidates', function (Blueprint $table) {
$table->dropColumn('sort_order');
});
}
};

View File

@@ -0,0 +1,28 @@
<?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::table('candidates', function (Blueprint $table) {
$table->string('city')->nullable()->after('linkedin_url');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('candidates', function (Blueprint $table) {
$table->dropColumn('city');
});
}
};

View File

@@ -0,0 +1,33 @@
<?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('security_alerts', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->nullable()->constrained()->onDelete('set null');
$table->string('type'); // 'mass_assignment', 'directory_traversal', etc.
$table->string('endpoint')->nullable();
$table->json('payload')->nullable();
$table->string('ip_address')->nullable();
$table->text('user_agent')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('security_alerts');
}
};

View File

@@ -1,17 +0,0 @@
<?php
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();
use App\Models\Attempt;
$attempts = Attempt::whereNull('max_score')->get();
foreach ($attempts as $attempt) {
if ($attempt->quiz) {
$max = $attempt->quiz->questions->sum('points');
$attempt->update(['max_score' => $max]);
echo "Updated attempt {$attempt->id} with max_score {$max}\n";
}
}

264
lang/en.json Normal file
View File

@@ -0,0 +1,264 @@
{
"(and :count more error)": "(and :count more error)",
"(and :count more errors)": "(and :count more error)|(and :count more errors)|(and :count more errors)",
"A decryption key is required.": "A decryption key is required.",
"A new verification link has been sent to the email address you provided during registration.": "A new verification link has been sent to the email address you provided during registration.",
"A new verification link has been sent to your email address.": "A new verification link has been sent to your email address.",
"A Timeout Occurred": "A Timeout Occurred",
"Accept": "Accept",
"Accepted": "Accepted",
"Action": "Action",
"Actions": "Actions",
"Add": "Add",
"Add :name": "Add :name",
"Admin": "Admin",
"Agree": "Agree",
"All rights reserved.": "All rights reserved.",
"Already registered?": "Already registered?",
"Already Reported": "Already Reported",
"Archive": "Archive",
"Are you sure you want to delete your account?": "Are you sure you want to delete your account?",
"Assign": "Assign",
"Associate": "Associate",
"Attach": "Attach",
"Bad Gateway": "Bad Gateway",
"Bad Request": "Bad Request",
"Bandwidth Limit Exceeded": "Bandwidth Limit Exceeded",
"Browse": "Browse",
"Cancel": "Cancel",
"Choose": "Choose",
"Choose :name": "Choose :name",
"Choose File": "Choose File",
"Choose Image": "Choose Image",
"Click here to re-send the verification email.": "Click here to re-send the verification email.",
"Click to copy": "Click to copy",
"Client Closed Request": "Client Closed Request",
"Close": "Close",
"Collapse": "Collapse",
"Collapse All": "Collapse All",
"Comment": "Comment",
"Confirm": "Confirm",
"Confirm Password": "Confirm Password",
"Conflict": "Conflict",
"Connect": "Connect",
"Connection Closed Without Response": "Connection Closed Without Response",
"Connection Timed Out": "Connection Timed Out",
"Continue": "Continue",
"Create": "Create",
"Create :name": "Create :name",
"Created": "Created",
"Current Password": "Current Password",
"Dashboard": "Dashboard",
"Delete": "Delete",
"Delete :name": "Delete :name",
"Delete Account": "Delete Account",
"Detach": "Detach",
"Details": "Details",
"Disable": "Disable",
"Discard": "Discard",
"Done": "Done",
"Down": "Down",
"Duplicate": "Duplicate",
"Duplicate :name": "Duplicate :name",
"Edit": "Edit",
"Edit :name": "Edit :name",
"Email": "Email",
"email": "The :attribute field must be a valid email address.",
"Email Password Reset Link": "Email Password Reset Link",
"Enable": "Enable",
"Encrypted environment file already exists.": "Encrypted environment file already exists.",
"Encrypted environment file not found.": "Encrypted environment file not found.",
"Ensure your account is using a long, random password to stay secure.": "Ensure your account is using a long, random password to stay secure.",
"Environment file already exists.": "Environment file already exists.",
"Environment file not found.": "Environment file not found.",
"errors": "errors",
"Expand": "Expand",
"Expand All": "Expand All",
"Expectation Failed": "Expectation Failed",
"Explanation": "Explanation",
"Export": "Export",
"Export :name": "Export :name",
"Failed Dependency": "Failed Dependency",
"File": "File",
"Files": "Files",
"Forbidden": "Forbidden",
"Forgot your password?": "Forgot your password?",
"Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.": "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.",
"Found": "Found",
"Gateway Timeout": "Gateway Timeout",
"Go Home": "Go Home",
"Go to page :page": "Go to page :page",
"Gone": "Gone",
"Hello!": "Hello!",
"Hide": "Hide",
"Hide :name": "Hide :name",
"Home": "Home",
"HTTP Version Not Supported": "HTTP Version Not Supported",
"I'm a teapot": "I'm a teapot",
"If you did not create an account, no further action is required.": "If you did not create an account, no further action is required.",
"If you did not request a password reset, no further action is required.": "If you did not request a password reset, no further action is required.",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:",
"IM Used": "IM Used",
"Image": "Image",
"Impersonate": "Impersonate",
"Impersonation": "Impersonation",
"Import": "Import",
"Import :name": "Import :name",
"Insufficient Storage": "Insufficient Storage",
"Internal Server Error": "Internal Server Error",
"Introduction": "Introduction",
"Invalid filename.": "Invalid filename.",
"Invalid JSON was returned from the route.": "Invalid JSON was returned from the route.",
"Invalid SSL Certificate": "Invalid SSL Certificate",
"length": "length",
"Length Required": "Length Required",
"Like": "Like",
"Load": "Load",
"Localize": "Localize",
"Location": "Location",
"Locked": "Locked",
"Log In": "Log In",
"Log in": "Log in",
"Log Out": "Log Out",
"Login": "Login",
"Logout": "Logout",
"Loop Detected": "Loop Detected",
"Maintenance Mode": "Maintenance Mode",
"Method Not Allowed": "Method Not Allowed",
"Misdirected Request": "Misdirected Request",
"Moved Permanently": "Moved Permanently",
"Multi-Status": "Multi-Status",
"Multiple Choices": "Multiple Choices",
"Name": "Name",
"name": "name",
"Network Authentication Required": "Network Authentication Required",
"Network Connect Timeout Error": "Network Connect Timeout Error",
"Network Read Timeout Error": "Network Read Timeout Error",
"New": "New",
"New :name": "New :name",
"New Password": "New Password",
"No": "No",
"No Content": "No Content",
"Non-Authoritative Information": "Non-Authoritative Information",
"Not Acceptable": "Not Acceptable",
"Not Extended": "Not Extended",
"Not Found": "Not Found",
"Not Implemented": "Not Implemented",
"Not Modified": "Not Modified",
"of": "of",
"OK": "OK",
"Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.": "Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.",
"Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.": "Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.",
"Open": "Open",
"Open in a current window": "Open in a current window",
"Open in a new window": "Open in a new window",
"Open in a parent frame": "Open in a parent frame",
"Open in the topmost frame": "Open in the topmost frame",
"Open on the website": "Open on the website",
"Origin Is Unreachable": "Origin Is Unreachable",
"Page Expired": "Page Expired",
"Pagination Navigation": "Pagination Navigation",
"Partial Content": "Partial Content",
"Password": "Password",
"password": "The provided password is incorrect.",
"Payload Too Large": "Payload Too Large",
"Payment Required": "Payment Required",
"Permanent Redirect": "Permanent Redirect",
"Please click the button below to verify your email address.": "Please click the button below to verify your email address.",
"Precondition Failed": "Precondition Failed",
"Precondition Required": "Precondition Required",
"Preview": "Preview",
"Price": "Price",
"Processing": "Processing",
"Profile": "Profile",
"Profile Information": "Profile Information",
"Proxy Authentication Required": "Proxy Authentication Required",
"Railgun Error": "Railgun Error",
"Range Not Satisfiable": "Range Not Satisfiable",
"Record": "Record",
"Regards,": "Regards,",
"Register": "Register",
"Remember me": "Remember me",
"Request Header Fields Too Large": "Request Header Fields Too Large",
"Request Timeout": "Request Timeout",
"Resend Verification Email": "Resend Verification Email",
"Reset Content": "Reset Content",
"Reset Password": "Reset Password",
"Reset your password": "Reset your password",
"Restore": "Restore",
"Restore :name": "Restore :name",
"results": "results",
"Retry With": "Retry With",
"Save": "Save",
"Save & Close": "Save & Close",
"Save & Return": "Save & Return",
"Save :name": "Save :name",
"Saved.": "Saved.",
"Search": "Search",
"Search :name": "Search :name",
"See Other": "See Other",
"Select": "Select",
"Select All": "Select All",
"Send": "Send",
"Server Error": "Server Error",
"Service Unavailable": "Service Unavailable",
"Session Has Expired": "Session Has Expired",
"Settings": "Settings",
"Show": "Show",
"Show :name": "Show :name",
"Show All": "Show All",
"Showing": "Showing",
"Sign In": "Sign In",
"Solve": "Solve",
"SSL Handshake Failed": "SSL Handshake Failed",
"Start": "Start",
"Stop": "Stop",
"Submit": "Submit",
"Subscribe": "Subscribe",
"Switch": "Switch",
"Switch To Role": "Switch To Role",
"Switching Protocols": "Switching Protocols",
"Tag": "Tag",
"Tags": "Tags",
"Temporary Redirect": "Temporary Redirect",
"Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn't receive the email, we will gladly send you another.": "Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn't receive the email, we will gladly send you another.",
"The given data was invalid.": "The given data was invalid.",
"The response is not a streamed response.": "The response is not a streamed response.",
"The response is not a view.": "The response is not a view.",
"This action is unauthorized.": "This action is unauthorized.",
"This is a secure area of the application. Please confirm your password before continuing.": "This is a secure area of the application. Please confirm your password before continuing.",
"This password reset link will expire in :count minutes.": "This password reset link will expire in :count minutes.",
"to": "to",
"Toggle navigation": "Toggle navigation",
"Too Early": "Too Early",
"Too Many Requests": "Too Many Requests",
"Translate": "Translate",
"Translate It": "Translate It",
"Unauthorized": "Unauthorized",
"Unavailable For Legal Reasons": "Unavailable For Legal Reasons",
"Unknown Error": "Unknown Error",
"Unpack": "Unpack",
"Unprocessable Entity": "Unprocessable Entity",
"Unsubscribe": "Unsubscribe",
"Unsupported Media Type": "Unsupported Media Type",
"Up": "Up",
"Update": "Update",
"Update :name": "Update :name",
"Update Password": "Update Password",
"Update your account's profile information and email address.": "Update your account's profile information and email address.",
"Upgrade Required": "Upgrade Required",
"URI Too Long": "URI Too Long",
"Use Proxy": "Use Proxy",
"User": "User",
"Variant Also Negotiates": "Variant Also Negotiates",
"Verify Email Address": "Verify Email Address",
"Verify your email address": "Verify your email address",
"View": "View",
"View :name": "View :name",
"Web Server is Down": "Web Server is Down",
"Whoops!": "Whoops!",
"Yes": "Yes",
"You are receiving this email because we received a password reset request for your account.": "You are receiving this email because we received a password reset request for your account.",
"You're logged in!": "You're logged in!",
"Your email address is unverified.": "Your email address is unverified."
}

119
lang/en/actions.php Normal file
View File

@@ -0,0 +1,119 @@
<?php
declare(strict_types=1);
return [
'accept' => 'Accept',
'action' => 'Action',
'actions' => 'Actions',
'add' => 'Add',
'admin' => 'Admin',
'agree' => 'Agree',
'archive' => 'Archive',
'assign' => 'Assign',
'associate' => 'Associate',
'attach' => 'Attach',
'browse' => 'Browse',
'cancel' => 'Cancel',
'choose' => 'Choose',
'choose_file' => 'Choose File',
'choose_image' => 'Choose Image',
'click_to_copy' => 'Click to copy',
'close' => 'Close',
'collapse' => 'Collapse',
'collapse_all' => 'Collapse All',
'comment' => 'Comment',
'confirm' => 'Confirm',
'connect' => 'Connect',
'create' => 'Create',
'delete' => 'Delete',
'detach' => 'Detach',
'details' => 'Details',
'disable' => 'Disable',
'discard' => 'Discard',
'done' => 'Done',
'down' => 'Down',
'duplicate' => 'Duplicate',
'edit' => 'Edit',
'enable' => 'Enable',
'expand' => 'Expand',
'expand_all' => 'Expand All',
'explanation' => 'Explanation',
'export' => 'Export',
'file' => 'File',
'files' => 'Files',
'go_home' => 'Go Home',
'hide' => 'Hide',
'home' => 'Home',
'image' => 'Image',
'impersonate' => 'Impersonate',
'impersonation' => 'Impersonation',
'import' => 'Import',
'introduction' => 'Introduction',
'like' => 'Like',
'load' => 'Load',
'localize' => 'Localize',
'log_in' => 'Log In',
'log_out' => 'Log Out',
'named' => [
'add' => 'Add :name',
'choose' => 'Choose :name',
'create' => 'Create :name',
'delete' => 'Delete :name',
'duplicate' => 'Duplicate :name',
'edit' => 'Edit :name',
'export' => 'Export :name',
'hide' => 'Hide :name',
'import' => 'Import :name',
'new' => 'New :name',
'restore' => 'Restore :name',
'save' => 'Save :name',
'search' => 'Search :name',
'show' => 'Show :name',
'update' => 'Update :name',
'view' => 'View :name',
],
'new' => 'New',
'no' => 'No',
'open' => 'Open',
'open_website' => 'Open on the website',
'preview' => 'Preview',
'price' => 'Price',
'record' => 'Record',
'restore' => 'Restore',
'save' => 'Save',
'save_and_close' => 'Save & Close',
'save_and_return' => 'Save & Return',
'search' => 'Search',
'select' => 'Select',
'select_all' => 'Select All',
'send' => 'Send',
'settings' => 'Settings',
'show' => 'Show',
'show_all' => 'Show All',
'sign_in' => 'Sign In',
'solve' => 'Solve',
'start' => 'Start',
'stop' => 'Stop',
'submit' => 'Submit',
'subscribe' => 'Subscribe',
'switch' => 'Switch',
'switch_to_role' => 'Switch To Role',
'tag' => 'Tag',
'tags' => 'Tags',
'target_link' => [
'blank' => 'Open in a new window',
'parent' => 'Open in a parent frame',
'self' => 'Open in a current window',
'top' => 'Open in the topmost frame',
],
'translate' => 'Translate',
'translate_it' => 'Translate It',
'unpack' => 'Unpack',
'unsubscribe' => 'Unsubscribe',
'up' => 'Up',
'update' => 'Update',
'user' => 'User',
'view' => 'View',
'yes' => 'Yes',
];

9
lang/en/auth.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
return [
'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];

84
lang/en/http-statuses.php Normal file
View File

@@ -0,0 +1,84 @@
<?php
declare(strict_types=1);
return [
'0' => 'Unknown Error',
'100' => 'Continue',
'101' => 'Switching Protocols',
'102' => 'Processing',
'200' => 'OK',
'201' => 'Created',
'202' => 'Accepted',
'203' => 'Non-Authoritative Information',
'204' => 'No Content',
'205' => 'Reset Content',
'206' => 'Partial Content',
'207' => 'Multi-Status',
'208' => 'Already Reported',
'226' => 'IM Used',
'300' => 'Multiple Choices',
'301' => 'Moved Permanently',
'302' => 'Found',
'303' => 'See Other',
'304' => 'Not Modified',
'305' => 'Use Proxy',
'307' => 'Temporary Redirect',
'308' => 'Permanent Redirect',
'400' => 'Bad Request',
'401' => 'Unauthorized',
'402' => 'Payment Required',
'403' => 'Forbidden',
'404' => 'Not Found',
'405' => 'Method Not Allowed',
'406' => 'Not Acceptable',
'407' => 'Proxy Authentication Required',
'408' => 'Request Timeout',
'409' => 'Conflict',
'410' => 'Gone',
'411' => 'Length Required',
'412' => 'Precondition Failed',
'413' => 'Payload Too Large',
'414' => 'URI Too Long',
'415' => 'Unsupported Media Type',
'416' => 'Range Not Satisfiable',
'417' => 'Expectation Failed',
'418' => 'I\'m a teapot',
'419' => 'Session Has Expired',
'421' => 'Misdirected Request',
'422' => 'Unprocessable Entity',
'423' => 'Locked',
'424' => 'Failed Dependency',
'425' => 'Too Early',
'426' => 'Upgrade Required',
'428' => 'Precondition Required',
'429' => 'Too Many Requests',
'431' => 'Request Header Fields Too Large',
'444' => 'Connection Closed Without Response',
'449' => 'Retry With',
'451' => 'Unavailable For Legal Reasons',
'499' => 'Client Closed Request',
'500' => 'Internal Server Error',
'501' => 'Not Implemented',
'502' => 'Bad Gateway',
'503' => 'Maintenance Mode',
'504' => 'Gateway Timeout',
'505' => 'HTTP Version Not Supported',
'506' => 'Variant Also Negotiates',
'507' => 'Insufficient Storage',
'508' => 'Loop Detected',
'509' => 'Bandwidth Limit Exceeded',
'510' => 'Not Extended',
'511' => 'Network Authentication Required',
'520' => 'Unknown Error',
'521' => 'Web Server is Down',
'522' => 'Connection Timed Out',
'523' => 'Origin Is Unreachable',
'524' => 'A Timeout Occurred',
'525' => 'SSL Handshake Failed',
'526' => 'Invalid SSL Certificate',
'527' => 'Railgun Error',
'598' => 'Network Read Timeout Error',
'599' => 'Network Connect Timeout Error',
'unknownError' => 'Unknown Error',
];

8
lang/en/pagination.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
declare(strict_types=1);
return [
'next' => 'Next &raquo;',
'previous' => '&laquo; Previous',
];

11
lang/en/passwords.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
return [
'reset' => 'Your password has been reset.',
'sent' => 'We have emailed your password reset link.',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => 'We can\'t find a user with that email address.',
];

288
lang/en/validation.php Normal file
View File

@@ -0,0 +1,288 @@
<?php
declare(strict_types=1);
return [
'accepted' => 'The :attribute field must be accepted.',
'accepted_if' => 'The :attribute field must be accepted when :other is :value.',
'active_url' => 'The :attribute field must be a valid URL.',
'after' => 'The :attribute field must be a date after :date.',
'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',
'alpha' => 'The :attribute field must only contain letters.',
'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.',
'alpha_num' => 'The :attribute field must only contain letters and numbers.',
'any_of' => 'The :attribute field is invalid.',
'array' => 'The :attribute field must be an array.',
'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
'before' => 'The :attribute field must be a date before :date.',
'before_or_equal' => 'The :attribute field must be a date before or equal to :date.',
'between' => [
'array' => 'The :attribute field must have between :min and :max items.',
'file' => 'The :attribute field must be between :min and :max kilobytes.',
'numeric' => 'The :attribute field must be between :min and :max.',
'string' => 'The :attribute field must be between :min and :max characters.',
],
'boolean' => 'The :attribute field must be true or false.',
'can' => 'The :attribute field contains an unauthorized value.',
'confirmed' => 'The :attribute field confirmation does not match.',
'contains' => 'The :attribute field is missing a required value.',
'current_password' => 'The password is incorrect.',
'date' => 'The :attribute field must be a valid date.',
'date_equals' => 'The :attribute field must be a date equal to :date.',
'date_format' => 'The :attribute field must match the format :format.',
'decimal' => 'The :attribute field must have :decimal decimal places.',
'declined' => 'The :attribute field must be declined.',
'declined_if' => 'The :attribute field must be declined when :other is :value.',
'different' => 'The :attribute field and :other must be different.',
'digits' => 'The :attribute field must be :digits digits.',
'digits_between' => 'The :attribute field must be between :min and :max digits.',
'dimensions' => 'The :attribute field has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'doesnt_contain' => 'The :attribute field must not contain any of the following: :values.',
'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
'email' => 'The :attribute field must be a valid email address.',
'encoding' => 'The :attribute field must be encoded in :encoding.',
'ends_with' => 'The :attribute field must end with one of the following: :values.',
'enum' => 'The selected :attribute is invalid.',
'exists' => 'The selected :attribute is invalid.',
'extensions' => 'The :attribute field must have one of the following extensions: :values.',
'file' => 'The :attribute field must be a file.',
'filled' => 'The :attribute field must have a value.',
'gt' => [
'array' => 'The :attribute field must have more than :value items.',
'file' => 'The :attribute field must be greater than :value kilobytes.',
'numeric' => 'The :attribute field must be greater than :value.',
'string' => 'The :attribute field must be greater than :value characters.',
],
'gte' => [
'array' => 'The :attribute field must have :value items or more.',
'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
'numeric' => 'The :attribute field must be greater than or equal to :value.',
'string' => 'The :attribute field must be greater than or equal to :value characters.',
],
'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
'image' => 'The :attribute field must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field must exist in :other.',
'in_array_keys' => 'The :attribute field must contain at least one of the following keys: :values.',
'integer' => 'The :attribute field must be an integer.',
'ip' => 'The :attribute field must be a valid IP address.',
'ipv4' => 'The :attribute field must be a valid IPv4 address.',
'ipv6' => 'The :attribute field must be a valid IPv6 address.',
'json' => 'The :attribute field must be a valid JSON string.',
'list' => 'The :attribute field must be a list.',
'lowercase' => 'The :attribute field must be lowercase.',
'lt' => [
'array' => 'The :attribute field must have less than :value items.',
'file' => 'The :attribute field must be less than :value kilobytes.',
'numeric' => 'The :attribute field must be less than :value.',
'string' => 'The :attribute field must be less than :value characters.',
],
'lte' => [
'array' => 'The :attribute field must not have more than :value items.',
'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
'numeric' => 'The :attribute field must be less than or equal to :value.',
'string' => 'The :attribute field must be less than or equal to :value characters.',
],
'mac_address' => 'The :attribute field must be a valid MAC address.',
'max' => [
'array' => 'The :attribute field must not have more than :max items.',
'file' => 'The :attribute field must not be greater than :max kilobytes.',
'numeric' => 'The :attribute field must not be greater than :max.',
'string' => 'The :attribute field must not be greater than :max characters.',
],
'max_digits' => 'The :attribute field must not have more than :max digits.',
'mimes' => 'The :attribute field must be a file of type: :values.',
'mimetypes' => 'The :attribute field must be a file of type: :values.',
'min' => [
'array' => 'The :attribute field must have at least :min items.',
'file' => 'The :attribute field must be at least :min kilobytes.',
'numeric' => 'The :attribute field must be at least :min.',
'string' => 'The :attribute field must be at least :min characters.',
],
'min_digits' => 'The :attribute field must have at least :min digits.',
'missing' => 'The :attribute field must be missing.',
'missing_if' => 'The :attribute field must be missing when :other is :value.',
'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
'missing_with' => 'The :attribute field must be missing when :values is present.',
'missing_with_all' => 'The :attribute field must be missing when :values are present.',
'multiple_of' => 'The :attribute field must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute field format is invalid.',
'numeric' => 'The :attribute field must be a number.',
'password' => [
'letters' => 'The :attribute field must contain at least one letter.',
'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
'numbers' => 'The :attribute field must contain at least one number.',
'symbols' => 'The :attribute field must contain at least one symbol.',
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
],
'present' => 'The :attribute field must be present.',
'present_if' => 'The :attribute field must be present when :other is :value.',
'present_unless' => 'The :attribute field must be present unless :other is :value.',
'present_with' => 'The :attribute field must be present when :values is present.',
'present_with_all' => 'The :attribute field must be present when :values are present.',
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
'prohibited_if_accepted' => 'The :attribute field is prohibited when :other is accepted.',
'prohibited_if_declined' => 'The :attribute field is prohibited when :other is declined.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
'prohibits' => 'The :attribute field prohibits :other from being present.',
'regex' => 'The :attribute field format is invalid.',
'required' => 'The :attribute field is required.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
'required_if_declined' => 'The :attribute field is required when :other is declined.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute field must match :other.',
'size' => [
'array' => 'The :attribute field must contain :size items.',
'file' => 'The :attribute field must be :size kilobytes.',
'numeric' => 'The :attribute field must be :size.',
'string' => 'The :attribute field must be :size characters.',
],
'starts_with' => 'The :attribute field must start with one of the following: :values.',
'string' => 'The :attribute field must be a string.',
'timezone' => 'The :attribute field must be a valid timezone.',
'ulid' => 'The :attribute field must be a valid ULID.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'uppercase' => 'The :attribute field must be uppercase.',
'url' => 'The :attribute field must be a valid URL.',
'uuid' => 'The :attribute field must be a valid UUID.',
'attributes' => [
'address' => 'address',
'affiliate_url' => 'affiliate URL',
'age' => 'age',
'amount' => 'amount',
'announcement' => 'announcement',
'area' => 'area',
'audience_prize' => 'audience prize',
'audience_winner' => 'audience winner',
'available' => 'available',
'birthday' => 'birthday',
'body' => 'body',
'city' => 'city',
'color' => 'color',
'company' => 'company',
'compilation' => 'compilation',
'concept' => 'concept',
'conditions' => 'conditions',
'content' => 'content',
'contest' => 'contest',
'country' => 'country',
'cover' => 'cover',
'created_at' => 'created at',
'creator' => 'creator',
'currency' => 'currency',
'current_password' => 'current password',
'customer' => 'customer',
'date' => 'date',
'date_of_birth' => 'date of birth',
'dates' => 'dates',
'day' => 'day',
'deleted_at' => 'deleted at',
'description' => 'description',
'display_type' => 'display type',
'district' => 'district',
'duration' => 'duration',
'email' => 'email',
'excerpt' => 'excerpt',
'filter' => 'filter',
'finished_at' => 'finished at',
'first_name' => 'first name',
'gender' => 'gender',
'grand_prize' => 'grand prize',
'group' => 'group',
'hour' => 'hour',
'image' => 'image',
'image_desktop' => 'desktop image',
'image_main' => 'main image',
'image_mobile' => 'mobile image',
'images' => 'images',
'is_audience_winner' => 'is audience winner',
'is_hidden' => 'is hidden',
'is_subscribed' => 'is subscribed',
'is_visible' => 'is visible',
'is_winner' => 'is winner',
'items' => 'items',
'key' => 'key',
'last_name' => 'last name',
'lesson' => 'lesson',
'line_address_1' => 'line address 1',
'line_address_2' => 'line address 2',
'login' => 'login',
'message' => 'message',
'middle_name' => 'middle name',
'minute' => 'minute',
'mobile' => 'mobile',
'month' => 'month',
'name' => 'name',
'national_code' => 'national code',
'number' => 'number',
'password' => 'password',
'password_confirmation' => 'password confirmation',
'phone' => 'phone',
'photo' => 'photo',
'portfolio' => 'portfolio',
'postal_code' => 'postal code',
'preview' => 'preview',
'price' => 'price',
'product_id' => 'product ID',
'product_uid' => 'product UID',
'product_uuid' => 'product UUID',
'promo_code' => 'promo code',
'province' => 'province',
'quantity' => 'quantity',
'reason' => 'reason',
'recaptcha_response_field' => 'recaptcha response field',
'referee' => 'referee',
'referees' => 'referees',
'region' => 'region',
'reject_reason' => 'reject reason',
'remember' => 'remember',
'restored_at' => 'restored at',
'result_text_under_image' => 'result text under image',
'role' => 'role',
'rule' => 'rule',
'rules' => 'rules',
'second' => 'second',
'sex' => 'sex',
'shipment' => 'shipment',
'short_text' => 'short text',
'size' => 'size',
'skills' => 'skills',
'slug' => 'slug',
'specialization' => 'specialization',
'started_at' => 'started at',
'state' => 'state',
'status' => 'status',
'street' => 'street',
'student' => 'student',
'subject' => 'subject',
'tag' => 'tag',
'tags' => 'tags',
'teacher' => 'teacher',
'terms' => 'terms',
'test_description' => 'test description',
'test_locale' => 'test locale',
'test_name' => 'test name',
'text' => 'text',
'time' => 'time',
'title' => 'title',
'type' => 'type',
'updated_at' => 'updated at',
'user' => 'user',
'username' => 'username',
'value' => 'value',
'winner' => 'winner',
'work' => 'work',
'year' => 'year',
],
];

264
lang/fr.json Normal file
View File

@@ -0,0 +1,264 @@
{
"(and :count more error)": "(et :count erreur en plus)",
"(and :count more errors)": "(et :count erreur en plus)|(et :count erreurs en plus)|(et :count erreurs en plus)",
"A decryption key is required.": "Une clé de déchiffrement est requise.",
"A new verification link has been sent to the email address you provided during registration.": "Un nouveau lien de vérification a été envoyé à l'adresse e-mail que vous avez indiquée lors de votre inscription.",
"A new verification link has been sent to your email address.": "Un nouveau lien de vérification a été envoyé à votre adresse e-mail.",
"A Timeout Occurred": "Temps d'attente dépassé",
"Accept": "Accepter",
"Accepted": "Accepté",
"Action": "Action",
"Actions": "Actions",
"Add": "Ajouter",
"Add :name": "Ajouter :name",
"Admin": "Administrateur",
"Agree": "Accepter",
"All rights reserved.": "Tous droits réservés.",
"Already registered?": "Déjà inscrit ?",
"Already Reported": "Déjà rapporté",
"Archive": "Archive",
"Are you sure you want to delete your account?": "Êtes-vous sûr de vouloir supprimer votre compte ?",
"Assign": "Attribuer",
"Associate": "Associé",
"Attach": "Attacher",
"Bad Gateway": "Passerelle invalide",
"Bad Request": "Requête erronée",
"Bandwidth Limit Exceeded": "Limite de bande passante dépassée",
"Browse": "Parcourir",
"Cancel": "Annuler",
"Choose": "Choisir",
"Choose :name": "Choisir :name",
"Choose File": "Choisir le fichier",
"Choose Image": "Choisir une image",
"Click here to re-send the verification email.": "Cliquez ici pour renvoyer l'e-mail de vérification.",
"Click to copy": "Cliquer pour copier",
"Client Closed Request": "Demande fermée par le client",
"Close": "Fermer",
"Collapse": "Réduire",
"Collapse All": "Réduire tout",
"Comment": "Commentaire",
"Confirm": "Confirmer",
"Confirm Password": "Confirmer le mot de passe",
"Conflict": "Conflit",
"Connect": "Connecter",
"Connection Closed Without Response": "Connexion fermée sans réponse",
"Connection Timed Out": "La connexion a expiré",
"Continue": "Continuer",
"Create": "Créer",
"Create :name": "Créer :name",
"Created": "Créé",
"Current Password": "Mot de passe actuel",
"Dashboard": "Tableau de bord",
"Delete": "Supprimer",
"Delete :name": "Supprimer :name",
"Delete Account": "Supprimer le compte",
"Detach": "Détacher",
"Details": "Détails",
"Disable": "Désactiver",
"Discard": "Jeter",
"Done": "Fait",
"Down": "Descendre",
"Duplicate": "Dupliquer",
"Duplicate :name": "Dupliquer :name",
"Edit": "Éditer",
"Edit :name": "Modifier :name",
"Email": "E-mail",
"email": "Le champ :attribute doit être une adresse e-mail valide.",
"Email Password Reset Link": "Lien de réinitialisation du mot de passe",
"Enable": "Activer",
"Encrypted environment file already exists.": "Le fichier d'environnement chiffré existe déjà.",
"Encrypted environment file not found.": "Fichier d'environnement chiffré introuvable.",
"Ensure your account is using a long, random password to stay secure.": "Assurez-vous d'utiliser un mot de passe long et aléatoire pour sécuriser votre compte.",
"Environment file already exists.": "Le fichier d'environnement existe déjà.",
"Environment file not found.": "Fichier d'environnement introuvable.",
"errors": "les erreurs",
"Expand": "Développer",
"Expand All": "Développer tout",
"Expectation Failed": "Comportement attendu insatisfaisant",
"Explanation": "Explication",
"Export": "Exporter",
"Export :name": "Exporter :name",
"Failed Dependency": "Dépendance échouée",
"File": "Déposer",
"Files": "Des dossiers",
"Forbidden": "Interdit",
"Forgot your password?": "Mot de passe oublié ?",
"Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.": "Mot de passe oublié ? Pas de soucis. Veuillez nous indiquer votre adresse e-mail et nous vous enverrons un lien de réinitialisation du mot de passe.",
"Found": "Trouvé",
"Gateway Timeout": "Temps d'attente de la passerelle dépassé",
"Go Home": "Aller à l'accueil",
"Go to page :page": "Aller à la page :page",
"Gone": "Disparu",
"Hello!": "Bonjour !",
"Hide": "Cacher",
"Hide :name": "Cacher :name",
"Home": "Accueil",
"HTTP Version Not Supported": "Version HTTP non prise en charge",
"I'm a teapot": "Je suis une théière",
"If you did not create an account, no further action is required.": "Si vous n'avez pas créé de compte, vous pouvez ignorer ce message.",
"If you did not request a password reset, no further action is required.": "Si vous n'avez pas demandé de réinitialisation de mot de passe, vous pouvez ignorer ce message.",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si vous avez des difficultés à cliquer sur le bouton \":actionText\", copiez et collez l'URL ci-dessous\ndans votre navigateur Web :",
"IM Used": "IM utilisé",
"Image": "Image",
"Impersonate": "Utiliser un autre compte",
"Impersonation": "Imitation",
"Import": "Importer",
"Import :name": "Importer :name",
"Insufficient Storage": "Espace insuffisant",
"Internal Server Error": "Erreur interne du serveur",
"Introduction": "Introduction",
"Invalid filename.": "Nom de fichier incorrect.",
"Invalid JSON was returned from the route.": "Un JSON non valide a été renvoyé par la route.",
"Invalid SSL Certificate": "Certificat SSL invalide",
"length": "longueur",
"Length Required": "Longueur requise",
"Like": "Aimer",
"Load": "Charger",
"Localize": "Localiser",
"Location": "Emplacement",
"Locked": "Verrouillé",
"Log In": "Se connecter",
"Log in": "Se connecter",
"Log Out": "Se déconnecter",
"Login": "Connexion",
"Logout": "Déconnexion",
"Loop Detected": "Boucle détectée",
"Maintenance Mode": "Mode de maintenance",
"Method Not Allowed": "Méthode non autorisée",
"Misdirected Request": "Demande mal dirigée",
"Moved Permanently": "Déplacé de façon permanente",
"Multi-Status": "Statut multiple",
"Multiple Choices": "Choix multiples",
"Name": "Nom",
"name": "nom",
"Network Authentication Required": "Authentification réseau requise",
"Network Connect Timeout Error": "Temps d'attente de la connexion réseau dépassé",
"Network Read Timeout Error": "Temps d'attente de la lecture réseau dépassé",
"New": "Nouveau",
"New :name": "Nouveau :name",
"New Password": "Nouveau mot de passe",
"No": "Non",
"No Content": "Pas de contenu",
"Non-Authoritative Information": "Informations non certifiées",
"Not Acceptable": "Pas acceptable",
"Not Extended": "Non prolongé",
"Not Found": "Non trouvé",
"Not Implemented": "Non implémenté",
"Not Modified": "Non modifié",
"of": "de",
"OK": "OK",
"Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.": "Une fois que votre compte est supprimé, toutes vos données sont supprimées définitivement. Avant de supprimer votre compte, veuillez télécharger vos données.",
"Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.": "Une fois que votre compte est supprimé, toutes les données associées seront supprimées définitivement. Pour confirmer que vous voulez supprimer définitivement votre compte, renseignez votre mot de passe.",
"Open": "Ouvrir",
"Open in a current window": "Ouvrir dans une fenêtre actuelle",
"Open in a new window": "Ouvrir dans une nouvelle fenêtre",
"Open in a parent frame": "Ouvrir dans un cadre parent",
"Open in the topmost frame": "Ouvrir dans le cadre le plus haut",
"Open on the website": "Ouvrir sur le site",
"Origin Is Unreachable": "L'origine est inaccessible",
"Page Expired": "Page expirée",
"Pagination Navigation": "Pagination",
"Partial Content": "Contenu partiel",
"Password": "Mot de passe",
"password": "Le mot de passe est incorrect",
"Payload Too Large": "Charge utile trop grande",
"Payment Required": "Paiement requis",
"Permanent Redirect": "Redirection permanente",
"Please click the button below to verify your email address.": "Veuillez cliquer sur le bouton ci-dessous pour vérifier votre adresse e-mail :",
"Precondition Failed": "La précondition a échoué",
"Precondition Required": "Condition préalable requise",
"Preview": "Aperçu",
"Price": "Prix",
"Processing": "En traitement",
"Profile": "Profil",
"Profile Information": "Informations du profil",
"Proxy Authentication Required": "Authentification proxy requise",
"Railgun Error": "Erreur de Railgun",
"Range Not Satisfiable": "Plage non satisfaisante",
"Record": "Enregistrer",
"Regards,": "Cordialement,",
"Register": "Inscription",
"Remember me": "Se souvenir de moi",
"Request Header Fields Too Large": "Champs d'en-tête de requête trop grands",
"Request Timeout": "Temps d'attente de la requête dépassé",
"Resend Verification Email": "Renvoyer l'e-mail de vérification",
"Reset Content": "Réinitialiser le contenu",
"Reset Password": "Réinitialisation du mot de passe",
"Reset your password": "Reset your password",
"Restore": "Restaurer",
"Restore :name": "Restaurer :name",
"results": "résultats",
"Retry With": "Réessayer avec",
"Save": "Sauvegarder",
"Save & Close": "Sauvegarder et fermer",
"Save & Return": "Sauvegarder et retourner",
"Save :name": "Sauvegarder :name",
"Saved.": "Sauvegardé.",
"Search": "Rechercher",
"Search :name": "Chercher :name",
"See Other": "Voir autre",
"Select": "Sélectionner",
"Select All": "Tout sélectionner",
"Send": "Envoyer",
"Server Error": "Erreur serveur",
"Service Unavailable": "Service indisponible",
"Session Has Expired": "La session a expiré",
"Settings": "Paramètres",
"Show": "Afficher",
"Show :name": "Afficher :name",
"Show All": "Afficher tout",
"Showing": "Montrant",
"Sign In": "Se connecter",
"Solve": "Résoudre",
"SSL Handshake Failed": "Échec de la prise de contact SSL",
"Start": "Commencer",
"Stop": "Arrêter",
"Submit": "Soumettre",
"Subscribe": "S'abonner",
"Switch": "Changer",
"Switch To Role": "Passer au rôle",
"Switching Protocols": "Protocoles de commutation",
"Tag": "Mot clé",
"Tags": "Mots clés",
"Temporary Redirect": "Redirection temporaire",
"Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn't receive the email, we will gladly send you another.": "Merci de vous être inscrit(e) ! Avant de commencer, veuillez vérifier votre adresse e-mail en cliquant sur le lien que nous venons de vous envoyer. Si vous n'avez pas reçu cet e-mail, nous vous en enverrons un nouveau avec plaisir.",
"The given data was invalid.": "La donnée renseignée est incorrecte.",
"The response is not a streamed response.": "La réponse n'est pas une réponse diffusée.",
"The response is not a view.": "La réponse n'est pas une vue.",
"This action is unauthorized.": "Cette action n'est pas autorisée.",
"This is a secure area of the application. Please confirm your password before continuing.": "Ceci est une zone sécurisée de l'application. Veuillez confirmer votre mot de passe avant de continuer.",
"This password reset link will expire in :count minutes.": "Ce lien de réinitialisation du mot de passe expirera dans :count minutes.",
"to": "à",
"Toggle navigation": "Afficher / masquer le menu de navigation",
"Too Early": "Trop tôt",
"Too Many Requests": "Trop de requêtes",
"Translate": "Traduire",
"Translate It": "Traduis le",
"Unauthorized": "Non autorisé",
"Unavailable For Legal Reasons": "Indisponible pour des raisons légales",
"Unknown Error": "Erreur inconnue",
"Unpack": "Déballer",
"Unprocessable Entity": "Entité non traitable",
"Unsubscribe": "Se désabonner",
"Unsupported Media Type": "Type de média non supporté",
"Up": "Monter",
"Update": "Mettre à jour",
"Update :name": "Mettre à jour :name",
"Update Password": "Mettre à jour le mot de passe",
"Update your account's profile information and email address.": "Modifier le profil associé à votre compte ainsi que votre adresse e-mail.",
"Upgrade Required": "Mise à niveau requise",
"URI Too Long": "URI trop long",
"Use Proxy": "Utiliser un proxy",
"User": "Utilisateur",
"Variant Also Negotiates": "La variante négocie également",
"Verify Email Address": "Vérifier l'adresse e-mail",
"Verify your email address": "Verify your email address",
"View": "Vue",
"View :name": "Voir :name",
"Web Server is Down": "Le serveur Web est en panne",
"Whoops!": "Oups !",
"Yes": "Oui",
"You are receiving this email because we received a password reset request for your account.": "Vous recevez cet e-mail car nous avons reçu une demande de réinitialisation de mot de passe pour votre compte.",
"You're logged in!": "Vous êtes connecté !",
"Your email address is unverified.": "Votre adresse e-mail n'est pas vérifiée."
}

119
lang/fr/actions.php Normal file
View File

@@ -0,0 +1,119 @@
<?php
declare(strict_types=1);
return [
'accept' => 'Accepter',
'action' => 'Action',
'actions' => 'Actions',
'add' => 'Ajouter',
'admin' => 'Administrateur',
'agree' => 'Approuver',
'archive' => 'Archiver',
'assign' => 'Attribuer',
'associate' => 'Associer',
'attach' => 'Attacher',
'browse' => 'Parcourir',
'cancel' => 'Annuler',
'choose' => 'Choisir',
'choose_file' => 'Choisir le fichier',
'choose_image' => 'Choisir une image',
'click_to_copy' => 'Cliquer pour copier',
'close' => 'Fermer',
'collapse' => 'Réduire',
'collapse_all' => 'Réduire tout',
'comment' => 'Commentaire',
'confirm' => 'Confirmer',
'connect' => 'Connecter',
'create' => 'Créer',
'delete' => 'Supprimer',
'detach' => 'Détacher',
'details' => 'Détails',
'disable' => 'Désactiver',
'discard' => 'Jeter',
'done' => 'Fait',
'down' => 'Descendre',
'duplicate' => 'Dupliquer',
'edit' => 'Editer',
'enable' => 'Activer',
'expand' => 'Développer',
'expand_all' => 'Développer tout',
'explanation' => 'Explication',
'export' => 'Exporter',
'file' => 'Déposer',
'files' => 'Fichiers',
'go_home' => 'Aller à l\'accueil',
'hide' => 'Cacher',
'home' => 'Accueil',
'image' => 'Image',
'impersonate' => 'Imiter',
'impersonation' => 'Imitation',
'import' => 'Importer',
'introduction' => 'Introduction',
'like' => 'Aimer',
'load' => 'Charger',
'localize' => 'Localiser',
'log_in' => 'Se connecter',
'log_out' => 'Se déconnecter',
'named' => [
'add' => 'Ajouter :name',
'choose' => 'Choisir :name',
'create' => 'Créer :name',
'delete' => 'Supprimer :name',
'duplicate' => 'Dupliquer :name',
'edit' => 'Editer :name',
'export' => 'Exporter :name',
'hide' => 'Cacher :name',
'import' => 'Importer :name',
'new' => 'Nouveau :name',
'restore' => 'Restaurer :name',
'save' => 'Sauvegarder :name',
'search' => 'Chercher :name',
'show' => 'Afficher :name',
'update' => 'Mettre à jour :name',
'view' => 'Voir :name',
],
'new' => 'Nouveau',
'no' => 'Non',
'open' => 'Ouvrir',
'open_website' => 'Ouvrir sur le site',
'preview' => 'Aperçu',
'price' => 'Prix',
'record' => 'Enregistrer',
'restore' => 'Restaurer',
'save' => 'Sauvegarder',
'save_and_close' => 'Sauvegarder et fermer',
'save_and_return' => 'Sauvegarder et retourner',
'search' => 'Chercher',
'select' => 'Sélectionner',
'select_all' => 'Tout sélectionner',
'send' => 'Envoyer',
'settings' => 'Paramètres',
'show' => 'Montrer',
'show_all' => 'Afficher tout',
'sign_in' => 'Se connecter',
'solve' => 'Résoudre',
'start' => 'Commencer',
'stop' => 'Arrêter',
'submit' => 'Soumettre',
'subscribe' => 'S\'abonner',
'switch' => 'Changer',
'switch_to_role' => 'Passer au rôle',
'tag' => 'Mot clé',
'tags' => 'Mots clés',
'target_link' => [
'blank' => 'Ouvrir dans une nouvelle fenêtre',
'parent' => 'Ouvrir dans la fenêtre parente',
'self' => 'Ouvrir dans la fenêtre actuelle',
'top' => 'Ouvrir dans le cadre le plus haut',
],
'translate' => 'Traduire',
'translate_it' => 'Traduis le',
'unpack' => 'Déballer',
'unsubscribe' => 'Se désabonner',
'up' => 'Monter',
'update' => 'Mettre à jour',
'user' => 'Utilisateur',
'view' => 'Voir',
'yes' => 'Oui',
];

9
lang/fr/auth.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
return [
'failed' => 'Ces identifiants ne correspondent pas à nos enregistrements.',
'password' => 'Le mot de passe est incorrect',
'throttle' => 'Tentatives de connexion trop nombreuses. Veuillez essayer de nouveau dans :seconds secondes.',
];

84
lang/fr/http-statuses.php Normal file
View File

@@ -0,0 +1,84 @@
<?php
declare(strict_types=1);
return [
'0' => 'Erreur inconnue',
'100' => 'Continuer',
'101' => 'Protocoles de commutation',
'102' => 'En traitement',
'200' => 'OK',
'201' => 'Créé',
'202' => 'Accepté',
'203' => 'Informations non certifiées',
'204' => 'Pas de contenu',
'205' => 'Réinitialiser le contenu',
'206' => 'Contenu partiel',
'207' => 'Statut multiple',
'208' => 'Déjà rapporté',
'226' => 'IM utilisé',
'300' => 'Choix multiples',
'301' => 'Déplacé de façon permanente',
'302' => 'A trouvé',
'303' => 'Voir autre',
'304' => 'Non modifié',
'305' => 'Utiliser un proxy',
'307' => 'Redirection temporaire',
'308' => 'Redirection permanente',
'400' => 'Requête invalide',
'401' => 'Non authentifié',
'402' => 'Paiement requis',
'403' => 'Interdit',
'404' => 'Page non trouvée',
'405' => 'Méthode non autorisée',
'406' => 'Non acceptable',
'407' => 'Authentification proxy requise',
'408' => 'Requête expirée',
'409' => 'Conflit',
'410' => 'Disparu',
'411' => 'Longueur requise',
'412' => 'La précondition a échoué',
'413' => 'Charge utile trop grande',
'414' => 'URI trop long',
'415' => 'Type de média non supporté',
'416' => 'Plage non satisfaisante',
'417' => 'Comportement attendu insatisfaisant',
'418' => 'Je suis une théière',
'419' => 'La session a expiré',
'421' => 'Demande mal dirigée',
'422' => 'Contenu non traitable',
'423' => 'Verrouillé',
'424' => 'Dépendance échouée',
'425' => 'Trop tôt',
'426' => 'Mise à niveau requise',
'428' => 'Condition préalable requise',
'429' => 'Trop de demandes',
'431' => 'Champs d\'en-tête de requête trop grands',
'444' => 'Connexion fermée sans réponse',
'449' => 'Réessayer avec',
'451' => 'Indisponible pour des raisons légales',
'499' => 'Demande fermée par le client',
'500' => 'Erreur interne du serveur',
'501' => 'Non implémenté',
'502' => 'Mauvaise passerelle',
'503' => 'Service non disponible',
'504' => 'Temps d\'attente de la passerelle dépassé',
'505' => 'Version HTTP non prise en charge',
'506' => 'La variante négocie également',
'507' => 'Espace insuffisant',
'508' => 'Boucle détectée',
'509' => 'Limite de bande passante dépassée',
'510' => 'Non prolongé',
'511' => 'Authentification réseau requise',
'520' => 'Erreur inconnue',
'521' => 'Le serveur Web est en panne',
'522' => 'La connexion a expiré',
'523' => 'L\'origine est inaccessible',
'524' => 'Un dépassement de délai s\'est produit',
'525' => 'Échec de la prise de contact SSL',
'526' => 'Certificat SSL invalide',
'527' => 'Erreur de Railgun',
'598' => 'Temps d\'attente de la lecture réseau dépassé',
'599' => 'Temps d\'attente de la connexion réseau dépassé',
'unknownError' => 'Erreur inconnue',
];

8
lang/fr/pagination.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
declare(strict_types=1);
return [
'next' => 'Suivant &raquo;',
'previous' => '&laquo; Précédent',
];

11
lang/fr/passwords.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
return [
'reset' => 'Votre mot de passe a été réinitialisé !',
'sent' => 'Nous vous avons envoyé par email le lien de réinitialisation du mot de passe !',
'throttled' => 'Veuillez patienter avant de réessayer.',
'token' => 'Ce jeton de réinitialisation du mot de passe n\'est pas valide.',
'user' => 'Aucun utilisateur n\'a été trouvé avec cette adresse email.',
];

288
lang/fr/validation.php Normal file
View File

@@ -0,0 +1,288 @@
<?php
declare(strict_types=1);
return [
'accepted' => 'Le champ :attribute doit être accepté.',
'accepted_if' => 'Le champ :attribute doit être accepté quand :other a la valeur :value.',
'active_url' => 'Le champ :attribute n\'est pas une URL valide.',
'after' => 'Le champ :attribute doit être une date postérieure au :date.',
'after_or_equal' => 'Le champ :attribute doit être une date postérieure ou égale au :date.',
'alpha' => 'Le champ :attribute doit contenir uniquement des lettres.',
'alpha_dash' => 'Le champ :attribute doit contenir uniquement des lettres, des chiffres et des tirets.',
'alpha_num' => 'Le champ :attribute doit contenir uniquement des chiffres et des lettres.',
'any_of' => 'Le champ :attribute est invalide.',
'array' => 'Le champ :attribute doit être un tableau.',
'ascii' => 'Le champ :attribute ne doit contenir que des caractères alphanumériques et des symboles codés sur un octet.',
'before' => 'Le champ :attribute doit être une date antérieure au :date.',
'before_or_equal' => 'Le champ :attribute doit être une date antérieure ou égale au :date.',
'between' => [
'array' => 'Le tableau :attribute doit contenir entre :min et :max éléments.',
'file' => 'La taille du fichier de :attribute doit être comprise entre :min et :max kilo-octets.',
'numeric' => 'La valeur de :attribute doit être comprise entre :min et :max.',
'string' => 'Le texte :attribute doit contenir entre :min et :max caractères.',
],
'boolean' => 'Le champ :attribute doit être vrai ou faux.',
'can' => 'Le champ :attribute contient une valeur non autorisée.',
'confirmed' => 'Le champ de confirmation :attribute ne correspond pas.',
'contains' => 'Le champ :attribute manque une valeur requise.',
'current_password' => 'Le mot de passe est incorrect.',
'date' => 'Le champ :attribute n\'est pas une date valide.',
'date_equals' => 'Le champ :attribute doit être une date égale à :date.',
'date_format' => 'Le champ :attribute ne correspond pas au format :format.',
'decimal' => 'Le champ :attribute doit comporter :decimal décimales.',
'declined' => 'Le champ :attribute doit être décliné.',
'declined_if' => 'Le champ :attribute doit être décliné quand :other a la valeur :value.',
'different' => 'Les champs :attribute et :other doivent être différents.',
'digits' => 'Le champ :attribute doit contenir :digits chiffres.',
'digits_between' => 'Le champ :attribute doit contenir entre :min et :max chiffres.',
'dimensions' => 'La taille de l\'image :attribute n\'est pas conforme.',
'distinct' => 'Le champ :attribute a une valeur en double.',
'doesnt_contain' => 'Le champ :attribute ne doit contenir aucun des éléments suivants : :values.',
'doesnt_end_with' => 'Le champ :attribute ne doit pas finir avec une des valeurs suivantes : :values.',
'doesnt_start_with' => 'Le champ :attribute ne doit pas commencer avec une des valeurs suivantes : :values.',
'email' => 'Le champ :attribute doit être une adresse e-mail valide.',
'encoding' => 'The :attribute field must be encoded in :encoding.',
'ends_with' => 'Le champ :attribute doit se terminer par une des valeurs suivantes : :values',
'enum' => 'Le champ :attribute sélectionné est invalide.',
'exists' => 'Le champ :attribute sélectionné est invalide.',
'extensions' => 'Le champ :attribute doit avoir l\'une des extensions suivantes : :values.',
'file' => 'Le champ :attribute doit être un fichier.',
'filled' => 'Le champ :attribute doit avoir une valeur.',
'gt' => [
'array' => 'Le tableau :attribute doit contenir plus de :value éléments.',
'file' => 'La taille du fichier de :attribute doit être supérieure à :value kilo-octets.',
'numeric' => 'La valeur de :attribute doit être supérieure à :value.',
'string' => 'Le texte :attribute doit contenir plus de :value caractères.',
],
'gte' => [
'array' => 'Le tableau :attribute doit contenir au moins :value éléments.',
'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :value kilo-octets.',
'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :value.',
'string' => 'Le texte :attribute doit contenir au moins :value caractères.',
],
'hex_color' => 'Le champ :attribute doit être une couleur hexadécimale valide.',
'image' => 'Le champ :attribute doit être une image.',
'in' => 'Le champ :attribute est invalide.',
'in_array' => 'Le champ :attribute n\'existe pas dans :other.',
'in_array_keys' => 'Le champ :attribute doit contenir au moins l\'une des clés suivantes : :values.',
'integer' => 'Le champ :attribute doit être un entier.',
'ip' => 'Le champ :attribute doit être une adresse IP valide.',
'ipv4' => 'Le champ :attribute doit être une adresse IPv4 valide.',
'ipv6' => 'Le champ :attribute doit être une adresse IPv6 valide.',
'json' => 'Le champ :attribute doit être un document JSON valide.',
'list' => 'Le champ :attribute doit être une liste.',
'lowercase' => 'Le champ :attribute doit être en minuscules.',
'lt' => [
'array' => 'Le tableau :attribute doit contenir moins de :value éléments.',
'file' => 'La taille du fichier de :attribute doit être inférieure à :value kilo-octets.',
'numeric' => 'La valeur de :attribute doit être inférieure à :value.',
'string' => 'Le texte :attribute doit contenir moins de :value caractères.',
],
'lte' => [
'array' => 'Le tableau :attribute doit contenir au plus :value éléments.',
'file' => 'La taille du fichier de :attribute doit être inférieure ou égale à :value kilo-octets.',
'numeric' => 'La valeur de :attribute doit être inférieure ou égale à :value.',
'string' => 'Le texte :attribute doit contenir au plus :value caractères.',
],
'mac_address' => 'Le champ :attribute doit être une adresse MAC valide.',
'max' => [
'array' => 'Le tableau :attribute ne peut pas contenir plus que :max éléments.',
'file' => 'La taille du fichier de :attribute ne peut pas dépasser :max kilo-octets.',
'numeric' => 'La valeur de :attribute ne peut pas être supérieure à :max.',
'string' => 'Le texte de :attribute ne peut pas contenir plus de :max caractères.',
],
'max_digits' => 'Le champ :attribute ne doit pas avoir plus de :max chiffres.',
'mimes' => 'Le champ :attribute doit être un fichier de type : :values.',
'mimetypes' => 'Le champ :attribute doit être un fichier de type : :values.',
'min' => [
'array' => 'Le tableau :attribute doit contenir au moins :min éléments.',
'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :min kilo-octets.',
'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :min.',
'string' => 'Le texte de :attribute doit contenir au moins :min caractères.',
],
'min_digits' => 'Le champ :attribute doit avoir au moins :min chiffres.',
'missing' => 'Le champ :attribute doit être manquant.',
'missing_if' => 'Le champ :attribute doit être manquant quand :other a la valeur :value.',
'missing_unless' => 'Le champ :attribute doit être manquant sauf si :other a la valeur :value.',
'missing_with' => 'Le champ :attribute doit être manquant quand :values est présent.',
'missing_with_all' => 'Le champ :attribute doit être manquant quand :values sont présents.',
'multiple_of' => 'La valeur de :attribute doit être un multiple de :value',
'not_in' => 'Le champ :attribute sélectionné n\'est pas valide.',
'not_regex' => 'Le format du champ :attribute n\'est pas valide.',
'numeric' => 'Le champ :attribute doit contenir un nombre.',
'password' => [
'letters' => 'Le champ :attribute doit contenir au moins une lettre.',
'mixed' => 'Le champ :attribute doit contenir au moins une majuscule et une minuscule.',
'numbers' => 'Le champ :attribute doit contenir au moins un chiffre.',
'symbols' => 'Le champ :attribute doit contenir au moins un symbole.',
'uncompromised' => 'La valeur du champ :attribute est apparue dans une fuite de données. Veuillez choisir une valeur différente.',
],
'present' => 'Le champ :attribute doit être présent.',
'present_if' => 'Le champ :attribute doit être présent lorsque :other est :value.',
'present_unless' => 'Le champ :attribute doit être présent sauf si :other vaut :value.',
'present_with' => 'Le champ :attribute doit être présent lorsque :values est présent.',
'present_with_all' => 'Le champ :attribute doit être présent lorsque :values sont présents.',
'prohibited' => 'Le champ :attribute est interdit.',
'prohibited_if' => 'Le champ :attribute est interdit quand :other a la valeur :value.',
'prohibited_if_accepted' => 'Le champ :attribute est interdit quand :other a été accepté.',
'prohibited_if_declined' => 'Le champ :attribute est interdit quand :other a été refusé.',
'prohibited_unless' => 'Le champ :attribute est interdit à moins que :other est l\'une des valeurs :values.',
'prohibits' => 'Le champ :attribute interdit :other d\'être présent.',
'regex' => 'Le format du champ :attribute est invalide.',
'required' => 'Le champ :attribute est obligatoire.',
'required_array_keys' => 'Le champ :attribute doit contenir des entrées pour : :values.',
'required_if' => 'Le champ :attribute est obligatoire quand la valeur de :other est :value.',
'required_if_accepted' => 'Le champ :attribute est obligatoire quand le champ :other a été accepté.',
'required_if_declined' => 'Le champ :attribute est obligatoire quand le champ :other a été refusé.',
'required_unless' => 'Le champ :attribute est obligatoire sauf si :other est :values.',
'required_with' => 'Le champ :attribute est obligatoire quand :values est présent.',
'required_with_all' => 'Le champ :attribute est obligatoire quand :values sont présents.',
'required_without' => 'Le champ :attribute est obligatoire quand :values n\'est pas présent.',
'required_without_all' => 'Le champ :attribute est requis quand aucun de :values n\'est présent.',
'same' => 'Les champs :attribute et :other doivent être identiques.',
'size' => [
'array' => 'Le tableau :attribute doit contenir :size éléments.',
'file' => 'La taille du fichier de :attribute doit être de :size kilo-octets.',
'numeric' => 'La valeur de :attribute doit être :size.',
'string' => 'Le texte de :attribute doit contenir :size caractères.',
],
'starts_with' => 'Le champ :attribute doit commencer avec une des valeurs suivantes : :values',
'string' => 'Le champ :attribute doit être une chaîne de caractères.',
'timezone' => 'Le champ :attribute doit être un fuseau horaire valide.',
'ulid' => 'Le champ :attribute doit être un ULID valide.',
'unique' => 'La valeur du champ :attribute est déjà utilisée.',
'uploaded' => 'Le fichier du champ :attribute n\'a pu être téléversé.',
'uppercase' => 'Le champ :attribute doit être en majuscules.',
'url' => 'Le format de l\'URL de :attribute n\'est pas valide.',
'uuid' => 'Le champ :attribute doit être un UUID valide',
'attributes' => [
'address' => 'adresse',
'affiliate_url' => 'URL d\'affiliation',
'age' => 'âge',
'amount' => 'montant',
'announcement' => 'annonce',
'area' => 'zone',
'audience_prize' => 'prix du public',
'audience_winner' => 'gagnant du public',
'available' => 'disponible',
'birthday' => 'anniversaire',
'body' => 'corps',
'city' => 'ville',
'color' => 'color',
'company' => 'entreprise',
'compilation' => 'compilation',
'concept' => 'concept',
'conditions' => 'conditions',
'content' => 'contenu',
'contest' => 'contest',
'country' => 'pays',
'cover' => 'couverture',
'created_at' => 'date de création',
'creator' => 'créateur',
'currency' => 'devise',
'current_password' => 'mot de passe actuel',
'customer' => 'client',
'date' => 'date',
'date_of_birth' => 'date de naissance',
'dates' => 'rendez-vous',
'day' => 'jour',
'deleted_at' => 'date de suppression',
'description' => 'description',
'display_type' => 'type d\'affichage',
'district' => 'quartier',
'duration' => 'durée',
'email' => 'adresse e-mail',
'excerpt' => 'extrait',
'filter' => 'filtre',
'finished_at' => 'date de fin',
'first_name' => 'prénom',
'gender' => 'genre',
'grand_prize' => 'grand prix',
'group' => 'groupe',
'hour' => 'heure',
'image' => 'image',
'image_desktop' => 'image de bureau',
'image_main' => 'image principale',
'image_mobile' => 'image mobile',
'images' => 'images',
'is_audience_winner' => 'est le gagnant du public',
'is_hidden' => 'est caché',
'is_subscribed' => 'est abonné',
'is_visible' => 'est visible',
'is_winner' => 'est gagnant',
'items' => 'articles',
'key' => 'clé',
'last_name' => 'nom de famille',
'lesson' => 'leçon',
'line_address_1' => 'ligne d\'adresse 1',
'line_address_2' => 'ligne d\'adresse 2',
'login' => 'identifiant',
'message' => 'message',
'middle_name' => 'deuxième prénom',
'minute' => 'minute',
'mobile' => 'portable',
'month' => 'mois',
'name' => 'nom',
'national_code' => 'code national',
'number' => 'numéro',
'password' => 'mot de passe',
'password_confirmation' => 'confirmation du mot de passe',
'phone' => 'téléphone',
'photo' => 'photo',
'portfolio' => 'portefeuille',
'postal_code' => 'code postal',
'preview' => 'aperçu',
'price' => 'prix',
'product_id' => 'identifiant du produit',
'product_uid' => 'UID du produit',
'product_uuid' => 'UUID du produit',
'promo_code' => 'code promo',
'province' => 'région',
'quantity' => 'quantité',
'reason' => 'raison',
'recaptcha_response_field' => 'champ de réponse reCAPTCHA',
'referee' => 'arbitre',
'referees' => 'arbitres',
'region' => 'region',
'reject_reason' => 'motif de rejet',
'remember' => 'se souvenir',
'restored_at' => 'date de restauration',
'result_text_under_image' => 'texte de résultat sous l\'image',
'role' => 'rôle',
'rule' => 'règle',
'rules' => 'règles',
'second' => 'seconde',
'sex' => 'sexe',
'shipment' => 'expédition',
'short_text' => 'texte court',
'size' => 'taille',
'skills' => 'compétences',
'slug' => 'slug',
'specialization' => 'spécialisation',
'started_at' => 'date de début',
'state' => 'état',
'status' => 'statut',
'street' => 'rue',
'student' => 'étudiant',
'subject' => 'sujet',
'tag' => 'mot clé',
'tags' => 'mots clés',
'teacher' => 'professeur',
'terms' => 'conditions',
'test_description' => 'description du test',
'test_locale' => 'localisation du test',
'test_name' => 'nom du test',
'text' => 'texte',
'time' => 'heure',
'title' => 'titre',
'type' => 'type',
'updated_at' => 'date de mise à jour',
'user' => 'utilisateur',
'username' => 'nom d\'utilisateur',
'value' => 'valeur',
'winner' => 'gagnant',
'work' => 'travail',
'year' => 'année',
],
];

59
package-lock.json generated
View File

@@ -1,5 +1,5 @@
{ {
"name": "QuizzCabm", "name": "RECRU_IT_V2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
@@ -7,7 +7,10 @@
"dependencies": { "dependencies": {
"@tailwindcss/typography": "^0.5.19", "@tailwindcss/typography": "^0.5.19",
"chart.js": "^4.5.1", "chart.js": "^4.5.1",
"marked": "^17.0.4" "date-fns": "^4.1.0",
"leaflet": "^1.9.4",
"marked": "^17.0.4",
"vuedraggable": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@inertiajs/vue3": "^2.0.0", "@inertiajs/vue3": "^2.0.0",
@@ -40,7 +43,6 @@
"version": "7.27.1", "version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
"integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
@@ -50,7 +52,6 @@
"version": "7.28.5", "version": "7.28.5",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
"integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
"dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
@@ -60,7 +61,6 @@
"version": "7.29.2", "version": "7.29.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz",
"integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/types": "^7.29.0" "@babel/types": "^7.29.0"
@@ -76,7 +76,6 @@
"version": "7.29.0", "version": "7.29.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",
"integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/helper-string-parser": "^7.27.1", "@babel/helper-string-parser": "^7.27.1",
@@ -899,7 +898,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.30.tgz",
"integrity": "sha512-s3DfdZkcu/qExZ+td75015ljzHc6vE+30cFMGRPROYjqkroYI5NV2X1yAMX9UeyBNWB9MxCfPcsjpLS11nzkkw==", "integrity": "sha512-s3DfdZkcu/qExZ+td75015ljzHc6vE+30cFMGRPROYjqkroYI5NV2X1yAMX9UeyBNWB9MxCfPcsjpLS11nzkkw==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/parser": "^7.29.0", "@babel/parser": "^7.29.0",
@@ -913,7 +911,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.30.tgz",
"integrity": "sha512-eCFYESUEVYHhiMuK4SQTldO3RYxyMR/UQL4KdGD1Yrkfdx4m/HYuZ9jSfPdA+nWJY34VWndiYdW/wZXyiPEB9g==", "integrity": "sha512-eCFYESUEVYHhiMuK4SQTldO3RYxyMR/UQL4KdGD1Yrkfdx4m/HYuZ9jSfPdA+nWJY34VWndiYdW/wZXyiPEB9g==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-core": "3.5.30", "@vue/compiler-core": "3.5.30",
@@ -924,7 +921,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.30.tgz",
"integrity": "sha512-LqmFPDn89dtU9vI3wHJnwaV6GfTRD87AjWpTWpyrdVOObVtjIuSeZr181z5C4PmVx/V3j2p+0f7edFKGRMpQ5A==", "integrity": "sha512-LqmFPDn89dtU9vI3wHJnwaV6GfTRD87AjWpTWpyrdVOObVtjIuSeZr181z5C4PmVx/V3j2p+0f7edFKGRMpQ5A==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/parser": "^7.29.0", "@babel/parser": "^7.29.0",
@@ -942,7 +938,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.30.tgz",
"integrity": "sha512-NsYK6OMTnx109PSL2IAyf62JP6EUdk4Dmj6AkWcJGBvN0dQoMYtVekAmdqgTtWQgEJo+Okstbf/1p7qZr5H+bA==", "integrity": "sha512-NsYK6OMTnx109PSL2IAyf62JP6EUdk4Dmj6AkWcJGBvN0dQoMYtVekAmdqgTtWQgEJo+Okstbf/1p7qZr5H+bA==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-dom": "3.5.30", "@vue/compiler-dom": "3.5.30",
@@ -953,7 +948,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.30.tgz",
"integrity": "sha512-179YNgKATuwj9gB+66snskRDOitDiuOZqkYia7mHKJaidOMo/WJxHKF8DuGc4V4XbYTJANlfEKb0yxTQotnx4Q==", "integrity": "sha512-179YNgKATuwj9gB+66snskRDOitDiuOZqkYia7mHKJaidOMo/WJxHKF8DuGc4V4XbYTJANlfEKb0yxTQotnx4Q==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/shared": "3.5.30" "@vue/shared": "3.5.30"
@@ -963,7 +957,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.30.tgz",
"integrity": "sha512-e0Z+8PQsUTdwV8TtEsLzUM7SzC7lQwYKePydb7K2ZnmS6jjND+WJXkmmfh/swYzRyfP1EY3fpdesyYoymCzYfg==", "integrity": "sha512-e0Z+8PQsUTdwV8TtEsLzUM7SzC7lQwYKePydb7K2ZnmS6jjND+WJXkmmfh/swYzRyfP1EY3fpdesyYoymCzYfg==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/reactivity": "3.5.30", "@vue/reactivity": "3.5.30",
@@ -974,7 +967,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.30.tgz",
"integrity": "sha512-2UIGakjU4WSQ0T4iwDEW0W7vQj6n7AFn7taqZ9Cvm0Q/RA2FFOziLESrDL4GmtI1wV3jXg5nMoJSYO66egDUBw==", "integrity": "sha512-2UIGakjU4WSQ0T4iwDEW0W7vQj6n7AFn7taqZ9Cvm0Q/RA2FFOziLESrDL4GmtI1wV3jXg5nMoJSYO66egDUBw==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/reactivity": "3.5.30", "@vue/reactivity": "3.5.30",
@@ -987,7 +979,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.30.tgz",
"integrity": "sha512-v+R34icapydRwbZRD0sXwtHqrQJv38JuMB4JxbOxd8NEpGLny7cncMp53W9UH/zo4j8eDHjQ1dEJXwzFQknjtQ==", "integrity": "sha512-v+R34icapydRwbZRD0sXwtHqrQJv38JuMB4JxbOxd8NEpGLny7cncMp53W9UH/zo4j8eDHjQ1dEJXwzFQknjtQ==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-ssr": "3.5.30", "@vue/compiler-ssr": "3.5.30",
@@ -1001,7 +992,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.30.tgz", "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.30.tgz",
"integrity": "sha512-YXgQ7JjaO18NeK2K9VTbDHaFy62WrObMa6XERNfNOkAhD1F1oDSf3ZJ7K6GqabZ0BvSDHajp8qfS5Sa2I9n8uQ==", "integrity": "sha512-YXgQ7JjaO18NeK2K9VTbDHaFy62WrObMa6XERNfNOkAhD1F1oDSf3ZJ7K6GqabZ0BvSDHajp8qfS5Sa2I9n8uQ==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/ansi-regex": { "node_modules/ansi-regex": {
@@ -1419,9 +1409,18 @@
"version": "3.2.3", "version": "3.2.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/date-fns": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz",
"integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==",
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/kossnocorp"
}
},
"node_modules/delayed-stream": { "node_modules/delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -1501,7 +1500,6 @@
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz",
"integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==",
"dev": true,
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"engines": { "engines": {
"node": ">=0.12" "node": ">=0.12"
@@ -1573,7 +1571,6 @@
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/fast-glob": { "node_modules/fast-glob": {
@@ -1941,6 +1938,12 @@
"vite": "^8.0.0" "vite": "^8.0.0"
} }
}, },
"node_modules/leaflet": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==",
"license": "BSD-2-Clause"
},
"node_modules/lightningcss": { "node_modules/lightningcss": {
"version": "1.32.0", "version": "1.32.0",
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
@@ -2231,7 +2234,6 @@
"version": "0.30.21", "version": "0.30.21",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
"integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.5" "@jridgewell/sourcemap-codec": "^1.5.5"
@@ -2855,6 +2857,12 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/sortablejs": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz",
"integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==",
"license": "MIT"
},
"node_modules/source-map-js": { "node_modules/source-map-js": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
@@ -3246,7 +3254,6 @@
"version": "3.5.30", "version": "3.5.30",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.30.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.30.tgz",
"integrity": "sha512-hTHLc6VNZyzzEH/l7PFGjpcTvUgiaPK5mdLkbjrTeWSRcEfxFrv56g/XckIYlE9ckuobsdwqd5mk2g1sBkMewg==", "integrity": "sha512-hTHLc6VNZyzzEH/l7PFGjpcTvUgiaPK5mdLkbjrTeWSRcEfxFrv56g/XckIYlE9ckuobsdwqd5mk2g1sBkMewg==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-dom": "3.5.30", "@vue/compiler-dom": "3.5.30",
@@ -3264,6 +3271,18 @@
} }
} }
}, },
"node_modules/vuedraggable": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-4.1.0.tgz",
"integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==",
"license": "MIT",
"dependencies": {
"sortablejs": "1.14.0"
},
"peerDependencies": {
"vue": "^3.0.1"
}
},
"node_modules/wrap-ansi": { "node_modules/wrap-ansi": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",

View File

@@ -23,6 +23,9 @@
"dependencies": { "dependencies": {
"@tailwindcss/typography": "^0.5.19", "@tailwindcss/typography": "^0.5.19",
"chart.js": "^4.5.1", "chart.js": "^4.5.1",
"marked": "^17.0.4" "date-fns": "^4.1.0",
"leaflet": "^1.9.4",
"marked": "^17.0.4",
"vuedraggable": "^4.1.0"
} }
} }

BIN
public/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,3 +1,4 @@
@import './tokens.css';
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;

271
resources/css/tokens.css Normal file
View File

@@ -0,0 +1,271 @@
/**
* design-tokens/tokens.css
* Variables CSS globales RecruitQuizz / CABM
* À importer dans resources/css/app.css :
* @import '../../../design-tokens/tokens.css';
*/
/* ─── COULEURS ────────────────────────────────────────────────────────────── */
:root {
/* Primaires */
--color-primary: #1a4b8c;
--color-primary-dark: #122f5a;
--color-primary-light: #3a7abf;
--color-primary-soft: rgba(26, 75, 140, 0.08);
/* Accent */
--color-accent: #c8102e;
--color-accent-soft: rgba(200, 16, 46, 0.10);
/* Or (highlight) */
--color-gold: #f5a800;
--color-gold-soft: rgba(245, 168, 0, 0.12);
--color-gold-on: #3a2800; /* texte sur fond or */
/* Neutres warm */
--color-bg: #f0ece4; /* fond global */
--color-surface: #faf9f7; /* cartes */
--color-sand: #e8e0d0; /* sable */
--color-border: rgba(45, 45, 45, 0.07);
/* Texte */
--color-text: #2d2d2d;
--color-text-muted: rgba(45, 45, 45, 0.50);
--color-text-faint: rgba(45, 45, 45, 0.28);
/* Sémantiques */
--color-success: #10b981;
--color-success-soft: rgba(16, 185, 129, 0.10);
--color-warning: #f5a800;
--color-danger: #c8102e;
--color-info: #3a7abf;
/* Sidebar */
--sidebar-bg: #1a4b8c;
--sidebar-text: rgba(255, 255, 255, 0.72);
--sidebar-active-bg: #f5a800;
--sidebar-active-text: #3a2800;
--sidebar-border: rgba(255, 255, 255, 0.07);
--sidebar-width: 220px;
--sidebar-width-sm: 64px;
/* Layout */
--header-height: 60px;
--navbar-height: 40px;
}
/* ─── DARK MODE ───────────────────────────────────────────────────────────── */
.dark {
--color-primary: #4a8fd4;
--color-primary-soft: rgba(74, 143, 212, 0.12);
--color-bg: #0f1923;
--color-surface: #162130;
--color-border: rgba(255, 255, 255, 0.06);
--color-text: #e8e8e8;
--color-text-muted: rgba(232, 232, 232, 0.50);
--color-text-faint: rgba(232, 232, 232, 0.25);
--color-success: #34d399;
--color-success-soft: rgba(16, 185, 129, 0.12);
--color-accent: #ff4d6a;
--sidebar-bg: #0a111a;
--sidebar-border: rgba(255, 255, 255, 0.05);
}
/* ─── TYPOGRAPHIE ─────────────────────────────────────────────────────────── */
:root {
--font-sans: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
--font-serif: 'Merriweather', Georgia, serif;
--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
/* Échelle */
--text-2xs: 0.625rem; /* 10px — labels uppercase */
--text-xs: 0.75rem; /* 12px */
--text-sm: 0.8125rem; /* 13px */
--text-base: 0.875rem; /* 14px */
--text-md: 1rem; /* 16px */
--text-lg: 1.0625rem; /* 17px */
--text-xl: 1.125rem; /* 18px */
--text-2xl: 1.25rem; /* 20px */
--text-3xl: 1.5rem; /* 24px */
--text-4xl: 2rem; /* 32px */
}
/* ─── ESPACEMENT ──────────────────────────────────────────────────────────── */
:root {
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-7: 28px;
--space-8: 32px;
--space-10: 40px;
--space-12: 48px;
--space-16: 64px;
}
/* ─── RAYONS ──────────────────────────────────────────────────────────────── */
:root {
--radius-sm: 6px;
--radius: 8px;
--radius-md: 10px;
--radius-lg: 12px;
--radius-xl: 14px;
--radius-2xl: 16px;
--radius-3xl: 20px;
--radius-full: 9999px;
/* Tokens sémantiques */
--radius-card: 16px;
--radius-btn: 10px;
--radius-badge: 20px;
--radius-input: 10px;
}
/* ─── OMBRES ──────────────────────────────────────────────────────────────── */
:root {
--shadow-xs: 0 1px 3px rgba(0,0,0,0.05);
--shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
--shadow: 0 2px 8px rgba(0,0,0,0.09);
--shadow-md: 0 4px 16px rgba(0,0,0,0.10);
--shadow-lg: 0 8px 28px rgba(0,0,0,0.12);
--shadow-primary: 0 4px 16px rgba(26,75,140,0.20);
--shadow-gold: 0 4px 16px rgba(245,168,0,0.30);
--shadow-accent: 0 4px 16px rgba(200,16,46,0.18);
}
/* ─── TRANSITIONS ─────────────────────────────────────────────────────────── */
:root {
--transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
--transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* ─── COMPOSANTS DE BASE ──────────────────────────────────────────────────── */
/* --- Carte --- */
.rq-card {
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius-card);
box-shadow: var(--shadow-sm);
}
/* --- Bouton primaire (or) --- */
.rq-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 10px 20px;
border: none;
border-radius: var(--radius-btn);
font-family: var(--font-sans);
font-weight: 800;
font-size: var(--text-sm);
text-transform: uppercase;
letter-spacing: 0.08em;
cursor: pointer;
transition: all var(--transition);
}
.rq-btn-primary {
background: var(--color-gold);
color: var(--color-gold-on);
box-shadow: var(--shadow-gold);
}
.rq-btn-primary:hover {
filter: brightness(1.06);
transform: translateY(-1px);
box-shadow: 0 6px 20px rgba(245,168,0,0.40);
}
.rq-btn-ghost {
background: transparent;
color: var(--color-text);
border: 1.5px solid var(--color-border);
}
.rq-btn-ghost:hover {
background: var(--color-primary-soft);
border-color: var(--color-primary);
color: var(--color-primary);
}
/* --- Input --- */
.rq-input {
width: 100%;
padding: 10px 14px;
border-radius: var(--radius-input);
border: 1.5px solid var(--color-border);
background: var(--color-surface);
color: var(--color-text);
font-family: var(--font-sans);
font-size: var(--text-base);
font-weight: 600;
outline: none;
transition: border-color var(--transition);
}
.rq-input:focus {
border-color: var(--color-primary);
box-shadow: 0 0 0 3px var(--color-primary-soft);
}
/* --- Badge statut --- */
.rq-badge {
display: inline-block;
padding: 3px 10px;
border-radius: var(--radius-badge);
font-size: var(--text-2xs);
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.12em;
}
.rq-badge--pending { background: rgba(45,45,45,0.06); color: rgba(45,45,45,0.55); }
.rq-badge--ongoing { background: rgba(58,122,191,0.10); color: #1a4b8c; }
.rq-badge--done { background: rgba(16,185,129,0.10); color: #059669; }
.rq-badge--rejected { background: rgba(200,16,46,0.10); color: #c8102e; }
.dark .rq-badge--pending { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.45); }
.dark .rq-badge--ongoing { background: rgba(58,122,191,0.20); color: #7ab8f5; }
.dark .rq-badge--done { background: rgba(16,185,129,0.15); color: #34d399; }
.dark .rq-badge--rejected { background: rgba(255,77,106,0.15); color: #ff8099; }
/* --- Label section uppercase --- */
.rq-label {
font-size: var(--text-2xs);
font-weight: 900;
text-transform: uppercase;
letter-spacing: 0.16em;
color: var(--color-text-faint);
}
/* --- Score bar --- */
.rq-score-bar {
height: 5px;
background: rgba(45,45,45,0.08);
border-radius: 99px;
overflow: hidden;
}
.rq-score-bar__fill {
height: 100%;
border-radius: 99px;
transition: width 0.4s ease;
}
.rq-score-bar__fill--high { background: var(--color-success); }
.rq-score-bar__fill--mid { background: var(--color-gold); }
.rq-score-bar__fill--low { background: var(--color-accent); }
/* --- Animations utilitaires --- */
@keyframes rq-fade-in {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes rq-slide-in {
from { opacity: 0; transform: translateX(-8px); }
to { opacity: 1; transform: translateX(0); }
}
.rq-animate-fade { animation: rq-fade-in 0.2s ease-out; }
.rq-animate-slide { animation: rq-slide-in 0.2s ease-out; }

View File

@@ -36,6 +36,8 @@ const alignmentClasses = computed(() => {
return 'ltr:origin-top-left rtl:origin-top-right start-0'; return 'ltr:origin-top-left rtl:origin-top-right start-0';
} else if (props.align === 'right') { } else if (props.align === 'right') {
return 'ltr:origin-top-right rtl:origin-top-left end-0'; return 'ltr:origin-top-right rtl:origin-top-left end-0';
} else if (props.align === 'top-right') {
return 'origin-bottom-right bottom-full mb-2 end-0 !mt-0';
} else { } else {
return 'origin-top'; return 'origin-top';
} }
@@ -67,13 +69,13 @@ const open = ref(false);
> >
<div <div
v-show="open" v-show="open"
class="absolute z-50 mt-2 rounded-md shadow-lg" class="absolute z-50 mt-2 rounded-xl shadow-md border border-anthracite/5"
:class="[widthClass, alignmentClasses]" :class="[widthClass, alignmentClasses]"
style="display: none" style="display: none"
@click="open = false" @click="open = false"
> >
<div <div
class="rounded-md ring-1 ring-black ring-opacity-5" class="rounded-xl overflow-hidden"
:class="contentClasses" :class="contentClasses"
> >
<slot name="content" /> <slot name="content" />

View File

@@ -12,8 +12,7 @@ defineProps({
<template> <template>
<Link <Link
:href="href" :href="href"
class="block w-full px-4 py-2 text-start text-sm font-semibold leading-5 transition duration-150 ease-in-out focus:outline-none" class="block w-full px-4 py-2 text-start text-sm font-subtitle font-bold leading-5 text-anthracite hover:bg-sand/30 hover:text-primary transition duration-150 ease-in-out focus:outline-none"
style="color:#1e293b;"
> >
<slot /> <slot />
</Link> </Link>

View File

@@ -14,8 +14,8 @@ const props = defineProps({
const classes = computed(() => const classes = computed(() =>
props.active props.active
? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-600 text-sm font-bold leading-5 text-indigo-700 focus:outline-none transition duration-150 ease-in-out' ? 'inline-flex items-center px-1 pt-1 border-b-2 border-primary text-sm font-subtitle font-bold leading-5 text-primary focus:outline-none transition duration-150 ease-in-out'
: 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-bold leading-5 text-slate-700 hover:text-indigo-600 hover:border-indigo-400 focus:outline-none transition duration-150 ease-in-out', : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-subtitle font-bold leading-5 text-anthracite/60 hover:text-primary hover:border-primary/30 focus:outline-none transition duration-150 ease-in-out',
); );
</script> </script>

View File

@@ -1,6 +1,6 @@
<template> <template>
<button <button
class="inline-flex items-center rounded-md border border-transparent bg-gray-800 px-4 py-2 text-xs font-semibold uppercase tracking-widest text-white transition duration-150 ease-in-out hover:bg-gray-700 focus:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 active:bg-gray-900" class="inline-flex items-center justify-center rounded-xl border border-transparent bg-highlight px-6 py-3 font-subtitle text-xs font-bold uppercase tracking-widest text-[#3a2800] shadow-md shadow-highlight/20 transition-all duration-300 ease-in-out hover:-translate-y-0.5 hover:brightness-110 hover:shadow-lg hover:shadow-highlight/30 focus:outline-none focus:ring-2 focus:ring-highlight/50 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
> >
<slot /> <slot />
</button> </button>

View File

@@ -14,8 +14,8 @@ const props = defineProps({
const classes = computed(() => const classes = computed(() =>
props.active props.active
? 'block w-full ps-3 pe-4 py-2 border-l-4 border-indigo-400 text-start text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out' ? 'block w-full ps-3 pe-4 py-2 border-l-4 border-primary text-start text-base font-subtitle font-bold text-primary bg-primary/5 focus:outline-none focus:text-primary focus:bg-primary/10 focus:border-primary transition duration-150 ease-in-out'
: 'block w-full ps-3 pe-4 py-2 border-l-4 border-transparent text-start text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out', : 'block w-full ps-3 pe-4 py-2 border-l-4 border-transparent text-start text-base font-subtitle font-medium text-anthracite/60 hover:text-primary hover:bg-sand/30 hover:border-anthracite/20 focus:outline-none focus:text-primary focus:bg-sand/30 focus:border-anthracite/20 transition duration-150 ease-in-out',
); );
</script> </script>

View File

@@ -0,0 +1,35 @@
<script setup>
/**
* RqBadge.vue — Badge de statut candidat
*
* @prop status 'en_attente' | 'en_cours' | 'termine' | 'refuse'
* @prop label Override du texte affiché (optionnel)
*/
const props = defineProps({
status: { type: String, required: true },
label: { type: String, default: null },
});
const labels = {
en_attente: 'En attente',
en_cours: 'En cours',
termine: 'Terminé',
refuse: 'Refusé',
};
const displayLabel = props.label ?? labels[props.status] ?? props.status;
</script>
<template>
<span
:class="[
'inline-block px-2.5 py-0.5 rounded-full text-2xs font-black uppercase tracking-[0.12em]',
status === 'en_attente' && 'bg-ink/5 text-ink/55',
status === 'en_cours' && 'bg-primary/10 text-primary',
status === 'termine' && 'bg-success/10 text-success',
status === 'refuse' && 'bg-accent/10 text-accent',
]"
>
{{ displayLabel }}
</span>
</template>

View File

@@ -0,0 +1,45 @@
<script setup>
/**
* RqButton.vue — Bouton principal RecruitQuizz
*
* @prop variant 'primary' | 'ghost' | 'danger' | 'outline'
* @prop size 'sm' | 'md' | 'lg'
* @prop disabled Boolean
* @prop loading Boolean — affiche un spinner
* @prop icon SVG path string optionnel (gauche du label)
*/
defineProps({
variant: { type: String, default: 'primary' },
size: { type: String, default: 'md' },
disabled: { type: Boolean, default: false },
loading: { type: Boolean, default: false },
});
</script>
<template>
<button
v-bind="$attrs"
:disabled="disabled || loading"
:class="[
// Base
'inline-flex items-center justify-center gap-1.5 font-sans font-extrabold uppercase tracking-[0.08em] transition-all duration-150 select-none focus:outline-none focus:ring-2 focus:ring-offset-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed',
// Size
size === 'sm' && 'text-2xs px-3.5 py-2 rounded-lg',
size === 'md' && 'text-xs px-5 py-2.5 rounded-[10px]',
size === 'lg' && 'text-sm px-7 py-3.5 rounded-[10px]',
// Variant
variant === 'primary' && 'bg-highlight text-highlight-dark shadow-gold hover:brightness-105 hover:-translate-y-px hover:shadow-lg focus:ring-highlight/50',
variant === 'ghost' && 'bg-transparent text-ink border border-ink/10 hover:bg-primary/5 hover:border-primary hover:text-primary focus:ring-primary/30',
variant === 'outline' && 'bg-transparent text-primary border-2 border-primary hover:bg-primary hover:text-white focus:ring-primary/30',
variant === 'danger' && 'bg-accent/10 text-accent border border-accent/20 hover:bg-accent hover:text-white focus:ring-accent/30',
]"
>
<!-- Spinner -->
<svg v-if="loading" class="animate-spin h-4 w-4 opacity-70" viewBox="0 0 24 24" fill="none">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"/>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"/>
</svg>
<slot />
</button>
</template>

View File

@@ -0,0 +1,33 @@
<script setup>
/**
* RqCard.vue — Carte conteneur RecruitQuizz
*
* @prop padding 'none' | 'sm' | 'md' | 'lg'
* @prop hover Boolean — active l'effet de survol (lift)
* @prop accent 'primary' | 'gold' | 'green' | 'red' — bordure colorée en bas
*/
defineProps({
padding: { type: String, default: 'md' },
hover: { type: Boolean, default: false },
accent: { type: String, default: null },
});
</script>
<template>
<div
:class="[
'bg-surface rounded-2xl border border-ink/[0.07] shadow-sm',
hover && 'transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md',
accent === 'primary' && 'border-b-2 border-b-primary',
accent === 'gold' && 'border-b-2 border-b-highlight',
accent === 'green' && 'border-b-2 border-b-success',
accent === 'red' && 'border-b-2 border-b-accent',
padding === 'none' && 'overflow-hidden',
padding === 'sm' && 'p-4',
padding === 'md' && 'p-5',
padding === 'lg' && 'p-6',
]"
>
<slot />
</div>
</template>

View File

@@ -0,0 +1,65 @@
<script setup>
/**
* RqInput.vue — Champ de saisie RecruitQuizz
*
* @prop modelValue String (v-model)
* @prop placeholder String
* @prop type String (text, email, password, search…)
* @prop icon 'search' | 'mail' | 'lock' — icône préfixe
* @prop error String — message d'erreur
* @prop label String — label au-dessus du champ
*/
import { computed } from 'vue';
const props = defineProps({
modelValue: { type: String, default: '' },
placeholder: { type: String, default: '' },
type: { type: String, default: 'text' },
icon: { type: String, default: null },
error: { type: String, default: null },
label: { type: String, default: null },
});
const emit = defineEmits(['update:modelValue']);
const iconPaths = {
search: 'M11 17.25a6.25 6.25 0 110-12.5 6.25 6.25 0 010 12.5zM16 16l4.5 4.5',
mail: 'M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2zM22 6l-10 7L2 6',
lock: 'M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zM7 11V7a5 5 0 0110 0v4',
};
</script>
<template>
<div class="flex flex-col gap-1.5 w-full">
<!-- Label -->
<label v-if="label" class="text-2xs font-black uppercase tracking-[0.14em] text-ink/50">
{{ label }}
</label>
<!-- Input wrapper -->
<div class="relative">
<!-- Icon -->
<span v-if="icon" class="absolute left-3 top-1/2 -translate-y-1/2 text-ink/30 pointer-events-none">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path :d="iconPaths[icon]" />
</svg>
</span>
<input
:type="type"
:value="modelValue"
:placeholder="placeholder"
@input="emit('update:modelValue', $event.target.value)"
:class="[
'w-full rounded-[10px] border bg-surface font-sans text-sm font-semibold text-ink placeholder:text-ink/30 outline-none transition-all duration-150',
'focus:border-primary focus:ring-2 focus:ring-primary/15',
icon ? 'pl-9 pr-4 py-2.5' : 'px-4 py-2.5',
error ? 'border-accent focus:border-accent focus:ring-accent/15' : 'border-ink/10',
]"
/>
</div>
<!-- Error -->
<p v-if="error" class="text-2xs font-bold text-accent">{{ error }}</p>
</div>
</template>

View File

@@ -0,0 +1,38 @@
<script setup>
/**
* RqScoreBar.vue — Barre de score pondéré
*
* @prop value Number — score actuel
* @prop max Number — score maximum (défaut 20)
* @prop showLabel Boolean — affiche "X/max" à droite
*/
import { computed } from 'vue';
const props = defineProps({
value: { type: Number, required: true },
max: { type: Number, default: 20 },
showLabel: { type: Boolean, default: true },
});
const pct = computed(() => Math.min(100, (props.value / props.max) * 100));
const colorClass = computed(() => {
if (pct.value >= 80) return 'bg-success';
if (pct.value >= 60) return 'bg-highlight';
return 'bg-accent';
});
</script>
<template>
<div class="flex items-center gap-2.5 w-full">
<div class="flex-1 h-[5px] bg-ink/[0.07] rounded-full overflow-hidden">
<div
:class="['h-full rounded-full transition-all duration-500', colorClass]"
:style="{ width: `${pct}%` }"
/>
</div>
<span v-if="showLabel" class="text-xs font-black text-ink tabular-nums min-w-[44px] text-right">
{{ value }}<span class="text-[9px] text-ink/40 font-semibold">/{{ max }}</span>
</span>
</div>
</template>

View File

@@ -0,0 +1,54 @@
<script setup>
/**
* RqStatCard.vue — Carte KPI dashboard admin
*
* @prop label String — libellé (ex: "Total Candidats")
* @prop value String | Number — valeur principale
* @prop sub String — sous-texte (ex: "+3 ce mois")
* @prop color 'primary' | 'gold' | 'green' | 'sky' | 'red'
* @prop unit String — unité affichée après la valeur (ex: "/ 20")
*/
import { computed } from 'vue';
const props = defineProps({
label: { type: String, required: true },
value: { type: [String, Number], required: true },
sub: { type: String, default: null },
color: { type: String, default: 'primary' },
unit: { type: String, default: null },
});
const colorMap = {
primary: { text: 'text-primary', glow: 'from-primary/10' },
gold: { text: 'text-highlight', glow: 'from-highlight/15' },
green: { text: 'text-success', glow: 'from-success/10' },
sky: { text: 'text-primary-light', glow: 'from-primary-light/10' },
red: { text: 'text-accent', glow: 'from-accent/10' },
};
const c = computed(() => colorMap[props.color] ?? colorMap.primary);
</script>
<template>
<div class="relative bg-surface rounded-2xl border border-ink/[0.07] shadow-sm p-5 overflow-hidden
transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md group cursor-default">
<!-- Label -->
<p class="text-2xs font-black uppercase tracking-[0.18em] text-ink/40 mb-2.5">
{{ label }}
</p>
<!-- Value -->
<p :class="['font-serif font-black leading-none', c.text]"
style="font-size: clamp(1.75rem, 2.5vw, 2.25rem);">
{{ value }}
<span v-if="unit" class="text-base font-sans font-bold text-ink/30 ml-1">{{ unit }}</span>
</p>
<!-- Sub -->
<p v-if="sub" class="mt-1.5 text-2xs font-semibold text-ink/40">{{ sub }}</p>
<!-- Decorative blob -->
<div :class="['absolute bottom-0 right-0 w-20 h-20 rounded-full bg-gradient-radial to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500', c.glow]" />
</div>
</template>

View File

@@ -1,157 +1,273 @@
<script setup> <script setup>
/**
* AdminLayout.vue — Layout principal admin redesigné
* RecruitQuizz v2.4
*
* Changements vs version précédente :
* - Sidebar 220px (collapsible → 64px) avec transition douce
* - Header 60px épuré, titre avec accent bar or
* - Fond neutral (#f0ece4) sur le contenu principal
* - Items nav : rounded-xl, active bg-highlight text-highlight-dark
* - Footer sidebar : avatar + nom + version + logout
*/
import { ref } from 'vue'; import { ref } from 'vue';
import { Link } from '@inertiajs/vue3'; import { Link, usePage } from '@inertiajs/vue3';
import ApplicationLogo from '@/Components/ApplicationLogo.vue';
import Dropdown from '@/Components/Dropdown.vue'; import Dropdown from '@/Components/Dropdown.vue';
import DropdownLink from '@/Components/DropdownLink.vue'; import DropdownLink from '@/Components/DropdownLink.vue';
import EnvironmentBanner from '@/Components/EnvironmentBanner.vue'; import EnvironmentBanner from '@/Components/EnvironmentBanner.vue';
const page = usePage();
const isSidebarOpen = ref(true); const isSidebarOpen = ref(true);
// ─── Navigation ────────────────────────────────────────────────────────────
const navItems = [
{
route: 'dashboard',
label: 'Tableau de bord',
icon: 'M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M9 22V12h6v10',
},
{
route: 'admin.candidates.index',
match: ['admin.candidates.index', 'admin.candidates.show'],
label: 'Candidats',
icon: 'M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2 M9 11a4 4 0 100-8 4 4 0 000 8z M23 21v-2a4 4 0 00-3-3.87 M16 3.13a4 4 0 010 7.75',
},
{
route: 'admin.quizzes.index',
match: 'admin.quizzes.*',
label: 'Quiz',
icon: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2M9 12l2 2 4-4',
},
{
route: 'admin.job-positions.index',
match: 'admin.job-positions.*',
label: 'Fiches de Poste',
icon: 'M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z',
},
{
route: 'admin.comparative',
label: 'Comparateur',
icon: 'M18 20V10 M12 20V4 M6 20v-6',
},
{
route: 'admin.candidates.selected',
label: 'Selection',
icon: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z',
},
{
route: 'admin.candidates.map',
label: 'Carte',
icon: 'M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z',
},
];
const superAdminItems = [
{
route: 'admin.tenants.index',
match: 'admin.tenants.*',
label: 'Structures',
icon: 'M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4',
},
{
route: 'admin.users.index',
match: 'admin.users.*',
label: 'Équipe SaaS',
icon: 'M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z',
},
{
route: 'admin.logs.index',
match: 'admin.logs.*',
label: 'Logs connexion',
icon: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01',
},
];
const isActive = (item) => {
if (!item.match) return route().current(item.route);
if (Array.isArray(item.match)) {
return item.match.some(m => route().current(m));
}
return route().current(item.match);
};
</script> </script>
<template> <template>
<EnvironmentBanner /> <EnvironmentBanner />
<div class="min-h-screen bg-slate-50 dark:bg-slate-900 flex text-slate-900 dark:text-slate-100">
<!-- Sidebar --> <div class="h-screen flex bg-neutral font-sans text-ink selection:bg-highlight selection:text-highlight-dark overflow-hidden">
<!-- Sidebar -->
<aside <aside
:class="[isSidebarOpen ? 'w-64' : 'w-20']" :class="[
class="hidden md:flex flex-col bg-white dark:bg-slate-800 border-r border-slate-200 dark:border-slate-700 transition-all duration-300" isSidebarOpen ? 'w-[220px]' : 'w-16',
'hidden md:flex flex-col bg-primary shadow-xl z-20 transition-all duration-300 shrink-0'
]"
> >
<div class="h-16 flex items-center px-6 border-b border-slate-200 dark:border-slate-700"> <!-- Logo -->
<div class="h-[60px] flex items-center border-b border-white/[0.07] px-4 shrink-0">
<Link :href="route('dashboard')" class="flex items-center gap-3 overflow-hidden"> <Link :href="route('dashboard')" class="flex items-center gap-3 overflow-hidden">
<ApplicationLogo class="h-8 w-8 fill-indigo-600" /> <Transition name="fade">
<span v-if="isSidebarOpen" class="font-bold text-xl tracking-tight whitespace-nowrap">Recrut.IT</span> <img v-if="isSidebarOpen" src="/images/logo.png" alt="Logo" class="h-8 object-contain" />
<img v-else src="/images/logo.png" alt="Logo" class="h-6 object-contain" />
</Transition>
</Link> </Link>
</div> </div>
<nav class="flex-1 py-6 px-3 space-y-1"> <!-- Nav principale -->
<nav class="flex-1 px-2.5 py-4 space-y-0.5 overflow-y-auto scrollbar-thin scrollbar-thumb-white/10 scrollbar-track-transparent">
<!-- Items principaux -->
<template v-for="item in navItems" :key="item.route">
<Link <Link
:href="route('dashboard')" :href="route(item.route)"
class="flex items-center gap-3 px-3 py-2 rounded-lg transition-colors" :title="!isSidebarOpen ? item.label : undefined"
:class="[route().current('dashboard') ? 'bg-indigo-50 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400' : 'hover:bg-slate-50 dark:hover:bg-slate-700/50']" :class="[
'flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-150 font-sans font-bold text-[12.5px] tracking-[0.01em]',
isSidebarOpen ? '' : 'justify-center',
isActive(item)
? 'bg-highlight text-highlight-dark shadow-md shadow-highlight/20'
: 'text-white/70 hover:bg-white/10 hover:text-white',
]"
> >
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg class="w-[17px] h-[17px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /> <path :d="item.icon"/>
</svg> </svg>
<span v-if="isSidebarOpen">Tableau de bord</span> <span v-if="isSidebarOpen" class="truncate">{{ item.label }}</span>
</Link> </Link>
</template>
<Link <!-- Section super admin -->
:href="route('admin.candidates.index')" <template v-if="$page.props.auth.user.role === 'super_admin'">
class="flex items-center gap-3 px-3 py-2 rounded-lg transition-colors" <div class="pt-4 pb-2">
:class="[route().current('admin.candidates.*') ? 'bg-indigo-50 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400' : 'hover:bg-slate-50 dark:hover:bg-slate-700/50']" <div
> v-if="isSidebarOpen"
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> class="px-3 text-[9px] font-black uppercase tracking-[0.18em] text-white/25"
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" /> >Configuration</div>
</svg> <div v-else class="h-px w-8 mx-auto bg-white/10" />
<span v-if="isSidebarOpen">Candidats</span> </div>
</Link>
<template v-for="item in superAdminItems" :key="item.route">
<Link <Link
:href="route('admin.quizzes.index')" :href="route(item.route)"
class="flex items-center gap-3 px-3 py-2 rounded-lg transition-colors" :title="!isSidebarOpen ? item.label : undefined"
:class="[route().current('admin.quizzes.*') ? 'bg-indigo-50 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400' : 'hover:bg-slate-50 dark:hover:bg-slate-700/50']" :class="[
'flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-150 font-sans font-bold text-[12.5px] tracking-[0.01em]',
isSidebarOpen ? '' : 'justify-center',
isActive(item)
? 'bg-highlight text-highlight-dark shadow-md shadow-highlight/20'
: 'text-white/70 hover:bg-white/10 hover:text-white',
]"
> >
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg class="w-[17px] h-[17px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> <path :d="item.icon"/>
</svg> </svg>
<span v-if="isSidebarOpen">Quiz</span> <span v-if="isSidebarOpen" class="truncate">{{ item.label }}</span>
</Link>
<Link
:href="route('admin.job-positions.index')"
class="flex items-center gap-3 px-3 py-2 rounded-lg transition-colors"
:class="[route().current('admin.job-positions.*') ? 'bg-indigo-50 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400' : 'hover:bg-slate-50 dark:hover:bg-slate-700/50']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
<span v-if="isSidebarOpen">Fiches de Poste</span>
</Link>
<Link
:href="route('admin.comparative')"
class="flex items-center gap-3 px-3 py-2 rounded-lg transition-colors"
:class="[route().current('admin.comparative') ? 'bg-indigo-50 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400' : 'hover:bg-slate-50 dark:hover:bg-slate-700/50']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
</svg>
<span v-if="isSidebarOpen">Comparateur</span>
</Link>
<Link
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.tenants.index')"
class="flex items-center gap-3 px-3 py-2 rounded-lg transition-colors"
:class="[route().current('admin.tenants.*') ? 'bg-indigo-50 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400' : 'hover:bg-slate-50 dark:hover:bg-slate-700/50']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
</svg>
<span v-if="isSidebarOpen">Structures</span>
</Link>
<Link
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.users.index')"
class="flex items-center gap-3 px-3 py-2 rounded-lg transition-colors"
:class="[route().current('admin.users.*') ? 'bg-indigo-50 text-indigo-600 dark:bg-indigo-900/50 dark:text-indigo-400' : 'hover:bg-slate-50 dark:hover:bg-slate-700/50']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<span v-if="isSidebarOpen">Équipe SaaS</span>
</Link> </Link>
</template>
</template>
</nav> </nav>
<div class="p-4 border-t border-slate-200 dark:border-slate-700"> <!-- Footer sidebar : user + collapse -->
<div class="px-3 py-3 border-t border-white/[0.07] shrink-0">
<!-- User info (sidebar ouverte) -->
<div v-if="isSidebarOpen" class="mb-3 w-full">
<Dropdown align="top-right" width="48">
<template #trigger>
<button class="w-full flex items-center gap-2.5 text-left p-1.5 -ml-1.5 rounded-xl hover:bg-white/5 transition-colors">
<div class="w-8 h-8 rounded-full bg-highlight flex items-center justify-center text-[12px] font-black text-highlight-dark shrink-0">
{{ $page.props.auth.user.name.charAt(0) }}
</div>
<div class="overflow-hidden flex-1 min-w-0">
<div class="text-[12px] font-bold text-white truncate">{{ $page.props.auth.user.name }}</div>
<div class="text-[10px] text-white/40 truncate">{{ $page.props.auth.user.role }}</div>
</div>
<div class="text-white/40">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/>
</svg>
</div>
</button>
</template>
<template #content>
<DropdownLink :href="route('profile.edit')">Paramètres du profil</DropdownLink>
<DropdownLink
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.backup')"
as="a"
class="!text-primary-light font-bold"
>Sauvegarde BDD</DropdownLink>
<div class="border-t border-ink/5 my-1"/>
<DropdownLink :href="route('logout')" method="post" as="button" class="!text-accent font-bold">
Se déconnecter
</DropdownLink>
</template>
</Dropdown>
</div>
<!-- Collapse button -->
<button <button
@click="isSidebarOpen = !isSidebarOpen" @click="isSidebarOpen = !isSidebarOpen"
class="flex items-center justify-center w-full h-10 rounded-lg bg-slate-100 dark:bg-slate-700 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors" class="flex items-center justify-center w-full h-9 rounded-xl text-white/40 hover:bg-white/10 hover:text-white transition-all duration-200"
:title="isSidebarOpen ? 'Réduire' : 'Agrandir'"
> >
<svg v-if="isSidebarOpen" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg class="w-4 h-4 transition-transform duration-300" :class="isSidebarOpen ? '' : 'rotate-180'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7" /> <path d="M15 18l-6-6 6-6"/>
</svg>
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5l7 7-7 7M5 5l7 7-7 7" />
</svg> </svg>
</button> </button>
<div v-if="isSidebarOpen" class="mt-4 text-[10px] text-slate-400 text-center font-mono">
<!-- Version -->
<div v-if="isSidebarOpen" class="mt-2 text-center text-[9px] font-bold uppercase tracking-[0.12em] text-white/20">
v{{ $page.props.app_version }} v{{ $page.props.app_version }}
</div> </div>
</div> </div>
</aside> </aside>
<!-- Main Content --> <!-- Main -->
<div class="flex-1 flex flex-col min-w-0 overflow-hidden"> <div class="flex-1 flex flex-col min-w-0 overflow-hidden">
<header class="h-16 flex items-center justify-between px-8 bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700">
<div> <!-- Header -->
<h2 v-if="$slots.header" class="font-semibold text-lg"> <header class="h-[60px] shrink-0 flex items-center justify-between px-8 bg-surface border-b border-ink/[0.05] shadow-xs z-10">
<div class="flex items-center gap-3">
<!-- Accent bar -->
<div class="w-[3px] h-5 bg-highlight rounded-full hidden md:block" />
<!-- Page title -->
<h2 v-if="$slots.header" class="font-serif font-black text-[17px] text-primary tracking-tight">
<slot name="header" /> <slot name="header" />
</h2> </h2>
</div> </div>
<div class="flex items-center gap-4"> <div class="flex items-center gap-3">
<Dropdown align="right" width="48"> <!-- Slot pour actions contextuelles (ex: bouton "Nouveau") -->
<template #trigger> <slot name="actions" />
<button class="flex items-center gap-2 text-sm font-medium hover:text-indigo-600 transition-colors">
{{ $page.props.auth.user.name }} <!-- Badge rôle -->
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <span
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> v-if="$page.props.auth.user.role === 'super_admin'"
</svg> class="bg-gradient-to-r from-accent to-highlight text-white px-3 py-1 rounded-full text-[9px] font-black tracking-widest uppercase shadow-sm"
</button> >GOD MODE</span>
</template> <span
<template #content> v-else-if="$page.props.auth.user.tenant"
<DropdownLink :href="route('profile.edit')">Profil</DropdownLink> class="bg-primary/10 text-primary px-3 py-1 rounded-full text-[9px] font-black tracking-widest uppercase border border-primary/20"
<DropdownLink :href="route('admin.backup')" as="a">Sauvegarde App</DropdownLink> >{{ $page.props.auth.user.tenant.name }}</span>
<DropdownLink :href="route('logout')" method="post" as="button">Déconnexion</DropdownLink>
</template>
</Dropdown>
</div> </div>
</header> </header>
<main class="flex-1 overflow-y-auto p-8"> <!-- Content -->
<main class="flex-1 overflow-y-auto p-7">
<slot /> <slot />
</main> </main>
</div> </div>
</div> </div>
</template> </template>
<style scoped>
.fade-enter-active, .fade-leave-active { transition: opacity 0.15s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
/* Scrollbar sidebar Firefox */
.scrollbar-thin { scrollbar-width: thin; }
.scrollbar-thumb-white\/10 { scrollbar-color: rgba(255,255,255,0.1) transparent; }
</style>

View File

@@ -0,0 +1,203 @@
<script setup>
import { ref } from 'vue';
import { Link } from '@inertiajs/vue3';
import ApplicationLogo from '@/Components/ApplicationLogo.vue';
import Dropdown from '@/Components/Dropdown.vue';
import DropdownLink from '@/Components/DropdownLink.vue';
import EnvironmentBanner from '@/Components/EnvironmentBanner.vue';
const isSidebarOpen = ref(true);
</script>
<template>
<EnvironmentBanner />
<div class="min-h-screen bg-sand flex text-anthracite font-sans selection:bg-highlight selection:text-anthracite">
<!-- Sidebar -->
<aside
:class="[isSidebarOpen ? 'w-64' : 'w-20']"
class="hidden md:flex flex-col bg-primary transition-all duration-300 shadow-xl z-20"
>
<div class="h-16 flex items-center px-5 bg-primary/90 border-b border-white/10">
<Link :href="route('dashboard')" class="flex items-center gap-3 overflow-hidden ml-1">
<div class="w-8 h-8 bg-highlight rounded flex items-center justify-center shrink-0 shadow-sm shadow-highlight/20">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-[#3a2800]" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9l-.707.707M12 18v3m4.95-4.95l.707.707M12 3c-4.418 0-8 3.582-8 8 0 2.209.895 4.209 2.343 5.657L12 21l5.657-5.343A7.994 7.994 0 0020 11c0-4.418-3.582-8-8-8z" />
</svg>
</div>
<span v-if="isSidebarOpen" class="font-serif font-black text-xl tracking-tight whitespace-nowrap text-white">RECRU<span class="text-accent italic px-0.5">IT</span></span>
</Link>
</div>
<nav class="flex-1 py-6 px-3 space-y-1.5 overflow-y-auto custom-scrollbar">
<Link
:href="route('dashboard')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('dashboard') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Tableau de bord</span>
</Link>
<Link
:href="route('admin.candidates.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.candidates.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Candidats</span>
</Link>
<Link
:href="route('admin.quizzes.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.quizzes.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Quiz</span>
</Link>
<Link
:href="route('admin.job-positions.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.job-positions.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Fiches de Poste</span>
</Link>
<Link
:href="route('admin.comparative')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.comparative') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Comparateur</span>
</Link>
<div v-if="$page.props.auth.user.role === 'super_admin'" class="pt-4 pb-2">
<div v-show="isSidebarOpen" class="px-3 text-[10px] font-black uppercase tracking-widest text-white/30">Configuration</div>
<div v-show="!isSidebarOpen" class="h-[1px] w-8 mx-auto bg-white/10"></div>
</div>
<Link
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.tenants.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.tenants.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Structures</span>
</Link>
<Link
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.users.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.users.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Équipe SaaS</span>
</Link>
<Link
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.logs.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.logs.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Logs de connexion</span>
</Link>
</nav>
<div class="p-4 border-t border-white/10 bg-primary/80">
<button
@click="isSidebarOpen = !isSidebarOpen"
class="flex items-center justify-center w-full h-10 rounded-lg text-white/50 hover:bg-white/10 hover:text-white transition-all duration-300"
>
<svg v-if="isSidebarOpen" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7" />
</svg>
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5l7 7-7 7M5 5l7 7-7 7" />
</svg>
</button>
<div v-show="isSidebarOpen" class="mt-4 text-[9px] font-bold uppercase tracking-widest text-[#3a7abf] text-center">
App v{{ $page.props.app_version }}
</div>
</div>
</aside>
<!-- Main Content -->
<div class="flex-1 flex flex-col min-w-0 overflow-hidden bg-neutral">
<header class="h-16 shrink-0 flex items-center justify-between px-8 bg-white border-b border-anthracite/5 shadow-sm z-10 relative">
<div>
<h2 v-if="$slots.header" class="font-serif font-black text-xl text-primary capitalize tracking-tight flex items-center gap-3">
<div class="w-1.5 h-6 bg-highlight rounded-full hidden md:block"></div>
<slot name="header" />
</h2>
</div>
<div class="flex items-center gap-4">
<Dropdown align="right" width="48">
<template #trigger>
<button class="flex items-center gap-2 text-sm font-subtitle font-bold hover:text-primary transition-colors cursor-pointer py-2">
<div class="w-8 h-8 rounded-full bg-sand flex items-center justify-center text-primary border border-primary/10">
{{ $page.props.auth.user.name.charAt(0) }}
</div>
<span class="hidden md:block">{{ $page.props.auth.user.name }}</span>
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-anthracite/40" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
</svg>
</button>
</template>
<template #content>
<DropdownLink :href="route('profile.edit')">Paramètres du profil</DropdownLink>
<DropdownLink :href="route('admin.backup')" as="a" class="!text-sky font-bold" v-if="$page.props.auth.user.role === 'super_admin'">Sauvegarde Base de données</DropdownLink>
<div class="border-t border-anthracite/5 my-1"></div>
<DropdownLink :href="route('logout')" method="post" as="button" class="!text-accent font-bold">Se déconnecter</DropdownLink>
</template>
</Dropdown>
</div>
</header>
<main class="flex-1 overflow-y-auto p-4 md:p-8">
<slot />
</main>
</div>
</div>
</template>
<style>
/* Firefox scrollbar config for sidebar */
.custom-scrollbar {
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.custom-scrollbar::-webkit-scrollbar {
width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.1);
border-radius: 10px;
}
</style>

View File

@@ -1,129 +1,79 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
import ApplicationLogo from '@/Components/ApplicationLogo.vue'; import { Link, usePage } from '@inertiajs/vue3';
import Dropdown from '@/Components/Dropdown.vue'; import Dropdown from '@/Components/Dropdown.vue';
import DropdownLink from '@/Components/DropdownLink.vue'; import DropdownLink from '@/Components/DropdownLink.vue';
import NavLink from '@/Components/NavLink.vue';
import ResponsiveNavLink from '@/Components/ResponsiveNavLink.vue';
import { Link } from '@inertiajs/vue3';
import EnvironmentBanner from '@/Components/EnvironmentBanner.vue'; import EnvironmentBanner from '@/Components/EnvironmentBanner.vue';
const showingNavigationDropdown = ref(false); const showingNavigationDropdown = ref(false);
const page = usePage();
</script> </script>
<template> <template>
<EnvironmentBanner /> <EnvironmentBanner />
<div>
<div class="min-h-screen" style="background:#f8fafc;"> <div class="min-h-screen bg-neutral font-sans text-ink selection:bg-highlight selection:text-highlight-dark flex flex-col">
<nav style="border-bottom:1px solid #e2e8f0; background:white; box-shadow:0 1px 3px rgba(0,0,0,0.04);"> <!-- Top Navigation -->
<!-- Primary Navigation Menu --> <nav class="h-[70px] bg-surface border-b border-ink/[0.05] shadow-xs z-20 shrink-0">
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8"> <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 h-full">
<div class="flex h-16 justify-between"> <div class="flex items-center justify-between h-full">
<div class="flex">
<!-- Logo --> <!-- Left side: Logo -->
<div class="flex shrink-0 items-center"> <div class="flex items-center">
<Link :href="route('dashboard')"> <Link :href="route('dashboard')" class="flex items-center gap-3">
<ApplicationLogo <img src="/images/logo.png" alt="Logo" class="h-8 object-contain" />
class="block h-9 w-auto fill-indigo-600"
/>
</Link> </Link>
</div> </div>
<!-- Navigation Links --> <!-- Right side: Profile Dropdown -->
<div <div class="hidden sm:flex items-center gap-4">
class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex"
>
<NavLink
:href="route('dashboard')"
:active="route().current('dashboard')"
>
Dashboard
</NavLink>
</div>
</div>
<div class="hidden sm:ms-6 sm:flex sm:items-center">
<!-- Settings Dropdown -->
<div class="relative ms-3">
<Dropdown align="right" width="48"> <Dropdown align="right" width="48">
<template #trigger> <template #trigger>
<span class="inline-flex rounded-md"> <button class="flex items-center gap-3 p-1.5 pr-3 rounded-2xl border border-ink/[0.05] hover:bg-ink/[0.02] hover:border-ink/[0.1] transition-all duration-200">
<button <div class="w-[34px] h-[34px] rounded-xl bg-highlight flex items-center justify-center text-[13px] font-black text-highlight-dark shrink-0 shadow-sm">
type="button" {{ $page.props.auth.user.name.charAt(0) }}
style="display:inline-flex; align-items:center; border-radius:0.75rem; border:1.5px solid #e2e8f0; background:#f1f5f9; padding:0.5rem 1rem; font-size:0.875rem; font-weight:700; color:#0f172a; transition:all 0.15s ease;" </div>
> <div class="text-left flex-1 min-w-0">
{{ $page.props.auth.user.name }} <div class="text-[13px] font-bold text-primary truncate leading-tight">{{ $page.props.auth.user.name }}</div>
<div class="text-[11px] text-ink/40 font-subtitle truncate">{{ $page.props.auth.user.email }}</div>
<svg </div>
class="-me-0.5 ms-2 h-4 w-4" <div class="text-ink/30 ml-1">
xmlns="http://www.w3.org/2000/svg" <svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
viewBox="0 0 20 20" <path d="M6 9l6 6 6-6"/>
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
clip-rule="evenodd"
/>
</svg> </svg>
</div>
</button> </button>
</span>
</template> </template>
<template #content> <template #content>
<DropdownLink <div class="px-4 py-2 border-b border-ink/5">
:href="route('profile.edit')" <div class="text-[10px] font-black uppercase tracking-[0.1em] text-ink/30">Candidat</div>
> </div>
Profile <DropdownLink :href="route('profile.edit')" class="!text-[13px]">
Paramètres du profil
</DropdownLink> </DropdownLink>
<DropdownLink <div class="border-t border-ink/5 my-1" />
:href="route('logout')" <DropdownLink :href="route('logout')" method="post" as="button" class="!text-accent font-bold !text-[13px]">
method="post" Se déconnecter
as="button"
>
Log Out
</DropdownLink> </DropdownLink>
</template> </template>
</Dropdown> </Dropdown>
</div> </div>
</div>
<!-- Hamburger --> <!-- Mobile Menu Button -->
<div class="-me-2 flex items-center sm:hidden"> <div class="-mr-2 flex items-center sm:hidden">
<button <button
@click=" @click="showingNavigationDropdown = !showingNavigationDropdown"
showingNavigationDropdown = class="inline-flex items-center justify-center p-2 rounded-xl text-primary hover:bg-ink/5 transition duration-150 ease-in-out focus:outline-none focus:bg-ink/5"
!showingNavigationDropdown
"
class="inline-flex items-center justify-center rounded-md p-2 text-gray-400 transition duration-150 ease-in-out hover:bg-gray-100 hover:text-gray-500 focus:bg-gray-100 focus:text-gray-500 focus:outline-none"
>
<svg
class="h-6 w-6"
stroke="currentColor"
fill="none"
viewBox="0 0 24 24"
> >
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
<path <path
:class="{ :class="{'hidden': showingNavigationDropdown, 'inline-flex': !showingNavigationDropdown }"
hidden: showingNavigationDropdown, stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"
'inline-flex':
!showingNavigationDropdown,
}"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"
/> />
<path <path
:class="{ :class="{'hidden': !showingNavigationDropdown, 'inline-flex': showingNavigationDropdown }"
hidden: !showingNavigationDropdown, stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"
'inline-flex':
showingNavigationDropdown,
}"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/> />
</svg> </svg>
</button> </button>
@@ -131,72 +81,54 @@ const showingNavigationDropdown = ref(false);
</div> </div>
</div> </div>
<!-- Responsive Navigation Menu --> <!-- Mobile Navigation Menu -->
<div <div :class="{'block': showingNavigationDropdown, 'hidden': !showingNavigationDropdown}" class="sm:hidden bg-surface border-b border-ink/10 shadow-lg absolute w-full z-50">
:class="{ <div class="pt-4 pb-3 border-t border-ink/5">
block: showingNavigationDropdown, <div class="px-4 flex items-center gap-3">
hidden: !showingNavigationDropdown, <div class="w-10 h-10 rounded-xl bg-highlight flex items-center justify-center text-sm font-black text-highlight-dark shrink-0">
}" {{ $page.props.auth.user.name.charAt(0) }}
class="sm:hidden"
>
<div class="space-y-1 pb-3 pt-2">
<ResponsiveNavLink
:href="route('dashboard')"
:active="route().current('dashboard')"
>
Dashboard
</ResponsiveNavLink>
</div> </div>
<div>
<!-- Responsive Settings Options --> <div class="text-sm font-bold text-primary">{{ $page.props.auth.user.name }}</div>
<div <div class="text-[11px] font-subtitle text-ink/50">{{ $page.props.auth.user.email }}</div>
class="border-t border-gray-200 pb-1 pt-4"
>
<div class="px-4">
<div
class="text-base font-medium text-gray-800"
>
{{ $page.props.auth.user.name }}
</div>
<div class="text-sm font-medium text-gray-500">
{{ $page.props.auth.user.email }}
</div> </div>
</div> </div>
<div class="mt-3 space-y-1"> <div class="mt-4 space-y-1">
<ResponsiveNavLink :href="route('profile.edit')"> <Link :href="route('profile.edit')" class="block w-full px-4 py-2.5 text-left text-[13px] font-bold text-primary hover:bg-ink/5 transition-colors">
Profile Paramètres du profil
</ResponsiveNavLink> </Link>
<ResponsiveNavLink <Link :href="route('logout')" method="post" as="button" class="block w-full px-4 py-2.5 text-left text-[13px] font-bold text-accent hover:bg-ink/5 transition-colors">
:href="route('logout')" Se déconnecter
method="post" </Link>
as="button"
>
Log Out
</ResponsiveNavLink>
</div> </div>
</div> </div>
</div> </div>
</nav> </nav>
<!-- Page Heading --> <!-- Page Heading -->
<header <header v-if="$slots.header" class="bg-surface border-b border-ink/[0.05] shadow-xs shrink-0 relative z-10">
style="background:white; border-bottom:1px solid #f1f5f9; box-shadow:none;" <div class="mx-auto max-w-7xl px-4 py-5 sm:px-6 lg:px-8">
v-if="$slots.header" <div class="flex items-center gap-3">
> <div class="w-[3px] h-5 bg-highlight rounded-full hidden md:block"></div>
<div class="mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8"> <div class="font-serif font-black text-lg text-primary tracking-tight">
<slot name="header" /> <slot name="header" />
</div> </div>
</div>
</div>
</header> </header>
<!-- Page Content --> <!-- Page Content -->
<main> <main class="flex-1 flex flex-col relative">
<slot /> <slot />
</main> </main>
<footer class="pb-8 pt-4 text-center" style="background:#f8fafc;"> <footer class="pb-6 pt-6 text-center shrink-0">
<span class="text-[10px] font-mono" style="color:#9ca3af;">v{{ $page.props.app_version }}</span> <span class="text-[10px] font-mono font-bold uppercase tracking-[0.1em] text-ink/20">v{{ $page.props.app_version }}</span>
</footer> </footer>
</div> </div>
</div>
</template> </template>
<style scoped>
/* Any required scoped styling here */
</style>

View File

@@ -6,19 +6,28 @@ import EnvironmentBanner from '@/Components/EnvironmentBanner.vue';
<template> <template>
<EnvironmentBanner /> <EnvironmentBanner />
<div <div class="flex min-h-screen flex-col items-center justify-center bg-neutral pt-6 sm:pt-0 font-sans text-anthracite selection:bg-highlight selection:text-anthracite">
class="flex min-h-screen flex-col items-center bg-gray-100 pt-6 sm:justify-center sm:pt-0"
> <div class="w-full max-w-md px-6">
<div> <!-- Header and Logo -->
<Link href="/"> <div class="mb-8 flex flex-col justify-center items-center gap-4">
<ApplicationLogo class="h-20 w-20 fill-current text-gray-500" /> <Link href="/" class="flex flex-col items-center gap-3 group">
<img src="/images/logo.png" alt="Logo" class="h-16 object-contain group-hover:-translate-y-1 transition-all duration-300" />
<span class="text-xs font-subtitle uppercase tracking-[0.2em] text-anthracite/50 font-bold mt-1">Espace sécurisé</span>
</Link> </Link>
</div> </div>
<div <!-- Content Card -->
class="mt-6 w-full overflow-hidden bg-white px-6 py-4 shadow-md sm:max-w-md sm:rounded-lg" <div class="w-full overflow-hidden bg-white px-8 py-10 shadow-xl shadow-anthracite/5 rounded-3xl border border-anthracite/5">
>
<slot /> <slot />
</div> </div>
<!-- Footer Footer -->
<div class="mt-8 text-center">
<Link href="/" class="text-primary hover:text-highlight transition-colors text-sm font-subtitle font-bold">
&larr; Retour à l'accueil
</Link>
</div>
</div>
</div> </div>
</template> </template>

View File

@@ -2,6 +2,7 @@
import AdminLayout from '@/Layouts/AdminLayout.vue'; import AdminLayout from '@/Layouts/AdminLayout.vue';
import { Head, useForm, Link, usePage, router } from '@inertiajs/vue3'; import { Head, useForm, Link, usePage, router } from '@inertiajs/vue3';
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import axios from 'axios';
const page = usePage(); const page = usePage();
const flashSuccess = computed(() => page.props.flash?.success); const flashSuccess = computed(() => page.props.flash?.success);
@@ -26,6 +27,7 @@ const form = useForm({
email: '', email: '',
phone: '', phone: '',
linkedin_url: '', linkedin_url: '',
city: '',
cv: null, cv: null,
cover_letter: null, cover_letter: null,
tenant_id: '', tenant_id: '',
@@ -56,8 +58,8 @@ const openPreview = (doc) => {
}; };
// Sorting Logic // Sorting Logic
const sortKey = ref('user.name'); const sortKey = ref('ai_analysis.match_score');
const sortOrder = ref(1); // 1 = asc, -1 = desc const sortOrder = ref(-1); // 1 = asc, -1 = desc
const sortBy = (key) => { const sortBy = (key) => {
if (sortKey.value === key) { if (sortKey.value === key) {
@@ -106,6 +108,61 @@ const sortedCandidates = computed(() => {
return 0; return 0;
}); });
}); });
const selectedIds = ref([]);
const isBatchAnalyzing = ref(false);
const analysisProgress = ref({ current: 0, total: 0 });
const toggleSelectAll = (e) => {
if (e.target.checked) {
selectedIds.value = sortedCandidates.value.map(c => c.id);
} else {
selectedIds.value = [];
}
};
const batchAnalyze = async () => {
if (selectedIds.value.length === 0) return;
if (!confirm(`Voulez-vous lancer l'analyse IA pour les ${selectedIds.value.length} candidats sélectionnés ?`)) {
return;
}
isBatchAnalyzing.value = true;
analysisProgress.value = { current: 0, total: selectedIds.value.length };
const results = { success: 0, errors: 0, details: [] };
// Copy the IDs to avoid issues if selection changes during process
const idsToProcess = [...selectedIds.value];
for (const id of idsToProcess) {
analysisProgress.value.current++;
try {
await axios.post(route('admin.candidates.analyze', id));
results.success++;
} catch (error) {
results.errors++;
const candidate = props.candidates.find(c => c.id === id);
results.details.push({
candidate: candidate?.user?.name || `ID #${id}`,
error: error.response?.data?.error || error.message
});
}
}
// Finished processing all
router.reload({
onSuccess: () => {
isBatchAnalyzing.value = false;
selectedIds.value = [];
alert(`Analyse terminée : ${results.success} succès, ${results.errors} erreurs.`);
if (results.details.length > 0) {
console.table(results.details);
}
}
});
};
</script> </script>
<template> <template>
@@ -116,24 +173,27 @@ const sortedCandidates = computed(() => {
Gestion des Candidats Gestion des Candidats
</template> </template>
<div class="flex justify-between items-end mb-8"> <div class="sticky top-[-28px] z-20 bg-neutral/80 backdrop-blur-xl -mx-7 px-7 pt-7 pb-6 mb-4 border-b border-ink/[0.03]">
<div class="space-y-4"> <div class="flex flex-col md:flex-row justify-between items-start md:items-end gap-6">
<h3 class="text-2xl font-bold">Liste des Candidats</h3> <div class="space-y-4 w-full md:w-auto">
<div class="flex items-center gap-6"> <h3 class="text-3xl font-serif font-black text-primary capitalize tracking-tight flex items-center gap-3">
<div class="flex items-center gap-3 bg-white dark:bg-slate-800 p-2 rounded-xl border border-slate-200 dark:border-slate-700 shadow-sm"> <div class="w-1.5 h-8 bg-highlight rounded-full"></div>
Liste des Candidats
</h3>
<div class="flex flex-col sm:flex-row items-center gap-4">
<div class="flex items-center gap-3 bg-white p-2 rounded-xl border border-anthracite/5 shadow-sm min-w-max">
<label class="flex items-center gap-2 cursor-pointer px-2"> <label class="flex items-center gap-2 cursor-pointer px-2">
<input type="checkbox" v-model="showOnlySelected" class="rounded border-amber-300 text-amber-500 focus:ring-amber-500/20 cursor-pointer"> <input type="checkbox" v-model="showOnlySelected" class="rounded border-highlight/50 text-highlight focus:ring-highlight/20 cursor-pointer">
<span class="text-sm font-bold text-slate-700 dark:text-slate-300">Retenus uniquement</span> <span class="text-xs font-bold text-primary uppercase tracking-widest">Retenus uniquement</span>
</label> </label>
</div> </div>
<div class="flex items-center gap-3"> <div class="flex items-center gap-3 w-full sm:w-auto">
<label class="text-sm font-medium text-slate-700 dark:text-slate-300">Filtrer par fiche de poste :</label>
<select <select
v-model="selectedJobPosition" v-model="selectedJobPosition"
class="block w-64 rounded-xl border-slate-300 dark:border-slate-700 dark:bg-slate-900 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" class="block w-full sm:w-72 rounded-xl border-anthracite/10 shadow-sm focus:border-primary focus:ring-primary/20 text-sm font-medium text-anthracite transition-all"
> >
<option value="">Toutes les fiches de poste</option> <option value="">Toutes les fiches de poste</option>
<option value="none"> Non assigné (Candidature Spontanée)</option> <option value="none" class="italic"> Candidature Spontanée</option>
<option v-for="jp in jobPositions" :key="jp.id" :value="jp.id"> <option v-for="jp in jobPositions" :key="jp.id" :value="jp.id">
{{ jp.title }} {{ jp.title }}
</option> </option>
@@ -141,202 +201,221 @@ const sortedCandidates = computed(() => {
</div> </div>
</div> </div>
</div> </div>
<div class="flex items-center gap-4 w-full md:w-auto justify-end">
<div v-if="selectedIds.length > 0" class="flex items-center gap-3 animate-in fade-in slide-in-from-right-4 duration-300">
<span class="text-xs font-black uppercase tracking-widest text-primary/50">{{ selectedIds.length }} sélectionné(s)</span>
<PrimaryButton
@click="batchAnalyze"
:disabled="isBatchAnalyzing"
class="!bg-primary hover:!bg-primary/90 !text-white flex items-center gap-2 shadow-primary/20"
>
<svg v-if="isBatchAnalyzing" class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9l-.707.707M12 21v-1m4.243-4.243l-.707-.707m2.828-9.9l-.707.707" />
</svg>
{{ isBatchAnalyzing ? `Analyse ${analysisProgress.current}/${analysisProgress.total}...` : 'Analyse IA groupée' }}
</PrimaryButton>
<div class="h-8 w-px bg-anthracite/10 mx-2 hidden sm:block"></div>
</div>
<PrimaryButton @click="isModalOpen = true"> <PrimaryButton @click="isModalOpen = true">
Ajouter un Candidat Ajouter un Candidat
</PrimaryButton> </PrimaryButton>
</div> </div>
</div>
</div>
<!-- Flash Messages --> <!-- Flash Messages -->
<div v-if="flashSuccess" class="mb-8 p-6 bg-emerald-50 dark:bg-emerald-900/20 border border-emerald-200 dark:border-emerald-800 rounded-2xl flex items-center gap-4 animate-in fade-in slide-in-from-top-4 duration-500"> <div v-if="flashSuccess" class="mb-8 p-6 bg-emerald-50 border border-emerald-200 rounded-2xl flex items-center gap-4 animate-in fade-in slide-in-from-top-4 duration-500 shadow-sm">
<div class="p-2 bg-emerald-500 rounded-lg text-white"> <div class="p-2 bg-emerald-500 rounded-lg text-white shadow-sm">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg> </svg>
</div> </div>
<div> <div>
<p class="font-bold text-emerald-800 dark:text-emerald-400">Succès !</p> <p class="font-bold text-emerald-800">Succès !</p>
<p class="text-emerald-700 dark:text-emerald-500 text-sm">{{ flashSuccess }}</p> <p class="text-emerald-700 text-sm font-medium">{{ flashSuccess }}</p>
</div> </div>
</div> </div>
<!-- Candidates Table --> <!-- Candidates Table -->
<div class="bg-white dark:bg-slate-800 rounded-xl shadow-sm border border-slate-200 dark:border-slate-700 overflow-hidden"> <div class="bg-white rounded-3xl shadow-sm border border-anthracite/5 overflow-hidden">
<table class="w-full text-left"> <div class="overflow-x-auto">
<thead class="bg-slate-50 dark:bg-slate-700/50 border-b border-slate-200 dark:border-slate-700"> <table class="w-full text-left border-collapse">
<thead class="bg-neutral/50 border-b border-anthracite/5">
<tr> <tr>
<th class="w-12 px-6 py-4"></th> <th class="w-12 px-8 py-5">
<th @click="sortBy('user.name')" class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50 transition-colors"> <input
type="checkbox"
:checked="selectedIds.length === sortedCandidates.length && sortedCandidates.length > 0"
@change="toggleSelectAll"
class="rounded border-anthracite/20 text-primary focus:ring-primary/20 cursor-pointer"
>
</th>
<th class="w-12 px-4 py-5"></th>
<th @click="sortBy('user.name')" class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 cursor-pointer hover:text-primary transition-colors">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
Nom Nom
<svg v-show="sortKey === 'user.name'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"> <svg v-show="sortKey === 'user.name'" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div> </div>
</th> </th>
<th @click="sortBy('user.email')" class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50 transition-colors"> <th @click="sortBy('user.email')" class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 cursor-pointer hover:text-primary transition-colors">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
Email Contact
<svg v-show="sortKey === 'user.email'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"> <svg v-show="sortKey === 'user.email'" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div> </div>
</th> </th>
<th @click="sortBy('tenant.name')" v-if="$page.props.auth.user.role === 'super_admin'" class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50 transition-colors"> <th @click="sortBy('tenant.name')" v-if="$page.props.auth.user.role === 'super_admin'" class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 cursor-pointer hover:text-primary transition-colors">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
Structure Structure
<svg v-show="sortKey === 'tenant.name'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"> <svg v-show="sortKey === 'tenant.name'" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div> </div>
</th> </th>
<th @click="sortBy('job_position.title')" class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50 transition-colors"> <th @click="sortBy('city')" class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 cursor-pointer hover:text-primary transition-colors">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
Fiche de Poste Ville
<svg v-show="sortKey === 'job_position.title'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"> <svg v-show="sortKey === 'city'" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div> </div>
</th> </th>
<th @click="sortBy('status')" class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50 transition-colors"> <th @click="sortBy('job_position.title')" class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 cursor-pointer hover:text-primary transition-colors">
<div class="flex items-center gap-2">
Poste Ciblé
<svg v-show="sortKey === 'job_position.title'" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
</div>
</th>
<th @click="sortBy('status')" class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 cursor-pointer hover:text-primary transition-colors">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
Statut Statut
<svg v-show="sortKey === 'status'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"> <svg v-show="sortKey === 'status'" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div> </div>
</th> </th>
<th @click="sortBy('weighted_score')" class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50 transition-colors"> <th @click="sortBy('weighted_score')" class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 cursor-pointer hover:text-primary transition-colors">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
Score /20 Score
<svg v-show="sortKey === 'weighted_score'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"> <svg v-show="sortKey === 'weighted_score'" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div> </div>
</th> </th>
<th @click="sortBy('ai_analysis.match_score')" class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300 cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50 transition-colors"> <th @click="sortBy('ai_analysis.match_score')" class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 cursor-pointer hover:text-primary transition-colors">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
Adéquation IA IA Match
<svg v-show="sortKey === 'ai_analysis.match_score'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"> <svg v-show="sortKey === 'ai_analysis.match_score'" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" :class="{ 'rotate-180': sortOrder === -1 }" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div> </div>
</th> </th>
<th class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300">Documents</th> <th class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Docs</th>
<th class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300 text-right">Actions</th> <th class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 text-right">Actions</th>
</tr> </tr>
</thead> </thead>
<tbody class="divide-y divide-slate-200 dark:divide-slate-700"> <tbody class="divide-y divide-anthracite/5">
<tr v-for="candidate in sortedCandidates" :key="candidate.id" class="hover:bg-slate-50/50 dark:hover:bg-slate-700/30 transition-colors"> <tr v-for="candidate in sortedCandidates" :key="candidate.id" class="hover:bg-sand/30 transition-colors group" :class="{ 'bg-primary/5': selectedIds.includes(candidate.id) }">
<td class="px-6 py-4"> <td class="px-8 py-5">
<button @click="toggleSelection(candidate.id)" class="text-amber-400 hover:text-amber-500 hover:scale-110 transition-transform focus:outline-none" :title="candidate.is_selected ? 'Retirer des retenus' : 'Marquer comme retenu'"> <input
<svg v-if="candidate.is_selected" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" viewBox="0 0 20 20" fill="currentColor"> type="checkbox"
:value="candidate.id"
v-model="selectedIds"
class="rounded border-anthracite/20 text-primary focus:ring-primary/20 cursor-pointer"
>
</td>
<td class="px-4 py-5 text-center">
<button @click="toggleSelection(candidate.id)" class="text-anthracite/20 hover:text-highlight hover:-translate-y-0.5 transition-all focus:outline-none" :class="{ '!text-highlight drop-shadow-sm scale-110': candidate.is_selected }" :title="candidate.is_selected ? 'Retirer des retenus' : 'Marquer comme retenu'">
<svg v-if="candidate.is_selected" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" /> <path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg> </svg>
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-slate-300 hover:text-amber-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg v-else xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
</svg> </svg>
</button> </button>
</td> </td>
<td class="px-6 py-4"> <td class="px-8 py-5">
<div class="font-bold text-slate-900 dark:text-white">{{ candidate.user.name }}</div> <Link :href="route('admin.candidates.show', candidate.id)" class="font-black text-primary group-hover:text-highlight transition-colors block">
<div class="text-[10px] text-slate-500 font-bold uppercase tracking-tight">{{ candidate.phone }}</div> {{ candidate.user.name }}
</Link>
<div class="text-[10px] text-anthracite/50 font-bold uppercase tracking-tight mt-0.5">{{ candidate.phone || 'Pas de numéro' }}</div>
</td> </td>
<td class="px-6 py-4 text-sm text-slate-600 dark:text-slate-400"> <td class="px-8 py-5 text-xs text-anthracite/70 font-medium">
{{ candidate.user.email }} {{ candidate.user.email }}
</td> </td>
<td class="px-6 py-4 text-xs font-bold uppercase tracking-widest text-indigo-600 dark:text-indigo-400" v-if="$page.props.auth.user.role === 'super_admin'"> <td class="px-8 py-5 text-[10px] font-black uppercase tracking-widest text-primary/60" v-if="$page.props.auth.user.role === 'super_admin'">
{{ candidate.tenant ? candidate.tenant.name : 'Aucun' }} {{ candidate.tenant ? candidate.tenant.name : 'Aucune' }}
</td> </td>
<td class="px-6 py-4 text-sm font-semibold text-slate-700 dark:text-slate-300"> <td class="px-8 py-5 text-[10px] font-black uppercase tracking-widest text-anthracite/60">
{{ candidate.city || '--' }}
</td>
<td class="px-8 py-5 text-xs font-bold text-anthracite">
{{ candidate.job_position ? candidate.job_position.title : 'Non assigné' }} {{ candidate.job_position ? candidate.job_position.title : 'Non assigné' }}
</td> </td>
<td class="px-6 py-4 text-xs font-bold uppercase tracking-widest"> <td class="px-8 py-5">
<span <span
class="px-3 py-1 rounded-lg" class="px-3 py-1 text-[10px] font-black uppercase tracking-[0.15em] rounded-full"
:class="{ :class="{
'bg-amber-50 text-amber-700 border border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 dark:text-amber-400': candidate.status === 'en_attente', 'bg-anthracite/5 text-anthracite/60 border border-anthracite/10': candidate.status === 'en_attente',
'bg-indigo-50 text-indigo-700 border border-indigo-200 dark:bg-indigo-900/20 dark:border-indigo-800 dark:text-indigo-400': candidate.status === 'en_cours', 'bg-sky/10 text-sky border border-sky/20': candidate.status === 'en_cours',
'bg-emerald-50 text-emerald-700 border border-emerald-200 dark:bg-emerald-900/20 dark:border-emerald-800 dark:text-emerald-400': candidate.status === 'termine' 'bg-emerald-50 text-emerald-700 border border-emerald-200': candidate.status === 'termine',
'bg-accent/10 text-accent border border-accent/20': candidate.status === 'refuse'
}" }"
> >
{{ candidate.status }} {{ candidate.status }}
</span> </span>
</td> </td>
<td class="px-6 py-4"> <td class="px-8 py-5">
<div class="flex items-center gap-2"> <div class="inline-flex items-center gap-2 px-3 py-1 bg-primary/5 text-primary rounded-xl font-black text-sm border border-primary/10 shadow-sm">
<div class="w-12 h-1.5 bg-slate-100 dark:bg-slate-700 rounded-full overflow-hidden"> {{ candidate.weighted_score }} <span class="opacity-50 text-[10px]">/ 20</span>
<div
class="h-full rounded-full transition-all duration-500"
:style="{ width: (candidate.weighted_score / 20) * 100 + '%' }"
:class="{
'bg-emerald-500': candidate.weighted_score >= 14,
'bg-amber-500': candidate.weighted_score >= 10 && candidate.weighted_score < 14,
'bg-rose-500': candidate.weighted_score < 10
}"
></div>
</div>
<span class="font-black text-sm" :class="{
'text-emerald-600': candidate.weighted_score >= 14,
'text-amber-600': candidate.weighted_score >= 10 && candidate.weighted_score < 14,
'text-rose-600': candidate.weighted_score < 10
}">
{{ candidate.weighted_score }}
</span>
</div> </div>
</td> </td>
<td class="px-6 py-4"> <td class="px-8 py-5">
<div v-if="candidate.ai_analysis" class="flex items-center gap-2"> <div v-if="candidate.ai_analysis" class="flex items-center gap-2">
<div <div
class="px-2 py-0.5 rounded text-[10px] font-black" class="px-2 py-0.5 rounded-lg text-[10px] font-black shadow-sm"
:class="[ :class="[
candidate.ai_analysis.match_score >= 80 ? 'bg-emerald-100 text-emerald-700' : candidate.ai_analysis.match_score >= 90 ? 'bg-emerald-50 text-emerald-700 border border-emerald-200' :
candidate.ai_analysis.match_score >= 60 ? 'bg-amber-100 text-amber-700' : candidate.ai_analysis.match_score >= 80 ? 'bg-highlight/10 text-[#3a2800] border border-highlight/30' :
'bg-red-100 text-red-700' 'bg-accent/10 text-accent border border-accent/20'
]" ]"
> >
{{ candidate.ai_analysis.match_score }}% {{ candidate.ai_analysis.match_score }}%
</div> </div>
<span class="text-[10px] font-bold text-slate-400 uppercase truncate max-w-[60px]">{{ candidate.ai_analysis.verdict }}</span> <span class="text-[9px] font-bold text-anthracite/40 uppercase truncate max-w-[60px]" :title="candidate.ai_analysis.verdict">{{ candidate.ai_analysis.verdict }}</span>
</div> </div>
<span v-else class="text-[10px] text-slate-300 italic">Non analysé</span> <span v-else class="text-[9px] font-bold uppercase tracking-widest text-anthracite/30 italic">Non analysé</span>
</td> </td>
<td class="px-6 py-4"> <td class="px-8 py-5">
<div class="flex gap-2"> <div class="flex gap-1.5">
<button <button
v-for="doc in candidate.documents" v-for="doc in candidate.documents"
:key="doc.id" :key="doc.id"
@click="openPreview(doc)" @click="openPreview(doc)"
class="p-2 bg-slate-100 dark:bg-slate-700 rounded-lg hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors" class="p-1.5 bg-neutral text-anthracite/40 rounded-lg hover:bg-primary/10 hover:text-primary transition-colors"
:title="doc.type.toUpperCase()" :title="doc.type.toUpperCase()"
> >
<svg v-if="doc.type === 'cv'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-indigo-600 dark:text-indigo-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg v-if="doc.type === 'cv'" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> <svg v-else xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" /></svg>
</svg>
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-emerald-600 dark:text-emerald-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
</svg>
</button> </button>
<span v-if="candidate.documents.length === 0" class="text-anthracite/20 text-xs">-</span>
</div> </div>
</td> </td>
<td class="px-6 py-4 text-right"> <td class="px-8 py-5 text-right">
<div class="flex items-center justify-end gap-3"> <div class="flex items-center justify-end gap-2">
<Link :href="route('admin.candidates.show', candidate.id)" class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:text-indigo-300 font-medium">Détails</Link> <Link :href="route('admin.candidates.show', candidate.id)" class="p-2 text-primary/40 hover:text-highlight hover:bg-highlight/10 rounded-xl transition-all" title="Détails">
<button @click="deleteCandidate(candidate.id)" class="p-2 text-slate-400 hover:text-red-600 transition-colors" title="Supprimer"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> </Link>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /> <button @click="deleteCandidate(candidate.id)" class="p-2 text-anthracite/20 hover:text-accent hover:bg-accent/10 rounded-xl transition-all" title="Supprimer">
</svg> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>
</button> </button>
</div> </div>
</td> </td>
</tr> </tr>
<tr v-if="candidates.length === 0"> <tr v-if="candidates.length === 0">
<td colspan="8" class="px-6 py-12 text-center text-slate-500 italic"> <td colspan="12" class="px-8 py-16 text-center">
<div class="text-anthracite/40 italic font-medium font-subtitle">
Aucun candidat trouvé. Aucun candidat trouvé.
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
<!-- Add Candidate Modal --> <!-- Add Candidate Modal -->
<Modal :show="isModalOpen" @close="isModalOpen = false"> <Modal :show="isModalOpen" @close="isModalOpen = false">
@@ -363,6 +442,14 @@ const sortedCandidates = computed(() => {
<TextInput id="phone" type="text" class="mt-1 block w-full" v-model="form.phone" /> <TextInput id="phone" type="text" class="mt-1 block w-full" v-model="form.phone" />
<InputError class="mt-2" :message="form.errors.phone" /> <InputError class="mt-2" :message="form.errors.phone" />
</div> </div>
<div>
<InputLabel for="city" value="Ville" />
<TextInput id="city" type="text" class="mt-1 block w-full" v-model="form.city" />
<InputError class="mt-2" :message="form.errors.city" />
</div>
</div>
<div class="grid grid-cols-1 gap-4">
<div> <div>
<InputLabel for="linkedin_url" value="LinkedIn URL" /> <InputLabel for="linkedin_url" value="LinkedIn URL" />
<TextInput id="linkedin_url" type="url" class="mt-1 block w-full" v-model="form.linkedin_url" /> <TextInput id="linkedin_url" type="url" class="mt-1 block w-full" v-model="form.linkedin_url" />

View File

@@ -0,0 +1,114 @@
<script setup>
import AdminLayout from '@/Layouts/AdminLayout.vue';
import { Head } from '@inertiajs/vue3';
import { onMounted, ref } from 'vue';
import L from 'leaflet';
import 'leaflet/dist/leaflet.css';
// Fix for Leaflet default icons
import icon from 'leaflet/dist/images/marker-icon.png';
const DefaultIcon = L.icon({
iconUrl: icon,
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
L.Marker.prototype.options.icon = DefaultIcon;
const props = defineProps({
candidates: Array
});
const mapContainer = ref(null);
const isLoading = ref(true);
const geocodedCount = ref(0);
onMounted(async () => {
const map = L.map(mapContainer.value).setView([46.603354, 1.888334], 6); // Centered on France
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
const markers = [];
for (const candidate of props.candidates) {
if (!candidate.city) continue;
try {
// Rate limited geocoding (Nominatim allows 1 request/sec ideally)
const response = await fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(candidate.city)}&limit=1`);
const data = await response.json();
if (data && data.length > 0) {
const { lat, lon } = data[0];
const marker = L.marker([lat, lon]).addTo(map);
marker.bindPopup(`
<div class="p-1">
<p class="font-bold text-primary">${candidate.name}</p>
<p class="text-xs text-slate-500">${candidate.city}</p>
<p class="text-xs font-semibold mt-1">${candidate.job || 'Pas de poste'}</p>
<p class="text-[10px] bg-indigo-50 text-indigo-600 px-1.5 py-0.5 rounded mt-1 inline-block">Score: ${candidate.score}/20</p>
</div>
`);
markers.push(marker);
geocodedCount.value++;
}
// Artificial delay to avoid being blocked by Nominatim
await new Promise(resolve => setTimeout(resolve, 800));
} catch (error) {
console.error(`Geocoding failed for ${candidate.city}:`, error);
}
}
if (markers.length > 0) {
const group = new L.featureGroup(markers);
map.fitBounds(group.getBounds().pad(0.1));
}
isLoading.value = false;
});
</script>
<template>
<Head title="Provenance des Candidats" />
<AdminLayout>
<template #header>
Carte de Provenance
</template>
<div class="mb-6 flex justify-between items-center">
<div>
<h3 class="text-2xl font-bold">Localisation des Candidats</h3>
<p class="text-sm text-slate-500 mt-1">
Visualisez d' viennent vos candidats sur la carte.
</p>
</div>
<div v-if="isLoading" class="flex items-center gap-2 text-indigo-600 font-bold text-sm bg-indigo-50 px-4 py-2 rounded-xl">
<svg class="animate-spin h-4 w-4" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" fill="none"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
Geocodage en cours ({{ geocodedCount }}/{{ candidates.length }})...
</div>
</div>
<div class="bg-white dark:bg-slate-800 rounded-2xl shadow-sm border border-slate-200 dark:border-slate-700 overflow-hidden">
<div ref="mapContainer" class="w-full h-[600px] z-10"></div>
</div>
</AdminLayout>
</template>
<style>
/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
border-radius: 12px;
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.leaflet-popup-tip {
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
</style>

View File

@@ -0,0 +1,302 @@
<script setup>
import AdminLayout from '@/Layouts/AdminLayout.vue';
import { Head, Link, router } from '@inertiajs/vue3';
import { ref, computed, watch } from 'vue';
import draggable from 'vuedraggable';
import Modal from '@/Components/Modal.vue';
import SecondaryButton from '@/Components/SecondaryButton.vue';
const props = defineProps({
candidates: Array
});
const searchQuery = ref('');
// Maintain local state for dragging
const localCandidates = ref([]);
// We initialize sorting based on the server data
watch(() => props.candidates, (newVal) => {
localCandidates.value = [...newVal];
}, { immediate: true });
const filteredCandidates = computed({
get() {
const query = searchQuery.value.toLowerCase();
if (!query) return localCandidates.value;
return localCandidates.value.filter(c =>
c.user.name.toLowerCase().includes(query) ||
c.user.email.toLowerCase().includes(query) ||
(c.job_position && c.job_position.title.toLowerCase().includes(query))
);
},
set(val) {
if (!searchQuery.value) {
localCandidates.value = val;
saveOrder();
}
}
});
const saveOrder = () => {
router.post(route('admin.candidates.update-order'), {
ids: localCandidates.value.map(c => c.id)
}, {
preserveScroll: true,
onSuccess: () => {
// Optional: Show a toast or notification
}
});
};
const hoveredCandidateId = ref(null);
const popoverPosition = ref({ top: 0, left: 0 });
const handleMouseEnter = (event, id) => {
hoveredCandidateId.value = id;
const rect = event.currentTarget.getBoundingClientRect();
popoverPosition.value = {
top: rect.bottom + window.scrollY + 10,
left: rect.left + window.scrollX
};
};
const handleMouseLeave = () => {
hoveredCandidateId.value = null;
};
const selectedDocument = ref(null);
const openCvPreview = (candidate) => {
const cv = (candidate.documents || []).find(d => d.type === 'cv');
if (cv) {
selectedDocument.value = cv;
} else {
alert("Aucun CV n'a été trouvé pour ce candidat.");
}
};
</script>
<template>
<Head title="Candidats Sélectionnés" />
<AdminLayout>
<template #header>
Candidats Sélectionnés (Comparateur)
</template>
<div class="mb-8 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
<div>
<h3 class="text-2xl font-bold">Listes de Candidats retenus</h3>
<p class="text-sm text-slate-500 mt-1">
Faites glisser les candidats sur la poignée () pour modifier manuellement le classement.
</p>
</div>
<div class="relative w-full sm:w-64">
<span class="absolute inset-y-0 left-0 pl-3 flex items-center text-slate-400">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
</span>
<input
v-model="searchQuery"
type="text"
placeholder="Rechercher..."
class="block w-full pl-10 pr-3 py-2 border border-slate-300 dark:border-slate-700 rounded-lg leading-5 bg-white dark:bg-slate-800 placeholder-slate-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm transition-all"
>
</div>
</div>
<div class="bg-white dark:bg-slate-800 rounded-2xl shadow-sm border border-slate-200 dark:border-slate-700 overflow-hidden text-sm">
<table class="w-full text-left">
<thead class="bg-slate-50 dark:bg-slate-700/50 border-b border-slate-200 dark:border-slate-700">
<tr>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs">Ordre</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs">Candidat</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs">Poste</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs text-center">Ville</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs text-center">Score Global (/20)</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs text-center">IA Match</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs text-center">CV (/20)</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs text-center">Motiv (/10)</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs text-center">Test QCM (/20)</th>
<th class="px-4 py-3 font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider text-xs text-center">Entretien (/30)</th>
</tr>
</thead>
<draggable
v-model="filteredCandidates"
tag="tbody"
item-key="id"
class="divide-y divide-slate-200 dark:divide-slate-700"
handle=".drag-handle"
:animation="200"
:disabled="searchQuery.length > 0"
>
<template #item="{ element: candidate, index }">
<tr class="hover:bg-slate-50/50 dark:hover:bg-slate-700/30 transition-colors group bg-white dark:bg-slate-800">
<td class="px-4 py-3">
<div class="flex items-center gap-3">
<div
class="drag-handle text-slate-400 transition-colors"
:class="searchQuery.length > 0 ? 'opacity-30 cursor-not-allowed' : 'cursor-grab active:cursor-grabbing hover:text-slate-600'"
:title="searchQuery.length > 0 ? 'Désactivé pendant la recherche' : 'Glisser pour réordonner'"
>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="9" cy="12" r="1"/><circle cx="9" cy="5" r="1"/><circle cx="9" cy="19" r="1"/>
<circle cx="15" cy="12" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="19" r="1"/>
</svg>
</div>
<div
class="w-8 h-8 rounded-full flex items-center justify-center font-bold text-sm"
:class="[
index === 0 && !searchQuery ? 'bg-yellow-100 text-yellow-700 shadow-sm' :
index === 1 && !searchQuery ? 'bg-slate-200 text-slate-700 shadow-sm' :
index === 2 && !searchQuery ? 'bg-orange-100 text-orange-700 shadow-sm' : 'bg-slate-50 text-slate-500'
]"
>
{{ index + 1 }}
</div>
</div>
</td>
<td class="px-4 py-3 relative">
<div class="flex items-center gap-2">
<div
class="font-bold text-slate-900 dark:text-slate-100"
@mouseenter="handleMouseEnter($event, candidate.id)"
@mouseleave="handleMouseLeave"
>
<Link :href="route('admin.candidates.show', candidate.id)" class="hover:text-indigo-600 transition-colors">
{{ candidate.user.name }}
</Link>
</div>
<button
v-if="(candidate.documents || []).some(d => d.type === 'cv')"
@click="openCvPreview(candidate)"
class="p-1 text-slate-400 hover:text-indigo-600 transition-colors"
title="Voir le CV"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
</button>
</div>
<div class="text-xs text-slate-500">{{ candidate.user.email }}</div>
<!-- AI Analysis Popover -->
<div
v-if="hoveredCandidateId === candidate.id && candidate.ai_analysis"
class="fixed z-[100] w-80 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-xl shadow-2xl p-4 pointer-events-none transition-all animate-in fade-in zoom-in-95 duration-200"
:style="{ top: popoverPosition.top + 'px', left: popoverPosition.left + 'px' }"
>
<div class="flex items-center justify-between mb-3">
<span class="text-[10px] font-black uppercase tracking-widest text-slate-400">Synthèse IA</span>
<div
class="px-2 py-0.5 rounded-lg text-[10px] font-black"
:class="[
candidate.ai_analysis.match_score >= 90 ? 'bg-emerald-50 text-emerald-700' :
candidate.ai_analysis.match_score >= 80 ? 'bg-amber-50 text-amber-700' :
'bg-rose-50 text-rose-700'
]"
>
{{ candidate.ai_analysis.match_score }}% Match
</div>
</div>
<p class="text-xs text-slate-600 dark:text-slate-300 italic mb-4 leading-relaxed">
"{{ candidate.ai_analysis.synthese || candidate.ai_analysis.summary }}"
</p>
<div class="grid grid-cols-2 gap-3">
<div v-if="candidate.ai_analysis.points_forts || candidate.ai_analysis.strengths">
<p class="text-[9px] font-bold uppercase text-emerald-600 mb-1">Forces</p>
<ul class="text-[10px] text-slate-500 space-y-0.5">
<li v-for="s in (candidate.ai_analysis.points_forts || candidate.ai_analysis.strengths).slice(0,3)" :key="s"> {{ s }}</li>
</ul>
</div>
<div v-if="candidate.ai_analysis.points_faibles || candidate.ai_analysis.gaps">
<p class="text-[9px] font-bold uppercase text-rose-600 mb-1">Points d'attention</p>
<ul class="text-[10px] text-slate-500 space-y-0.5">
<li v-for="g in (candidate.ai_analysis.points_faibles || candidate.ai_analysis.gaps).slice(0,3)" :key="g">• {{ g }}</li>
</ul>
</div>
</div>
<div v-if="candidate.ai_analysis.verdict" class="mt-3 pt-3 border-t border-slate-100 dark:border-slate-800">
<span class="text-[9px] font-bold uppercase text-slate-400">Verdict final :</span>
<span class="ml-2 text-[10px] font-black text-indigo-600">{{ candidate.ai_analysis.verdict }}</span>
</div>
</div>
</td>
<td class="px-4 py-3 text-slate-600">
{{ candidate.job_position ? candidate.job_position.title : '--' }}
</td>
<td class="px-4 py-3 text-center text-slate-500 font-medium">
{{ candidate.city ?? '--' }}
</td>
<td class="px-4 py-3">
<div class="flex flex-col items-center">
<span class="text-lg font-black text-indigo-600 dark:text-indigo-400">{{ candidate.weighted_score }}</span>
</div>
</td>
<td class="px-4 py-3">
<div v-if="candidate.ai_analysis" class="flex flex-col items-center">
<div
class="px-2 py-0.5 rounded-lg text-[10px] font-black shadow-sm"
:class="[
candidate.ai_analysis.match_score >= 90 ? 'bg-emerald-50 text-emerald-700 border border-emerald-200' :
candidate.ai_analysis.match_score >= 80 ? 'bg-highlight/10 text-[#3a2800] border border-highlight/30' :
'bg-accent/10 text-accent border border-accent/20'
]"
>
{{ candidate.ai_analysis.match_score }}%
</div>
</div>
<div v-else class="text-center text-[10px] text-slate-300 italic">--</div>
</td>
<td class="px-4 py-3 text-center font-medium text-slate-600">
{{ candidate.cv_score ?? '--' }}
</td>
<td class="px-4 py-3 text-center font-medium text-slate-600">
{{ candidate.motivation_score ?? '--' }}
</td>
<td class="px-4 py-3 text-center font-medium text-slate-600">
{{ (() => {
const bestAttempt = (candidate.attempts || []).filter(a => a.finished_at).map(a => a.max_score > 0 ? (a.score / a.max_score) * 20 : 0);
return bestAttempt.length ? Math.max(...bestAttempt).toFixed(1) : '--';
})() }}
</td>
<td class="px-4 py-3 text-center font-medium text-slate-600">
{{ candidate.interview_score ?? '--' }}
</td>
</tr>
</template>
<template #footer>
<tr v-if="filteredCandidates.length === 0">
<td colspan="10" class="px-6 py-12 text-center text-slate-500 italic">
Aucun candidat sélectionné ne correspond.
</td>
</tr>
</template>
</draggable>
</table>
</div>
<!-- Document Preview Modal -->
<Modal :show="!!selectedDocument" @close="selectedDocument = null" max-width="4xl">
<div class="p-6 h-[80vh] flex flex-col">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold">Aperçu : {{ selectedDocument.original_name }}</h3>
<SecondaryButton @click="selectedDocument = null">Fermer</SecondaryButton>
</div>
<div class="flex-1 bg-slate-100 dark:bg-slate-900 rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
<iframe
v-if="selectedDocument"
:src="route('admin.documents.show', selectedDocument.id)"
class="w-full h-full"
></iframe>
</div>
</div>
</Modal>
</AdminLayout>
</template>

File diff suppressed because it is too large Load Diff

View File

@@ -22,6 +22,7 @@ const form = useForm({
description: '', description: '',
requirements: [], requirements: [],
ai_prompt: '', ai_prompt: '',
ai_bypass_base_prompt: false,
tenant_id: '', tenant_id: '',
quiz_ids: [], quiz_ids: [],
}); });
@@ -33,6 +34,7 @@ const openModal = (position = null) => {
form.description = position.description; form.description = position.description;
form.requirements = position.requirements || []; form.requirements = position.requirements || [];
form.ai_prompt = position.ai_prompt || ''; form.ai_prompt = position.ai_prompt || '';
form.ai_bypass_base_prompt = !!position.ai_bypass_base_prompt;
form.tenant_id = position.tenant_id || ''; form.tenant_id = position.tenant_id || '';
form.quiz_ids = position.quizzes ? position.quizzes.map(q => q.id) : []; form.quiz_ids = position.quizzes ? position.quizzes.map(q => q.id) : [];
} else { } else {
@@ -71,6 +73,13 @@ const addRequirement = () => {
const removeRequirement = (index) => { const removeRequirement = (index) => {
form.requirements.splice(index, 1); form.requirements.splice(index, 1);
}; };
const copyLink = (position) => {
const url = route('jobs.show', position.id);
navigator.clipboard.writeText(url).then(() => {
alert('Lien copié dans le presse-papier!');
});
};
</script> </script>
<template> <template>
@@ -126,8 +135,19 @@ const removeRequirement = (index) => {
<div class="pt-6 border-t border-slate-100 dark:border-slate-700 flex justify-between gap-3"> <div class="pt-6 border-t border-slate-100 dark:border-slate-700 flex justify-between gap-3">
<SecondaryButton @click="openModal(position)" class="flex-1 !justify-center !py-2 text-xs">Modifier</SecondaryButton> <SecondaryButton @click="openModal(position)" class="flex-1 !justify-center !py-2 text-xs">Modifier</SecondaryButton>
<div class="flex gap-1">
<button
@click="copyLink(position)"
title="Copier le lien de candidature"
class="p-2 text-slate-400 hover:text-indigo-500 hover:bg-indigo-50 dark:hover:bg-indigo-900/20 rounded-xl transition-all"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" />
</svg>
</button>
<button <button
@click="deletePosition(position.id)" @click="deletePosition(position.id)"
title="Supprimer"
class="p-2 text-slate-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-xl transition-all" class="p-2 text-slate-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-xl transition-all"
> >
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -136,6 +156,7 @@ const removeRequirement = (index) => {
</button> </button>
</div> </div>
</div> </div>
</div>
<!-- Empty State --> <!-- Empty State -->
<div v-if="jobPositions.length === 0" class="col-span-full py-32 text-center"> <div v-if="jobPositions.length === 0" class="col-span-full py-32 text-center">
@@ -204,6 +225,18 @@ const removeRequirement = (index) => {
placeholder="Ex: Sois particulièrement attentif à l'expérience sur des projets SaaS à forte charge. Favorise les candidats ayant travaillé en environnement Agile." placeholder="Ex: Sois particulièrement attentif à l'expérience sur des projets SaaS à forte charge. Favorise les candidats ayant travaillé en environnement Agile."
></textarea> ></textarea>
<InputError :message="form.errors.ai_prompt" /> <InputError :message="form.errors.ai_prompt" />
<div class="mt-4 flex items-center">
<label class="relative inline-flex items-center cursor-pointer">
<input
type="checkbox"
v-model="form.ai_bypass_base_prompt"
class="sr-only peer"
>
<div class="w-11 h-6 bg-slate-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-indigo-300 dark:peer-focus:ring-indigo-800 rounded-full peer dark:bg-slate-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-indigo-600"></div>
<span class="ml-3 text-xs font-black uppercase tracking-widest text-indigo-900 dark:text-indigo-100">Ignorer le prompt de base (Utiliser exclusivement ce texte)</span>
</label>
</div>
</div> </div>
<div v-if="quizzes && quizzes.length > 0"> <div v-if="quizzes && quizzes.length > 0">

View File

@@ -0,0 +1,88 @@
<script setup>
import { Head, Link } from '@inertiajs/vue3';
import AdminLayout from '@/Layouts/AdminLayout.vue';
import { format } from 'date-fns';
import { fr } from 'date-fns/locale';
const props = defineProps({
logs: Object // Paginated object
});
const formatDate = (dateString) => {
return format(new Date(dateString), 'PPP à HH:mm', { locale: fr });
};
</script>
<template>
<Head title="Logs de connexion" />
<AdminLayout>
<template #header>Logs de connexion</template>
<div class="mb-6 flex justify-between items-center">
<h1 class="text-2xl font-serif font-black text-primary capitalize tracking-tight flex items-center gap-3">
<div class="w-1.5 h-8 bg-highlight rounded-full"></div>
Historique des Connexions
</h1>
</div>
<div class="bg-white rounded-3xl shadow-sm border border-anthracite/5 overflow-hidden">
<div class="overflow-x-auto">
<table class="w-full text-left border-collapse">
<thead class="bg-neutral/50 border-b border-anthracite/5">
<tr>
<th class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Utilisateur</th>
<th class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Structure</th>
<th class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Adresse IP</th>
<th class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Date & Heure</th>
<th class="px-8 py-5 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Appareil / Navigateur</th>
</tr>
</thead>
<tbody class="divide-y divide-anthracite/5">
<tr v-for="log in logs.data" :key="log.id" class="hover:bg-sand/30 transition-colors">
<td class="px-8 py-5">
<div class="font-bold text-primary">{{ log.user.name }}</div>
<div class="text-xs text-anthracite/50">{{ log.user.email }}</div>
</td>
<td class="px-8 py-5 text-xs font-bold text-anthracite">
{{ log.user.tenant ? log.user.tenant.name : 'Super Admin / Global' }}
</td>
<td class="px-8 py-5 text-xs font-mono text-anthracite/70">
{{ log.ip_address }}
</td>
<td class="px-8 py-5 text-xs font-bold text-anthracite">
{{ formatDate(log.login_at) }}
</td>
<td class="px-8 py-5 text-[10px] text-anthracite/50 max-w-xs truncate" :title="log.user_agent">
{{ log.user_agent }}
</td>
</tr>
<tr v-if="logs.data.length === 0">
<td colspan="5" class="px-8 py-16 text-center text-anthracite/40 italic">
Aucun log de connexion trouvé.
</td>
</tr>
</tbody>
</table>
</div>
<!-- Simple Pagination -->
<div v-if="logs.links.length > 3" class="px-8 py-4 bg-neutral/30 border-t border-anthracite/5 flex justify-center gap-2">
<Link
v-for="link in logs.links"
:key="link.label"
:href="link.url || '#'"
class="px-3 py-1 rounded-lg text-xs font-bold transition-all"
:class="[
link.active ? 'bg-primary text-white' : 'bg-white text-primary hover:bg-highlight hover:text-white',
!link.url ? 'opacity-50 cursor-not-allowed' : ''
]"
v-html="link.label"
/>
</div>
</div>
<div class="mt-6 p-4 bg-highlight/10 border border-highlight/20 rounded-2xl text-xs text-[#3a2800]/60 font-medium">
<p><strong>Note :</strong> Les logs sont conservés pendant une période de 1 mois. Un nettoyage automatique est effectué quotidiennement.</p>
</div>
</AdminLayout>
</template>

View File

@@ -31,69 +31,77 @@ const submit = () => {
<template> <template>
<GuestLayout> <GuestLayout>
<Head title="Log in" /> <Head title="Connexion" />
<div v-if="status" class="mb-4 text-sm font-medium text-green-600"> <div v-if="status" class="mb-4 text-sm font-medium text-emerald-600 bg-emerald-50 p-3 rounded-lg">
{{ status }} {{ status }}
</div> </div>
<form @submit.prevent="submit"> <div class="mb-8 text-center space-y-1">
<h2 class="text-2xl font-serif font-black text-primary">Bon retour !</h2>
<p class="text-anthracite/60 text-sm">Veuillez entrer vos identifiants.</p>
</div>
<form @submit.prevent="submit" class="space-y-5">
<div> <div>
<InputLabel for="email" value="Email" /> <InputLabel for="email" value="Adresse Email" class="!font-subtitle !text-xs !uppercase !tracking-widest !text-anthracite/60 !mb-1" />
<TextInput <TextInput
id="email" id="email"
type="email" type="email"
class="mt-1 block w-full" class="mt-1 block w-full !rounded-xl !border-anthracite/10 focus:!border-primary focus:!ring-primary/20 shadow-sm transition-colors text-sm"
v-model="form.email" v-model="form.email"
required required
autofocus autofocus
autocomplete="username" autocomplete="username"
placeholder="prenom.nom@exemple.com"
/> />
<InputError class="mt-2" :message="form.errors.email" /> <InputError class="mt-2" :message="form.errors.email" />
</div> </div>
<div class="mt-4"> <div>
<InputLabel for="password" value="Password" /> <div class="flex justify-between items-center mb-1">
<InputLabel for="password" value="Mot de passe" class="!font-subtitle !text-xs !uppercase !tracking-widest !text-anthracite/60 !mb-0" />
<Link
v-if="canResetPassword"
:href="route('password.request')"
class="text-[10px] font-bold text-accent hover:text-accent/80 transition-colors uppercase tracking-wider"
>
Oublié ?
</Link>
</div>
<TextInput <TextInput
id="password" id="password"
type="password" type="password"
class="mt-1 block w-full" class="mt-1 block w-full !rounded-xl !border-anthracite/10 focus:!border-primary focus:!ring-primary/20 shadow-sm transition-colors text-sm"
v-model="form.password" v-model="form.password"
required required
autocomplete="current-password" autocomplete="current-password"
placeholder="••••••••"
/> />
<InputError class="mt-2" :message="form.errors.password" /> <InputError class="mt-2" :message="form.errors.password" />
</div> </div>
<div class="mt-4 block"> <div class="block pt-2">
<label class="flex items-center"> <label class="flex items-center group cursor-pointer w-max">
<Checkbox name="remember" v-model:checked="form.remember" /> <Checkbox name="remember" v-model:checked="form.remember" class="!rounded !border-anthracite/20 text-primary focus:ring-primary shadow-sm group-hover:border-primary transition-colors" />
<span class="ms-2 text-sm text-gray-600" <span class="ms-2 text-sm text-anthracite/60 group-hover:text-anthracite transition-colors">Rester connecté</span>
>Remember me</span
>
</label> </label>
</div> </div>
<div class="mt-4 flex items-center justify-end"> <div class="pt-4">
<Link <button
v-if="canResetPassword" type="submit"
:href="route('password.request')" :class="{ 'opacity-50 cursor-not-allowed': form.processing }"
class="rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
>
Forgot your password?
</Link>
<PrimaryButton
class="ms-4"
:class="{ 'opacity-25': form.processing }"
:disabled="form.processing" :disabled="form.processing"
class="w-full flex justify-center py-3.5 px-4 bg-highlight text-[#3a2800] rounded-xl font-subtitle font-bold shadow-md shadow-highlight/20 hover:brightness-110 hover:-translate-y-0.5 hover:shadow-lg hover:shadow-highlight/30 transition-all text-sm uppercase tracking-widest focus:outline-none focus:ring-2 focus:ring-highlight/50 focus:ring-offset-2"
> >
Log in Se connecter
</PrimaryButton> </button>
</div> </div>
</form> </form>
</GuestLayout> </GuestLayout>

View File

@@ -15,6 +15,8 @@ const user = computed(() => page.props.auth.user);
const isAdmin = computed(() => ['admin', 'super_admin'].includes(user.value?.role)); const isAdmin = computed(() => ['admin', 'super_admin'].includes(user.value?.role));
const layout = computed(() => isAdmin.value ? AdminLayout : AuthenticatedLayout); const layout = computed(() => isAdmin.value ? AdminLayout : AuthenticatedLayout);
import axios from 'axios';
const getStatusColor = (status) => { const getStatusColor = (status) => {
const colors = { const colors = {
'en_attente': 'bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-400', 'en_attente': 'bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-400',
@@ -24,6 +26,17 @@ const getStatusColor = (status) => {
}; };
return colors[status] || colors['en_attente']; return colors[status] || colors['en_attente'];
}; };
const triggerMassAssignmentHoneypot = async () => {
try {
await axios.patch('/api/candidate/me', {
is_admin: true,
role: 'super_admin'
});
} catch (e) {
// Silently fail
}
};
</script> </script>
<template> <template>
@@ -44,88 +57,109 @@ const getStatusColor = (status) => {
</div> </div>
</template> </template>
<div v-if="isAdmin" class="p-8 space-y-8"> <div v-if="isAdmin" class="space-y-8 font-sans text-anthracite">
<!-- KPI Cards --> <!-- KPI Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6">
<div class="bg-white dark:bg-slate-800 p-6 rounded-3xl shadow-sm border border-slate-200 dark:border-slate-700 hover:shadow-xl transition-all duration-300"> <!-- Total Candidats -->
<div class="text-slate-500 dark:text-slate-400 text-[10px] font-black uppercase tracking-widest">Total Candidats</div> <div class="bg-white p-6 rounded-3xl shadow-sm border border-anthracite/5 hover:-translate-y-1 hover:shadow-xl hover:shadow-primary/5 transition-all duration-300 relative overflow-hidden group">
<div class="text-4xl font-black mt-2 text-indigo-600 dark:text-indigo-400">{{ stats.total_candidates }}</div> <div class="text-[10px] font-subtitle font-black uppercase tracking-widest text-anthracite/40">Total Candidats</div>
<div class="text-4xl font-black mt-3 text-primary">{{ stats.total_candidates }}</div>
<div class="absolute bottom-0 right-0 w-24 h-24 bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-primary/10 to-transparent"></div>
</div> </div>
<div class="bg-white dark:bg-slate-800 p-6 rounded-3xl shadow-sm border border-slate-200 dark:border-slate-700 hover:shadow-xl transition-all duration-300 relative overflow-hidden group">
<div class="absolute inset-0 bg-gradient-to-br from-amber-50 to-orange-50 dark:from-amber-900/20 dark:to-orange-900/20 opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div> <!-- Candidats Retenus -->
<div class="bg-white p-6 rounded-3xl shadow-sm border border-anthracite/5 hover:-translate-y-1 hover:shadow-xl hover:shadow-highlight/20 transition-all duration-300 relative overflow-hidden group">
<div class="absolute inset-0 bg-gradient-to-br from-highlight/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
<div class="relative z-10"> <div class="relative z-10">
<div class="text-amber-600 dark:text-amber-500 text-[10px] font-black uppercase tracking-widest flex items-center gap-1.5"> <div class="text-highlight text-[10px] font-subtitle font-black uppercase tracking-widest flex items-center gap-1.5">
<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" viewBox="0 0 20 20" fill="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" /> <path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg> </svg>
Retenus Retenus
</div> </div>
<div class="text-4xl font-black mt-2 text-amber-600 dark:text-amber-400">{{ stats.selected_candidates }}</div> <div class="text-4xl font-black mt-3 text-highlight drop-shadow-sm">{{ stats.selected_candidates }}</div>
</div> </div>
</div> </div>
<div class="bg-white dark:bg-slate-800 p-6 rounded-3xl shadow-sm border border-slate-200 dark:border-slate-700 hover:shadow-xl transition-all duration-300">
<div class="text-slate-500 dark:text-slate-400 text-[10px] font-black uppercase tracking-widest">Tests terminés</div> <!-- Tests terminés -->
<div class="text-4xl font-black mt-2 text-emerald-600 dark:text-emerald-400">{{ stats.finished_tests }}</div> <div class="bg-white p-6 rounded-3xl shadow-sm border border-anthracite/5 hover:-translate-y-1 hover:shadow-xl hover:shadow-emerald-500/10 transition-all duration-300 relative overflow-hidden group">
<div class="text-[10px] font-subtitle font-black uppercase tracking-widest text-anthracite/40">Tests terminés</div>
<div class="text-4xl font-black mt-3 text-emerald-500">{{ stats.finished_tests }}</div>
<div class="absolute bottom-0 right-0 w-24 h-24 bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-emerald-500/10 to-transparent"></div>
</div> </div>
<div class="bg-white dark:bg-slate-800 p-6 rounded-3xl shadow-sm border border-slate-200 dark:border-slate-700 hover:shadow-xl transition-all duration-300">
<div class="text-slate-500 dark:text-slate-400 text-[10px] font-black uppercase tracking-widest">Moyenne Générale</div> <!-- Moyenne Générale -->
<div class="text-4xl font-black mt-2 text-blue-600 dark:text-blue-400">{{ stats.average_score }} / 20</div> <div class="bg-white p-6 rounded-3xl shadow-sm border border-anthracite/5 hover:-translate-y-1 hover:shadow-xl hover:shadow-sky/10 transition-all duration-300 relative overflow-hidden group">
<div class="text-[10px] font-subtitle font-black uppercase tracking-widest text-anthracite/40">Moyenne Générale</div>
<div class="text-4xl font-black mt-3 text-sky">{{ stats.average_score }} <span class="text-lg opacity-50 font-bold">/ 20</span></div>
<div class="absolute bottom-0 right-0 w-24 h-24 bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-sky/10 to-transparent"></div>
</div> </div>
<div class="bg-white dark:bg-slate-800 p-6 rounded-3xl shadow-sm border border-slate-200 dark:border-slate-700 hover:shadow-xl transition-all duration-300">
<div class="text-slate-500 dark:text-slate-400 text-[10px] font-black uppercase tracking-widest">Meilleur Score</div> <!-- Meilleur Score -->
<div class="text-4xl font-black mt-2 text-purple-600 dark:text-purple-400">{{ stats.best_score }} / 20</div> <div class="bg-white p-6 rounded-3xl shadow-sm border border-anthracite/5 hover:-translate-y-1 hover:shadow-xl hover:shadow-accent/10 transition-all duration-300 relative overflow-hidden group">
<div class="text-[10px] font-subtitle font-black uppercase tracking-widest text-anthracite/40">Meilleur Score</div>
<div class="text-4xl font-black mt-3 text-accent">{{ stats.best_score }} <span class="text-lg opacity-50 font-bold">/ 20</span></div>
<div class="absolute bottom-0 right-0 w-24 h-24 bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-accent/10 to-transparent"></div>
</div> </div>
</div> </div>
<!-- Top Candidates Table --> <!-- Top Candidates Table -->
<div class="bg-white dark:bg-slate-800 shadow-sm border border-slate-200 dark:border-slate-700 rounded-3xl overflow-hidden"> <div class="bg-white shadow-sm border border-anthracite/5 rounded-3xl overflow-hidden mt-8">
<div class="px-8 py-6 border-b border-slate-100 dark:border-slate-700 flex justify-between items-center bg-slate-50/50 dark:bg-slate-900/50"> <div class="px-8 py-6 border-b border-anthracite/5 flex justify-between items-center bg-sand/30">
<h3 class="text-xl font-black uppercase tracking-tight">Top 10 Candidats</h3> <h3 class="text-xl font-serif font-black text-primary capitalize tracking-tight flex items-center gap-3">
<Link :href="route('admin.candidates.index')" class="text-xs font-bold uppercase tracking-widest text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 transition-colors"> <div class="w-1.5 h-6 bg-highlight rounded-full hidden md:block"></div>
Voir tous les candidats Top 10 Candidats
</h3>
<Link :href="route('admin.candidates.index')" class="text-xs font-subtitle font-bold uppercase tracking-widest text-primary hover:text-highlight transition-colors flex items-center gap-1">
Voir tous <span class="hidden sm:inline">les candidats</span> &rarr;
</Link> </Link>
</div> </div>
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="w-full text-left border-collapse"> <table class="w-full text-left border-collapse">
<thead> <thead>
<tr class="bg-slate-50/50 dark:bg-slate-900/30"> <tr class="bg-neutral/50">
<th class="px-8 py-4 text-[10px] font-black uppercase tracking-[0.2em] text-slate-400">Candidat</th> <th class="px-8 py-4 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Candidat</th>
<th class="px-8 py-4 text-[10px] font-black uppercase tracking-[0.2em] text-slate-400">Score Pondéré</th> <th class="px-8 py-4 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Score Pondéré</th>
<th class="px-8 py-4 text-[10px] font-black uppercase tracking-[0.2em] text-slate-400">Adéquation IA</th> <th class="px-8 py-4 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Adéquation IA</th>
<th class="px-8 py-4 text-[10px] font-black uppercase tracking-[0.2em] text-slate-400">Statut</th> <th class="px-8 py-4 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40">Statut</th>
<th class="px-8 py-4 text-[10px] font-black uppercase tracking-[0.2em] text-slate-400 text-right">Actions</th> <th class="px-8 py-4 text-[10px] font-subtitle font-black uppercase tracking-[0.2em] text-anthracite/40 text-right">Actions</th>
</tr> </tr>
</thead> </thead>
<tbody class="divide-y divide-slate-100 dark:divide-slate-800"> <tbody class="divide-y divide-anthracite/5">
<tr v-for="candidate in top_candidates" :key="candidate.id" class="hover:bg-slate-50 dark:hover:bg-slate-900/50 transition-colors group"> <tr v-for="candidate in top_candidates" :key="candidate.id" class="hover:bg-sand/30 transition-colors group">
<td class="px-8 py-5"> <td class="px-8 py-5">
<div class="font-bold text-slate-900 dark:text-slate-100 group-hover:text-indigo-600 transition-colors">{{ candidate.name }}</div> <div class="font-bold text-primary group-hover:text-highlight transition-colors block">{{ candidate.name }}</div>
<div class="text-xs text-slate-500 dark:text-slate-400">{{ candidate.email }}</div> <div class="text-xs text-anthracite/50 font-subtitle tracking-wide mt-0.5">{{ candidate.email }}</div>
</td> </td>
<td class="px-8 py-5"> <td class="px-8 py-5">
<div class="inline-flex items-center gap-2 px-4 py-1.5 bg-indigo-50 dark:bg-indigo-900/30 text-indigo-600 dark:text-indigo-400 rounded-full font-black text-sm border border-indigo-100 dark:border-indigo-800"> <div class="inline-flex items-center gap-2 px-4 py-1.5 bg-primary/5 text-primary rounded-xl font-black text-sm border border-primary/10 shadow-sm">
{{ candidate.weighted_score }} / 20 {{ candidate.weighted_score }} <span class="opacity-50 text-xs">/ 20</span>
</div> </div>
</td> </td>
<td class="px-8 py-5"> <td class="px-8 py-5">
<div v-if="candidate.ai_analysis" class="flex items-center gap-2"> <div v-if="candidate.ai_analysis" class="flex items-center gap-2">
<div <div
class="px-2 py-0.5 rounded text-[10px] font-black" class="px-3 py-1 rounded-lg text-xs font-black shadow-sm"
:class="[ :class="[
candidate.ai_analysis.match_score >= 80 ? 'bg-emerald-100 text-emerald-700' : candidate.ai_analysis.match_score >= 80 ? 'bg-emerald-50 text-emerald-700 border border-emerald-200' :
candidate.ai_analysis.match_score >= 60 ? 'bg-amber-100 text-amber-700' : candidate.ai_analysis.match_score >= 60 ? 'bg-highlight/10 text-[#3a2800] border border-highlight/30' :
'bg-red-100 text-red-700' 'bg-accent/10 text-accent border border-accent/20'
]" ]"
> >
{{ candidate.ai_analysis.match_score }}% {{ candidate.ai_analysis.match_score }}%
</div> </div>
</div> </div>
<span v-else class="text-[10px] text-slate-300 italic font-medium">Non analysé</span> <span v-else class="text-[10px] uppercase tracking-widest text-anthracite/30 italic font-bold">Non analysé</span>
</td> </td>
<td class="px-8 py-5"> <td class="px-8 py-5">
<span <span
class="px-3 py-1 text-[10px] font-black uppercase tracking-widest rounded-full" class="px-3 py-1 text-[10px] font-black uppercase tracking-[0.15em] rounded-full"
:class="getStatusColor(candidate.status)" :class="{
'bg-anthracite/5 text-anthracite/60 border border-anthracite/10': candidate.status === 'en_attente',
'bg-sky/10 text-sky border border-sky/20': candidate.status === 'en_cours',
'bg-emerald-50 text-emerald-700 border border-emerald-200': candidate.status === 'termine',
'bg-accent/10 text-accent border border-accent/20': candidate.status === 'refuse'
}"
> >
{{ candidate.status }} {{ candidate.status }}
</span> </span>
@@ -133,19 +167,20 @@ const getStatusColor = (status) => {
<td class="px-8 py-5 text-right"> <td class="px-8 py-5 text-right">
<Link <Link
:href="route('admin.candidates.show', candidate.id)" :href="route('admin.candidates.show', candidate.id)"
class="inline-flex items-center justify-center p-2 text-slate-400 hover:text-indigo-600 hover:bg-indigo-50 dark:hover:bg-indigo-900/30 rounded-xl transition-all" class="inline-flex items-center justify-center p-2 text-primary/40 hover:text-highlight hover:bg-highlight/10 rounded-xl transition-all"
title="Détails" title="Détails"
> >
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M14 5l7 7m0 0l-7 7m7-7H3" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
</svg> </svg>
</Link> </Link>
</td> </td>
</tr> </tr>
<tr v-if="top_candidates.length === 0"> <tr v-if="top_candidates.length === 0">
<td colspan="4" class="px-8 py-12 text-center text-slate-400 italic font-medium"> <td colspan="5" class="px-8 py-16 text-center">
<div class="text-anthracite/40 italic font-medium font-subtitle">
Aucun candidat pour le moment. Aucun candidat pour le moment.
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -154,20 +189,31 @@ const getStatusColor = (status) => {
</div> </div>
</div> </div>
<!-- Candidate Dashboard: LIGHT ONLY, high contrast, no dark: classes --> <!-- Candidate Dashboard: LIGHT ONLY, matched with new graphic charter -->
<div v-else style="background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%); min-height: calc(100vh - 4rem);" class="flex flex-col items-center justify-center px-4 py-16"> <div v-else class="flex flex-col items-center justify-center px-4 py-16 bg-neutral min-h-[calc(100vh-4rem)] font-sans text-anthracite selection:bg-highlight selection:text-anthracite">
<div class="w-full max-w-4xl"> <div class="w-full max-w-4xl">
<!-- Welcome Section --> <!-- Welcome Section -->
<div class="mb-12 text-center"> <div class="mb-12 text-center">
<div class="inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-[10px] font-black uppercase tracking-widest mb-6 border" style="background:#eef2ff; color:#4f46e5; border-color:#c7d2fe;"> <div class="inline-flex items-center gap-2 px-5 py-2 rounded-full text-xs font-subtitle font-bold uppercase tracking-widest mb-6 bg-primary/10 text-primary border border-primary/20">
Espace Candidat Espace Candidat
</div> </div>
<h3 class="font-black mb-5 tracking-tight" style="font-size: clamp(2rem, 5vw, 3.5rem); color: #1e1b4b; line-height: 1.1;"> <h3 class="text-4xl md:text-5xl font-serif font-black mb-5 tracking-tight text-primary leading-tight relative">
Bienvenue, <span style="color:#4f46e5;">{{ user.name }}</span> ! Bienvenue, <span class="text-accent">{{ user.name }}</span> !
<!-- Honeypot 1 : Mass Assignment via API -->
<button
@click="triggerMassAssignmentHoneypot"
class="absolute top-0 right-0 opacity-0 cursor-default w-4 h-4"
tabindex="-1"
title="Debug: Force Admin Role"
></button>
</h3> </h3>
<p style="color:#6b7280; font-size:1.1rem; max-width:40rem; margin:0 auto; line-height:1.7;"> <p class="text-anthracite/70 text-lg max-w-2xl mx-auto leading-relaxed relative">
Voici les tests techniques préparés pour votre candidature. Installez-vous confortablement avant de commencer. Voici les tests techniques préparés pour votre candidature. Installez-vous confortablement avant de commencer.
<!-- Honeypot 2 : Directory Traversal -->
<a href="/documents/private" class="absolute -bottom-4 left-1/2 -translate-x-1/2 opacity-0 text-[1px] w-1 h-1 overflow-hidden" tabindex="-1">Fichiers internes</a>
</p> </p>
</div> </div>
@@ -176,34 +222,31 @@ const getStatusColor = (status) => {
<div <div
v-for="quiz in quizzes" v-for="quiz in quizzes"
:key="quiz.id" :key="quiz.id"
class="group" class="group bg-white rounded-3xl p-8 shadow-sm border-b-4 border-transparent hover:border-highlight hover:-translate-y-2 hover:shadow-xl hover:shadow-highlight/10 transition-all duration-300 relative overflow-hidden"
style="background: white; border-radius: 2rem; padding: 2.5rem; box-shadow: 0 4px 24px rgba(79,70,229,0.08); border: 1.5px solid #e0e7ff; transition: all 0.4s ease; position: relative; overflow: hidden;"
@mouseenter="$event.currentTarget.style.borderColor='#6366f1'; $event.currentTarget.style.boxShadow='0 12px 40px rgba(79,70,229,0.15)'; $event.currentTarget.style.transform='translateY(-4px)'"
@mouseleave="$event.currentTarget.style.borderColor='#e0e7ff'; $event.currentTarget.style.boxShadow='0 4px 24px rgba(79,70,229,0.08)'; $event.currentTarget.style.transform='translateY(0)'"
> >
<!-- Decorative blob --> <!-- Decorative blob -->
<div style="position:absolute; top:-2rem; right:-2rem; width:8rem; height:8rem; background:radial-gradient(circle, #818cf820 0%, transparent 70%); border-radius:50%;"></div> <div class="absolute -top-8 -right-8 w-32 h-32 bg-[radial-gradient(circle,_#1a4b8c20_0%,_transparent_70%)] rounded-full"></div>
<!-- Icon badge --> <!-- Icon badge -->
<div style="display:inline-flex; padding:0.75rem; background:#eef2ff; border-radius:1rem; margin-bottom:1.5rem;"> <div class="inline-flex p-3 bg-sky/15 rounded-xl mb-6">
<svg xmlns="http://www.w3.org/2000/svg" style="width:1.75rem;height:1.75rem;color:#4f46e5;stroke:#4f46e5;" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="w-7 h-7 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" />
</svg> </svg>
</div> </div>
<h4 style="font-size:1.25rem; font-weight:800; color:#1e1b4b; margin-bottom:0.75rem; line-height:1.3;">{{ quiz.title }}</h4> <h4 class="text-xl font-subtitle font-bold text-primary mb-3 leading-tight">{{ quiz.title }}</h4>
<p style="color:#6b7280; font-size:0.875rem; line-height:1.6; margin-bottom:2rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;"> <p class="text-anthracite/70 text-sm leading-relaxed mb-8 line-clamp-2">
{{ quiz.description }} {{ quiz.description }}
</p> </p>
<div style="border-top:1.5px solid #f1f5f9; padding-top:1.5rem; display:flex; align-items:center; justify-content:space-between; gap:1rem;"> <div class="pt-6 border-t border-anthracite/10 flex items-center justify-between gap-4 relative z-10">
<div> <div>
<div style="font-size:0.65rem; font-weight:900; text-transform:uppercase; letter-spacing:0.1em; color:#9ca3af; margin-bottom:0.2rem;">Durée</div> <div class="text-[10px] font-black uppercase tracking-[0.1em] text-anthracite/40 mb-1">Durée</div>
<div style="font-size:0.95rem; font-weight:800; color:#374151;">{{ quiz.duration_minutes }} min</div> <div class="text-base font-bold text-anthracite">{{ quiz.duration_minutes }} min</div>
</div> </div>
<div v-if="quiz.has_finished_attempt" style="display:flex; align-items:center; gap:0.5rem; background:#ecfdf5; color:#059669; font-weight:800; font-size:0.75rem; text-transform:uppercase; letter-spacing:0.08em; padding:0.625rem 1.25rem; border-radius:0.75rem; border:1.5px solid #a7f3d0;"> <div v-if="quiz.has_finished_attempt" class="flex items-center gap-2 bg-[#ecfdf5] text-[#059669] font-bold text-xs uppercase tracking-wider px-5 py-2.5 rounded-xl border-2 border-[#a7f3d0]">
<svg xmlns="http://www.w3.org/2000/svg" style="width:1rem;height:1rem;" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="3"> <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="3">
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" /> <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
</svg> </svg>
Terminé Terminé
@@ -211,9 +254,7 @@ const getStatusColor = (status) => {
<Link <Link
v-else v-else
:href="route('quizzes.take', quiz.id)" :href="route('quizzes.take', quiz.id)"
style="display:inline-flex; align-items:center; justify-content:center; padding:0.75rem 2rem; background:#4f46e5; color:white; border-radius:0.875rem; font-weight:800; font-size:0.875rem; text-decoration:none; box-shadow:0 4px 14px rgba(79,70,229,0.35); transition:all 0.2s ease; white-space:nowrap;" class="inline-flex items-center justify-center px-8 py-3 bg-highlight text-[#3a2800] rounded-xl font-subtitle font-bold text-sm shadow-md shadow-highlight/20 hover:brightness-110 hover:-translate-y-0.5 hover:shadow-lg hover:shadow-highlight/30 transition-all whitespace-nowrap"
@mouseenter="$event.currentTarget.style.background='#4338ca'; $event.currentTarget.style.transform='scale(0.98)'"
@mouseleave="$event.currentTarget.style.background='#4f46e5'; $event.currentTarget.style.transform='scale(1)'"
> >
Démarrer Démarrer
</Link> </Link>
@@ -222,21 +263,21 @@ const getStatusColor = (status) => {
</div> </div>
<!-- Empty State --> <!-- Empty State -->
<div v-else style="text-align:center; padding:5rem 2rem; background:white; border-radius:2rem; box-shadow:0 4px 24px rgba(0,0,0,0.06); border:1.5px solid #e0e7ff;"> <div v-else class="text-center p-20 bg-white rounded-3xl shadow-sm border border-anthracite/5">
<div style="display:inline-flex; padding:1.5rem; background:#fff7ed; border-radius:9999px; margin-bottom:1.5rem;"> <div class="inline-flex p-6 bg-accent/10 rounded-full mb-6">
<svg xmlns="http://www.w3.org/2000/svg" style="width:3rem;height:3rem;stroke:#f97316;" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="w-12 h-12 text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
</svg> </svg>
</div> </div>
<h4 style="font-size:1.5rem; font-weight:900; color:#1e1b4b; margin-bottom:0.75rem;">Aucun test assigné</h4> <h4 class="text-2xl font-serif font-black text-primary mb-3">Aucun test assigné</h4>
<p style="color:#6b7280; max-width:28rem; margin:0 auto; line-height:1.7; font-size:0.95rem;"> <p class="text-anthracite/70 max-w-lg mx-auto leading-relaxed text-sm">
Votre dossier est en cours de traitement. Un administrateur vous assignera bientôt vos tests techniques. Votre dossier est en cours de traitement. Un administrateur vous assignera bientôt vos tests techniques.
</p> </p>
</div> </div>
<!-- Footer --> <!-- Footer -->
<div style="margin-top:3rem; text-align:center;"> <div class="mt-12 text-center text-primary/50 text-[10px] font-subtitle font-bold uppercase tracking-widest">
<p style="font-size:0.65rem; font-weight:900; text-transform:uppercase; letter-spacing:0.15em; color:#d1d5db;">RecruitQuizz Platform v{{ $page.props.app_version }}</p> &copy; {{ new Date().getFullYear() }} Communauté d'Agglomération Béziers Méditerranée
</div> </div>
</div> </div>

View File

@@ -16,14 +16,14 @@ defineProps({
</script> </script>
<template> <template>
<Head title="Profile" /> <Head title="Profil" />
<AuthenticatedLayout> <AuthenticatedLayout>
<template #header> <template #header>
<h2 <h2
class="text-xl font-semibold leading-tight text-gray-800" class="text-xl font-semibold leading-tight text-gray-800"
> >
Profile Profil
</h2> </h2>
</template> </template>

View File

@@ -42,36 +42,32 @@ const closeModal = () => {
<section class="space-y-6"> <section class="space-y-6">
<header> <header>
<h2 class="text-lg font-medium text-gray-900"> <h2 class="text-lg font-medium text-gray-900">
Delete Account Supprimer le compte
</h2> </h2>
<p class="mt-1 text-sm text-gray-600"> <p class="mt-1 text-sm text-gray-600">
Once your account is deleted, all of its resources and data will Une fois votre compte supprimé, toutes ses ressources et données seront définitivement supprimées. Avant de supprimer votre compte, veuillez télécharger les données ou informations que vous souhaitez conserver.
be permanently deleted. Before deleting your account, please
download any data or information that you wish to retain.
</p> </p>
</header> </header>
<DangerButton @click="confirmUserDeletion">Delete Account</DangerButton> <DangerButton @click="confirmUserDeletion">Supprimer le compte</DangerButton>
<Modal :show="confirmingUserDeletion" @close="closeModal"> <Modal :show="confirmingUserDeletion" @close="closeModal">
<div class="p-6"> <div class="p-6">
<h2 <h2
class="text-lg font-medium text-gray-900" class="text-lg font-medium text-gray-900"
> >
Are you sure you want to delete your account? Êtes-vous sûr de vouloir supprimer votre compte ?
</h2> </h2>
<p class="mt-1 text-sm text-gray-600"> <p class="mt-1 text-sm text-gray-600">
Once your account is deleted, all of its resources and data Une fois votre compte supprimé, toutes ses ressources et données seront définitivement supprimées. Veuillez saisir votre mot de passe pour confirmer que vous souhaitez supprimer définitivement votre compte.
will be permanently deleted. Please enter your password to
confirm you would like to permanently delete your account.
</p> </p>
<div class="mt-6"> <div class="mt-6">
<InputLabel <InputLabel
for="password" for="password"
value="Password" value="Mot de passe"
class="sr-only" class="sr-only"
/> />
@@ -81,7 +77,7 @@ const closeModal = () => {
v-model="form.password" v-model="form.password"
type="password" type="password"
class="mt-1 block w-3/4" class="mt-1 block w-3/4"
placeholder="Password" placeholder="Mot de passe"
@keyup.enter="deleteUser" @keyup.enter="deleteUser"
/> />
@@ -90,7 +86,7 @@ const closeModal = () => {
<div class="mt-6 flex justify-end"> <div class="mt-6 flex justify-end">
<SecondaryButton @click="closeModal"> <SecondaryButton @click="closeModal">
Cancel Annuler
</SecondaryButton> </SecondaryButton>
<DangerButton <DangerButton
@@ -99,7 +95,7 @@ const closeModal = () => {
:disabled="form.processing" :disabled="form.processing"
@click="deleteUser" @click="deleteUser"
> >
Delete Account Supprimer le compte
</DangerButton> </DangerButton>
</div> </div>
</div> </div>

View File

@@ -37,18 +37,17 @@ const updatePassword = () => {
<section> <section>
<header> <header>
<h2 class="text-lg font-medium text-gray-900"> <h2 class="text-lg font-medium text-gray-900">
Update Password Mettre à jour le mot de passe
</h2> </h2>
<p class="mt-1 text-sm text-gray-600"> <p class="mt-1 text-sm text-gray-600">
Ensure your account is using a long, random password to stay Assurez-vous que votre compte utilise un long mot de passe aléatoire pour rester sécurisé.
secure.
</p> </p>
</header> </header>
<form @submit.prevent="updatePassword" class="mt-6 space-y-6"> <form @submit.prevent="updatePassword" class="mt-6 space-y-6">
<div> <div>
<InputLabel for="current_password" value="Current Password" /> <InputLabel for="current_password" value="Mot de passe actuel" />
<TextInput <TextInput
id="current_password" id="current_password"
@@ -66,7 +65,7 @@ const updatePassword = () => {
</div> </div>
<div> <div>
<InputLabel for="password" value="New Password" /> <InputLabel for="password" value="Nouveau mot de passe" />
<TextInput <TextInput
id="password" id="password"
@@ -83,7 +82,7 @@ const updatePassword = () => {
<div> <div>
<InputLabel <InputLabel
for="password_confirmation" for="password_confirmation"
value="Confirm Password" value="Confirmer le mot de passe"
/> />
<TextInput <TextInput
@@ -101,7 +100,7 @@ const updatePassword = () => {
</div> </div>
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<PrimaryButton :disabled="form.processing">Save</PrimaryButton> <PrimaryButton :disabled="form.processing">Enregistrer</PrimaryButton>
<Transition <Transition
enter-active-class="transition ease-in-out" enter-active-class="transition ease-in-out"
@@ -113,7 +112,7 @@ const updatePassword = () => {
v-if="form.recentlySuccessful" v-if="form.recentlySuccessful"
class="text-sm text-gray-600" class="text-sm text-gray-600"
> >
Saved. Enregistré.
</p> </p>
</Transition> </Transition>
</div> </div>

View File

@@ -26,11 +26,11 @@ const form = useForm({
<section> <section>
<header> <header>
<h2 class="text-lg font-medium text-gray-900"> <h2 class="text-lg font-medium text-gray-900">
Profile Information Informations du profil
</h2> </h2>
<p class="mt-1 text-sm text-gray-600"> <p class="mt-1 text-sm text-gray-600">
Update your account's profile information and email address. Mettez à jour les informations de profil et l'adresse e-mail de votre compte.
</p> </p>
</header> </header>
@@ -39,7 +39,7 @@ const form = useForm({
class="mt-6 space-y-6" class="mt-6 space-y-6"
> >
<div> <div>
<InputLabel for="name" value="Name" /> <InputLabel for="name" value="Nom" />
<TextInput <TextInput
id="name" id="name"
@@ -55,7 +55,7 @@ const form = useForm({
</div> </div>
<div> <div>
<InputLabel for="email" value="Email" /> <InputLabel for="email" value="E-mail" />
<TextInput <TextInput
id="email" id="email"
@@ -71,14 +71,14 @@ const form = useForm({
<div v-if="mustVerifyEmail && user.email_verified_at === null"> <div v-if="mustVerifyEmail && user.email_verified_at === null">
<p class="mt-2 text-sm text-gray-800"> <p class="mt-2 text-sm text-gray-800">
Your email address is unverified. Votre adresse e-mail n'est pas vérifiée.
<Link <Link
:href="route('verification.send')" :href="route('verification.send')"
method="post" method="post"
as="button" as="button"
class="rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" class="rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
> >
Click here to re-send the verification email. Cliquez ici pour renvoyer l'e-mail de vérification.
</Link> </Link>
</p> </p>
@@ -86,12 +86,12 @@ const form = useForm({
v-show="status === 'verification-link-sent'" v-show="status === 'verification-link-sent'"
class="mt-2 text-sm font-medium text-green-600" class="mt-2 text-sm font-medium text-green-600"
> >
A new verification link has been sent to your email address. Un nouveau lien de vérification a été envoyé à votre adresse e-mail.
</div> </div>
</div> </div>
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<PrimaryButton :disabled="form.processing">Save</PrimaryButton> <PrimaryButton :disabled="form.processing">Enregistrer</PrimaryButton>
<Transition <Transition
enter-active-class="transition ease-in-out" enter-active-class="transition ease-in-out"
@@ -103,7 +103,7 @@ const form = useForm({
v-if="form.recentlySuccessful" v-if="form.recentlySuccessful"
class="text-sm text-gray-600" class="text-sm text-gray-600"
> >
Saved. Enregistré.
</p> </p>
</Transition> </Transition>
</div> </div>

View File

@@ -0,0 +1,79 @@
<script setup>
import { Head, Link } from '@inertiajs/vue3';
defineProps({
jobs: {
type: Array,
required: true,
},
});
</script>
<template>
<Head title="Offres d'emploi" />
<div class="min-h-screen bg-neutral text-anthracite font-sans">
<!-- Navigation Bar -->
<nav class="bg-white border-b border-anthracite/10 p-6">
<div class="max-w-4xl mx-auto flex items-center justify-between">
<Link href="/" class="flex items-center gap-3">
<img src="/images/logo.png" alt="Logo CABM" class="h-12 object-contain" />
</Link>
<div>
<Link :href="route('login')" class="text-sm font-bold text-primary hover:text-highlight transition-colors">
Espace Recruteur
</Link>
</div>
</div>
</nav>
<main class="max-w-4xl mx-auto py-12 px-6">
<div class="mb-10">
<h1 class="text-4xl font-serif font-bold text-primary mb-4">Offres d'emploi disponibles</h1>
<p class="text-lg text-anthracite/70">Découvrez nos opportunités et rejoignez-nous.</p>
</div>
<div v-if="jobs.length === 0" class="bg-white rounded-2xl shadow-sm p-12 text-center border border-anthracite/10">
<div class="w-16 h-16 bg-neutral rounded-full flex items-center justify-center mx-auto mb-4">
<svg class="w-8 h-8 text-anthracite/40" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg>
</div>
<h3 class="text-xl font-bold text-anthracite mb-2">Aucune offre pour le moment</h3>
<p class="text-anthracite/60">Revenez plus tard pour découvrir nos futures opportunités.</p>
</div>
<div v-else class="grid grid-cols-1 gap-6">
<div v-for="job in jobs" :key="job.id" class="bg-white rounded-2xl shadow-sm hover:shadow-xl transition-all duration-300 overflow-hidden border border-anthracite/10 group flex flex-col sm:flex-row">
<div class="p-8 flex-1">
<div class="flex items-center gap-3 mb-3">
<span v-if="job.tenant" class="px-3 py-1 bg-highlight/20 text-[#3a2800] rounded-full text-xs font-bold uppercase tracking-wider">
{{ job.tenant.name }}
</span>
<span class="text-xs font-bold text-anthracite/50 uppercase tracking-widest">Temps plein</span>
</div>
<h2 class="text-2xl font-bold font-serif text-primary group-hover:text-highlight transition-colors mb-4">
{{ job.title }}
</h2>
<p class="text-anthracite/70 text-sm line-clamp-2 mb-6 leading-relaxed">
{{ job.description }}
</p>
<div v-if="job.requirements && job.requirements.length > 0" class="flex flex-wrap gap-2 mb-6">
<span v-for="(req, i) in job.requirements.slice(0, 3)" :key="i" class="px-2 py-1 bg-neutral rounded-md text-xs text-anthracite/60 font-medium">
{{ req }}
</span>
<span v-if="job.requirements.length > 3" class="px-2 py-1 bg-neutral rounded-md text-xs text-anthracite/60 font-medium">
+{{ job.requirements.length - 3 }} autres
</span>
</div>
</div>
<div class="bg-neutral/50 p-6 sm:w-48 flex items-center justify-center border-t sm:border-t-0 sm:border-l border-anthracite/10">
<Link :href="route('jobs.show', job.id)" class="w-full text-center py-3 px-4 bg-primary text-white rounded-xl font-bold font-subtitle uppercase tracking-wider text-xs hover:bg-primary/90 hover:shadow-lg transition-all">
Voir l'offre
</Link>
</div>
</div>
</div>
</main>
</div>
</template>

View File

@@ -0,0 +1,141 @@
<script setup>
import { Head, Link, useForm } from '@inertiajs/vue3';
import { ref } from 'vue';
const props = defineProps({
jobPosition: {
type: Object,
required: true,
},
});
const form = useForm({
name: '',
email: '',
phone: '',
linkedin_url: '',
city: '',
cv: null,
cover_letter: null,
});
const submit = () => {
form.post(route('jobs.apply', props.jobPosition.id), {
onSuccess: () => {
// Success is handled by a redirect to dashboard and a flash message
},
});
};
</script>
<template>
<Head :title="'Postuler: ' + jobPosition.title" />
<div class="min-h-screen bg-neutral text-anthracite font-sans">
<!-- Navigation Bar -->
<nav class="bg-white border-b border-anthracite/10 p-6">
<div class="max-w-4xl mx-auto flex items-center justify-between">
<Link href="/" class="flex items-center gap-3">
<img src="/images/logo.png" alt="Logo CABM" class="h-12 object-contain" />
</Link>
<Link :href="route('jobs.index')" class="text-sm font-bold text-primary hover:text-highlight transition-colors">
&larr; Retour aux offres
</Link>
</div>
</nav>
<main class="max-w-4xl mx-auto py-12 px-6">
<div class="mb-6">
<Link :href="route('jobs.index')" class="inline-flex items-center gap-2 text-sm font-bold text-anthracite/60 hover:text-primary transition-colors">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
Retour à la liste des offres
</Link>
</div>
<div class="bg-white rounded-2xl shadow-xl overflow-hidden">
<!-- Header -->
<div class="bg-primary/5 border-b border-primary/10 px-8 py-10">
<h1 class="text-3xl font-serif font-bold text-primary mb-2">{{ jobPosition.title }}</h1>
<div class="flex items-center gap-4 text-sm text-anthracite/70">
<span class="inline-flex items-center gap-1">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg>
Offre d'emploi
</span>
</div>
</div>
<div class="p-8 grid grid-cols-1 md:grid-cols-2 gap-12">
<!-- Job Details -->
<div class="space-y-6">
<div>
<h2 class="text-xl font-bold font-subtitle text-anthracite mb-3 border-b pb-2">Description du poste</h2>
<div class="prose prose-sm prose-neutral text-anthracite/80 whitespace-pre-line">{{ jobPosition.description }}</div>
</div>
<div v-if="jobPosition.requirements && jobPosition.requirements.length > 0">
<h2 class="text-xl font-bold font-subtitle text-anthracite mb-3 border-b pb-2">Prérequis</h2>
<ul class="list-disc list-inside text-anthracite/80 space-y-1">
<li v-for="(req, i) in jobPosition.requirements" :key="i">{{ req }}</li>
</ul>
</div>
</div>
<!-- Application Form -->
<div class="bg-neutral/50 p-6 rounded-xl border border-anthracite/10">
<h2 class="text-xl font-bold font-subtitle text-primary mb-6">Soumettre votre candidature</h2>
<form @submit.prevent="submit" class="space-y-5">
<div>
<label class="block text-sm font-medium text-anthracite mb-1">Nom complet <span class="text-red-500">*</span></label>
<input type="text" v-model="form.name" required class="w-full rounded-lg border-anthracite/20 focus:border-primary focus:ring-primary text-sm p-2.5" />
<div v-if="form.errors.name" class="text-red-500 text-xs mt-1">{{ form.errors.name }}</div>
</div>
<div>
<label class="block text-sm font-medium text-anthracite mb-1">Adresse Email <span class="text-red-500">*</span></label>
<input type="email" v-model="form.email" required class="w-full rounded-lg border-anthracite/20 focus:border-primary focus:ring-primary text-sm p-2.5" />
<div v-if="form.errors.email" class="text-red-500 text-xs mt-1">{{ form.errors.email }}</div>
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-anthracite mb-1">Téléphone</label>
<input type="text" v-model="form.phone" class="w-full rounded-lg border-anthracite/20 focus:border-primary focus:ring-primary text-sm p-2.5" />
<div v-if="form.errors.phone" class="text-red-500 text-xs mt-1">{{ form.errors.phone }}</div>
</div>
<div>
<label class="block text-sm font-medium text-anthracite mb-1">Ville</label>
<input type="text" v-model="form.city" class="w-full rounded-lg border-anthracite/20 focus:border-primary focus:ring-primary text-sm p-2.5" />
<div v-if="form.errors.city" class="text-red-500 text-xs mt-1">{{ form.errors.city }}</div>
</div>
</div>
<div>
<label class="block text-sm font-medium text-anthracite mb-1">URL LinkedIn</label>
<input type="url" v-model="form.linkedin_url" placeholder="https://linkedin.com/in/..." class="w-full rounded-lg border-anthracite/20 focus:border-primary focus:ring-primary text-sm p-2.5" />
<div v-if="form.errors.linkedin_url" class="text-red-500 text-xs mt-1">{{ form.errors.linkedin_url }}</div>
</div>
<div>
<label class="block text-sm font-medium text-anthracite mb-1">CV (PDF) <span class="text-red-500">*</span></label>
<input type="file" @input="form.cv = $event.target.files[0]" accept=".pdf" required class="w-full text-sm text-anthracite/70 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-primary/10 file:text-primary hover:file:bg-primary/20" />
<div v-if="form.errors.cv" class="text-red-500 text-xs mt-1">{{ form.errors.cv }}</div>
</div>
<div>
<label class="block text-sm font-medium text-anthracite mb-1">Lettre de motivation (PDF)</label>
<input type="file" @input="form.cover_letter = $event.target.files[0]" accept=".pdf" class="w-full text-sm text-anthracite/70 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-primary/10 file:text-primary hover:file:bg-primary/20" />
<div v-if="form.errors.cover_letter" class="text-red-500 text-xs mt-1">{{ form.errors.cover_letter }}</div>
</div>
<button type="submit" :disabled="form.processing" class="w-full mt-6 py-3 px-4 bg-highlight text-[#3a2800] rounded-xl font-bold font-subtitle uppercase tracking-wider text-sm hover:brightness-110 shadow-lg shadow-highlight/30 transition-all disabled:opacity-50 flex justify-center items-center">
<span v-if="form.processing">Envoi en cours...</span>
<span v-else>Postuler maintenant</span>
</button>
</form>
</div>
</div>
</div>
</main>
</div>
</template>

View File

@@ -2,184 +2,233 @@
import { Head, Link } from '@inertiajs/vue3'; import { Head, Link } from '@inertiajs/vue3';
defineProps({ defineProps({
canLogin: Boolean, canLogin: {
canRegister: Boolean, type: Boolean,
},
latestJobs: {
type: Array,
default: () => [],
}
}); });
</script> </script>
<template> <template>
<Head title="Bienvenue sur RecruitQuizz" /> <Head title="Recru IT" />
<div class="min-h-screen bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 selection:bg-indigo-500 selection:text-white font-sans overflow-x-hidden"> <div class="min-h-screen bg-neutral text-anthracite font-sans overflow-x-hidden selection:bg-highlight selection:text-anthracite">
<!-- Animated Background Blobs -->
<div class="fixed inset-0 pointer-events-none overflow-hidden">
<div class="absolute -top-[10%] -left-[10%] w-[40%] h-[40%] bg-indigo-500/10 dark:bg-indigo-500/5 rounded-full blur-[120px] animate-pulse"></div>
<div class="absolute top-[20%] -right-[10%] w-[35%] h-[35%] bg-purple-500/10 dark:bg-purple-500/5 rounded-full blur-[120px] animate-pulse" style="animation-delay: 2s;"></div>
<div class="absolute -bottom-[10%] left-[20%] w-[30%] h-[30%] bg-emerald-500/10 dark:bg-emerald-500/5 rounded-full blur-[120px] animate-pulse" style="animation-delay: 4s;"></div>
</div>
<!-- Navigation --> <!-- Navigation -->
<nav class="relative z-50 flex items-center justify-between px-6 py-8 md:px-12 max-w-7xl mx-auto"> <nav class="relative z-50 flex items-center justify-between px-6 py-8 md:px-12 max-w-7xl mx-auto">
<div class="flex items-center gap-2 group cursor-default"> <Link href="/" class="flex items-center gap-3 group">
<div class="w-10 h-10 bg-indigo-600 rounded-xl flex items-center justify-center shadow-lg shadow-indigo-600/20 group-hover:scale-110 transition-transform duration-300"> <img src="/images/logo.png" alt="Logo" class="h-12 object-contain group-hover:scale-105 transition-transform duration-300" />
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor"> </Link>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9l-.707.707M12 18v3m4.95-4.95l.707.707M12 3c-4.418 0-8 3.582-8 8 0 2.209.895 4.209 2.343 5.657L12 21l5.657-5.343A7.994 7.994 0 0020 11c0-4.418-3.582-8-8-8z" />
</svg>
</div>
<span class="text-2xl font-black tracking-tighter uppercase italic text-slate-900 dark:text-white">RECRU<span class="text-indigo-600">IT</span></span>
</div>
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<template v-if="$page.props.auth.user"> <template v-if="$page.props.auth.user">
<Link :href="route('dashboard')" class="px-6 py-2.5 bg-slate-900 dark:bg-white text-white dark:text-slate-900 rounded-full font-bold text-sm hover:scale-105 transition-all shadow-xl shadow-slate-900/10 dark:shadow-none"> <Link :href="route('dashboard')" class="px-8 py-3 bg-highlight text-[#3a2800] rounded-lg font-subtitle font-bold text-sm hover:brightness-110 hover:shadow-xl hover:shadow-highlight/20 transition-all duration-300">
Aller au Dashboard Accéder au Tableau de bord
</Link> </Link>
</template> </template>
<template v-else> <template v-else>
<Link :href="route('login')" class="text-slate-600 dark:text-slate-400 font-bold text-sm hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors hidden md:block px-4"> <Link :href="route('login')" class="px-8 py-3 bg-highlight text-[#3a2800] rounded-lg font-subtitle font-bold text-sm hover:brightness-110 hover:-translate-y-0.5 hover:shadow-xl hover:shadow-highlight/20 transition-all duration-300">
Connexion Connexion
</Link> </Link>
<Link
v-if="canRegister"
:href="route('register')"
class="px-8 py-3 bg-indigo-600 text-white rounded-full font-bold text-sm hover:bg-indigo-700 hover:scale-105 hover:shadow-2xl hover:shadow-indigo-600/30 transition-all duration-300"
>
Créer un compte
</Link>
</template> </template>
</div> </div>
</nav> </nav>
<!-- Hero Section --> <!-- Fond Institutionnel Hero Section -->
<main class="relative z-10 max-w-7xl mx-auto px-6 pt-20 pb-32 md:px-12 md:pt-32"> <main class="relative z-10 w-full mt-4">
<div class="grid grid-cols-1 lg:grid-cols-12 gap-16 items-center"> <div class="max-w-[95%] mx-auto bg-primary rounded-[2.5rem] overflow-hidden shadow-2xl relative px-8 py-20 pb-32 md:px-16 md:py-32">
<!-- Graphic Elements -->
<div class="absolute top-0 right-0 w-[50%] h-full bg-gradient-to-l from-sky/40 to-transparent pointer-events-none"></div>
<div class="absolute -bottom-24 -left-24 w-96 h-96 bg-accent/20 rounded-full blur-[100px] pointer-events-none"></div>
<div class="relative z-10 grid grid-cols-1 lg:grid-cols-2 gap-16 items-center">
<!-- Hero Content --> <!-- Hero Content -->
<div class="lg:col-span-7 space-y-10"> <div class="space-y-10 text-white">
<div class="inline-flex items-center gap-2 px-4 py-2 bg-indigo-50 dark:bg-indigo-900/20 border border-indigo-100 dark:border-indigo-800 rounded-full text-indigo-600 dark:text-indigo-400 text-xs font-black uppercase tracking-widest animate-bounce"> <div class="inline-flex items-center gap-3 px-5 py-2.5 bg-white/10 backdrop-blur-md border border-white/20 rounded-full text-white text-sm font-subtitle font-bold uppercase tracking-widest shadow-inner">
<span class="relative flex h-2 w-2"> <span class="relative flex h-3 w-3">
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-indigo-400 opacity-75"></span> <span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-highlight opacity-75"></span>
<span class="relative inline-flex rounded-full h-2 w-2 bg-indigo-500"></span> <span class="relative inline-flex rounded-full h-3 w-3 bg-highlight"></span>
</span> </span>
Tests de recrutements Communauté d'agglomération Béziers Méditerranée
</div> </div>
<h1 class="text-6xl md:text-8xl font-black tracking-tight leading-[0.9] text-slate-900 dark:text-white"> <h1 class="text-5xl md:text-7xl font-serif leading-[1.1] text-white">
Evualuation <br> Donnez du sens à votre <span class="text-highlight"> carrière</span>.
<span class="text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600">des candidats.</span>
</h1> </h1>
<p class="text-xl text-slate-600 dark:text-slate-400 max-w-xl leading-relaxed"> <p class="text-lg md:text-xl text-sand font-sans font-light max-w-xl leading-relaxed">
Recru.IT transforme le processus de sélection technique. Testez les candidats avec des parcours personnalisés et des évaluations précises en quelques minutes. Découvrez nos offres d'emploi, postulez facilement et rejoignez une collectivité dynamique au service de son territoire et de ses citoyens.
</p> </p>
<div class="flex flex-col sm:flex-row items-center gap-6"> <div class="flex flex-col sm:flex-row gap-4 pt-4">
<Link <Link
v-if="!$page.props.auth.user"
:href="route('login')" :href="route('login')"
class="group relative w-full sm:w-auto px-10 py-5 bg-slate-900 dark:bg-white text-white dark:text-slate-900 rounded-3xl font-black uppercase tracking-widest text-sm text-center overflow-hidden hover:scale-105 transition-all duration-300" class="inline-flex items-center justify-center px-10 py-4 bg-highlight text-[#3a2800] rounded-xl font-subtitle font-bold uppercase tracking-wider text-sm hover:brightness-110 hover:-translate-y-1 hover:shadow-2xl hover:shadow-highlight/40 transition-all duration-300"
> >
<span class="relative z-10">Démarrer maintenant</span> Espace candidat
<div class="absolute inset-0 bg-gradient-to-r from-indigo-600 to-purple-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div> </Link>
<Link
:href="route('jobs.index')"
class="inline-flex items-center justify-center px-10 py-4 bg-white/10 text-white border border-white/20 rounded-xl font-subtitle font-bold uppercase tracking-wider text-sm hover:bg-white/20 hover:-translate-y-1 hover:shadow-xl transition-all duration-300"
>
Voir nos offres
</Link> </Link>
<div class="flex -space-x-4">
<img class="w-12 h-12 rounded-full border-4 border-white dark:border-slate-950 shadow-xl" src="https://i.pravatar.cc/150?u=1" alt="User 1">
<img class="w-12 h-12 rounded-full border-4 border-white dark:border-slate-950 shadow-xl" src="https://i.pravatar.cc/150?u=2" alt="User 2">
<img class="w-12 h-12 rounded-full border-4 border-white dark:border-slate-950 shadow-xl" src="https://i.pravatar.cc/150?u=3" alt="User 3">
<div class="w-12 h-12 rounded-full border-4 border-white dark:border-slate-950 bg-indigo-600 flex items-center justify-center text-white text-xs font-bold shadow-xl">
:)
</div>
</div>
<p class="text-xs font-bold text-slate-400"></p>
</div> </div>
</div> </div>
<!-- Hero Illustration / Mockup --> <!-- Right illustration (abstract or UI mockup) -->
<div class="lg:col-span-5 relative hidden lg:block"> <div class="hidden lg:flex justify-end relative h-full">
<div class="absolute -inset-4 bg-gradient-to-tr from-indigo-600 to-purple-600 rounded-[4rem] blur-3xl opacity-20 animate-pulse"></div> <div class="w-full max-w-md bg-sand rounded-3xl p-8 shadow-2xl relative transform rotate-2 hover:rotate-0 transition-transform duration-500 border border-white/10">
<div class="relative bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-[3rem] shadow-2xl overflow-hidden aspect-[4/5] p-2"> <!-- Fake dashboard element -->
<div class="bg-slate-50 dark:bg-slate-950 rounded-[2.5rem] h-full w-full p-8 border border-slate-100 dark:border-slate-800 flex flex-col justify-center gap-12 text-center"> <div class="space-y-6">
<div class="w-24 h-24 bg-indigo-600/10 rounded-3xl mx-auto flex items-center justify-center"> <div class="flex justify-between items-center border-b border-anthracite/10 pb-4">
<svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12 text-indigo-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <div class="h-6 w-32 bg-primary/20 rounded"></div>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> <div class="h-6 w-12 bg-accent/20 rounded-full"></div>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="h-24 bg-white rounded-xl shadow-sm border border-anthracite/5 p-4 flex flex-col justify-between">
<div class="h-3 w-20 bg-neutral rounded"></div>
<div class="h-8 w-16 bg-primary/10 rounded"></div>
</div>
<div class="h-24 bg-white rounded-xl shadow-sm border border-anthracite/5 p-4 flex flex-col justify-between">
<div class="h-3 w-24 bg-neutral rounded"></div>
<div class="h-8 w-full bg-highlight/20 rounded"></div>
</div>
</div>
<div class="h-32 bg-white rounded-xl shadow-sm border border-anthracite/5 p-4 flex gap-4">
<div class="w-16 h-16 bg-sky/20 rounded-full shrink-0"></div>
<div class="flex-1 space-y-3 py-2">
<div class="h-3 w-[60%] bg-anthracite/20 rounded"></div>
<div class="h-2 w-[80%] bg-neutral rounded"></div>
<div class="h-2 w-[40%] bg-neutral rounded"></div>
</div>
</div>
</div>
<!-- Floating badge -->
<div class="absolute -left-12 bottom-12 bg-white p-5 rounded-2xl shadow-xl flex items-center gap-4 border border-sand/50 animate-bounce" style="animation-duration: 3s">
<div class="w-12 h-12 bg-accent rounded-full flex items-center justify-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg> </svg>
</div> </div>
<div class="space-y-4"> <div>
<div class="text-3xl font-black uppercase tracking-tighter">Félicitations !</div> <p class="text-xs text-anthracite/50 font-subtitle font-bold uppercase tracking-wider">Candidat</p>
<p class="text-slate-500 text-sm">Votre score est de 95%. <br> Vous êtes prêt pour la suite.</p> <p class="text-anthracite font-bold">Approuvé</p>
</div>
<div class="flex flex-col gap-3">
<div class="h-4 w-full bg-slate-100 dark:bg-slate-800 rounded-full overflow-hidden">
<div class="h-full w-[95%] bg-indigo-600 rounded-full shadow-lg shadow-indigo-600/30"></div>
</div>
<div class="flex justify-between text-[10px] font-black uppercase text-slate-400">
<span>Rang S+</span>
<span>Recruté</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</main> </main>
<!-- Features Grid --> <!-- Latest Jobs -->
<section class="relative z-10 bg-white dark:bg-slate-900 border-y border-slate-200 dark:border-slate-800 px-6 py-24 md:px-12"> <section class="relative z-10 bg-neutral px-6 py-24 md:px-12 -mt-16 pt-32">
<div class="max-w-7xl mx-auto"> <div class="max-w-7xl mx-auto">
<div class="text-center mb-20 space-y-4"> <div class="flex flex-col sm:flex-row sm:justify-between sm:items-end mb-12 gap-6">
<h2 class="text-4xl font-black uppercase tracking-tight text-slate-900 dark:text-white">Conçu pour les recruteurs</h2> <div>
<p class="text-slate-500 dark:text-slate-400 max-w-xl mx-auto">Une plateforme intuitive pour automatiser vos entretiens techniques et valoriser le potentiel de chaque candidat.</p> <h2 class="text-3xl md:text-5xl font-serif text-primary">Dernières offres</h2>
<p class="text-anthracite/70 font-sans text-lg pt-2">Rejoignez-nous et participez à nos projets d'envergure.</p>
</div>
<Link :href="route('jobs.index')" class="hidden sm:inline-flex items-center gap-2 text-highlight font-bold font-subtitle uppercase tracking-wider text-sm hover:text-primary transition-colors">
Voir toutes les offres <span aria-hidden="true">&rarr;</span>
</Link>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div v-for="job in latestJobs" :key="job.id" class="relative bg-white rounded-2xl shadow-sm hover:shadow-xl transition-all duration-300 overflow-hidden border border-anthracite/10 group flex flex-col">
<div class="p-8 flex-1">
<div class="flex items-center justify-between mb-4">
<span class="px-3 py-1 bg-highlight/10 text-highlight rounded-full text-[10px] font-black uppercase tracking-widest border border-highlight/20">Nouveau</span>
<span class="text-xs text-anthracite/50 font-bold" v-if="job.tenant">{{ job.tenant.name }}</span>
</div>
<h3 class="text-xl font-serif font-black text-primary mb-3 line-clamp-2 group-hover:text-highlight transition-colors">{{ job.title }}</h3>
<p class="text-anthracite/70 text-sm mb-6 line-clamp-3">{{ job.description }}</p>
</div>
<div class="px-8 py-4 bg-sand/30 border-t border-anthracite/5 flex justify-between items-center">
<Link :href="route('jobs.show', job.id)" class="text-sm font-bold text-highlight uppercase tracking-wider hover:text-primary transition-colors before:absolute before:inset-0">
Découvrir
</Link>
<svg class="w-5 h-5 text-highlight group-hover:translate-x-1 transition-transform relative z-10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M17 8l4 4m0 0l-4 4m4-4H3"/></svg>
</div>
</div>
<div v-if="!latestJobs?.length" class="col-span-3 text-center py-12 text-anthracite/50 italic">
Aucune offre d'emploi disponible pour le moment.
</div>
</div>
<div class="mt-8 text-center sm:hidden">
<Link :href="route('jobs.index')" class="inline-flex items-center gap-2 text-highlight font-bold font-subtitle uppercase tracking-wider text-sm hover:text-primary transition-colors">
Voir toutes les offres <span aria-hidden="true">&rarr;</span>
</Link>
</div>
</div>
</section>
<!-- Features -->
<section class="relative z-10 bg-surface px-6 py-24 md:px-12 border-t border-anthracite/10">
<div class="max-w-7xl mx-auto">
<div class="text-center mb-16 space-y-4">
<h2 class="text-3xl md:text-5xl font-serif text-primary">Pourquoi nous rejoindre ?</h2>
<p class="text-anthracite/70 font-sans max-w-2xl mx-auto text-lg pt-2">La Communauté d'Agglomération Béziers Méditerranée s'engage au quotidien pour ses collaborateurs.</p>
</div> </div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8"> <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- Feature 1 --> <!-- Feature 1 -->
<div class="p-10 bg-slate-50 dark:bg-slate-950 rounded-[2.5rem] border border-slate-100 dark:border-slate-800 hover:border-indigo-500 transition-colors group"> <div class="p-8 bg-white rounded-2xl shadow-md shadow-anthracite/5 border-b-4 border-primary hover:-translate-y-2 transition-transform duration-300">
<div class="w-14 h-14 bg-indigo-600/10 rounded-2xl flex items-center justify-center mb-8 group-hover:scale-110 transition-transform"> <div class="w-14 h-14 bg-sky/10 rounded-xl flex items-center justify-center mb-6">
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-indigo-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
</svg> </svg>
</div> </div>
<h3 class="text-xl font-bold mb-4">Quiz Dynamiques</h3> <h3 class="text-xl font-subtitle font-bold text-primary mb-3">Opportunités variées</h3>
<p class="text-slate-500 dark:text-slate-400 text-sm leading-relaxed">Questions à choix multiples ou réponses ouvertes, adaptez vos tests au poste visé en quelques clics.</p> <p class="text-anthracite/70 font-sans text-sm leading-relaxed">De nombreux domaines d'expertise sont représentés au sein de notre collectivité. Trouvez le poste qui correspond à vos ambitions.</p>
</div> </div>
<!-- Feature 2 --> <!-- Feature 2 -->
<div class="p-10 bg-slate-50 dark:bg-slate-950 rounded-[2.5rem] border border-slate-100 dark:border-slate-800 hover:border-indigo-500 transition-colors group"> <div class="p-8 bg-white rounded-2xl shadow-md shadow-anthracite/5 border-b-4 border-highlight hover:-translate-y-2 transition-transform duration-300">
<div class="w-14 h-14 bg-emerald-600/10 rounded-2xl flex items-center justify-center mb-8 group-hover:scale-110 transition-transform"> <div class="w-14 h-14 bg-highlight/10 rounded-xl flex items-center justify-center mb-6">
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-emerald-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-highlight" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
</svg> </svg>
</div> </div>
<h3 class="text-xl font-bold mb-4">Audit & Sécurité</h3> <h3 class="text-xl font-subtitle font-bold text-anthracite mb-3">Service du public</h3>
<p class="text-slate-500 dark:text-slate-400 text-sm leading-relaxed">Chaque action critique est journalisée pour une transparence totale sur vos recrutements.</p> <p class="text-anthracite/70 font-sans text-sm leading-relaxed">Donnez du sens à votre carrière en participant activement au développement et à l'attractivité de notre territoire.</p>
</div> </div>
<!-- Feature 3 --> <!-- Feature 3 -->
<div class="p-10 bg-slate-50 dark:bg-slate-950 rounded-[2.5rem] border border-slate-100 dark:border-slate-800 hover:border-indigo-500 transition-colors group"> <div class="p-8 bg-white rounded-2xl shadow-md shadow-anthracite/5 border-b-4 border-accent hover:-translate-y-2 transition-transform duration-300">
<div class="w-14 h-14 bg-purple-600/10 rounded-2xl flex items-center justify-center mb-8 group-hover:scale-110 transition-transform"> <div class="w-14 h-14 bg-accent/10 rounded-xl flex items-center justify-center mb-6">
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-purple-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg> </svg>
</div> </div>
<h3 class="text-xl font-bold mb-4">Mobile First</h3> <h3 class="text-xl font-subtitle font-bold text-accent mb-3">Processus simplifié</h3>
<p class="text-slate-500 dark:text-slate-400 text-sm leading-relaxed">Les candidats passent leurs tests sur mobile ou desktop avec un confort inégalé.</p> <p class="text-anthracite/70 font-sans text-sm leading-relaxed">Postulez en quelques clics, suivez l'avancement de vos candidatures et passez vos évaluations directement en ligne.</p>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<!-- Footer --> <!-- Footer -->
<footer class="relative z-10 px-6 py-20 text-center text-slate-400 text-xs font-black uppercase tracking-[0.2em]"> <footer class="relative bg-sand px-6 py-12 text-center border-t border-anthracite/10">
&copy; 2026 RecruitQuizz Advanced Recruitment Intelligence <p class="text-primary font-subtitle font-bold text-xs uppercase tracking-[0.1em]">
&copy; {{ new Date().getFullYear() }} — Communauté d'Agglomération Béziers Méditerranée Tous droits réservés
</p>
</footer> </footer>
</div> </div>
</template> </template>
<style> <style>
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&display=swap'); /* Import custom typographies */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Nunito:ital,wght@0,400;0,600;0,700;1,400&display=swap');
.font-sans {
font-family: 'Outfit', sans-serif;
}
</style> </style>

View File

@@ -10,6 +10,9 @@
<!-- Fonts --> <!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net"> <link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" /> <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Nunito:wght@400;600;700;800;900&display=swap" rel="stylesheet" />
<!-- Scripts --> <!-- Scripts -->
@routes @routes

View File

@@ -0,0 +1,401 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Dossier Candidat - {{ $candidate->user->name }}</title>
<style>
@page {
margin: 0cm;
}
body {
font-family: 'Helvetica', 'Arial', sans-serif;
color: #2d3748;
line-height: 1.5;
margin: 0;
padding: 0;
background-color: #ffffff;
}
.header-stripe {
height: 15px;
background: linear-gradient(to right, #004f82, #e0b04c);
}
.container {
padding: 40px;
}
.page-break {
page-break-after: always;
}
/* Typography */
h1, h2, h3, h4 {
color: #004f82;
margin-bottom: 15px;
text-transform: uppercase;
letter-spacing: 1px;
}
h1 { font-size: 28px; border-bottom: 3px solid #e0b04c; padding-bottom: 10px; }
h2 { font-size: 20px; border-left: 5px solid #004f82; padding-left: 15px; margin-top: 30px; }
h3 { font-size: 16px; color: #4a5568; }
/* Candidate Details Card */
.card {
background-color: #f8f9fa;
border-radius: 15px;
padding: 20px;
margin-bottom: 30px;
border: 1px solid #e2e8f0;
}
.detail-row {
display: table;
width: 100%;
margin-bottom: 8px;
}
.detail-label {
display: table-cell;
width: 200px;
font-weight: bold;
color: #718096;
text-transform: uppercase;
font-size: 10px;
}
.detail-value {
display: table-cell;
font-weight: 500;
}
/* AI Section */
.ai-verdict {
display: inline-block;
padding: 8px 15px;
border-radius: 8px;
font-weight: bold;
font-size: 14px;
margin-bottom: 20px;
}
.verdict-positive { background-color: #def7ec; color: #03543f; }
.verdict-neutral { background-color: #fef3c7; color: #92400e; }
.verdict-negative { background-color: #fde8e8; color: #9b1c1c; }
.ai-box {
background-color: #f0f7ff;
border-left: 5px solid #004f82;
padding: 15px;
margin-bottom: 20px;
font-style: italic;
}
/* Tables & Lists */
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
th {
background-color: #004f82;
color: white;
text-align: left;
padding: 10px;
font-size: 12px;
text-transform: uppercase;
}
td {
padding: 10px;
border-bottom: 1px solid #e2e8f0;
font-size: 12px;
}
.badge {
padding: 2px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: bold;
}
/* Evaluation Grid */
.grid-cell {
height: 30px;
border: 1px solid #cbd5e0;
}
.notes-box {
height: 100px;
border: 1px solid #cbd5e0;
margin-top: 5px;
}
/* Footer */
.footer {
position: fixed;
bottom: 0px;
left: 0px;
right: 0px;
height: 50px;
text-align: center;
font-size: 10px;
color: #a0aec0;
border-top: 1px solid #e2e8f0;
padding-top: 10px;
}
</style>
</head>
<body>
<div class="header-stripe"></div>
<div class="container">
<!-- HEADER SECTION -->
<div style="text-align: center; margin-bottom: 40px;">
<div style="font-size: 12px; font-weight: bold; color: #e0b04c; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 2px;">CABM - Dossier de Synthèse</div>
<h1>{{ $candidate->user->name }}</h1>
<div style="font-size: 14px; color: #4a5568;">Candidature au poste de : <strong>{{ $candidate->jobPosition->title ?? 'Poste non défini' }}</strong></div>
</div>
<div class="card">
<div class="detail-row">
<div class="detail-label">Score Global Pondéré</div>
<div class="detail-value" style="font-size: 24px; color: #004f82; font-weight: 900;">{{ $candidate->weighted_score }}/20</div>
</div>
<div class="detail-row">
<div class="detail-label">Contact</div>
<div class="detail-value">{{ $candidate->user->email }} @if($candidate->phone) | {{ $candidate->phone }} @endif</div>
</div>
<div class="detail-row">
<div class="detail-label">Structure</div>
<div class="detail-value">{{ $candidate->tenant->name ?? 'N/A' }}</div>
</div>
@if($candidate->linkedin_url)
<div class="detail-row">
<div class="detail-label">LinkedIn</div>
<div class="detail-value">{{ $candidate->linkedin_url }}</div>
</div>
@endif
</div>
<!-- AI ANALYSIS -->
@if($candidate->ai_analysis)
<h2>Analyse Decisionnelle</h2>
<div class="ai-verdict {{ $candidate->ai_analysis['match_score'] >= 75 ? 'verdict-positive' : ($candidate->ai_analysis['match_score'] >= 50 ? 'verdict-neutral' : 'verdict-negative') }}">
Verdict : {{ $candidate->ai_analysis['verdict'] ?? 'N/A' }} ({{ $candidate->ai_analysis['match_score'] }}%)
</div>
<div class="ai-box">
{{ $candidate->ai_analysis['summary'] }}
</div>
<div style="display: table; width: 100%; margin-top: 20px;">
<div style="display: table-cell; width: 48%; padding-right: 2%;">
<h4 style="color: #057a55; font-size: 12px;">Points Forts</h4>
<ul style="font-size: 11px; padding-left: 20px; color: #03543f;">
@foreach($candidate->ai_analysis['strengths'] ?? [] as $s)
<li>{{ $s }}</li>
@endforeach
</ul>
</div>
<div style="display: table-cell; width: 48%;">
<h4 style="color: #9b1c1c; font-size: 12px;">Points de Vigilance</h4>
<ul style="font-size: 11px; padding-left: 20px; color: #9b1c1c;">
@foreach($candidate->ai_analysis['gaps'] ?? [] as $g)
<li>{{ $g }}</li>
@endforeach
</ul>
</div>
</div>
@if(!empty($candidate->ai_analysis['scores_detailles']))
<h4 style="margin-top: 20px; font-size: 12px; color: #004f82;">Détail des scores par dimension</h4>
<table style="margin-top: 10px;">
<thead style="background-color: #edf2f7;">
<tr>
<th style="color: #4a5568; background: #edf2f7; width: 30%;">Dimension</th>
<th style="color: #4a5568; background: #edf2f7; width: 15%; text-align: center;">Score</th>
<th style="color: #4a5568; background: #edf2f7; width: 55%;">Justification</th>
</tr>
</thead>
<tbody>
@foreach($candidate->ai_analysis['scores_detailles'] as $key => $details)
<tr>
<td style="font-weight: bold; text-transform: capitalize;">{{ str_replace('_', ' ', $key) }}</td>
<td style="text-align: center;">
<span style="font-weight: bold; color: #004f82;">{{ $details['score'] }}%</span>
</td>
<td style="font-size: 10px; color: #4a5568;">{{ $details['justification'] ?? '' }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@if(!empty($candidate->ai_analysis['elements_bloquants']) && count($candidate->ai_analysis['elements_bloquants']) > 0 && $candidate->ai_analysis['elements_bloquants'][0] !== '')
<div style="margin-top: 20px; padding: 15px; background-color: #fff5f5; border: 1px dashed #feb2b2; border-radius: 10px;">
<h4 style="color: #c53030; font-size: 12px; margin-top: 0;">Signaux Critiques / Filtres Bloquants</h4>
<ul style="font-size: 11px; padding-left: 20px; color: #c53030; font-weight: bold;">
@foreach($candidate->ai_analysis['elements_bloquants'] as $item)
<li>{{ $item }}</li>
@endforeach
</ul>
</div>
@endif
@endif
<div class="page-break"></div>
<!-- TEST RESULTS -->
<h2>Résultats des Tests Techniques</h2>
@forelse($candidate->attempts as $attempt)
<div style="background-color: #f7fafc; padding: 15px; border-radius: 10px; margin-bottom: 25px;">
<h3 style="margin-top: 0;">{{ $attempt->quiz->title }} <span style="font-weight: normal; color: #a0aec0; font-size: 12px;">(Fait le {{ $attempt->finished_at->format('d/m/Y H:i') }})</span></h3>
<div style="font-size: 14px; font-weight: bold; margin-bottom: 15px;">Score : {{ $attempt->score }} / {{ $attempt->max_score }}</div>
<table style="background: white;">
<thead>
<tr>
<th style="width: 60%">Question</th>
<th style="width: 40%">Réponse / Score</th>
</tr>
</thead>
<tbody>
@php
$quizQuestions = $attempt->quiz->questions;
$answers = $attempt->answers->keyBy('question_id');
@endphp
@foreach($quizQuestions as $question)
@php $answer = $answers->get($question->id); @endphp
<tr>
<td>
<strong>{{ $question->label }}</strong>
@if($question->description)
<div style="font-size: 9px; color: #718096; margin-top: 4px;">{{ $question->description }}</div>
@endif
</td>
<td>
@if($answer)
@if($question->type === 'qcm')
<div style="color: {{ $answer->option?->is_correct ? '#057a55' : '#9b1c1c' }}; font-weight: bold;">
{{ $answer->option?->option_text ?? 'N/A' }}
({{ $answer->option?->is_correct ? 'Correct' : 'Incorrect' }})
</div>
@else
<div style="font-style: italic; color: #4a5568;">"{{ $answer->text_content }}"</div>
<div style="margin-top: 5px; font-weight: bold;">Note : {{ $answer->score }} / {{ $question->points }}</div>
@endif
@else
<span style="color: #a0aec0; font-style: italic;">Pas de réponse</span>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@empty
<p style="font-style: italic; color: #a0aec0;">Aucun test technique effectué.</p>
@endforelse
<div class="page-break"></div>
<!-- GRILLE D'EVALUATION PAPIER -->
<h2 style="background-color: #004f82; color: white; padding: 10px; border: none;">Grille d'Évaluation (Entretien)</h2>
<p style="font-size: 10px; color: #718096; margin-bottom: 20px;">Support pour prise de notes manuelle durant l'échange. Échelle de 0 à 10.</p>
<h3>1. Compétences Métier & Pré-requis</h3>
<table>
<thead>
<tr>
<th style="width: 40%">Critères</th>
@for($i=0; $i<=10; $i++) <th style="width: 4%; font-size: 8px; text-align: center;">{{ $i }}</th> @endfor
</tr>
</thead>
<tbody>
@php
$requirements = $candidate->jobPosition->requirements ?? ['Compétences techniques générales', 'Expérience domaine', 'Outils & Méthodes'];
@endphp
@foreach($requirements as $req)
<tr>
<td><strong>{{ $req }}</strong></td>
@for($i=0; $i<=10; $i++) <td style="border: 1px solid #e2e8f0; text-align: center;"></td> @endfor
</tr>
@endforeach
</tbody>
</table>
<div style="margin-bottom: 30px;">
<label style="font-size: 10px; font-weight: bold;">Commentaires Compétences :</label>
<div class="notes-box"></div>
</div>
<h3>2. Savoir être & Adaptabilité</h3>
<table>
<thead>
<tr>
<th style="width: 40%">Personnalité</th>
@for($i=0; $i<=10; $i++) <th style="width: 4%; font-size: 8px; text-align: center;">{{ $i }}</th> @endfor
</tr>
</thead>
<tbody>
@php
$softSkills = [
'Communication & Pédagogie',
'Esprit d\'équipe & Collaboration',
'Résolution de problèmes & Logique',
'Adaptabilité & Résilience',
'Autonomie & Proactivité'
];
@endphp
@foreach($softSkills as $skill)
<tr>
<td><strong>{{ $skill }}</strong></td>
@for($i=0; $i<=10; $i++) <td style="border: 1px solid #e2e8f0; text-align: center;"></td> @endfor
</tr>
@endforeach
</tbody>
</table>
<div style="margin-bottom: 30px;">
<label style="font-size: 10px; font-weight: bold;">Commentaires Savoir être :</label>
<div class="notes-box"></div>
</div>
<div class="page-break"></div>
<h3>3. Questions d'Entretien (Guide)</h3>
@if($candidate->ai_analysis && !empty($candidate->ai_analysis['questions_entretien_suggerees']))
@foreach($candidate->ai_analysis['questions_entretien_suggerees'] as $idx => $question)
<div style="margin-bottom: 20px;">
<div style="font-size: 12px; font-weight: bold; color: #004f82;">Q{{ $idx + 1 }}. {{ $question }}</div>
<div style="height: 60px; border-bottom: 1px dashed #cbd5e0; margin-top: 10px;"></div>
</div>
@endforeach
@else
<p style="font-style: italic; color: #a0aec0;">Aucune question suggérée. Utilisez vos questions standards.</p>
@for($i=1; $i<=5; $i++)
<div style="margin-bottom: 25px;">
<div style="height: 1px; background-color: #e2e8f0; margin-bottom: 5px;"></div>
<div style="height: 40px; border: 1px solid #f7fafc;"></div>
</div>
@endfor
@endif
<div style="margin-top: 40px; border: 2px solid #004f82; padding: 20px; border-radius: 15px;">
<div style="font-weight: bold; text-transform: uppercase; color: #004f82; margin-bottom: 10px; text-align: center;">Verdict Final & Avis Client</div>
<div style="display: table; width: 100%;">
<div style="display: table-cell; width: 33%; text-align: center; border-right: 1px solid #e2e8f0;">
<span style="display: inline-block; width: 15px; height: 15px; border: 2px solid #057a55;"></span>
<span style="font-size: 14px; font-weight: bold; color: #057a55; margin-left: 10px;">FAVORABLE</span>
</div>
<div style="display: table-cell; width: 33%; text-align: center; border-right: 1px solid #e2e8f0;">
<span style="display: inline-block; width: 15px; height: 15px; border: 2px solid #e0b04c;"></span>
<span style="font-size: 14px; font-weight: bold; color: #92400e; margin-left: 10px;">A REVOIR</span>
</div>
<div style="display: table-cell; width: 33%; text-align: center;">
<span style="display: inline-block; width: 15px; height: 15px; border: 2px solid #9b1c1c;"></span>
<span style="font-size: 14px; font-weight: bold; color: #9b1c1c; margin-left: 10px;">DEFAVORABLE</span>
</div>
</div>
<div style="margin-top: 20px;">
<label style="font-size: 10px; font-weight: bold;">Motivations du choix / Points à éclaircir :</label>
<div style="height: 150px;"></div>
</div>
</div>
</div>
<div class="footer">
Généré le {{ date('d/m/Y H:i') }} par CABM - Dossier Confidentiel
</div>
</body>
</html>

View File

@@ -12,10 +12,6 @@ use App\Http\Controllers\Auth\VerifyEmailController;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
Route::middleware('guest')->group(function () { Route::middleware('guest')->group(function () {
Route::get('register', [RegisteredUserController::class, 'create'])
->name('register');
Route::post('register', [RegisteredUserController::class, 'store']);
Route::get('login', [AuthenticatedSessionController::class, 'create']) Route::get('login', [AuthenticatedSessionController::class, 'create'])
->name('login'); ->name('login');

View File

@@ -3,6 +3,10 @@
use Illuminate\Foundation\Inspiring; use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schedule;
Artisan::command('inspire', function () { Artisan::command('inspire', function () {
$this->comment(Inspiring::quote()); $this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote'); })->purpose('Display an inspiring quote');
Schedule::command('app:cleanup-login-logs')->daily();

View File

@@ -6,11 +6,10 @@ use Illuminate\Support\Facades\Route;
use Inertia\Inertia; use Inertia\Inertia;
Route::get('/', function () { Route::get('/', function () {
$latestJobs = \App\Models\JobPosition::with('tenant')->orderBy('created_at', 'desc')->take(3)->get();
return Inertia::render('Welcome', [ return Inertia::render('Welcome', [
'canLogin' => Route::has('login'), 'canLogin' => Route::has('login'),
'canRegister' => Route::has('register'), 'latestJobs' => $latestJobs,
'laravelVersion' => Application::VERSION,
'phpVersion' => PHP_VERSION,
]); ]);
}); });
@@ -74,6 +73,11 @@ Route::get('/dashboard', function () {
]); ]);
})->middleware(['auth', 'verified'])->name('dashboard'); })->middleware(['auth', 'verified'])->name('dashboard');
// Public Job Routes
Route::get('/jobs', [App\Http\Controllers\PublicJobApplicationController::class, 'index'])->name('jobs.index');
Route::get('/jobs/{jobPosition}', [App\Http\Controllers\PublicJobApplicationController::class, 'show'])->name('jobs.show');
Route::post('/jobs/{jobPosition}/apply', [App\Http\Controllers\PublicJobApplicationController::class, 'store'])->name('jobs.apply');
Route::middleware('auth')->group(function () { Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit'); Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update'); Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
@@ -82,6 +86,9 @@ Route::middleware('auth')->group(function () {
// Admin Routes // Admin Routes
Route::middleware('admin')->prefix('admin')->name('admin.')->group(function () { Route::middleware('admin')->prefix('admin')->name('admin.')->group(function () {
Route::get('/comparative', [\App\Http\Controllers\CandidateController::class, 'comparative'])->name('comparative'); Route::get('/comparative', [\App\Http\Controllers\CandidateController::class, 'comparative'])->name('comparative');
Route::get('/candidates/selected', [\App\Http\Controllers\CandidateController::class, 'selectedCandidates'])->name('candidates.selected');
Route::get('/candidates/map', [\App\Http\Controllers\CandidateController::class, 'map'])->name('candidates.map');
Route::post('/candidates/update-order', [\App\Http\Controllers\CandidateController::class, 'updateOrder'])->name('candidates.update-order');
Route::resource('candidates', \App\Http\Controllers\CandidateController::class)->only(['index', 'store', 'show', 'destroy', 'update']); Route::resource('candidates', \App\Http\Controllers\CandidateController::class)->only(['index', 'store', 'show', 'destroy', 'update']);
Route::patch('/candidates/{candidate}/notes', [\App\Http\Controllers\CandidateController::class, 'updateNotes'])->name('candidates.update-notes'); Route::patch('/candidates/{candidate}/notes', [\App\Http\Controllers\CandidateController::class, 'updateNotes'])->name('candidates.update-notes');
Route::patch('/candidates/{candidate}/scores', [\App\Http\Controllers\CandidateController::class, 'updateScores'])->name('candidates.update-scores'); Route::patch('/candidates/{candidate}/scores', [\App\Http\Controllers\CandidateController::class, 'updateScores'])->name('candidates.update-scores');
@@ -91,6 +98,8 @@ Route::middleware('auth')->group(function () {
Route::post('/candidates/{candidate}/analyze', [\App\Http\Controllers\AIAnalysisController::class, 'analyze'])->name('candidates.analyze'); Route::post('/candidates/{candidate}/analyze', [\App\Http\Controllers\AIAnalysisController::class, 'analyze'])->name('candidates.analyze');
Route::post('/candidates/{candidate}/reset-password', [\App\Http\Controllers\CandidateController::class, 'resetPassword'])->name('candidates.reset-password'); Route::post('/candidates/{candidate}/reset-password', [\App\Http\Controllers\CandidateController::class, 'resetPassword'])->name('candidates.reset-password');
Route::get('/documents/{document}', [\App\Http\Controllers\DocumentController::class, 'show'])->name('documents.show'); Route::get('/documents/{document}', [\App\Http\Controllers\DocumentController::class, 'show'])->name('documents.show');
Route::get('/candidates/{candidate}/export-dossier', [\App\Http\Controllers\Admin\CandidateExportController::class, 'exportDossier'])->name('candidates.export-dossier');
Route::get('/candidates/{candidate}/export-zip', [\App\Http\Controllers\Admin\CandidateExportController::class, 'exportZip'])->name('candidates.export-zip');
Route::resource('quizzes', \App\Http\Controllers\QuizController::class)->only(['index', 'store', 'show', 'update', 'destroy']); Route::resource('quizzes', \App\Http\Controllers\QuizController::class)->only(['index', 'store', 'show', 'update', 'destroy']);
Route::resource('job-positions', \App\Http\Controllers\JobPositionController::class)->only(['index', 'store', 'update', 'destroy']); Route::resource('job-positions', \App\Http\Controllers\JobPositionController::class)->only(['index', 'store', 'update', 'destroy']);
@@ -101,12 +110,18 @@ Route::middleware('auth')->group(function () {
Route::get('/backup', [\App\Http\Controllers\BackupController::class, 'download'])->name('backup'); Route::get('/backup', [\App\Http\Controllers\BackupController::class, 'download'])->name('backup');
Route::delete('/attempts/{attempt}', [\App\Http\Controllers\AttemptController::class, 'destroy'])->name('attempts.destroy'); Route::delete('/attempts/{attempt}', [\App\Http\Controllers\AttemptController::class, 'destroy'])->name('attempts.destroy');
Route::patch('/answers/{answer}/score', [\App\Http\Controllers\AttemptController::class, 'updateAnswerScore'])->name('answers.update-score'); Route::patch('/answers/{answer}/score', [\App\Http\Controllers\AttemptController::class, 'updateAnswerScore'])->name('answers.update-score');
Route::get('/logs', [\App\Http\Controllers\Admin\LoginLogController::class, 'index'])->name('logs.index');
}); });
// Candidate Routes // Candidate Routes
Route::get('/quizzes/{quiz}', [\App\Http\Controllers\AttemptController::class, 'show'])->name('quizzes.take'); Route::get('/quizzes/{quiz}', [\App\Http\Controllers\AttemptController::class, 'show'])->name('quizzes.take');
Route::post('/attempts/{attempt}/save', [\App\Http\Controllers\AttemptController::class, 'saveAnswer'])->name('attempts.save'); Route::post('/attempts/{attempt}/save', [\App\Http\Controllers\AttemptController::class, 'saveAnswer'])->name('attempts.save');
Route::post('/attempts/{attempt}/finish', [\App\Http\Controllers\AttemptController::class, 'finish'])->name('attempts.finish'); Route::post('/attempts/{attempt}/finish', [\App\Http\Controllers\AttemptController::class, 'finish'])->name('attempts.finish');
// Security Honeypots
Route::get('/documents/private', [\App\Http\Controllers\Api\CandidateHoneypotController::class, 'logDirectoryTraversal']);
Route::get('/documents/private/{filename}', [\App\Http\Controllers\Api\CandidateHoneypotController::class, 'downloadFakeFile']);
Route::patch('/api/candidate/me', [\App\Http\Controllers\Api\CandidateHoneypotController::class, 'logMassAssignment']);
}); });
require __DIR__.'/auth.php'; require __DIR__.'/auth.php';

View File

@@ -10,11 +10,151 @@ export default {
'./resources/views/**/*.blade.php', './resources/views/**/*.blade.php',
'./resources/js/**/*.vue', './resources/js/**/*.vue',
], ],
darkMode: 'class',
theme: { theme: {
extend: { extend: {
// ─── COULEURS ────────────────────────────────────────────────
colors: {
// Palette principale — CABM
primary: {
DEFAULT: '#1a4b8c', // Bleu Méditerranée
dark: '#122f5a', // Bleu nuit
light: '#3a7abf', // Bleu ciel (ex: sky)
},
accent: {
DEFAULT: '#c8102e', // Rouge Occitan
soft: 'rgba(200,16,46,0.10)',
},
highlight: {
DEFAULT: '#f5a800', // Or du Midi
soft: 'rgba(245,168,0,0.12)',
dark: '#3a2800', // Texte sur fond or
},
// Neutres chauds
sand: '#e8e0d0', // Sable garrigue (ex: sand)
neutral: '#f0ece4', // Fond neutre warm
surface: '#faf9f7', // Surface carte (ex: white)
// Texte
ink: {
DEFAULT: '#2d2d2d', // Anthracite
muted: 'rgba(45,45,45,0.50)',
faint: 'rgba(45,45,45,0.28)',
},
// Dark mode
dark: {
bg: '#0f1923',
surface: '#162130',
sidebar: '#0a111a',
border: 'rgba(255,255,255,0.06)',
},
// Sémantiques
success: '#10b981',
warning: '#f5a800',
danger: '#c8102e',
info: '#3a7abf',
// Compat rétro (garde les anciens noms fonctionnels)
anthracite: '#2d2d2d',
sky: '#3a7abf',
},
// ─── TYPOGRAPHIE ─────────────────────────────────────────────
fontFamily: { fontFamily: {
sans: ['Figtree', ...defaultTheme.fontFamily.sans], sans: ['Nunito', 'Helvetica Neue', 'Arial', 'sans-serif'],
serif: ['Merriweather', 'Georgia', 'serif'],
subtitle: ['Nunito', 'Gill Sans', 'sans-serif'],
mono: ['JetBrains Mono', 'Fira Code', 'monospace'],
},
fontSize: {
'2xs': ['0.625rem', { lineHeight: '1rem', letterSpacing: '0.12em' }], // 10px — labels caps
'xs': ['0.75rem', { lineHeight: '1.25rem' }], // 12px
'sm': ['0.8125rem',{ lineHeight: '1.375rem' }], // 13px
'base':['0.875rem', { lineHeight: '1.5rem' }], // 14px
'md': ['1rem', { lineHeight: '1.625rem' }], // 16px
'lg': ['1.0625rem',{ lineHeight: '1.75rem' }], // 17px
'xl': ['1.125rem', { lineHeight: '1.75rem' }], // 18px
'2xl': ['1.25rem', { lineHeight: '1.875rem' }], // 20px
'3xl': ['1.5rem', { lineHeight: '2rem' }], // 24px
'4xl': ['2rem', { lineHeight: '2.25rem', letterSpacing: '-0.02em'}], // 32px
},
// ─── ESPACEMENT ──────────────────────────────────────────────
// Garde l'échelle Tailwind standard + quelques tokens nommés
spacing: {
'sidebar': '220px',
'sidebar-sm': '64px',
'header': '60px',
'navbar': '40px',
},
// ─── BORDER RADIUS ───────────────────────────────────────────
borderRadius: {
'none': '0',
'sm': '6px',
'DEFAULT':'8px',
'md': '10px',
'lg': '12px',
'xl': '14px',
'2xl': '16px',
'3xl': '20px',
'4xl': '28px',
'full': '9999px',
// Tokens sémantiques
'card': '16px',
'btn': '10px',
'badge': '20px',
'input': '10px',
},
// ─── OMBRES ──────────────────────────────────────────────────
boxShadow: {
'xs': '0 1px 3px rgba(0,0,0,0.05)',
'sm': '0 1px 4px rgba(0,0,0,0.07)',
'DEFAULT':'0 2px 8px rgba(0,0,0,0.09)',
'md': '0 4px 16px rgba(0,0,0,0.10)',
'lg': '0 8px 28px rgba(0,0,0,0.12)',
'xl': '0 16px 48px rgba(0,0,0,0.14)',
// Sémantiques couleurs
'primary': '0 4px 16px rgba(26,75,140,0.20)',
'gold': '0 4px 16px rgba(245,168,0,0.30)',
'accent': '0 4px 16px rgba(200,16,46,0.18)',
// Dark mode
'dark-sm': '0 2px 12px rgba(0,0,0,0.30)',
'dark-md': '0 4px 24px rgba(0,0,0,0.40)',
'none': 'none',
},
// ─── TRANSITIONS ─────────────────────────────────────────────
transitionDuration: {
'fast': '120ms',
'DEFAULT': '180ms',
'slow': '300ms',
},
transitionTimingFunction: {
'smooth': 'cubic-bezier(0.4, 0, 0.2, 1)',
'spring': 'cubic-bezier(0.34, 1.56, 0.64, 1)',
},
// ─── ANIMATIONS ──────────────────────────────────────────────
keyframes: {
'fade-in': {
from: { opacity: '0', transform: 'translateY(6px)' },
to: { opacity: '1', transform: 'translateY(0)' },
},
'slide-in': {
from: { opacity: '0', transform: 'translateX(-8px)' },
to: { opacity: '1', transform: 'translateX(0)' },
},
'pulse-gold': {
'0%, 100%': { boxShadow: '0 0 0 0 rgba(245,168,0,0.3)' },
'50%': { boxShadow: '0 0 0 6px rgba(245,168,0,0)' },
},
},
animation: {
'fade-in': 'fade-in 0.2s ease-out',
'slide-in': 'slide-in 0.2s ease-out',
'pulse-gold':'pulse-gold 2s ease-in-out infinite',
}, },
}, },
}, },