From e1547d7835c02324f67ac5649a2987756afd5ce3 Mon Sep 17 00:00:00 2001 From: erio Date: Fri, 10 Apr 2026 23:08:03 +0800 Subject: [PATCH] fix(payment): resolve PR audit issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add payment navigation to AppSidebar (user orders + admin payment menu group with collapse) - Add 5 missing nav i18n keys (myOrders, orderManagement, paymentDashboard, paymentConfig, paymentPlans) - Renumber payment migrations 090-100 → 092-102 to avoid conflict with upstream 090/091 - Remove non-payment sora_client_enabled change, restore upstream purchase_subscription fields - Remove extra 'data' from SettingsTab type union --- ...ment_orders.sql => 092_payment_orders.sql} | 0 ...it_logs.sql => 093_payment_audit_logs.sql} | 0 ...s.sql => 094_removed_payment_channels.sql} | 0 ...n_plans.sql => 095_subscription_plans.sql} | 0 ...sql => 096_payment_provider_instances.sql} | 0 ..._purchase_subscription_to_custom_menu.sql} | 0 ...ve_easypay_from_enabled_payment_types.sql} | 0 ...ment_mode.sql => 101_add_payment_mode.sql} | 0 ...02_add_out_trade_no_to_payment_orders.sql} | 0 frontend/src/api/admin/settings.ts | 5 +- frontend/src/components/layout/AppSidebar.vue | 191 +++++++++++++++--- frontend/src/i18n/locales/en.ts | 7 +- frontend/src/i18n/locales/zh.ts | 7 +- frontend/src/views/admin/SettingsView.vue | 5 +- 14 files changed, 182 insertions(+), 33 deletions(-) rename backend/migrations/{090_payment_orders.sql => 092_payment_orders.sql} (100%) rename backend/migrations/{091_payment_audit_logs.sql => 093_payment_audit_logs.sql} (100%) rename backend/migrations/{092_removed_payment_channels.sql => 094_removed_payment_channels.sql} (100%) rename backend/migrations/{093_subscription_plans.sql => 095_subscription_plans.sql} (100%) rename backend/migrations/{094_payment_provider_instances.sql => 096_payment_provider_instances.sql} (100%) rename backend/migrations/{096_migrate_purchase_subscription_to_custom_menu.sql => 098_migrate_purchase_subscription_to_custom_menu.sql} (100%) rename backend/migrations/{098_remove_easypay_from_enabled_payment_types.sql => 100_remove_easypay_from_enabled_payment_types.sql} (100%) rename backend/migrations/{099_add_payment_mode.sql => 101_add_payment_mode.sql} (100%) rename backend/migrations/{100_add_out_trade_no_to_payment_orders.sql => 102_add_out_trade_no_to_payment_orders.sql} (100%) diff --git a/backend/migrations/090_payment_orders.sql b/backend/migrations/092_payment_orders.sql similarity index 100% rename from backend/migrations/090_payment_orders.sql rename to backend/migrations/092_payment_orders.sql diff --git a/backend/migrations/091_payment_audit_logs.sql b/backend/migrations/093_payment_audit_logs.sql similarity index 100% rename from backend/migrations/091_payment_audit_logs.sql rename to backend/migrations/093_payment_audit_logs.sql diff --git a/backend/migrations/092_removed_payment_channels.sql b/backend/migrations/094_removed_payment_channels.sql similarity index 100% rename from backend/migrations/092_removed_payment_channels.sql rename to backend/migrations/094_removed_payment_channels.sql diff --git a/backend/migrations/093_subscription_plans.sql b/backend/migrations/095_subscription_plans.sql similarity index 100% rename from backend/migrations/093_subscription_plans.sql rename to backend/migrations/095_subscription_plans.sql diff --git a/backend/migrations/094_payment_provider_instances.sql b/backend/migrations/096_payment_provider_instances.sql similarity index 100% rename from backend/migrations/094_payment_provider_instances.sql rename to backend/migrations/096_payment_provider_instances.sql diff --git a/backend/migrations/096_migrate_purchase_subscription_to_custom_menu.sql b/backend/migrations/098_migrate_purchase_subscription_to_custom_menu.sql similarity index 100% rename from backend/migrations/096_migrate_purchase_subscription_to_custom_menu.sql rename to backend/migrations/098_migrate_purchase_subscription_to_custom_menu.sql diff --git a/backend/migrations/098_remove_easypay_from_enabled_payment_types.sql b/backend/migrations/100_remove_easypay_from_enabled_payment_types.sql similarity index 100% rename from backend/migrations/098_remove_easypay_from_enabled_payment_types.sql rename to backend/migrations/100_remove_easypay_from_enabled_payment_types.sql diff --git a/backend/migrations/099_add_payment_mode.sql b/backend/migrations/101_add_payment_mode.sql similarity index 100% rename from backend/migrations/099_add_payment_mode.sql rename to backend/migrations/101_add_payment_mode.sql diff --git a/backend/migrations/100_add_out_trade_no_to_payment_orders.sql b/backend/migrations/102_add_out_trade_no_to_payment_orders.sql similarity index 100% rename from backend/migrations/100_add_out_trade_no_to_payment_orders.sql rename to backend/migrations/102_add_out_trade_no_to_payment_orders.sql diff --git a/frontend/src/api/admin/settings.ts b/frontend/src/api/admin/settings.ts index 3b529eb2..3a8a13b7 100644 --- a/frontend/src/api/admin/settings.ts +++ b/frontend/src/api/admin/settings.ts @@ -38,7 +38,8 @@ export interface SystemSettings { doc_url: string home_content: string hide_ccs_import_button: boolean - sora_client_enabled: boolean + purchase_subscription_enabled: boolean + purchase_subscription_url: string backend_mode_enabled: boolean custom_menu_items: CustomMenuItem[] custom_endpoints: CustomEndpoint[] @@ -155,6 +156,8 @@ export interface UpdateSettingsRequest { doc_url?: string home_content?: string hide_ccs_import_button?: boolean + purchase_subscription_enabled?: boolean + purchase_subscription_url?: string backend_mode_enabled?: boolean custom_menu_items?: CustomMenuItem[] custom_endpoints?: CustomEndpoint[] diff --git a/frontend/src/components/layout/AppSidebar.vue b/frontend/src/components/layout/AppSidebar.vue index 09b83f6f..ebdefef0 100644 --- a/frontend/src/components/layout/AppSidebar.vue +++ b/frontend/src/components/layout/AppSidebar.vue @@ -29,30 +29,64 @@