fix(dashboard): scope owner and service views by resolved shop

This commit is contained in:
zetaloop
2026-02-22 17:14:52 +08:00
parent 1f2dc1434b
commit 1dfcd3927d
11 changed files with 269 additions and 70 deletions
+6
View File
@@ -0,0 +1,6 @@
import type { Shop } from "@/lib/types"
export function resolveOwnerShop(userId: string | undefined, shops: Shop[]): Shop | null {
if (!userId) return null
return shops.find((shop) => shop.owner.id === userId) ?? null
}