Add business workshop management UI with Jalali scheduling and shared dashboard polish.
Includes workshop list/edit/details, registrations modal, category tree, shared EmptyState/RichTextEditor/toasts, and fixes for the Jalali date picker and thumbnail field layout. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
89269dff04
commit
d5aca8bea7
@@ -0,0 +1,75 @@
|
||||
import { Presentation, PlusCircle, FolderTree } from 'lucide-react'
|
||||
import { SectionCard } from '../components/SectionCard'
|
||||
import { Breadcrumbs } from '../components/Breadcrumbs'
|
||||
import { PageTitle } from '../components/PageTitle'
|
||||
import { useT } from '../i18n/useT'
|
||||
import type { BusinessMessageKey } from '../i18n/messages'
|
||||
import styles from '../components/PageContent.module.css'
|
||||
|
||||
const workshopSections: {
|
||||
icon: typeof Presentation
|
||||
titleKey: BusinessMessageKey
|
||||
descKey: BusinessMessageKey
|
||||
linkKey: BusinessMessageKey
|
||||
href: string
|
||||
wide?: boolean
|
||||
}[] = [
|
||||
{
|
||||
icon: Presentation,
|
||||
titleKey: 'nav.workshops.list',
|
||||
descKey: 'workshop.card.list.desc',
|
||||
linkKey: 'workshop.card.list.link',
|
||||
href: '/workshops/list',
|
||||
wide: true,
|
||||
},
|
||||
{
|
||||
icon: PlusCircle,
|
||||
titleKey: 'nav.workshops.new',
|
||||
descKey: 'workshop.card.new.desc',
|
||||
linkKey: 'workshop.card.new.link',
|
||||
href: '/workshops/new',
|
||||
},
|
||||
{
|
||||
icon: FolderTree,
|
||||
titleKey: 'workshop.card.categories.title',
|
||||
descKey: 'workshop.card.categories.desc',
|
||||
linkKey: 'workshop.card.categories.link',
|
||||
href: '/workshops/categories',
|
||||
},
|
||||
]
|
||||
|
||||
export function WorkshopPage() {
|
||||
const t = useT()
|
||||
|
||||
return (
|
||||
<main className={styles.content}>
|
||||
<Breadcrumbs
|
||||
items={[
|
||||
{ label: 'Dashboard', href: '/' },
|
||||
{ label: 'Content', href: '/content' },
|
||||
{ label: 'Workshops' },
|
||||
]}
|
||||
/>
|
||||
<div className={styles.pageHeader}>
|
||||
<div>
|
||||
<PageTitle en="WORKSHOPS">{t('title.workshops')}</PageTitle>
|
||||
<p className={styles.pageSubtitle}>{t('workshop.page.subtitle')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={styles.gridHome}>
|
||||
{workshopSections.map((section) => (
|
||||
<SectionCard
|
||||
key={section.href}
|
||||
icon={section.icon}
|
||||
title={t(section.titleKey)}
|
||||
description={t(section.descKey)}
|
||||
linkText={t(section.linkKey)}
|
||||
href={section.href}
|
||||
className={section.wide ? styles.span4 : undefined}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user