Add e-payment UI, checkout payment result, and legacy migrate domain lookup.
Wire Mellat settings in business dashboard, customer bank return page with payment details, and super-admin migrate modal domain confirmation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
a11f9643bb
commit
cc94b929e0
@@ -9,6 +9,7 @@ import {
|
||||
FileText,
|
||||
Briefcase,
|
||||
Globe,
|
||||
Layers,
|
||||
HelpCircle,
|
||||
LogOut,
|
||||
ChevronDown,
|
||||
@@ -31,6 +32,7 @@ import { getBusinessProfile } from '../services/businessProfileService'
|
||||
import { useTenantBranding } from '../context/TenantBrandingContext'
|
||||
import {
|
||||
hasBusinessModule,
|
||||
hasAnyBusinessModule,
|
||||
type BusinessModuleId,
|
||||
} from '../utils/businessModules'
|
||||
import { Tooltip } from './Tooltip'
|
||||
@@ -66,6 +68,11 @@ function isGroupActive(group: NavGroup, pathname: string) {
|
||||
if (pathname === group.basePath || pathname.startsWith(`${group.basePath}/`)) {
|
||||
return true
|
||||
}
|
||||
if (group.id === 'content') {
|
||||
if (pathname.startsWith('/blog') || pathname.startsWith('/videos') || pathname.startsWith('/instructions')) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return group.children.some(
|
||||
(child) => pathname === child.to || pathname.startsWith(`${child.to}/`),
|
||||
)
|
||||
@@ -159,17 +166,20 @@ export function Sidebar() {
|
||||
},
|
||||
{
|
||||
type: 'group',
|
||||
id: 'blog',
|
||||
icon: FileText,
|
||||
labelKey: 'nav.blog',
|
||||
basePath: '/blog',
|
||||
moduleId: 'blog',
|
||||
id: 'content',
|
||||
icon: Layers,
|
||||
labelKey: 'nav.content',
|
||||
basePath: '/content',
|
||||
children: [
|
||||
{ labelKey: 'nav.blog.overview', to: '/blog' },
|
||||
{ labelKey: 'nav.blog.list', to: '/blog/list' },
|
||||
{ labelKey: 'nav.blog.new', to: '/blog/new' },
|
||||
{ labelKey: 'nav.blog.categories', to: '/blog/categories' },
|
||||
{ labelKey: 'nav.blog.settings', to: '/blog/settings' },
|
||||
...(hasBusinessModule(enabledModules, 'blog')
|
||||
? [{ labelKey: 'nav.content.blog' as BusinessMessageKey, to: '/blog' }]
|
||||
: []),
|
||||
...(hasBusinessModule(enabledModules, 'videos')
|
||||
? [{ labelKey: 'nav.content.videos' as BusinessMessageKey, to: '/videos' }]
|
||||
: []),
|
||||
...(hasBusinessModule(enabledModules, 'instructions')
|
||||
? [{ labelKey: 'nav.content.instructions' as BusinessMessageKey, to: '/instructions' }]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -209,9 +219,12 @@ export function Sidebar() {
|
||||
{ type: 'link', id: 'settings', icon: Settings, labelKey: 'nav.settings', to: '/settings' },
|
||||
]
|
||||
|
||||
return items.filter(
|
||||
(item) => !item.moduleId || hasBusinessModule(enabledModules, item.moduleId),
|
||||
)
|
||||
return items.filter((item) => {
|
||||
if (item.type === 'group' && item.id === 'content') {
|
||||
return hasAnyBusinessModule(enabledModules, ['blog', 'videos', 'instructions'])
|
||||
}
|
||||
return !item.moduleId || hasBusinessModule(enabledModules, item.moduleId)
|
||||
})
|
||||
}, [enabledModules])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user