Enhance Service Messages by Config & activeUntil #9

This commit is contained in:
nocnico
2025-07-03 19:26:17 +02:00
parent e137b0c75e
commit ffe0d45ab6
9 changed files with 159 additions and 78 deletions

View File

@@ -4,7 +4,6 @@ const fetchMainMessage = async () => {
return await prisma.notam.findFirst({
where: {
active: true,
isMainMsg: true,
},
});
};
@@ -15,19 +14,19 @@ export const WarningAlert = async () => {
let msgColor;
switch (mainMessage?.color) {
case "WARNING":
msgColor = "alert alert-soft alert-warning ml-3 py-2";
msgColor = "alert alert-soft alert-warning ml-3 py-2 flex items-center gap-2";
break;
case "INFO":
msgColor = "alert alert-soft alert-info ml-3 py-2";
msgColor = "alert alert-soft alert-info ml-3 py-2 flex items-center gap-2";
break;
case "SUCCESS":
msgColor = "alert alert-soft alert-success ml-3 py-2";
msgColor = "alert alert-soft alert-success ml-3 py-2 flex items-center gap-2";
break;
case "ERROR":
msgColor = "alert alert-error ml-3 py-2";
msgColor = "alert alert-error ml-3 py-2 flex items-center gap-2";
break;
default:
msgColor = "alert alert-soft ml-3 py-2";
msgColor = "alert alert-soft ml-3 py-2 flex items-center gap-2";
}
if (mainMessage?.message == "" || !mainMessage) {