data models created

This commit is contained in:
Arjun Patel
2022-01-14 03:29:52 -08:00
parent 47c55fbc26
commit 46ab74119f
3 changed files with 47 additions and 5 deletions
+21
View File
@@ -0,0 +1,21 @@
import { Timestamp } from "firebase/firestore";
export class Team {
id: string;
name:string;
status: TeamStatus;
allowedUserCount:number;
createdBy: string;
createdDate: Timestamp;
lastUpdatedDate: Timestamp;
}
export enum TeamStatus {
created = "created",
deactivated = "deactivated",
deleted = "deleted"
}
+21
View File
@@ -0,0 +1,21 @@
export class TeamMember {
id: string;
userId: string;
teamId: string;
inviteEmailAddress: string;
invitedByUserId: string;
role: TeamMemberRole
status: TeamMemberStatus
}
export enum TeamMemberRole {
admin = "admin"
}
export enum TeamMemberStatus {
invited = "invited",
activated = "activated",
deleted = "deleted"
}
+5 -5
View File
@@ -55,7 +55,7 @@ function RouteHandler() {
}, [currUser]) }, [currUser])
if (loading || !user) { if (loading || !user) {
return <div>figuring out where you should go</div> return <div></div>
} }
// not in a team yet, and have not created a team yet // not in a team yet, and have not created a team yet
@@ -65,7 +65,7 @@ function RouteHandler() {
<div className="flex flex-row items-center justify-between"> <div className="flex flex-row items-center justify-between">
<span className="flex flex-col justify-start"> <span className="flex flex-col justify-start">
<div className="text-lg">👋Hey, {user.firstName}</div> <div className="text-lg">👋Hey, {user.firstName}</div>
<span className="text-gray-300 text-md">Let&apos;s get you started</span> <span className="text-gray-300 text-md">Let&apos;s get you started.</span>
</span> </span>
<button onClick={() => router.push('/teams/profile')}> <button onClick={() => router.push('/teams/profile')}>
@@ -82,9 +82,9 @@ function RouteHandler() {
<span className="text-gray-300 text-sm text-left">Add members, and get started immediately.</span> <span className="text-gray-300 text-sm text-left">Add members, and get started immediately.</span>
</span> </span>
<button className='ml-auto bg-gray-500 bg-opacity-25 p-2 rounded group-hover:bg-opacity-40 group-hover:bg-teal-500'> <span className='ml-auto bg-gray-500 bg-opacity-25 p-2 rounded group-hover:bg-opacity-40 group-hover:bg-teal-500'>
<FaArrowRight className='text-sm text-white' /> <FaArrowRight className='text-sm text-white' />
</button> </span>
</button> </button>
{/* tell your manager to add your email */} {/* tell your manager to add your email */}
@@ -98,7 +98,7 @@ function RouteHandler() {
</button> </button>
<span className="text-gray-300 ml-auto text-md mt-10">Learn more about <button onClick={() => router.push('/teams/landing')} className="underline font-satisfy text-xl text-teal-500 decoration-teal-500">nirvana</button></span> <span className="text-gray-300 ml-auto text-md mt-10">or learn more about <button onClick={() => router.push('/teams/landing')} className="underline font-satisfy text-xl text-teal-500 decoration-teal-500">nirvana</button></span>
</div> </div>
) )
} }