Marketing Hub: RBAC, i18n (AR/EN), tasks overhaul, team/user merge, tutorial

Features:
- Full RBAC with 3 roles (superadmin/manager/contributor)
- Ownership tracking on posts, tasks, campaigns, projects
- Task system: assign to anyone, filter combobox, visibility scoping
- Team members merged into users table (single source of truth)
- Post thumbnails on kanban cards from attachments
- Publication link validation before publishing
- Interactive onboarding tutorial with Settings restart
- Full Arabic/English i18n with RTL layout support
- Language toggle in sidebar, IBM Plex Sans Arabic font
- Brand-based visibility filtering for non-superadmins
- Manager can only create contributors
- Profile completion flow for new users
- Cookie-based sessions (express-session + SQLite)
This commit is contained in:
fahed
2026-02-08 20:46:58 +03:00
commit 35d84b6bff
2240 changed files with 846749 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { PLATFORMS } from '../utils/api'
export default function PlatformIcon({ platform, size = 16, showLabel = false, className = '' }) {
const p = PLATFORMS[platform]
if (!p) return <span className="text-[10px] text-text-tertiary capitalize">{platform}</span>
return (
<span className={`inline-flex items-center gap-1 ${className}`} title={p.label}>
<svg
width={size}
height={size}
viewBox="0 0 24 24"
fill={p.color}
className="shrink-0"
>
<path d={p.icon} />
</svg>
{showLabel && <span className="text-xs text-text-secondary">{p.label}</span>}
</span>
)
}
export function PlatformIcons({ platforms = [], size = 14, gap = 'gap-1', className = '' }) {
if (!platforms || platforms.length === 0) return null
return (
<span className={`inline-flex items-center ${gap} ${className}`}>
{platforms.map(p => <PlatformIcon key={p} platform={p} size={size} />)}
</span>
)
}