feat: Add Store link to admin header and notification activity log

- Add Store link to admin header (visible when customer SPA is enabled)
- Add storeUrl and customerSpaEnabled to WNW_CONFIG in Assets.php and StandaloneAdmin.php
- Update window.d.ts with new WNW_CONFIG properties
- Create ActivityLog.tsx component with search, filters, and pagination
- Add /notifications/logs API endpoint to NotificationsController
- Update Notifications.tsx to link to activity log page
- Add ActivityLog route to App.tsx
This commit is contained in:
Dwindi Ramadhana
2026-01-04 23:51:54 +07:00
parent 0f542ad452
commit 6c8cbb93e6
8 changed files with 366 additions and 33 deletions

View File

@@ -72,6 +72,8 @@ class Assets
'wpAdminUrl' => admin_url('admin.php?page=woonoow'),
'isAuthenticated' => is_user_logged_in(),
'pluginUrl' => trailingslashit(plugins_url('/', dirname(__DIR__))),
'storeUrl' => home_url('/store/'),
'customerSpaEnabled' => get_option('woonoow_customer_spa_enabled', false),
]);
wp_add_inline_script($handle, 'window.WNW_CONFIG = window.WNW_CONFIG || WNW_CONFIG;', 'after');
@@ -195,6 +197,8 @@ class Assets
'wpAdminUrl' => admin_url('admin.php?page=woonoow'),
'isAuthenticated' => is_user_logged_in(),
'pluginUrl' => trailingslashit(plugins_url('/', dirname(__DIR__))),
'storeUrl' => home_url('/store/'),
'customerSpaEnabled' => get_option('woonoow_customer_spa_enabled', false),
]);
// WordPress REST API settings (for media upload compatibility)