diff --git a/server/services/notifications/utils/processNotifications.ts b/server/services/notifications/utils/processNotifications.ts index be775ec..1339cd1 100644 --- a/server/services/notifications/utils/processNotifications.ts +++ b/server/services/notifications/utils/processNotifications.ts @@ -14,7 +14,9 @@ export const startNotificationMonitor = async () => { createLog("info", "notify", "notify", `Notification system is now active.`); setInterval(async () => { - const { data, error } = await tryCatch(db.select().from(notifications)); + const { data: notes, error } = (await tryCatch( + db.select().from(notifications) + )) as any; if (error) { createLog( @@ -27,8 +29,6 @@ export const startNotificationMonitor = async () => { ); } - const notes: any = data; - for (const note of notes) { //if we get deactivated remove it. if (runningCrons[note.name] && !note.active) { diff --git a/server/services/sqlServer/querys/dataMart/deleveryByDateRange.ts b/server/services/sqlServer/querys/dataMart/deleveryByDateRange.ts index 3be99ed..049f3e3 100644 --- a/server/services/sqlServer/querys/dataMart/deleveryByDateRange.ts +++ b/server/services/sqlServer/querys/dataMart/deleveryByDateRange.ts @@ -1,7 +1,7 @@ export const deliveryByDateRange = ` use AlplaPROD_test1 -DECLARE @StartDate DATE = ' 1990-1-1 ' -- 2025-1-1 -DECLARE @EndDate DATE = '2025-4-18' -- 2025-1-31 +DECLARE @StartDate DATE = '[startDate]' -- 2025-1-1 +DECLARE @EndDate DATE = '[endDate]' -- 2025-1-31 select * from (select (select wert from dbo.T_SystemParameter where Bezeichnung = 'Werkskuerzel') as Plant, AuftragsNummer as OrderNumber,