-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(integration): document alert messages
- Loading branch information
1 parent
b0d1f4e
commit 20a5b44
Showing
16 changed files
with
623 additions
and
8 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
frontend/src/types/RavenIntegrations/RavenDocumentNotification.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { RavenDocumentNotificationRecipients } from './RavenDocumentNotificationRecipients' | ||
|
||
export interface RavenDocumentNotification{ | ||
creation: string | ||
name: string | ||
modified: string | ||
owner: string | ||
modified_by: string | ||
docstatus: 0 | 1 | 2 | ||
parent?: string | ||
parentfield?: string | ||
parenttype?: string | ||
idx?: number | ||
/** Notification Name : Data */ | ||
notification_name: string | ||
/** Enabled : Check */ | ||
enabled?: 0 | 1 | ||
/** Sender : Link - Raven Bot */ | ||
sender: string | ||
/** Send Alert On : Select */ | ||
send_alert_on: "New Document" | "Update" | "Submit" | "Cancel" | "Delete" | ||
/** Document Type : Link - DocType */ | ||
document_type: string | ||
/** Condition : Code - Optional: The alert will be sent if this expression is true */ | ||
condition?: string | ||
/** Recipients : Table - Raven Document Notification Recipients */ | ||
recipients: RavenDocumentNotificationRecipients[] | ||
/** Message : Code - Can be HTML/Markdown/Plain Text. Support Jinja tags */ | ||
message: string | ||
} |
19 changes: 19 additions & 0 deletions
19
frontend/src/types/RavenIntegrations/RavenDocumentNotificationRecipients.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
export interface RavenDocumentNotificationRecipients{ | ||
creation: string | ||
name: string | ||
modified: string | ||
owner: string | ||
modified_by: string | ||
docstatus: 0 | 1 | 2 | ||
parent?: string | ||
parentfield?: string | ||
parenttype?: string | ||
idx?: number | ||
/** Channel Type : Select */ | ||
channel_type: "Channel" | "User" | ||
/** Variable Type : Select */ | ||
variable_type: "Static" | "DocField" | "Jinja" | ||
/** Value : Data */ | ||
value: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
8 changes: 8 additions & 0 deletions
8
raven/raven_integrations/doctype/raven_document_notification/raven_document_notification.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2024, The Commit Company (Algocode Technologies Pvt. Ltd.) and contributors | ||
// For license information, please see license.txt | ||
|
||
// frappe.ui.form.on("Raven Document Notification", { | ||
// refresh(frm) { | ||
|
||
// }, | ||
// }); |
148 changes: 148 additions & 0 deletions
148
...n/raven_integrations/doctype/raven_document_notification/raven_document_notification.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"autoname": "field:notification_name", | ||
"creation": "2024-12-15 17:36:24.825068", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"notification_name", | ||
"enabled", | ||
"column_break_hpcq", | ||
"sender", | ||
"section_break_vsib", | ||
"send_alert_on", | ||
"column_break_rxyz", | ||
"document_type", | ||
"conditions_tab", | ||
"condition", | ||
"recipients_tab", | ||
"recipients", | ||
"message_content_tab", | ||
"message" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "notification_name", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Notification Name", | ||
"reqd": 1, | ||
"unique": 1 | ||
}, | ||
{ | ||
"default": "1", | ||
"fieldname": "enabled", | ||
"fieldtype": "Check", | ||
"label": "Enabled" | ||
}, | ||
{ | ||
"fieldname": "column_break_hpcq", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "section_break_vsib", | ||
"fieldtype": "Section Break" | ||
}, | ||
{ | ||
"fieldname": "send_alert_on", | ||
"fieldtype": "Select", | ||
"in_list_view": 1, | ||
"label": "Send Alert On", | ||
"options": "New Document\nUpdate\nSubmit\nCancel\nDelete", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "column_break_rxyz", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "document_type", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Document Type", | ||
"options": "DocType", | ||
"reqd": 1, | ||
"search_index": 1 | ||
}, | ||
{ | ||
"fieldname": "conditions_tab", | ||
"fieldtype": "Tab Break", | ||
"label": "Conditions" | ||
}, | ||
{ | ||
"description": "Optional: The alert will be sent if this expression is true", | ||
"fieldname": "condition", | ||
"fieldtype": "Code", | ||
"label": "Condition" | ||
}, | ||
{ | ||
"fieldname": "recipients_tab", | ||
"fieldtype": "Tab Break", | ||
"label": "Recipients" | ||
}, | ||
{ | ||
"fieldname": "recipients", | ||
"fieldtype": "Table", | ||
"label": "Recipients", | ||
"options": "Raven Document Notification Recipients", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "message_content_tab", | ||
"fieldtype": "Tab Break", | ||
"label": "Message Content" | ||
}, | ||
{ | ||
"description": "Can be HTML/Markdown/Plain Text. Support Jinja tags", | ||
"fieldname": "message", | ||
"fieldtype": "Code", | ||
"label": "Message", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "sender", | ||
"fieldtype": "Link", | ||
"label": "Sender", | ||
"options": "Raven Bot", | ||
"reqd": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"links": [], | ||
"modified": "2024-12-15 19:21:43.452516", | ||
"modified_by": "Administrator", | ||
"module": "Raven Integrations", | ||
"name": "Raven Document Notification", | ||
"naming_rule": "By fieldname", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"write": 1 | ||
}, | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Raven Admin", | ||
"share": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "creation", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
Oops, something went wrong.