Update Settings.tsx
This commit is contained in:
@@ -491,7 +491,7 @@ export const SettingsPage: React.FC = () => {
|
||||
const updated = { ...notice, active: !notice.active };
|
||||
await CondoService.saveNotice(updated);
|
||||
setNotices(notices.map(n => n.id === notice.id ? updated : n));
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
};
|
||||
@@ -698,12 +698,14 @@ export const SettingsPage: React.FC = () => {
|
||||
)}
|
||||
|
||||
{/* STORAGE CONFIG TAB */}
|
||||
{isPrivileged && activeTab === 'storage' && globalSettings?.storageConfig && (
|
||||
{isPrivileged && activeTab === 'storage' && (
|
||||
<div className="animate-fade-in bg-white rounded-xl shadow-sm border border-slate-200 p-6 max-w-2xl">
|
||||
<h3 className="text-lg font-bold text-slate-800 mb-4 flex items-center gap-2"><Cloud className="w-5 h-5 text-blue-600" /> Configurazione Storage</h3>
|
||||
<p className="text-sm text-slate-500 mb-6">Scegli dove salvare i documenti caricati.</p>
|
||||
|
||||
<form onSubmit={handleStorageSubmit} className="space-y-6">
|
||||
{globalSettings?.storageConfig ? (
|
||||
<>
|
||||
<div>
|
||||
<label className="text-sm font-bold text-slate-700 mb-2 block">Provider Attivo</label>
|
||||
<select
|
||||
@@ -754,6 +756,10 @@ export const SettingsPage: React.FC = () => {
|
||||
<Save className="w-4 h-4" /> Salva Impostazioni
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<div className="text-center p-4 text-slate-500">Inizializzazione configurazione storage...</div>
|
||||
)}
|
||||
</form>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user