Skip to content

Commit 3a9e101

Browse files
Merge pull request #76 from uwblueprint/INTF25-delete-legacy-models-2
[INTF25] - Delete legacy models
2 parents 74d97b5 + 7ff3ec2 commit 3a9e101

File tree

5 files changed

+0
-240
lines changed

5 files changed

+0
-240
lines changed

backend/typescript/models/application.model.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.

backend/typescript/models/applicationDashboard.model.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.

backend/typescript/models/user.model.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
} from "sequelize-typescript";
1111
import { NonAttribute } from "sequelize";
1212
import { PositionTitle, PositionTitles, Role } from "../types";
13-
import ApplicationDashboardTable from "./applicationDashboard.model";
1413
import Position from "./position.model";
1514
import ReviewedApplicantRecord from "./reviewedApplicantRecord.model";
1615

@@ -38,9 +37,6 @@ export default class User extends Model {
3837
@Column({ type: DataType.ENUM(...Object.values(PositionTitles)) })
3938
position?: PositionTitle;
4039

41-
@HasMany(() => ApplicationDashboardTable)
42-
applicationDashboards?: ApplicationDashboardTable[];
43-
4440
@HasMany(() => ReviewedApplicantRecord, {
4541
foreignKey: "reviewerId",
4642
as: "user",

backend/typescript/server.ts

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import * as admin from "firebase-admin";
55
import { ApolloServer } from "apollo-server-express";
66
import { sequelize } from "./models";
77
import schema from "./graphql";
8-
import Application from "./models/application.model";
98
import memeberData from "./graphql/sampleData/members.json";
109
import firebaseAuthUsers from "./graphql/sampleData/users.json";
1110

@@ -112,52 +111,6 @@ app.get("/authUsers", async (req, res) => {
112111
}
113112
});
114113

115-
app.get("/termApplications", async (req, res) => {
116-
ref
117-
.orderByChild("term")
118-
.equalTo("Fall 2023") // Fetch all applications for <term> (e.g. Fall 2023)
119-
// eslint-disable-next-line func-names
120-
.once("value", function (snapshot) {
121-
const applications: Application[] = [];
122-
snapshot.forEach((childSnapshot) => {
123-
applications.push(childSnapshot.val());
124-
});
125-
res.status(200).json(applications);
126-
});
127-
});
128-
129-
app.get("/applications", async (req, res) => {
130-
try {
131-
const snapshot = await ref.once("value");
132-
const applications: Application[] = [];
133-
snapshot.forEach((childSnapshot) => {
134-
applications.push(childSnapshot.val());
135-
});
136-
res.status(200).json(applications);
137-
} catch (error) {
138-
res
139-
.status(500)
140-
.send("An error occurred while retrieving the applications.");
141-
}
142-
});
143-
144-
app.get("/applications/:id", async (req, res) => {
145-
try {
146-
const { id } = req.params;
147-
const snapshot = await ref.child(id).once("value");
148-
const application = snapshot.val();
149-
if (application) {
150-
res.status(200).json(application);
151-
} else {
152-
res.status(404).send("Student application not found.");
153-
}
154-
} catch (error) {
155-
res
156-
.status(500)
157-
.send("An error occurred while retrieving the student application.");
158-
}
159-
});
160-
161114
app.listen({ port: process.env.PORT || 5000 }, () => {
162115
// eslint-disable-next-line no-console
163116
console.info(`Server is listening on port ${process.env.PORT || 5000}!`);

backend/typescript/types.ts

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,6 @@ export type UserDTO = {
3333
role: Role;
3434
};
3535

36-
export type ApplicationDashboardDTO = {
37-
id: number;
38-
reviewerEmail: string;
39-
passionFSG: number;
40-
teamPlayer: number;
41-
desireToLearn: number;
42-
skill: number;
43-
skillCategory: string;
44-
reviewerComments: string;
45-
recommendedSecondChoice: string;
46-
reviewerId: number;
47-
applicationId: number;
48-
};
49-
50-
export type ApplicationDashboardInput = Omit<
51-
ApplicationDashboardDTO,
52-
"applicationId"
53-
>;
54-
5536
// DEPRECATED - TO BE REMOVED AT THE END OF S25
5637
export type ApplicationDTO = {
5738
id: number;
@@ -122,12 +103,6 @@ export type ApplicantRecordExtraInfo = {
122103
adminReview?: string;
123104
};
124105

125-
export type ApplicationDashboardRowDTO = {
126-
application: ApplicationDTO;
127-
reviewDashboards: ApplicationDashboardDTO[];
128-
reviewers: UserDTO[];
129-
};
130-
131106
export type ReviewerDTO = {
132107
firstName: string;
133108
lastName: string;
@@ -167,28 +142,6 @@ export type NodemailerConfig = {
167142

168143
export type SignUpMethod = "PASSWORD" | "GOOGLE";
169144

170-
export enum ApplicantRole {
171-
pres = "president", // community tab
172-
int_dir = "internal director",
173-
ext_dir = "external director",
174-
vpe = "vp engineering", // eng tab
175-
vpd = "vp design", // design tab
176-
vpp = "vp product", // prod tab
177-
vpt = "vp talent", // community tab
178-
vp_ext = "vp external", // community tab
179-
vp_int = "vp internal", // community tab
180-
vp_comms = "vp communications", // community tab
181-
vp_scoping = "vp scoping", // community tab
182-
vp_finance = "vp finance & operations", // community tab
183-
pm = "project manager", // prod tab
184-
pl = "project lead", // eng tab
185-
design_mentor = "design mentor", // design tab
186-
graphic_design = "graphic designer", // design tab
187-
product_design = "product designer", // design tab
188-
uxr = "user researcher", // design tab
189-
dev = "project developer", // eng tab
190-
}
191-
192145
export enum Department {
193146
Engineering = "Engineering",
194147
Design = "Design",

0 commit comments

Comments
 (0)