Add quality gates and baseline tests for web/mobile

This commit is contained in:
zouantchaw
2026-02-12 23:21:25 -05:00
parent bda22f12ef
commit 6502a2f983
17 changed files with 543 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
import { getFirestore, doc, getDoc } from "firebase/firestore";
import { app } from "../features/auth/firebase";
import { getDashboardPath as getDashboardPathFromRole } from "../features/auth/roleUtils";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - generated dataconnect types may not be resolvable in this context
import { getUserById } from "@/dataconnect-generated";
@@ -68,11 +69,5 @@ export const fetchUserData = async (uid: string): Promise<UserData | null> => {
* @returns The appropriate dashboard path
*/
export const getDashboardPath = (userRole: string): string => {
const roleMap: Record<string, string> = {
admin: "/dashboard/admin",
client: "/dashboard/client",
vendor: "/dashboard/vendor",
};
return roleMap[userRole.toLowerCase()] || "/dashboard/client";
return getDashboardPathFromRole(userRole);
};