mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 21:48:18 +00:00
Tour package booking, app release, new endpoints, more updates and fixes
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
Grid3x3,
|
||||
Banknote,
|
||||
Activity,
|
||||
Smartphone,
|
||||
} from 'lucide-react';
|
||||
import { useAuthStore } from '@/lib/auth-store';
|
||||
import { cn } from '@/lib/utils';
|
||||
@@ -69,8 +70,9 @@ const navigationSections: { title: string; items: NavItem[] }[] = [
|
||||
{
|
||||
title: 'Tourism',
|
||||
items: [
|
||||
{ name: 'Packages', href: '/packages', icon: Package, permission: PERMS.admin },
|
||||
{ name: 'Inquiries', href: '/package-inquiries', icon: MessageSquare, permission: PERMS.admin },
|
||||
{ name: 'Packages', href: '/packages', icon: Package, permission: PERMS.admin },
|
||||
// { name: 'Pkg Bookings', href: '/package-bookings', icon: Ticket, permission: PERMS.admin },
|
||||
{ name: 'Inquiries', href: '/package-inquiries', icon: MessageSquare, permission: PERMS.admin },
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -91,49 +93,44 @@ const navigationSections: { title: string; items: NavItem[] }[] = [
|
||||
{ name: 'Pricing & Fares', href: '/pricing', icon: DollarSign, permission: PERMS.admin },
|
||||
{ name: 'Tariff Rates', href: '/tariff-rates', icon: Banknote, permission: PERMS.admin },
|
||||
{ name: 'Fare Rules', href: '/fare-management', icon: Settings, permission: PERMS.admin },
|
||||
{ name: 'Currencies', href: '/currencies', icon: Banknote, permission: PERMS.currencies.manage },
|
||||
{ name: 'Payment Methods', href: '/payment-methods', icon: CreditCard, permission: PERMS.payments.view },
|
||||
{ name: 'Payments', href: '/payments', icon: CreditCard, permission: PERMS.payments.view },
|
||||
{ name: 'Currencies', href: '/currencies', icon: Banknote, permission: PERMS.currencies.manage },
|
||||
{ name: 'Promo Codes', href: '/promos', icon: Gift, permission: PERMS.admin },
|
||||
{ name: 'Payment Methods', href: '/payment-methods', icon: CreditCard, permission: PERMS.payments.view },
|
||||
{ name: 'Wallet Accounts', href: '/wallet-accounts', icon: Wallet, permission: PERMS.payments.view },
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Customer Services',
|
||||
items: [
|
||||
{ name: 'Loyalty Program', href: '/loyalty', icon: Gift, permission: PERMS.passengers.view },
|
||||
{ name: 'Support Center', href: '/support', icon: MessageSquare, permission: PERMS.bookings.view },
|
||||
// { name: 'Support Center', href: '/support', icon: MessageSquare, permission: PERMS.bookings.view },
|
||||
{ name: 'Notifications', href: '/notifications', icon: Bell, permission: PERMS.notifications.send },
|
||||
]
|
||||
},
|
||||
// {
|
||||
// title: 'Customer Services',
|
||||
// items: [
|
||||
// { name: 'Loyalty Program', href: '/loyalty', icon: Gift },
|
||||
// { name: 'Support Center', href: '/support', icon: MessageSquare },
|
||||
// { name: 'Notifications', href: '/notifications', icon: Bell },
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: 'Security & Compliance',
|
||||
items: [
|
||||
{ name: 'Audit Logs', href: '/audit', icon: AlertTriangle, permission: PERMS.audit.view },
|
||||
{ name: 'Fraud Detection', href: '/fraud', icon: Shield, permission: PERMS.fraud.view },
|
||||
{ name: 'Verifayda Integration', href: '/verifayda', icon: UserCheck, permission: PERMS.admin },
|
||||
// { name: 'Verifayda Integration', href: '/verifayda', icon: UserCheck, permission: PERMS.admin },
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Analytics & Reports',
|
||||
items: [
|
||||
{ name: 'Reports', href: '/reports', icon: BarChart3, permission: PERMS.reports.view },
|
||||
{ name: 'Operational Reports', href: '/operational-reports', icon: FileText, permission: PERMS.reports.view },
|
||||
// { name: 'Operational Reports', href: '/operational-reports', icon: FileText, permission: PERMS.reports.view },
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'System',
|
||||
items: [
|
||||
{ name: 'Agent Operations', href: '/agents', icon: Briefcase, permission: PERMS.agents.view },
|
||||
{ name: 'User Management', href: '/settings/users', icon: Users, permission: PERMS.admin },
|
||||
{ name: 'Agents', href: '/agents', icon: Briefcase, permission: PERMS.agents.view },
|
||||
{ name: 'Users', href: '/settings/users', icon: Users, permission: PERMS.admin },
|
||||
{ name: 'Settings', href: '/settings', icon: Settings, permission: PERMS.admin },
|
||||
{ name: 'Health', href: '/health', icon: Activity, permission: PERMS.admin },
|
||||
{ name: 'App Releases', href: '/app-releases', icon: Smartphone, permission: PERMS.admin },
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -103,12 +103,32 @@ export default function ConfirmDialog({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{error && (
|
||||
<div className="flex gap-3 rounded-xl bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 px-4 py-3">
|
||||
<AlertCircle className="h-4 w-4 text-red-600 dark:text-red-400 shrink-0 mt-0.5" />
|
||||
<p className="text-xs text-red-800 dark:text-red-300 leading-relaxed">{error}</p>
|
||||
</div>
|
||||
)}
|
||||
{error && (() => {
|
||||
const lines = error.split('\n').map(l => l.trim()).filter(Boolean);
|
||||
const bullets = lines.filter(l => l.startsWith('•'));
|
||||
const intro = lines.find(l => l.startsWith('Cannot') || (!l.startsWith('•') && !l.startsWith('Once') && !l.startsWith('The following')));
|
||||
const outro = lines.find(l => l.startsWith('Once'));
|
||||
return (
|
||||
<div className="rounded-xl bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 px-4 py-3 space-y-2">
|
||||
<div className="flex gap-2 items-start">
|
||||
<AlertCircle className="h-4 w-4 text-red-600 dark:text-red-400 shrink-0 mt-0.5" />
|
||||
<p className="text-xs font-medium text-red-800 dark:text-red-300 leading-relaxed">{intro ?? error}</p>
|
||||
</div>
|
||||
{bullets.length > 0 && (
|
||||
<ul className="list-disc list-inside space-y-1 pl-6">
|
||||
{bullets.map((b, i) => (
|
||||
<li key={i} className="text-xs text-red-800 dark:text-red-300 leading-relaxed">
|
||||
{b.replace(/^•\s*/, '')}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{outro && (
|
||||
<p className="text-xs text-red-700 dark:text-red-400 pl-6">{outro}</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
|
||||
{/* Footer */}
|
||||
|
||||
Reference in New Issue
Block a user