diff --git a/app/dashboards/organization_dashboard.rb b/app/dashboards/organization_dashboard.rb index 30840bd8e..df0e89255 100644 --- a/app/dashboards/organization_dashboard.rb +++ b/app/dashboards/organization_dashboard.rb @@ -29,6 +29,7 @@ class OrganizationDashboard < Administrate::BaseDashboard onboarding_additional_consent_text: Field::String, channel_image: Field::ActiveStorage, whats_app_more_info_message: Field::Text, + whats_app_profile_about: Field::Text, signal_complete_onboarding_link: Field::Url, whats_app_quick_reply_button_text: Field::JSONB }.freeze @@ -56,6 +57,7 @@ class OrganizationDashboard < Administrate::BaseDashboard contact_person business_plan upgrade_discount + whats_app_profile_about whats_app_more_info_message onboarding_data_protection_link onboarding_data_processing_consent_additional_info diff --git a/db/migrate/20241120144127_add_whats_app_quick_reply_button_text_to_organizations.rb b/db/migrate/20241120144127_add_whats_app_quick_reply_button_text_to_organizations.rb deleted file mode 100644 index 2dd4e893b..000000000 --- a/db/migrate/20241120144127_add_whats_app_quick_reply_button_text_to_organizations.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddWhatsAppQuickReplyButtonTextToOrganizations < ActiveRecord::Migration[6.1] - def change - add_column :organizations, :whats_app_quick_reply_button_text, :jsonb, default: { answer_request: 'Antworten', more_info: 'Mehr Infos' } - end -end diff --git a/db/migrate/20241120150844_change_whats_app_profile_about_to_whats_app_more_info_message_on_organizations.rb b/db/migrate/20241120150844_change_whats_app_profile_about_to_whats_app_more_info_message_on_organizations.rb deleted file mode 100644 index 1ff37e404..000000000 --- a/db/migrate/20241120150844_change_whats_app_profile_about_to_whats_app_more_info_message_on_organizations.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class ChangeWhatsAppProfileAboutToWhatsAppMoreInfoMessageOnOrganizations < ActiveRecord::Migration[6.1] - def change - rename_column :organizations, :whats_app_profile_about, :whats_app_more_info_message - end -end diff --git a/db/migrate/20241120182931_add_whats_app_columns_to_organizations.rb b/db/migrate/20241120182931_add_whats_app_columns_to_organizations.rb new file mode 100644 index 000000000..a8d0112dd --- /dev/null +++ b/db/migrate/20241120182931_add_whats_app_columns_to_organizations.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class AddWhatsAppColumnsToOrganizations < ActiveRecord::Migration[6.1] + def change + change_table :organizations, bulk: true do |t| + t.jsonb :whats_app_quick_reply_button_text, default: { answer_request: 'Antworten', more_info: 'Mehr Infos' } + t.string :whats_app_more_info_message, default: '' + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 889b5fd83..c52ca04e7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_11_20_150844) do +ActiveRecord::Schema.define(version: 2024_11_20_182931) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" @@ -230,11 +230,12 @@ t.string "three_sixty_dialog_client_id" t.string "three_sixty_dialog_client_waba_account_id" t.string "email_from_address" - t.string "whats_app_more_info_message", default: "" + t.string "whats_app_profile_about", default: "" t.jsonb "onboarding_allowed", default: {"email"=>true, "signal"=>true, "threema"=>true, "telegram"=>true, "whats_app"=>true} t.jsonb "twilio_content_sids", default: {"new_request_day1"=>"", "new_request_day2"=>"", "new_request_day3"=>"", "new_request_night1"=>"", "new_request_night2"=>"", "new_request_night3"=>"", "new_request_evening1"=>"", "new_request_evening2"=>"", "new_request_evening3"=>"", "new_request_morning1"=>"", "new_request_morning2"=>"", "new_request_morning3"=>""} t.string "signal_complete_onboarding_link" t.jsonb "whats_app_quick_reply_button_text", default: {"more_info"=>"Mehr Infos", "answer_request"=>"Antworten"} + t.string "whats_app_more_info_message", default: "" t.index ["business_plan_id"], name: "index_organizations_on_business_plan_id" t.index ["contact_person_id"], name: "index_organizations_on_contact_person_id" t.index ["telegram_bot_username"], name: "index_organizations_on_telegram_bot_username", unique: true