From 0cde2cb449e2a7ef2b257e2179d69bab89053deb Mon Sep 17 00:00:00 2001 From: cowch Date: Mon, 6 Apr 2026 16:50:16 -0500 Subject: [PATCH] Update Creating a notificaion --- Creating-a-notificaion.md | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/Creating-a-notificaion.md b/Creating-a-notificaion.md index 51ca806..3f34088 100644 --- a/Creating-a-notificaion.md +++ b/Creating-a-notificaion.md @@ -1,14 +1,32 @@ -When creating a new notification we need to make sure 3 files are created with the same name +When creating a new notification we need to make sure 2 files are created at min -in the notification folder create a file like -`notification.{name}.ts` +The below files are what you need and there places they belong. + +- The notification - `notification.{name}.ts` + - This will go into the notification folder +- The sql - `{name}.sql` + - This will go into the prodSql or gpSql depending on what query it is + - when utilizing lsts own db for querying this will go directly into the notificaion +- The email template - `{name}.hbs` + - This will go into the utils/mailViews + +The `notification.master.ts` will also need to be updated with the new data + +below is an example. + +```json +{ + name: "qualityBlocking", + description: + "Checks for new blocking orders that have been entered, recommend to get the most recent order in here before activating.", + active: false, + interval: "10", + options: [{ sentBlockingOrders: [{ timeStamp: "0", blockingOrder: 1 }] }], +}, +``` + +options is an array of what ever you want in here that relates to the notification -when the query is in alplaprod you will need to create one in the prodSql/queries folder, for Gp queries will need to go into gpSql/queries -`{name}.sql` - -Last one you need to create is the email file in the utlis/mailViews -`{name}.hbs` - -if one of these are not in the notification will fail +The only exception to the files is the query portion as it can be directly inside the notification.