Skip to content

Commit 1e4a7cc

Browse files
committed
#3845 Merge develop into #3845-mouse-placement-bug
2 parents 7dcefe6 + 0fb0b4c commit 1e4a7cc

196 files changed

Lines changed: 17522 additions & 2868 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
*.env
2929
.agent
3030

31+
# Generated Claude skills (source is src/docs-site/docs/)
32+
.claude/skills/
33+
3134
npm-debug.log*
3235
yarn-debug.log*
3336
yarn-error.log*

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
"workspaces": [
77
"src/backend",
88
"src/frontend",
9-
"src/shared"
9+
"src/shared",
10+
"src/docs-site"
1011
],
1112
"scripts": {
1213
"prettier-check": "yarn prettier --check .",
1314
"frontend": "yarn workspace frontend start",
1415
"backend": "yarn workspace backend start",
1516
"backend:dev": "yarn workspace backend dev",
16-
"start": "yarn workspace shared build; concurrently --kill-others-on-fail \"yarn backend:dev\" \"yarn frontend\"",
17+
"start": "yarn workspace shared build; concurrently --kill-others-on-fail --hide 2 \"yarn backend:dev\" \"yarn frontend\" \"yarn docs:dev\"",
1718
"prisma:seed": "cd src/backend; npx prisma db seed",
1819
"prisma:reset:force": "yarn workspace shared build; cd src/backend; npx prisma migrate reset --force",
1920
"prisma:reset": "yarn workspace shared build; cd src/backend; npx prisma migrate reset",
@@ -59,7 +60,11 @@
5960
"docker:i": "cd devContainerization && docker compose -f docker-compose.dev.yml exec -T backend sh -c \"yarn install && cd src/backend && npx prisma generate\" && docker compose -f docker-compose.dev.yml exec -T frontend sh -c \"yarn install\"",
6061
"docker:test": "yarn test:setup && cd devContainerization && docker compose -f docker-compose.dev.yml exec backend bash -c \"yarn test:backend\" && docker compose -f docker-compose.dev.yml exec frontend sh -c \"yarn test:frontend\" && yarn test:teardown",
6162
"docker:rebuild": "docker compose -f devContainerization/docker-compose.dev.yml rm -f -s && yarn docker:start",
62-
"db:pull": "node scripts/db-pull.mjs"
63+
"db:pull": "node scripts/db-pull.mjs",
64+
"docs:dev": "yarn workspace finishline-docs docs:dev",
65+
"docs:build": "yarn workspace finishline-docs docs:build",
66+
"docs:serve": "yarn workspace finishline-docs serve",
67+
"skills:sync": "yarn workspace finishline-docs sync-skills"
6368
},
6469
"resolutions": {
6570
"@types/react": "17.0.1",
@@ -153,6 +158,8 @@
153158
"build",
154159
"coverage",
155160
"docs",
161+
"src/docs-site/.docusaurus",
162+
"src/docs-site/build",
156163
"lambda",
157164
"node_modules",
158165
"public",

src/backend/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import retrospectiveRouter from './src/routes/retrospective.routes.js';
2626
import partsRouter from './src/routes/parts.routes.js';
2727
import financeRouter from './src/routes/finance.routes.js';
2828
import calendarRouter from './src/routes/calendar.routes.js';
29+
import prospectiveSponsorRouter from './src/routes/prospective-sponsor.routes.js';
2930

3031
const app = express();
3132

@@ -110,6 +111,7 @@ app.use('/retrospective', retrospectiveRouter);
110111
app.use('/parts', partsRouter);
111112
app.use('/finance', financeRouter);
112113
app.use('/calendar', calendarRouter);
114+
app.use('/prospective-sponsors', prospectiveSponsorRouter);
113115
app.use('/', (_req, res) => {
114116
res.status(200).json('Welcome to FinishLine');
115117
});

src/backend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"concat-stream": "^2.0.0",
2323
"cookie-parser": "^1.4.5",
2424
"cors": "^2.8.5",
25+
"dayjs": "^1.11.19",
2526
"decimal.js": "^10.4.3",
2627
"dotenv": "^16.0.1",
2728
"express": "^5.0.0",

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/finance.controllers.ts

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,43 @@ export default class FinanceController {
77
const {
88
name,
99
activeStatus,
10+
valueTypes,
1011
sponsorValue,
1112
joinDate,
1213
activeYears,
1314
sponsorTierId,
1415
taxExempt,
15-
sponsorContact,
16+
contactName,
17+
contactEmail,
18+
contactPhone,
19+
contactPosition,
1620
sponsorTasks,
1721
discountCode,
18-
sponsorNotes
22+
sponsorNotes,
23+
stockDescription,
24+
discountDescription
1925
} = req.body;
2026

2127
const sponsor = await FinanceServices.createSponsor(
2228
req.currentUser,
2329
name,
2430
activeStatus,
25-
sponsorValue,
31+
valueTypes,
2632
joinDate,
2733
activeYears,
28-
sponsorTierId,
34+
sponsorTierId || undefined,
2935
taxExempt,
30-
sponsorContact,
36+
contactName,
3137
sponsorTasks,
3238
req.organization,
39+
sponsorValue,
3340
discountCode,
34-
sponsorNotes
41+
sponsorNotes,
42+
contactEmail,
43+
contactPhone,
44+
contactPosition,
45+
stockDescription,
46+
discountDescription
3547
);
3648
res.status(200).json(sponsor);
3749
} catch (error: unknown) {
@@ -73,7 +85,7 @@ export default class FinanceController {
7385
static async editSponsorTask(req: Request, res: Response, next: NextFunction) {
7486
try {
7587
const { sponsorTaskId } = req.params as Record<string, string>;
76-
const { dueDate, notes, notifyDate, assigneeUserId } = req.body;
88+
const { dueDate, notes, notifyDate, assigneeUserId, done } = req.body;
7789

7890
const updatedSponsorTask = await FinanceServices.editSponsorTask(
7991
req.currentUser,
@@ -82,7 +94,8 @@ export default class FinanceController {
8294
dueDate,
8395
notes,
8496
notifyDate,
85-
assigneeUserId
97+
assigneeUserId,
98+
done
8699
);
87100
res.status(200).json(updatedSponsorTask);
88101
} catch (error: unknown) {
@@ -323,15 +336,21 @@ export default class FinanceController {
323336
const {
324337
name,
325338
activeStatus,
339+
valueTypes,
326340
sponsorValue,
327341
joinDate,
328342
activeYears,
329343
sponsorTierId,
330-
sponsorContact,
344+
contactName,
345+
contactEmail,
346+
contactPhone,
347+
contactPosition,
331348
taxExempt,
332349
sponsorTasks,
333350
discountCode,
334-
sponsorNotes
351+
sponsorNotes,
352+
stockDescription,
353+
discountDescription
335354
} = req.body;
336355

337356
const updatedSponsor = await FinanceServices.editSponsor(
@@ -340,15 +359,21 @@ export default class FinanceController {
340359
sponsorId,
341360
name,
342361
activeStatus,
343-
sponsorValue,
362+
valueTypes,
344363
joinDate,
345364
activeYears,
346-
sponsorTierId,
347-
sponsorContact,
365+
sponsorTierId || undefined,
366+
contactName,
348367
taxExempt,
349368
sponsorTasks,
369+
sponsorValue,
350370
discountCode,
351-
sponsorNotes
371+
sponsorNotes,
372+
contactEmail,
373+
contactPhone,
374+
contactPosition,
375+
stockDescription,
376+
discountDescription
352377
);
353378

354379
res.status(200).json(updatedSponsor);
@@ -385,4 +410,14 @@ export default class FinanceController {
385410
next(error);
386411
}
387412
}
413+
414+
static async toggleSponsorTaskDone(req: Request, res: Response, next: NextFunction) {
415+
try {
416+
const { sponsorTaskId } = req.params as Record<string, string>;
417+
const updatedTask = await FinanceServices.toggleSponsorTaskDone(req.currentUser, req.organization, sponsorTaskId);
418+
res.status(200).json(updatedTask);
419+
} catch (error: unknown) {
420+
next(error);
421+
}
422+
}
388423
}

src/backend/src/controllers/projects.controllers.ts

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,17 @@ export default class ProjectsController {
216216
name,
217217
status,
218218
materialTypeName,
219+
linkUrl,
220+
wbsNum,
221+
req.organization,
219222
manufacturerName,
220223
manufacturerPartNumber,
221224
quantity,
222225
price,
223226
subtotal,
224-
linkUrl,
225-
wbsNum,
226-
req.organization,
227227
notes,
228228
assemblyId,
229-
pdmFileName === '' ? undefined : pdmFileName,
229+
pdmFileName,
230230
unitName,
231231
reimbursementRequestId
232232
);
@@ -236,6 +236,22 @@ export default class ProjectsController {
236236
}
237237
}
238238

239+
static async copyMaterialsToProject(req: Request, res: Response, next: NextFunction) {
240+
try {
241+
const { materialIds, destinationWbsNum } = req.body;
242+
243+
const newMaterialIds = await BillOfMaterialsService.copyMaterialsToProject(
244+
req.currentUser,
245+
materialIds,
246+
destinationWbsNum,
247+
req.organization
248+
);
249+
res.status(200).json(newMaterialIds);
250+
} catch (error: unknown) {
251+
next(error);
252+
}
253+
}
254+
239255
static async createManufacturer(req: Request, res: Response, next: NextFunction) {
240256
try {
241257
const { name } = req.body;
@@ -379,17 +395,17 @@ export default class ProjectsController {
379395
name,
380396
status,
381397
materialTypeName,
398+
linkUrl,
399+
req.organization,
382400
manufacturerName,
383401
manufacturerPartNumber,
384402
quantity,
385403
price,
386404
subtotal,
387-
linkUrl,
388-
req.organization,
389405
notes,
390406
unitName,
391407
assemblyId,
392-
pdmFileName === '' ? undefined : pdmFileName,
408+
pdmFileName,
393409
reimbursementRequestId
394410
);
395411
res.status(200).json(updatedMaterial);

0 commit comments

Comments
 (0)