Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f4a68cb
#3872 Created the guest page sidebar
richard-feng07 Feb 5, 2026
42502bd
Merge branch 'develop' into #3872-RichardFeng-Sidebar
richard-feng07 Feb 5, 2026
234ea7b
#3872 removed hard coded teams
richard-feng07 Feb 5, 2026
c635232
3872 fixed subteams tab
richard-feng07 Feb 8, 2026
9b047c9
#3872 used different hook for subdivisions
richard-feng07 Feb 20, 2026
697fb44
#3873 working frontend
staysgt Feb 11, 2026
58041bf
#3873 finished guest home page + guest user seed data
staysgt Feb 15, 2026
1f34158
#3873 - removed applyInterestImageId and exploreAsGuestImageId
staysgt Feb 15, 2026
c45043f
#3873 fix lint
staysgt Feb 15, 2026
0031382
#3873 renamed platform logo and implemented get/set platform endpoint…
staysgt Feb 23, 2026
48667ad
#3872 fixed homepage
richard-feng07 Feb 23, 2026
7bb8a6e
#3873 edit platform description endpoints + frontend in recruitment a…
staysgt Feb 23, 2026
3d74c61
Merge pull request #3955 from Northeastern-Electric-Racing/#3872-Rich…
chpy04 Feb 24, 2026
65cf82d
#3873 commented out unimplemented pages on the sidebar
staysgt Feb 25, 2026
bedf35d
#3873 lint
staysgt Feb 25, 2026
5a89199
#3873 changes from review
staysgt Mar 2, 2026
bb098b6
#3873 prettier
staysgt Mar 2, 2026
2159a19
Merge remote-tracking branch 'origin/develop' into #3873-guest-home-page
staysgt Mar 5, 2026
d9cac5a
#3873 isOnGuestHomePage boolean added to link types
staysgt Mar 5, 2026
d2b6380
#3873 lint
staysgt Mar 5, 2026
f3a1bd7
#3873 fix seed data
staysgt Mar 5, 2026
434093f
Merge branch 'develop' into #3873-guest-home-page
chpy04 Mar 6, 2026
9404dc1
#3873 separate links, update guest home page image deafult, update pn…
staysgt Mar 7, 2026
fd24120
Merge branch 'develop' into #3873-guest-home-page
chpy04 Mar 11, 2026
15d33a9
#3873 fixed admin tools, fixed featured projects, link types unrequir…
staysgt Mar 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 28 additions & 31 deletions src/backend/src/controllers/organizations.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,6 @@ export default class OrganizationsController {
}
}

static async setImages(req: Request, res: Response, next: NextFunction) {
try {
const { applyInterestImage = [], exploreAsGuestImage = [] } = req.files as {
applyInterestImage?: Express.Multer.File[];
exploreAsGuestImage?: Express.Multer.File[];
};

const applyInterestFile = applyInterestImage[0] || null;
const exploreAsGuestFile = exploreAsGuestImage[0] || null;

const newImages = await OrganizationsService.setImages(
applyInterestFile,
exploreAsGuestFile,
req.currentUser,
req.organization
);

res.status(200).json(newImages);
} catch (error: unknown) {
next(error);
}
}
static async getAllUsefulLinks(req: Request, res: Response, next: NextFunction) {
try {
const links = await OrganizationsService.getAllUsefulLinks(req.organization.organizationId);
Expand Down Expand Up @@ -97,15 +75,6 @@ export default class OrganizationsController {
}
}

static async getOrganizationImages(req: Request, res: Response, next: NextFunction) {
try {
const images = await OrganizationsService.getOrganizationImages(req.organization.organizationId);
res.status(200).json(images);
} catch (error: unknown) {
next(error);
}
}

static async setOrganizationFeaturedProjects(req: Request, res: Response, next: NextFunction) {
try {
const { projectIds } = req.body;
Expand Down Expand Up @@ -142,6 +111,20 @@ export default class OrganizationsController {
}
}

static async setPlatformLogoImage(req: Request, res: Response, next: NextFunction) {
try {
if (!req.file) {
throw new HttpException(400, 'Invalid or undefined image data');
}

const updatedOrg = await OrganizationsService.setPlatformLogoImage(req.file, req.currentUser, req.organization);

res.status(200).json(updatedOrg);
} catch (error: unknown) {
next(error);
}
}

static async setNewMemberImage(req: Request, res: Response, next: NextFunction) {
try {
if (!req.file) {
Expand Down Expand Up @@ -181,6 +164,20 @@ export default class OrganizationsController {
}
}

static async setPlatformDescription(req: Request, res: Response, next: NextFunction) {
try {
const updatedOrg = await OrganizationsService.setPlatformDescription(
req.body.platformDescription,
req.currentUser,
req.organization
);

res.status(200).json(updatedOrg);
} catch (error: unknown) {
next(error);
}
}

static async getOrganizationFeaturedProjects(req: Request, res: Response, next: NextFunction) {
try {
const featuredProjects = await OrganizationsService.getOrganizationFeaturedProjects(req.organization.organizationId);
Expand Down
14 changes: 11 additions & 3 deletions src/backend/src/controllers/projects.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,16 @@ export default class ProjectsController {

static async createLinkType(req: Request, res: Response, next: NextFunction) {
try {
const { name, iconName, required } = req.body;
const { name, iconName, required, isOnGuestHomePage } = req.body;

const newLinkType = await ProjectsService.createLinkType(req.currentUser, name, iconName, required, req.organization);
const newLinkType = await ProjectsService.createLinkType(
req.currentUser,
name,
iconName,
required,
req.organization,
isOnGuestHomePage
);
res.status(200).json(newLinkType);
} catch (error: unknown) {
next(error);
Expand Down Expand Up @@ -453,13 +460,14 @@ export default class ProjectsController {
static async editLinkType(req: Request, res: Response, next: NextFunction) {
try {
const { linkTypeName } = req.params as Record<string, string>;
const { name: newName, iconName, required } = req.body;
const { name: newName, iconName, required, isOnGuestHomePage } = req.body;
const linkTypeUpdated = await ProjectsService.editLinkType(
linkTypeName,
iconName,
required,
req.currentUser,
req.organization,
isOnGuestHomePage,
newName
);
res.status(200).json(linkTypeUpdated);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Warnings:

- You are about to drop the column `applyInterestImageId` on the `Organization` table. All the data in the column will be lost.
- You are about to drop the column `exploreAsGuestImageId` on the `Organization` table. All the data in the column will be lost.

*/
-- DropForeignKey
ALTER TABLE "Sponsor" DROP CONSTRAINT "Sponsor_sponsorTierId_fkey";

-- AlterTable
ALTER TABLE "Link_Type" ADD COLUMN "isOnGuestHomePage" BOOLEAN NOT NULL DEFAULT false;

-- AlterTable
ALTER TABLE "Organization" DROP COLUMN "applyInterestImageId",
DROP COLUMN "exploreAsGuestImageId",
ADD COLUMN "platformDescription" TEXT NOT NULL DEFAULT '',
ADD COLUMN "platformLogoImageId" TEXT;

-- AlterTable
ALTER TABLE "Sponsor" ALTER COLUMN "valueTypes" DROP DEFAULT;

-- AddForeignKey
ALTER TABLE "Sponsor" ADD CONSTRAINT "Sponsor_sponsorTierId_fkey" FOREIGN KEY ("sponsorTierId") REFERENCES "Sponsor_Tier"("sponsorTierId") ON DELETE SET NULL ON UPDATE CASCADE;
25 changes: 13 additions & 12 deletions src/backend/src/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -583,16 +583,17 @@ model Work_Package {
}

model Link_Type {
id String @id @default(uuid())
name String
dateCreated DateTime @default(now())
iconName String
required Boolean
creatorId String
creator User @relation(name: "linkTypeCreator", fields: [creatorId], references: [userId])
links Link[] @relation(name: "linkTypes")
organizationId String
organization Organization @relation(fields: [organizationId], references: [organizationId])
id String @id @default(uuid())
name String
dateCreated DateTime @default(now())
iconName String
required Boolean
creatorId String
creator User @relation(name: "linkTypeCreator", fields: [creatorId], references: [userId])
links Link[] @relation(name: "linkTypes")
organizationId String
organization Organization @relation(fields: [organizationId], references: [organizationId])
isOnGuestHomePage Boolean @default(false)

@@unique([name, organizationId], name: "uniqueLinkType")
@@index([organizationId])
Expand Down Expand Up @@ -1379,8 +1380,6 @@ model Organization {
advisor User? @relation(name: "advisor", fields: [advisorId], references: [userId])
advisorId String?
description String @default("")
applyInterestImageId String?
exploreAsGuestImageId String?
newMemberImageId String?
logoImageId String?
slackWorkspaceId String?
Expand All @@ -1389,6 +1388,8 @@ model Organization {
partReviewSampleImageId String?
partReviewGuideLink String?
sponsorshipNotificationsSlackChannelId String?
platformDescription String @default("")
platformLogoImageId String?

// Relation references
wbsElements WBS_Element[]
Expand Down
15 changes: 15 additions & 0 deletions src/backend/src/prisma/seed-data/users.seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ const joeBlow: Prisma.UserCreateInput = {
}
};

const guestUser: Prisma.UserCreateInput = {
firstName: 'Guest',
lastName: 'User',
googleAuthId: 'guest-google-id',
email: 'guest@husky.neu.edu',
emailId: 'guest',
userSettings: {
create: {
defaultTheme: Theme.DARK,
slackId: SLACK_ID ? SLACK_ID : 'guest'
}
}
};

const wonderwoman: Prisma.UserCreateInput = {
firstName: 'Diana',
lastName: 'Prince',
Expand Down Expand Up @@ -994,6 +1008,7 @@ export const dbSeedAllUsers = {
thomasEmrax,
joeShmoe,
joeBlow,
guestUser,
wonderwoman,
flash,
aquaman,
Expand Down
37 changes: 20 additions & 17 deletions src/backend/src/prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ const performSeed: () => Promise<void> = async () => {
userCreatedId: thomasEmrax.userId,
description:
'Northeastern Electric Racing is a student-run organization at Northeastern University building all-electric formula-style race cars from scratch to compete in Forumla Hybrid + Electric Formula SAE (FSAE).',
applyInterestImageId: '1_iak6ord4JP9TcR1sOYopyEs6EjTKQpw',
exploreAsGuestImageId: '1wRes7V_bMm9W7_3JCIDXYkMUiy6B3wRI',
applicationLink:
'https://docs.google.com/forms/d/e/1FAIpQLSeCvG7GqmZm_gmSZiahbVTW9ZFpEWG0YfGQbkSB_whhHzxXpA/closedform'
'https://docs.google.com/forms/d/e/1FAIpQLSeCvG7GqmZm_gmSZiahbVTW9ZFpEWG0YfGQbkSB_whhHzxXpA/closedform',
platformDescription:
'Finishline is a Project Management Dashboard developed by the Software Team at Northeastern Electric Racing.',
platformLogoImageId: '1auQO3GYydZOo1-vCn0D2iyCfaxaVFssx'
}
});

Expand Down Expand Up @@ -264,6 +265,7 @@ const performSeed: () => Promise<void> = async () => {
const regina = await createUser(dbSeedAllUsers.regina, RoleEnum.MEMBER, organizationId);
const patrick = await createUser(dbSeedAllUsers.patrick, RoleEnum.MEMBER, organizationId);
const spongebob = await createUser(dbSeedAllUsers.spongebob, RoleEnum.MEMBER, organizationId);
await createUser(dbSeedAllUsers.guestUser, RoleEnum.GUEST, organizationId);

await UsersService.updateUserRole(cyborg.userId, thomasEmrax, 'APP_ADMIN', ner);

Expand Down Expand Up @@ -367,21 +369,15 @@ const performSeed: () => Promise<void> = async () => {
const mechanical = await TeamsService.createTeamType(
batman,
'Mechanical',
'YouTubeIcon',
'Construction',
'This is the mechanical team',
ner
);
const software = await TeamsService.createTeamType(
thomasEmrax,
'Software',
'InstagramIcon',
'This is the software team',
ner
);
const software = await TeamsService.createTeamType(thomasEmrax, 'Software', 'Code', 'This is the software team', ner);
const electrical = await TeamsService.createTeamType(
cyborg,
'Electrical',
'SettingsIcon',
'ElectricBolt',
'This is the electrical team',
ner
);
Expand Down Expand Up @@ -551,15 +547,22 @@ const performSeed: () => Promise<void> = async () => {
);

/** Link Types */
const confluenceLinkType = await ProjectsService.createLinkType(batman, 'Confluence', 'description', true, ner);
const confluenceLinkType = await ProjectsService.createLinkType(batman, 'Confluence', 'description', true, ner, false);

const bomLinkType = await ProjectsService.createLinkType(batman, 'Bill of Materials', 'bar_chart', true, ner);
const bomLinkType = await ProjectsService.createLinkType(batman, 'Bill of Materials', 'bar_chart', true, ner, false);

const mainWebsiteLinkType = await ProjectsService.createLinkType(batman, 'NER Website', 'bar_chart', true, ner);
const mainWebsiteLinkType = await ProjectsService.createLinkType(batman, 'NER Website', 'bar_chart', true, ner, false);

const instagramWebsiteLinkType = await ProjectsService.createLinkType(batman, 'NER Instagram', 'bar_chart', true, ner);
const instagramWebsiteLinkType = await ProjectsService.createLinkType(
batman,
'NER Instagram',
'bar_chart',
true,
ner,
false
);

await ProjectsService.createLinkType(batman, 'Google Drive', 'folder', true, ner);
await ProjectsService.createLinkType(batman, 'Google Drive', 'folder', true, ner, false);

/**
* Projects
Expand Down
21 changes: 13 additions & 8 deletions src/backend/src/routes/organizations.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ const upload = multer({ limits: { fileSize: MAX_FILE_SIZE }, storage: memoryStor
organizationRouter.get('/current', OrganizationsController.getCurrentOrganization);
organizationRouter.post('/useful-links/set', ...linkValidators, validateInputs, OrganizationsController.setUsefulLinks);
organizationRouter.get('/useful-links', OrganizationsController.getAllUsefulLinks);
organizationRouter.post(
'/images/update',
upload.fields([
{ name: 'applyInterestImage', maxCount: 1 },
{ name: 'exploreAsGuestImage', maxCount: 1 }
]),
OrganizationsController.setImages
);

organizationRouter.post(
'/application-link/update',
Expand Down Expand Up @@ -51,6 +43,13 @@ organizationRouter.post(
);
organizationRouter.post('/logo/update', upload.single('logo'), OrganizationsController.setLogoImage);
organizationRouter.get('/logo', OrganizationsController.getOrganizationLogoImage);

organizationRouter.post(
'/platform-logo/update',
upload.single('platformLogo'),
OrganizationsController.setPlatformLogoImage
);

organizationRouter.post(
'/new-member-image/update',
upload.single('newMemberImage'),
Expand All @@ -63,6 +62,12 @@ organizationRouter.post(
validateInputs,
OrganizationsController.setOrganizationDescription
);
organizationRouter.post(
'/platform-description/set',
nonEmptyString(body('platformDescription')),
validateInputs,
OrganizationsController.setPlatformDescription
);
organizationRouter.get('/featured-projects', OrganizationsController.getOrganizationFeaturedProjects);
organizationRouter.post(
'/workspaceId/set',
Expand Down
Loading
Loading