correct some bugs
Deploy Aegis Portal / build-and-deploy (push) Successful in 17s

This commit is contained in:
LathanDevers
2026-07-26 12:06:57 +02:00
parent f32702a5d0
commit bf6071f785
7 changed files with 8 additions and 20 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
export default function BackupModale(){
export default function BackupModale(closeModal: () => void) {
return (
<div className="bg-white rounded-2xl shadow-xl w-full max-w-3xl overflow-hidden animate-in fade-in zoom-in-95 duration-200">
<div className="px-6 py-4 border-b border-slate-100 flex justify-between items-center bg-slate-50">
-2
View File
@@ -1,5 +1,3 @@
import React from 'react';
export default function BackupWidget({ onClick }: { onClick?: () => void }) {
return (
<div
@@ -1,5 +1,3 @@
import React from 'react';
export default function SecurityWidget() {
return (
<div className="bg-white rounded-xl shadow-sm border border-slate-200 p-6">
+2 -2
View File
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
import { pb } from '../../config/pocketbase';
export default function ServicesWidget() {
const [contracts, setContracts] = useState([]);
const [contracts, setContracts] = useState<any[]>([]);
const [isModalOpen, setIsModalOpen] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [isSubmitting, setIsSubmitting] = useState(false);
@@ -69,7 +69,7 @@ export default function ServicesWidget() {
) : contracts.length === 0 ? (
<p className= "text-sm text-slate-500" > Aucun contrat actif détecté.</p>
) : (
contracts.map((contract) => (
contracts.map((contract?: any) => (
<div key= { contract.id } className = "p-4 bg-slate-50 rounded-lg border border-slate-100 flex justify-between items-center" >
<div>
<h3 className="text-sm font-medium text-slate-900" > { contract.service_name } </h3>
-3
View File
@@ -1,6 +1,3 @@
import { useState, useEffect } from 'react';
import { pb } from '../../config/pocketbase';
export default function AccountSettings() {
return (
<div className="min-h-screen bg-slate-50 font-sans text-slate-900 selection:bg-blue-900 selection:text-white">
+2 -1
View File
@@ -16,6 +16,7 @@ interface Message {
created: string;
expand?: {
author?: {
id?: string;
name?: string;
email?: string;
avatar?: string;
@@ -153,7 +154,7 @@ export default function TicketDetail({ ticketId, onBack }: TicketDetailProps) {
</div>
) : (
messages.map((msg) => {
const isMyMessage = msg.author === currentUser?.id;
const isMyMessage = msg.expand?.author?.id === currentUser?.id;
const authorName = msg.expand?.author?.name || msg.expand?.author?.email || 'Expert GISE';
return (
+3 -9
View File
@@ -10,7 +10,7 @@ interface TrustCenterProps {
export default function TrustCenter({ onNavigate }: TrustCenterProps) {
const [activeModal, setActiveModal] = useState<'none' | 'evolution' | 'analytics' | 'backups'>('none');
const [selectedService, setSelectedService] = useState<string>('');
//const [selectedService, setSelectedService] = useState<string>('');
const [evolutionChoice, setEvolutionChoice] = useState<string>('');
const closeModal = () => setActiveModal('none');
@@ -47,13 +47,7 @@ export default function TrustCenter({ onNavigate }: TrustCenterProps) {
</div>
<div className="space-y-6">
<ServicesWidget
onEvolutionClick={() => setActiveModal('evolution')}
onServiceClick={(service) => {
setSelectedService(service);
setActiveModal('analytics');
}}
/>
<ServicesWidget />
{/* CTA Support ITSM Actif */}
<div className="bg-blue-900 rounded-xl shadow-sm border border-blue-800 p-6 text-white">
@@ -116,7 +110,7 @@ export default function TrustCenter({ onNavigate }: TrustCenterProps) {
<div className="px-6 py-4 border-b border-slate-100 flex justify-between items-center bg-slate-50">
<div>
<h3 className="text-lg font-bold text-slate-900">Télémétrie & Analytics</h3>
<p className="text-sm text-slate-500">{selectedService}</p>
<p className="text-sm text-slate-500">{'selectedService'}</p>
</div>
<button onClick={closeModal} className="text-slate-400 hover:text-slate-900"><svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M6 18L18 6M6 6l12 12" /></svg></button>
</div>