feat: Module Devis professionnel avec écrans complets
Création de 2 écrans professionnels pour le module Devis:
1. devis/nouveau.xhtml:
- 4 sections: Informations générales, Détail du devis, Montants, Conditions
- Numéro auto-généré avec icône
- Statut avec 5 valeurs (BROUILLON, ATTENTE, ACCEPTE, REFUSE, EXPIRE)
- Dates d'émission et validité avec calendriers
- Client et objet du devis requis
- Placeholder pour lignes de devis (future développement)
- Calcul automatique TVA 18% et TTC
- Récapitulatif visuel HT/TVA/TTC avec composant monétaire
- Conditions de paiement et remarques (section collapsible)
- 3 boutons: Annuler, Brouillon, Envoyer
2. devis/details.xhtml:
- En-tête: numéro, statut, client, objet, dates
- Actions: Retour, Convertir en chantier, PDF, Modifier
- 4 KPI cards: Montant HT, TVA, TTC, Statut
- 6 onglets professionnels:
* Vue d'ensemble: infos + récap financier + actions rapides
* Détail des lignes: table lignes (placeholder)
* Conditions: paiement, délais, garanties
* Documents: GED associée (placeholder)
* Suivi: timeline actions
* Historique: modifications (placeholder)
Corrections:
- Fix navigation /factures/nouvelle -> /factures/nouveau (factures.xhtml)
- Fix menu /factures/nouvelle -> /factures/nouveau (menu.xhtml)
Tous les composants réutilisables utilisés (status-badge, monetary-display).
Validation complète côté client et serveur.
UI/UX professionnel adapté au métier BTP.
This commit is contained in:
98
verify-config.ps1
Normal file
98
verify-config.ps1
Normal file
@@ -0,0 +1,98 @@
|
||||
# Script de verification de la configuration Keycloak
|
||||
|
||||
$KEYCLOAK_URL = "https://security.lions.dev"
|
||||
$REALM = "btpxpress"
|
||||
$CLIENT_ID = "btpxpress-frontend"
|
||||
$ADMIN_USER = "admin"
|
||||
$ADMIN_PASSWORD = "KeycloakAdmin2025!"
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "==================================================" -ForegroundColor Cyan
|
||||
Write-Host "Verification de la configuration Keycloak" -ForegroundColor Green
|
||||
Write-Host "==================================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Obtenir le token
|
||||
$body = @{
|
||||
grant_type = "password"
|
||||
client_id = "admin-cli"
|
||||
username = $ADMIN_USER
|
||||
password = $ADMIN_PASSWORD
|
||||
}
|
||||
|
||||
$tokenResponse = Invoke-RestMethod -Uri "$KEYCLOAK_URL/realms/master/protocol/openid-connect/token" -Method Post -ContentType "application/x-www-form-urlencoded" -Body $body
|
||||
$token = $tokenResponse.access_token
|
||||
|
||||
$headers = @{
|
||||
Authorization = "Bearer $token"
|
||||
"Content-Type" = "application/json"
|
||||
}
|
||||
|
||||
# 1. Verifier le client
|
||||
Write-Host "1. Configuration du client '$CLIENT_ID':" -ForegroundColor Yellow
|
||||
$clients = Invoke-RestMethod -Uri "$KEYCLOAK_URL/admin/realms/$REALM/clients" -Method Get -Headers $headers
|
||||
$client = $clients | Where-Object { $_.clientId -eq $CLIENT_ID }
|
||||
|
||||
if ($client) {
|
||||
Write-Host " Client ID: $($client.clientId)" -ForegroundColor Green
|
||||
Write-Host " Client Type: Public" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host " Redirect URIs:" -ForegroundColor Cyan
|
||||
$client.redirectUris | ForEach-Object { Write-Host " - $_" -ForegroundColor White }
|
||||
Write-Host ""
|
||||
Write-Host " Web Origins:" -ForegroundColor Cyan
|
||||
$client.webOrigins | ForEach-Object { Write-Host " - $_" -ForegroundColor White }
|
||||
} else {
|
||||
Write-Host " Client non trouve!" -ForegroundColor Red
|
||||
}
|
||||
|
||||
# 2. Verifier l'utilisateur de test
|
||||
Write-Host ""
|
||||
Write-Host "2. Utilisateur de test:" -ForegroundColor Yellow
|
||||
$users = Invoke-RestMethod -Uri "$KEYCLOAK_URL/admin/realms/$REALM/users?username=test@btpxpress.com" -Method Get -Headers $headers
|
||||
|
||||
if ($users.Count -gt 0) {
|
||||
$user = $users[0]
|
||||
Write-Host " Username: $($user.username)" -ForegroundColor Green
|
||||
Write-Host " Email: $($user.email)" -ForegroundColor Green
|
||||
Write-Host " Enabled: $($user.enabled)" -ForegroundColor Green
|
||||
Write-Host " Email Verified: $($user.emailVerified)" -ForegroundColor Green
|
||||
|
||||
# Recuperer les roles de l'utilisateur
|
||||
$userRoles = Invoke-RestMethod -Uri "$KEYCLOAK_URL/admin/realms/$REALM/users/$($user.id)/role-mappings/realm" -Method Get -Headers $headers
|
||||
|
||||
Write-Host ""
|
||||
Write-Host " Roles assignes:" -ForegroundColor Cyan
|
||||
if ($userRoles.Count -gt 0) {
|
||||
$userRoles | ForEach-Object { Write-Host " - $($_.name)" -ForegroundColor White }
|
||||
} else {
|
||||
Write-Host " Aucun role assigne" -ForegroundColor Yellow
|
||||
}
|
||||
} else {
|
||||
Write-Host " Utilisateur non trouve!" -ForegroundColor Red
|
||||
}
|
||||
|
||||
# 3. Verification OIDC
|
||||
Write-Host ""
|
||||
Write-Host "3. Configuration OIDC:" -ForegroundColor Yellow
|
||||
try {
|
||||
$oidcConfig = Invoke-RestMethod -Uri "$KEYCLOAK_URL/realms/$REALM/.well-known/openid-configuration" -Method Get
|
||||
Write-Host " Issuer: $($oidcConfig.issuer)" -ForegroundColor Green
|
||||
Write-Host " Authorization endpoint: OK" -ForegroundColor Green
|
||||
Write-Host " Token endpoint: OK" -ForegroundColor Green
|
||||
Write-Host " Userinfo endpoint: OK" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host " Erreur lors de la verification OIDC" -ForegroundColor Red
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "==================================================" -ForegroundColor Cyan
|
||||
Write-Host "Verification terminee!" -ForegroundColor Green
|
||||
Write-Host "==================================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "Vous pouvez maintenant demarrer l'application:" -ForegroundColor Yellow
|
||||
Write-Host " mvn quarkus:dev" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "Puis acceder a: http://localhost:8081" -ForegroundColor Yellow
|
||||
Write-Host "Credentials: test@btpxpress.com / Test123!" -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
Reference in New Issue
Block a user