diff --git a/bots/admin.py b/bots/admin.py index d71972450..391d28ae5 100644 --- a/bots/admin.py +++ b/bots/admin.py @@ -88,12 +88,21 @@ class Media: class BotIntegrationAdmin(admin.ModelAdmin): search_fields = [ "name", + "billing_account_uid", + "user_language", + "fb_page_id", + "fb_page_name", + "fb_page_access_token", "ig_account_id", "ig_username", - "fb_page_id", "wa_phone_number", + "wa_phone_number_id", + "slack_team_id", + "slack_team_name", "slack_channel_id", - "billing_account_uid", + "slack_channel_name", + "slack_channel_hook_url", + "slack_access_token", ] list_display = [ "name", @@ -343,7 +352,17 @@ class ConversationAdmin(admin.ModelAdmin): list_filter = ["bot_integration", "created_at", LastActiveDeltaFilter] autocomplete_fields = ["bot_integration"] search_fields = [ + "fb_page_id", + "fb_page_name", + "fb_page_access_token", + "ig_account_id", + "ig_username", "wa_phone_number", + "slack_user_id", + "slack_team_id", + "slack_user_name", + "slack_channel_id", + "slack_channel_name", ] + [f"bot_integration__{field}" for field in BotIntegrationAdmin.search_fields] actions = [export_to_csv, export_to_excel] @@ -395,10 +414,11 @@ class MessageAdmin(admin.ModelAdmin): "created_at", ] search_fields = [ - "analysis_result", "role", "content", "display_content", + "platform_msg_id", + "analysis_result", ] + [f"conversation__{field}" for field in ConversationAdmin.search_fields] list_display = [ "__str__",