Add business Finance hub with invoices and templates.

Ship invoice issue/list/templates under Finance, fix tenant theme reset and owner role badge, and show customers-joined charts by Persian months.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-11 15:17:03 +03:30
co-authored by Cursor
parent 722933dda9
commit 917b840ee5
44 changed files with 5136 additions and 105 deletions
+10 -6
View File
@@ -46,11 +46,15 @@ export function Header() {
const membership =
user?.businesses.find((b) => String(b.id) === String(activeBusinessId)) ??
user?.businesses[0]
const adminBadgeLabel = isSuperAdmin
const roleBadgeLabel = isSuperAdmin
? t('role.superAdmin')
: membership?.teamRole === 'admin'
? t('role.admin')
: null
: membership?.isOwner
? t('role.owner')
: membership?.teamRole === 'admin'
? t('role.admin')
: membership?.teamRole
? t('role.staff')
: null
useEffect(() => {
if (!menuOpen) return
@@ -116,8 +120,8 @@ export function Header() {
>
<div className={styles.profileInfo}>
<span className={styles.name}>{displayName}</span>
{adminBadgeLabel ? (
<span className={styles.roleBadge}>{adminBadgeLabel}</span>
{roleBadgeLabel ? (
<span className={styles.roleBadge}>{roleBadgeLabel}</span>
) : null}
</div>
<ChevronDown