fix: Register staff notifications route and fix import paths

## 🐛 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
This commit is contained in:
dwindown
2025-11-11 20:04:41 +07:00
parent a6a82f6ab9
commit 031829ace4
3 changed files with 5 additions and 3 deletions

View File

@@ -201,6 +201,7 @@ import SettingsTax from '@/routes/Settings/Tax';
import SettingsCustomers from '@/routes/Settings/Customers'; import SettingsCustomers from '@/routes/Settings/Customers';
import SettingsLocalPickup from '@/routes/Settings/LocalPickup'; import SettingsLocalPickup from '@/routes/Settings/LocalPickup';
import SettingsNotifications from '@/routes/Settings/Notifications'; import SettingsNotifications from '@/routes/Settings/Notifications';
import StaffNotifications from '@/routes/Settings/Notifications/Staff';
import SettingsDeveloper from '@/routes/Settings/Developer'; import SettingsDeveloper from '@/routes/Settings/Developer';
import MorePage from '@/routes/More'; import MorePage from '@/routes/More';
@@ -488,6 +489,7 @@ function AppRoutes() {
<Route path="/settings/local-pickup" element={<SettingsLocalPickup />} /> <Route path="/settings/local-pickup" element={<SettingsLocalPickup />} />
<Route path="/settings/checkout" element={<SettingsIndex />} /> <Route path="/settings/checkout" element={<SettingsIndex />} />
<Route path="/settings/notifications" element={<SettingsNotifications />} /> <Route path="/settings/notifications" element={<SettingsNotifications />} />
<Route path="/settings/notifications/staff" element={<StaffNotifications />} />
<Route path="/settings/brand" element={<SettingsIndex />} /> <Route path="/settings/brand" element={<SettingsIndex />} />
<Route path="/settings/developer" element={<SettingsDeveloper />} /> <Route path="/settings/developer" element={<SettingsDeveloper />} />

View File

@@ -41,7 +41,7 @@ export default function StaffNotifications() {
</TabsContent> </TabsContent>
<TabsContent value="templates" className="space-y-4"> <TabsContent value="templates" className="space-y-4">
<NotificationTemplates recipientType="staff" /> <NotificationTemplates />
</TabsContent> </TabsContent>
</Tabs> </Tabs>
</SettingsLayout> </SettingsLayout>

View File

@@ -1,14 +1,14 @@
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { api } from '@/lib/api'; import { api } from '@/lib/api';
import { SettingsCard } from '../components/SettingsCard'; import { SettingsCard } from '../../components/SettingsCard';
import { Badge } from '@/components/ui/badge'; import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Switch } from '@/components/ui/switch'; import { Switch } from '@/components/ui/switch';
import { RefreshCw, Mail, MessageCircle, Send, Bell, ExternalLink, Settings, Check, X } from 'lucide-react'; import { RefreshCw, Mail, MessageCircle, Send, Bell, ExternalLink, Settings, Check, X } from 'lucide-react';
import { toast } from 'sonner'; import { toast } from 'sonner';
import { __ } from '@/lib/i18n'; import { __ } from '@/lib/i18n';
import ChannelConfig from './ChannelConfig'; import ChannelConfig from '../ChannelConfig';
interface NotificationChannel { interface NotificationChannel {
id: string; id: string;