diff --git a/app/controllers/api/v1/accounts/inboxes_controller.rb b/app/controllers/api/v1/accounts/inboxes_controller.rb index d60e4c3e8..2bda5c07a 100644 --- a/app/controllers/api/v1/accounts/inboxes_controller.rb +++ b/app/controllers/api/v1/accounts/inboxes_controller.rb @@ -49,6 +49,7 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController return if permitted_params(channel_attributes)[:channel].blank? validate_email_channel(channel_attributes) if @inbox.inbox_type == 'Email' + @inbox.channel.update!(permitted_params(channel_attributes)[:channel]) update_channel_feature_flags end diff --git a/app/controllers/api/v1/widget/base_controller.rb b/app/controllers/api/v1/widget/base_controller.rb index ad555fc22..38c880526 100644 --- a/app/controllers/api/v1/widget/base_controller.rb +++ b/app/controllers/api/v1/widget/base_controller.rb @@ -68,7 +68,7 @@ class Api::V1::Widget::BaseController < ApplicationController mergee_contact: @contact ).perform else - @contact.update!(email: email, name: contact_name, phone_number: contact_phone_number) + @contact.update!(email: email, name: contact_name) end end @@ -80,10 +80,6 @@ class Api::V1::Widget::BaseController < ApplicationController params[:contact][:name] || contact_email.split('@')[0] end - def contact_phone_number - params[:contact][:phone_number] - end - def browser_params { browser_name: browser.name, diff --git a/app/controllers/api/v1/widget/conversations_controller.rb b/app/controllers/api/v1/widget/conversations_controller.rb index 8cfb65be6..8d28345d4 100644 --- a/app/controllers/api/v1/widget/conversations_controller.rb +++ b/app/controllers/api/v1/widget/conversations_controller.rb @@ -51,7 +51,6 @@ class Api::V1::Widget::ConversationsController < Api::V1::Widget::BaseController end def permitted_params - params.permit(:id, :typing_status, :website_token, :email, contact: [:name, :email, :phone_number], - message: [:content, :referer_url, :timestamp, :echo_id]) + params.permit(:id, :typing_status, :website_token, :email, contact: [:name, :email], message: [:content, :referer_url, :timestamp, :echo_id]) end end diff --git a/app/javascript/dashboard/components/buttons/ToggleButton.vue b/app/javascript/dashboard/components/buttons/ToggleButton.vue deleted file mode 100644 index 37328aba5..000000000 --- a/app/javascript/dashboard/components/buttons/ToggleButton.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - - diff --git a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json index 6111b90fd..538d6d5f0 100644 --- a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json +++ b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json @@ -187,7 +187,7 @@ } } }, - "WHATSAPP": { + "WHATSAPP": { "TITLE": "WhatsApp Channel", "DESC": "Start supporting your customers via WhatsApp.", "PROVIDERS": { @@ -211,6 +211,7 @@ "PLACEHOLDER": "API key", "APPLY_FOR_ACCESS": "Don't have any API key? Apply for access here", "ERROR": "Please enter a valid value." + }, "SUBMIT_BUTTON": "Create WhatsApp Channel", "API": { @@ -431,11 +432,6 @@ }, "PRE_CHAT_FORM": { "DESCRIPTION": "Pre chat forms enable you to capture user information before they start conversation with you.", - "SET_FIELDS": "Pre chat form fields", - "SET_FIELDS_HEADER": { - "FIELDS": "Fields", - "REQUIRED": "Required" - }, "ENABLE": { "LABEL": "Enable pre chat form", "OPTIONS": { @@ -468,7 +464,7 @@ "VALIDATION_ERROR": "Starting time should be before closing time.", "CHOOSE": "Choose" }, - "ALL_DAY": "All-Day" + "ALL_DAY":"All-Day" }, "IMAP": { "TITLE": "IMAP", diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/automation/Index.vue index b3a4ce9d7..811fc95c6 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/automation/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/automation/Index.vue @@ -34,10 +34,19 @@ {{ automation.name }} {{ automation.description }} - + > + + {{ readableTime(automation.created_on) }} @@ -131,13 +140,11 @@ import AddAutomationRule from './AddAutomationRule.vue'; import EditAutomationRule from './EditAutomationRule.vue'; import alertMixin from 'shared/mixins/alertMixin'; import timeMixin from 'dashboard/mixins/time'; -import ToggleButton from 'dashboard/components/buttons/ToggleButton'; export default { components: { AddAutomationRule, EditAutomationRule, - ToggleButton, }, mixins: [alertMixin, timeMixin], data() { @@ -283,4 +290,41 @@ export default { .automation__status-checkbox { margin: 0; } +.toggle-button { + background-color: var(--s-200); + position: relative; + display: inline-flex; + height: 19px; + width: 34px; + border: 2px solid transparent; + border-radius: var(--border-radius-large); + cursor: pointer; + transition-property: background-color; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 200ms; + flex-shrink: 0; +} + +.toggle-button.active { + background-color: var(--w-500); +} + +.toggle-button span { + --space-one-point-five: 1.5rem; + height: var(--space-one-point-five); + width: var(--space-one-point-five); + display: inline-block; + background-color: var(--white); + box-shadow: rgb(255, 255, 255) 0px 0px 0px 0px, + rgba(59, 130, 246, 0.5) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, + rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; + transform: translate(0, 0); + border-radius: 100%; + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 200ms; +} +.toggle-button span.active { + transform: translate(var(--space-one-point-five), var(--space-zero)); +} diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/Settings.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/Settings.vue index bf0c22515..6c01bc3dd 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/Settings.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/Settings.vue @@ -15,57 +15,28 @@ -
-