Skip to content

Commit

Permalink
add roles
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-ng committed Apr 2, 2024
1 parent f9b2b52 commit 0c80b2c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ const SEEDED_DATA = [
email: "johndoe@gmail.com",
auth_id: "bide",
permission: "Reviewers",
role: "Developer",
role: "Project Developer",
},
{
first_name: "Jane",
last_name: "Doe",
email: "janedoe@gmail.ca",
auth_id: "none",
permission: "Reviewers",
role: "Developer",
role: "Project Developer",
},
{
first_name: "UW",
last_name: "Blueprint",
email: "recruitmenttools@uwblueprint.org",
auth_id: "1Z4wyuonu9MhAi4VoAEiTMVj1iT2",
permission: "Reviewers",
role: "Developer",
role: "Project Developer",
},
];
// recruitmenttools@uwblueprint.org
Expand Down Expand Up @@ -64,7 +64,11 @@ export const up: Migration = async ({ context: sequelize }) => {
defaultValue: "Reviewers"
},
role: {
type: DataType.ENUM("Developer", "Designer"),
type: DataType.ENUM(
"Co-President", "Director Lead", "Internal Director", "External Director",
"VP Engineering", "VP Design", "VP Product", "VP Project Scoping", "VP Finance & Operations", "VP Talent",
"Graphic Designer", "Marketing & Outreach Director", "Product Manager", "Project Lead", "Project Developer", "Product Designer"
),
allowNull: false,
},
createdAt: DataType.DATE,
Expand Down
8 changes: 7 additions & 1 deletion backend/typescript/models/user.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ export default class User extends Model {
@Column({ type: DataType.ENUM("VP Talent", "Eteam", "Engineering", "Product", "Design", "Reviewers"), allowNull: false, defaultValue: 'Reviewers' })
permission!: Permission;

@Column({ type: DataType.ENUM("Developer, Designer"), allowNull: false })
@Column({
type: DataType.ENUM(
"Co-President", "Director Lead", "Internal Director", "External Director",
"VP Engineering", "VP Design", "VP Product", "VP Project Scoping", "VP Finance & Operations", "VP Talent",
"Graphic Designer", "Marketing & Outreach Director", "Product Manager", "Project Lead", "Project Developer", "Product Designer"
), allowNull: false
})
role!: Role;

@HasMany(() => ApplicationDashboardTable)
Expand Down
4 changes: 3 additions & 1 deletion backend/typescript/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export type Permission = "VP Talent" | "Eteam" | "Engineering" | "Product" | "Design" | "Reviewers";

export type Role = "Developer" | "Designer";
export type Role = "Co-President" | "Director Lead" | "Internal Director" | "External Director" |
"VP Engineering" | "VP Design" | "VP Product" | "VP Project Scoping" | "VP Finance & Operations" | "VP Talent" |
"Graphic Designer" | "Marketing & Outreach Director" | "Product Manager" | "Project Lead" | "Project Developer" | "Product Designer";

export enum StatusType {
ACCEPTED = "accepted",
Expand Down

0 comments on commit 0c80b2c

Please sign in to comment.