mise a jour fonctionnalités
This commit is contained in:
parent
c9d27e54a7
commit
bc5107152b
@ -143,18 +143,7 @@ function AdminObjet() {
|
|||||||
let fieldB = b[sortCriteria] || "";
|
let fieldB = b[sortCriteria] || "";
|
||||||
return fieldA.localeCompare(fieldB);
|
return fieldA.localeCompare(fieldB);
|
||||||
});
|
});
|
||||||
|
|
||||||
const [energyPriority, setPriority] = useState("");
|
|
||||||
const [alertSettings, setAlertSettings] = useState("");
|
|
||||||
|
|
||||||
const handleSaveGlobalRules = () => {
|
|
||||||
console.log("Règles globales enregistrées :", {
|
|
||||||
energyPriority,
|
|
||||||
alertSettings,
|
|
||||||
});
|
|
||||||
alert("Les règles globales ont été enregistrées");
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen">
|
<div className="flex h-screen">
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
@ -295,41 +284,7 @@ function AdminObjet() {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section className="bg-white p-6 rounded-xl shadow-md mt-12">
|
|
||||||
<h2 className="text-2xl font-semibold mb-4">Règles Globales</h2>
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
|
|
||||||
<div className="flex flex-col">
|
|
||||||
<label className="mb-2 font-medium text-gray-700">
|
|
||||||
Priorité
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
placeholder="Définir la priorité énergétique"
|
|
||||||
value={energyPriority}
|
|
||||||
onChange={(e) => setPriority(e.target.value)}
|
|
||||||
className="border border-gray-300 rounded-lg p-2"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="flex flex-col">
|
|
||||||
<label className="mb-2 font-medium text-gray-700">
|
|
||||||
Gestion des alertes
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
placeholder="Définir les règles d'alerte"
|
|
||||||
value={alertSettings}
|
|
||||||
onChange={(e) => setAlertSettings(e.target.value)}
|
|
||||||
className="border border-gray-300 rounded-lg p-2"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button
|
|
||||||
onClick={handleSaveGlobalRules}
|
|
||||||
className="bg-green-600 text-white px-4 py-2 rounded-lg"
|
|
||||||
>
|
|
||||||
Enregistrer les règles globales
|
|
||||||
</button>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
<section className="bg-white p-6 rounded-xl shadow-md mt-12">
|
<section className="bg-white p-6 rounded-xl shadow-md mt-12">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user