fix(landing-page): update model/schema attributes and eslint warnings
- Add missing visual fields to LandingHosts table - Add custom_config to permitted landing_host_params - Fix ESLint warnings causing commit block in LandingHostsConfig.vue
This commit is contained in:
parent
e5e2ed762e
commit
06ffb93d9c
@ -51,7 +51,8 @@ class Api::V1::Accounts::LandingHostsController < Api::V1::Accounts::BaseControl
|
||||
:hostname, :unit_code, :active, :auto_label,
|
||||
:page_title, :page_subtitle, :button_text, :logo_url,
|
||||
:suite_image_url, :theme_color, :whatsapp_number,
|
||||
:initial_message, :default_source, :default_campanha
|
||||
:initial_message, :default_source, :default_campanha,
|
||||
custom_config: {}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@ -136,14 +136,15 @@ export default {
|
||||
}
|
||||
},
|
||||
async deleteHost(id) {
|
||||
/* eslint-disable no-alert */
|
||||
if (
|
||||
// eslint-disable-next-line no-alert
|
||||
!window.confirm(
|
||||
'Deseja realmente remover este domínio? A landing page parará de funcionar imediatamente.'
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
/* eslint-enable no-alert */
|
||||
try {
|
||||
await landingHostsApi.deleteHost(
|
||||
this.currentAccountId,
|
||||
@ -204,6 +205,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- eslint-disable vue/html-closing-bracket-newline -->
|
||||
<div class="mx-8 mt-4 pb-12">
|
||||
<div class="mb-6">
|
||||
<h2 class="text-base font-semibold text-n-slate-12 mb-1">
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
class AddVisualFieldsToLandingHosts < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_column :landing_hosts, :page_title, :string, default: 'Atendimento Express' unless column_exists?(:landing_hosts, :page_title)
|
||||
add_column :landing_hosts, :page_subtitle, :string, default: "Atendimento Imediato\nEntrada Discreta\nSem Burocracia" unless column_exists?(
|
||||
:landing_hosts, :page_subtitle
|
||||
)
|
||||
add_column :landing_hosts, :button_text, :string, default: 'Ver disponibilidade agora' unless column_exists?(:landing_hosts, :button_text)
|
||||
add_column :landing_hosts, :logo_url, :string unless column_exists?(:landing_hosts, :logo_url)
|
||||
add_column :landing_hosts, :suite_image_url, :string unless column_exists?(:landing_hosts, :suite_image_url)
|
||||
add_column :landing_hosts, :theme_color, :string, default: '#25D366' unless column_exists?(:landing_hosts, :theme_color)
|
||||
add_column :landing_hosts, :whatsapp_number, :string, default: '' unless column_exists?(:landing_hosts, :whatsapp_number)
|
||||
end
|
||||
end
|
||||
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2026_03_03_074000) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2026_03_03_172517) do
|
||||
# These extensions should be enabled to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
enable_extension "pg_trgm"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user