Skip to content

Commit

Permalink
Merge pull request #637 from The-Commit-Company/rav-39-raven-bot-doct…
Browse files Browse the repository at this point in the history
…ype-setup

feat: Raven Bot Doctype Setup
  • Loading branch information
TITANiumRox authored Feb 2, 2024
2 parents 1bf1ac1 + 0264a6c commit 3e3a850
Show file tree
Hide file tree
Showing 17 changed files with 350 additions and 117 deletions.
10 changes: 8 additions & 2 deletions mobile/src/types/Raven/RavenUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ export interface RavenUser{
parentfield?: string
parenttype?: string
idx?: number
/** Type : Select */
type: "User" | "Bot"
/** User : Link - User */
user: string
user?: string
/** Bot : Link - Raven Bot */
bot?: string
/** Full Name : Data */
full_name: string
full_name?: string
/** First Name : Data */
first_name?: string
/** User Image : Attach Image */
user_image?: string
/** Enabled : Check */
enabled?: 0 | 1
}
25 changes: 25 additions & 0 deletions mobile/src/types/RavenBot/RavenBot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

export interface RavenBot{
creation: string
name: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Bot Name : Data */
bot_name?: string
/** Description : Data */
description?: string
/** Image : Attach Image */
image?: string
/** Enabled : Check */
enabled?: 0 | 1
/** Is Standard : Check */
is_standard?: 0 | 1
/** Module : Link - Module Def */
module?: string
}
4 changes: 4 additions & 0 deletions mobile/src/types/RavenMessaging/RavenMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export interface RavenMessage{
link_doctype?: string
/** Link Document : Dynamic Link */
link_document?: string
/** Is Bot Message : Check */
is_bot_message?: 0 | 1
/** Bot : Link - Raven User */
bot?: string
/** Content : Long Text */
content?: string
}
10 changes: 8 additions & 2 deletions raven-app/src/types/Raven/RavenUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ export interface RavenUser{
parentfield?: string
parenttype?: string
idx?: number
/** Type : Select */
type: "User" | "Bot"
/** User : Link - User */
user: string
user?: string
/** Bot : Link - Raven Bot */
bot?: string
/** Full Name : Data */
full_name: string
full_name?: string
/** First Name : Data */
first_name?: string
/** User Image : Attach Image */
user_image?: string
/** Enabled : Check */
enabled?: 0 | 1
}
25 changes: 25 additions & 0 deletions raven-app/src/types/RavenBot/RavenBot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

export interface RavenBot{
creation: string
name: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Bot Name : Data */
bot_name?: string
/** Description : Data */
description?: string
/** Image : Attach Image */
image?: string
/** Enabled : Check */
enabled?: 0 | 1
/** Is Standard : Check */
is_standard?: 0 | 1
/** Module : Link - Module Def */
module?: string
}
4 changes: 4 additions & 0 deletions raven-app/src/types/RavenMessaging/RavenMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export interface RavenMessage{
link_doctype?: string
/** Link Document : Dynamic Link */
link_document?: string
/** Is Bot Message : Check */
is_bot_message?: 0 | 1
/** Bot : Link - Raven User */
bot?: string
/** Content : Long Text */
content?: string
}
3 changes: 2 additions & 1 deletion raven/modules.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Raven
Raven Messaging
Raven Channel Management
Raven Channel Management
Raven Bot
27 changes: 22 additions & 5 deletions raven/raven/doctype/raven_user/raven_user.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:user",
"creation": "2023-09-06 14:36:48.631681",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"type",
"user",
"bot",
"full_name",
"first_name",
"user_image",
Expand All @@ -17,11 +18,12 @@
],
"fields": [
{
"depends_on": "eval: doc.type == 'Human'",
"fieldname": "user",
"fieldtype": "Link",
"label": "User",
"mandatory_depends_on": "eval: doc.type == 'Human'",
"options": "User",
"reqd": 1,
"unique": 1
},
{
Expand All @@ -32,7 +34,7 @@
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Full Name",
"reqd": 1
"mandatory_depends_on": "eval: doc.type == 'Human'"
},
{
"fetch_from": "user.first_name",
Expand All @@ -41,6 +43,7 @@
"label": "First Name"
},
{
"depends_on": "eval: doc.type == 'Human'",
"fetch_from": ".",
"fieldname": "user_image",
"fieldtype": "Attach Image",
Expand All @@ -57,15 +60,29 @@
"fieldname": "html_xuuw",
"fieldtype": "HTML",
"options": "<p>To disable the user from accessing Raven, go to \"Users\" and remove the \"Raven User\" role.</p>"
},
{
"fieldname": "type",
"fieldtype": "Select",
"label": "Type",
"options": "User\nBot",
"reqd": 1
},
{
"depends_on": "eval: doc.type == 'Bot'",
"fieldname": "bot",
"fieldtype": "Link",
"label": "Bot",
"options": "Raven Bot"
}
],
"image_field": "user_image",
"links": [],
"modified": "2023-12-08 04:14:02.588812",
"modified": "2024-01-19 17:53:07.854127",
"modified_by": "Administrator",
"module": "Raven",
"name": "Raven User",
"naming_rule": "By fieldname",
"naming_rule": "By script",
"owner": "Administrator",
"permissions": [
{
Expand Down
Loading

0 comments on commit 3e3a850

Please sign in to comment.