Skip to content

Commit 30af8a5

Browse files
committed
Merge branch 'develop' into feature/bom-improvement-pt2
2 parents a2e1018 + 4568620 commit 30af8a5

123 files changed

Lines changed: 2551 additions & 1434 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/system-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
- multitenancy
89
- develop
910
- feature/**
1011

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ eb-deploy/
7070

7171
# Claude Code Files
7272
CLAUDE.md
73-
.playwright-mcp/
73+
.playwright-mcp/
74+
docs/

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage - compile TypeScript
2-
FROM node:20 AS builder
2+
FROM node:25 AS builder
33
WORKDIR /app
44

55
COPY package.json tsconfig.build.json ./
@@ -11,11 +11,11 @@ RUN cd src/backend && npx prisma generate
1111
RUN yarn build:shared
1212
RUN yarn build:backend
1313

14-
FROM node:20-slim
14+
FROM platformatic/node-caged:25-slim
1515
WORKDIR /app
1616

1717
# Install OpenSSL for Prisma (slim image needs this)
18-
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
18+
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/* && npm install -g yarn
1919

2020
COPY package.json ./
2121

devContainerization/Dockerfile.backend.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20
1+
FROM node:25
22

33
COPY package.json tsconfig.build.json ./
44
COPY ./src/backend/package.json ./src/backend/tsconfig.json src/backend/

devContainerization/Dockerfile.frontend.dev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine
1+
FROM node:25-alpine
22

33
COPY package.json tsconfig.build.json ./
44
COPY ./src/frontend/package.json ./src/frontend/tsconfig.json src/frontend/
@@ -11,4 +11,4 @@ COPY ./src/frontend src/frontend
1111
COPY ./src/shared src/shared
1212

1313
EXPOSE 3000
14-
CMD [ "yarn", "workspace", "frontend", "vite", "--force", "--host" ]
14+
CMD [ "yarn", "workspace", "frontend", "vite", "--force", "--host" ]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"@babel/preset-typescript": "^7.18.6",
8787
"@types/canvas-confetti": "^1.9.0",
8888
"@types/jest": "^29.5.14",
89-
"@types/node": "20.0.0",
89+
"@types/node": "^25.0.0",
9090
"@typescript-eslint/eslint-plugin": "8.20.0",
9191
"@typescript-eslint/parser": "8.20.0",
9292
"concurrently": "^9.1.0",

src/backend/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# TO BE RUN FROM DOCKER COMPOSE. DO NOT RUN MANUALLY AS CONTEXT IS NOT SET CORRECTLY
2-
FROM node:20
2+
FROM platformatic/node-caged:25-slim
3+
RUN npm install -g yarn
34

45
WORKDIR /base
56

src/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"devDependencies": {
4040
"@types/express-jwt": "^6.0.4",
4141
"@types/jsonwebtoken": "^8.5.9",
42-
"@types/node": "^20.0.0",
42+
"@types/node": "^25.0.0",
4343
"@types/supertest": "^2.0.12",
4444
"nodemon": "^2.0.16",
4545
"supertest": "^6.2.4",

src/backend/src/controllers/change-requests.controllers.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,25 @@ export default class ChangeRequestsController {
140140
}
141141
}
142142

143+
static async createLeadershipChangeRequest(req: Request, res: Response, next: NextFunction) {
144+
try {
145+
const { wbsNum, leadId, managerId } = req.body;
146+
147+
const cr = await ChangeRequestsService.createLeadershipChangeRequest(
148+
req.currentUser,
149+
wbsNum.carNumber,
150+
wbsNum.projectNumber,
151+
wbsNum.workPackageNumber,
152+
leadId,
153+
managerId,
154+
req.organization
155+
);
156+
res.status(200).json(cr);
157+
} catch (error: unknown) {
158+
next(error);
159+
}
160+
}
161+
143162
static async createStandardChangeRequest(req: Request, res: Response, next: NextFunction) {
144163
try {
145164
const { wbsNum, type, what, why, proposedSolutions, projectProposedChanges, workPackageProposedChanges } = req.body;

src/backend/src/controllers/organizations.controllers.ts

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,6 @@ export default class OrganizationsController {
2222
}
2323
}
2424

25-
static async setImages(req: Request, res: Response, next: NextFunction) {
26-
try {
27-
const { applyInterestImage = [], exploreAsGuestImage = [] } = req.files as {
28-
applyInterestImage?: Express.Multer.File[];
29-
exploreAsGuestImage?: Express.Multer.File[];
30-
};
31-
32-
const applyInterestFile = applyInterestImage[0] || null;
33-
const exploreAsGuestFile = exploreAsGuestImage[0] || null;
34-
35-
const newImages = await OrganizationsService.setImages(
36-
applyInterestFile,
37-
exploreAsGuestFile,
38-
req.currentUser,
39-
req.organization
40-
);
41-
42-
res.status(200).json(newImages);
43-
} catch (error: unknown) {
44-
next(error);
45-
}
46-
}
4725
static async getAllUsefulLinks(req: Request, res: Response, next: NextFunction) {
4826
try {
4927
const links = await OrganizationsService.getAllUsefulLinks(req.organization.organizationId);
@@ -97,15 +75,6 @@ export default class OrganizationsController {
9775
}
9876
}
9977

100-
static async getOrganizationImages(req: Request, res: Response, next: NextFunction) {
101-
try {
102-
const images = await OrganizationsService.getOrganizationImages(req.organization.organizationId);
103-
res.status(200).json(images);
104-
} catch (error: unknown) {
105-
next(error);
106-
}
107-
}
108-
10978
static async setOrganizationFeaturedProjects(req: Request, res: Response, next: NextFunction) {
11079
try {
11180
const { projectIds } = req.body;
@@ -142,6 +111,20 @@ export default class OrganizationsController {
142111
}
143112
}
144113

114+
static async setPlatformLogoImage(req: Request, res: Response, next: NextFunction) {
115+
try {
116+
if (!req.file) {
117+
throw new HttpException(400, 'Invalid or undefined image data');
118+
}
119+
120+
const updatedOrg = await OrganizationsService.setPlatformLogoImage(req.file, req.currentUser, req.organization);
121+
122+
res.status(200).json(updatedOrg);
123+
} catch (error: unknown) {
124+
next(error);
125+
}
126+
}
127+
145128
static async setNewMemberImage(req: Request, res: Response, next: NextFunction) {
146129
try {
147130
if (!req.file) {
@@ -181,6 +164,20 @@ export default class OrganizationsController {
181164
}
182165
}
183166

167+
static async setPlatformDescription(req: Request, res: Response, next: NextFunction) {
168+
try {
169+
const updatedOrg = await OrganizationsService.setPlatformDescription(
170+
req.body.platformDescription,
171+
req.currentUser,
172+
req.organization
173+
);
174+
175+
res.status(200).json(updatedOrg);
176+
} catch (error: unknown) {
177+
next(error);
178+
}
179+
}
180+
184181
static async getOrganizationFeaturedProjects(req: Request, res: Response, next: NextFunction) {
185182
try {
186183
const featuredProjects = await OrganizationsService.getOrganizationFeaturedProjects(req.organization.organizationId);

0 commit comments

Comments
 (0)