Update Creating a notificaion
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user