From 031829ace4129a63d8548927ec7bca74bc1d8b70 Mon Sep 17 00:00:00 2001 From: dwindown Date: Tue, 11 Nov 2025 20:04:41 +0700 Subject: [PATCH] fix: Register staff notifications route and fix import paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🐛 Bug Fixes **App.tsx:** - ✅ Added StaffNotifications import - ✅ Registered `/settings/notifications/staff` route **Staff/Channels.tsx:** - ✅ Fixed SettingsCard import path (../../components/SettingsCard) - ✅ Fixed ChannelConfig import path (../ChannelConfig) **Staff.tsx:** - ✅ Removed recipientType prop from Templates (not supported yet) --- **Status:** Staff notifications route should now work correctly --- admin-spa/src/App.tsx | 2 ++ admin-spa/src/routes/Settings/Notifications/Staff.tsx | 2 +- .../src/routes/Settings/Notifications/Staff/Channels.tsx | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/admin-spa/src/App.tsx b/admin-spa/src/App.tsx index 586b02b..3450949 100644 --- a/admin-spa/src/App.tsx +++ b/admin-spa/src/App.tsx @@ -201,6 +201,7 @@ import SettingsTax from '@/routes/Settings/Tax'; import SettingsCustomers from '@/routes/Settings/Customers'; import SettingsLocalPickup from '@/routes/Settings/LocalPickup'; import SettingsNotifications from '@/routes/Settings/Notifications'; +import StaffNotifications from '@/routes/Settings/Notifications/Staff'; import SettingsDeveloper from '@/routes/Settings/Developer'; import MorePage from '@/routes/More'; @@ -488,6 +489,7 @@ function AppRoutes() { } /> } /> } /> + } /> } /> } /> diff --git a/admin-spa/src/routes/Settings/Notifications/Staff.tsx b/admin-spa/src/routes/Settings/Notifications/Staff.tsx index ce4eec7..658c639 100644 --- a/admin-spa/src/routes/Settings/Notifications/Staff.tsx +++ b/admin-spa/src/routes/Settings/Notifications/Staff.tsx @@ -41,7 +41,7 @@ export default function StaffNotifications() { - + diff --git a/admin-spa/src/routes/Settings/Notifications/Staff/Channels.tsx b/admin-spa/src/routes/Settings/Notifications/Staff/Channels.tsx index 1a494a9..068197d 100644 --- a/admin-spa/src/routes/Settings/Notifications/Staff/Channels.tsx +++ b/admin-spa/src/routes/Settings/Notifications/Staff/Channels.tsx @@ -1,14 +1,14 @@ import React, { useState, useEffect } from 'react'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { api } from '@/lib/api'; -import { SettingsCard } from '../components/SettingsCard'; +import { SettingsCard } from '../../components/SettingsCard'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Switch } from '@/components/ui/switch'; import { RefreshCw, Mail, MessageCircle, Send, Bell, ExternalLink, Settings, Check, X } from 'lucide-react'; import { toast } from 'sonner'; import { __ } from '@/lib/i18n'; -import ChannelConfig from './ChannelConfig'; +import ChannelConfig from '../ChannelConfig'; interface NotificationChannel { id: string;