Chore: Web widget Inbox Tech Debts (#738)
* Chore: Webwidget Inbox Tech Debts * Additional customization options creating Web Widget * Changes to edit Page for Web Widget * Remove the WebWidget API end points * Minor chores Address: #680, #502 Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
#
|
||||
# Table name: channel_web_widgets
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# website_name :string
|
||||
# website_token :string
|
||||
# website_url :string
|
||||
# widget_color :string default("#1f93ff")
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# account_id :integer
|
||||
# id :integer not null, primary key
|
||||
# agent_away_message :string
|
||||
# website_token :string
|
||||
# website_url :string
|
||||
# welcome_tagline :string
|
||||
# welcome_title :string
|
||||
# widget_color :string default("#1f93ff")
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# account_id :integer
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
@@ -19,7 +21,6 @@
|
||||
class Channel::WebWidget < ApplicationRecord
|
||||
self.table_name = 'channel_web_widgets'
|
||||
|
||||
validates :website_name, presence: true
|
||||
validates :website_url, presence: true
|
||||
validates :widget_color, presence: true
|
||||
|
||||
@@ -27,10 +28,6 @@ class Channel::WebWidget < ApplicationRecord
|
||||
has_one :inbox, as: :channel, dependent: :destroy
|
||||
has_secure_token :website_token
|
||||
|
||||
def name
|
||||
'Website'
|
||||
end
|
||||
|
||||
def web_widget_script
|
||||
"<script>
|
||||
(function(d,t) {
|
||||
|
||||
Reference in New Issue
Block a user