Skip to content

Commit

Permalink
#2395 merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaryan1203 committed May 18, 2024
2 parents cd62e5a + c12d06e commit ef00b31
Show file tree
Hide file tree
Showing 13 changed files with 1,099 additions and 642 deletions.
371 changes: 371 additions & 0 deletions src/backend/src/prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,96 @@ const performSeed: () => Promise<void> = async () => {
katara.userId
);

/** Project 7 */
const { projectWbsNumber: project7WbsNumber, projectId: project7Id } = await seedProject(
lexLuther,
changeRequest1.crId,
1,
'Laser Cannon Prototype',
'Develop a prototype of a laser cannon for the Justice League',
[justiceLeague.teamId],
zatanna,
500,
['T2.1.1', 'T5.5.2'],
['Increase accuracy by 20% from 80% to 100%'],
['Capable of penetrating reinforced steel'],
['Must be mounted on the roof of the Batmobile'],
[
{
linkId: '-1',
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
linkTypeName: 'Confluence'
},
{
linkId: '-1',
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
linkTypeName: 'Bill of Materials'
}
],
zatanna.userId,
lexLuther.userId
);

/** Project 8 */
const { projectWbsNumber: project8WbsNumber, projectId: project8Id } = await seedProject(
ryanGiggs,
changeRequest1.crId,
1,
'Stadium Renovation',
`Renovate the team's stadium to improve fan experience`,
[ravens.teamId],
mikeMacdonald,
1000000,
['T9.7.3'],
['Install new seating with better sightlines'],
['Upgrade concession stands with more variety'],
['Implement a state-of-the-art sound system'],
[
{
linkId: '-1',
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
linkTypeName: 'Confluence'
},
{
linkId: '-1',
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
linkTypeName: 'Bill of Materials'
}
],
mikeMacdonald.userId,
ryanGiggs.userId
);

/** Project 9 */
const { projectWbsNumber: project9WbsNumber, projectId: project9Id } = await seedProject(
glen,
changeRequest1.crId,
1,
'Community Outreach Program',
'Initiate a community outreach program to engage with local schools',
[slackBotTeam.teamId],
june,
5000,
['T11.2.5', 'T13.8.1'],
['Increase participation by 50% from 100 to 150 students'],
['Expand program to include after-school tutoring'],
['Establish partnerships with local businesses for sponsorship'],
[
{
linkId: '-1',
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
linkTypeName: 'Confluence'
},
{
linkId: '-1',
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
linkTypeName: 'Bill of Materials'
}
],
june.userId,
glen.userId
);

/**
* Change Requests for Creating Work Packages
*/
Expand Down Expand Up @@ -690,6 +780,131 @@ const performSeed: () => Promise<void> = async () => {
// approve the change request
await ChangeRequestsService.reviewChangeRequest(batman, changeRequestProject6Id, 'LGTM', true, proposedSolution6Id);

const changeRequestProject7 = await ChangeRequestsService.createStandardChangeRequest(
cyborg,
project7WbsNumber.carNumber,
project7WbsNumber.projectNumber,
project7WbsNumber.workPackageNumber,
CR_Type.OTHER,
'Initial Change Request',
[
{
type: Scope_CR_Why_Type.INITIALIZATION,
explain: 'need this to initialize work packages'
}
],
[
{
budgetImpact: 0,
description: 'Initializing seed data',
timelineImpact: 0,
scopeImpact: 'no scope impact'
}
],
null,
null
);

const changeRequestProject7Id = changeRequestProject7.crId;

// make a proposed solution for it
const proposedSolution7 = await ChangeRequestsService.addProposedSolution(
cyborg,
changeRequestProject7Id,
0,
'Initializing seed data',
0,
'no scope impact'
);

const proposedSolution7Id = proposedSolution7.id;

// approve the change request
await ChangeRequestsService.reviewChangeRequest(batman, changeRequestProject7Id, 'LGTM', true, proposedSolution7Id);

const changeRequestProject8 = await ChangeRequestsService.createStandardChangeRequest(
cyborg,
project8WbsNumber.carNumber,
project8WbsNumber.projectNumber,
project8WbsNumber.workPackageNumber,
CR_Type.OTHER,
'Initial Change Request',
[
{
type: Scope_CR_Why_Type.INITIALIZATION,
explain: 'need this to initialize work packages'
}
],
[
{
budgetImpact: 0,
description: 'Initializing seed data',
timelineImpact: 0,
scopeImpact: 'no scope impact'
}
],
null,
null
);

const changeRequestProject8Id = changeRequestProject8.crId;

// make a proposed solution for it
const proposedSolution8 = await ChangeRequestsService.addProposedSolution(
cyborg,
changeRequestProject8Id,
0,
'Initializing seed data',
0,
'no scope impact'
);

const proposedSolution8Id = proposedSolution8.id;

// approve the change request
await ChangeRequestsService.reviewChangeRequest(batman, changeRequestProject8Id, 'LGTM', true, proposedSolution8Id);

const changeRequestProject9 = await ChangeRequestsService.createStandardChangeRequest(
cyborg,
project9WbsNumber.carNumber,
project9WbsNumber.projectNumber,
project9WbsNumber.workPackageNumber,
CR_Type.OTHER,
'Initial Change Request',
[
{
type: Scope_CR_Why_Type.INITIALIZATION,
explain: 'need this to initialize work packages'
}
],
[
{
budgetImpact: 0,
description: 'Initializing seed data',
timelineImpact: 0,
scopeImpact: 'no scope impact'
}
],
null,
null
);

const changeRequestProject9Id = changeRequestProject9.crId;

// make a proposed solution for it
const proposedSolution9 = await ChangeRequestsService.addProposedSolution(
cyborg,
changeRequestProject9Id,
0,
'Initializing seed data',
0,
'no scope impact'
);

const proposedSolution9Id = proposedSolution9.id;

// approve the change request
await ChangeRequestsService.reviewChangeRequest(batman, changeRequestProject9Id, 'LGTM', true, proposedSolution9Id);
/**
* Work Packages
*/
Expand Down Expand Up @@ -916,6 +1131,162 @@ const performSeed: () => Promise<void> = async () => {

await ChangeRequestsService.reviewChangeRequest(joeShmoe, workPackage7ActivationCrId, 'LFG', true, null);

/** Work Packages for Project 7 */
/** Work Package 1 */
const { workPackageWbsNumber: project3WP1WbsNumber, workPackage: project3WP1 } = await seedWorkPackage(
lexLuther,
'Design Laser Canon',
changeRequestProject7Id,
WorkPackageStage.Design,
'01/01/2023',
3,
[],
[
'Define the specifications and requirements for the laser cannon prototype',
'Research and evaluate existing laser technologies and components',
'Design the conceptual framework and architecture of the prototype'
],
['Conceptual design and specifications document for the laser cannon prototype'],
zatanna,
WbsElementStatus.Active,
zatanna.userId,
lexLuther.userId
);

const project3WP1ActivationCrId = await ChangeRequestsService.createActivationChangeRequest(
lexLuther,
project3WP1.wbsElement.carNumber,
project3WP1.wbsElement.projectNumber,
project3WP1.wbsElement.workPackageNumber,
CR_Type.ACTIVATION,
project3WP1.project.wbsElement.leadId!,
project3WP1.project.wbsElement.managerId!,
new Date('2024-03-25T04:00:00.000Z'),
true
);

await ChangeRequestsService.reviewChangeRequest(joeShmoe, project3WP1ActivationCrId, 'Approved!', true, null);

/** Work Package 2 */
const { workPackageWbsNumber: project3WP2WbsNumber, workPackage: project3WP2 } = await seedWorkPackage(
lexLuther,
'Laser Canon Research',
changeRequestProject7Id,
WorkPackageStage.Research,
'01/22/2023',
5,
[],
[
'Research and select appropriate materials for the construction of the laser cannon',
'Design and fabricate the structural components of the prototype',
'Test and validate the structural integrity of the prototype'
],
['Prototype design and materials report'],
zatanna,
WbsElementStatus.Active,
zatanna.userId,
lexLuther.userId
);

/** Work Package 3 */
const { workPackageWbsNumber: project3WP3WbsNumber, workPackage: project3WP3 } = await seedWorkPackage(
lexLuther,
'Laser Canon Testing',
changeRequestProject7Id,
WorkPackageStage.Testing,
'02/15/2023',
3,
[],
[
'Construct and integrate the electronic components into the prototype',
'Perform functionality tests and evaluate the performance of the prototype',
'Generate a comprehensive test report and make necessary adjustments'
],
['Prototype integration and testing report'],
zatanna,
WbsElementStatus.Active,
zatanna.userId,
lexLuther.userId
);

/** Work Packages for Project 8 */
/** Work Package 1 */
const { workPackageWbsNumber: project4WP1WbsNumber, workPackage: project4WP1 } = await seedWorkPackage(
ryanGiggs,
'Stadium Research',
changeRequestProject8Id,
WorkPackageStage.Research,
'02/01/2023',
5,
[],
[
'Conduct a site survey and assessment of the current stadium infrastructure',
'Develop a detailed project plan including timelines, resource allocation, and budget estimates',
'Obtain necessary permits and regulatory approvals'
],
['Comprehensive project plan and timeline'],
mikeMacdonald,
WbsElementStatus.Active,
mikeMacdonald.userId,
ryanGiggs.userId
);

const project4WP1ActivationCrId = await ChangeRequestsService.createActivationChangeRequest(
ryanGiggs,
project4WP1.wbsElement.carNumber,
project4WP1.wbsElement.projectNumber,
project4WP1.wbsElement.workPackageNumber,
CR_Type.ACTIVATION,
project4WP1.project.wbsElement.leadId!,
project4WP1.project.wbsElement.managerId!,
new Date('2023-08-21T04:00:00.000Z'),
true
);

await ChangeRequestsService.reviewChangeRequest(joeShmoe, project4WP1ActivationCrId, 'Approved!', true, null);

/** Work Package 2 */
const { workPackageWbsNumber: project4WP2WbsNumber, workPackage: project4WP2 } = await seedWorkPackage(
ryanGiggs,
'Stadium Install',
changeRequestProject8Id,
WorkPackageStage.Install,
'03/01/2023',
8,
[],
[
'Demolish and remove existing seating and infrastructure',
'Construct and install new seating structures according to specifications',
'Install amenities such as restrooms, concession stands, and VIP areas'
],
['Completed construction of stadium infrastructure'],
mikeMacdonald,
WbsElementStatus.Active,
mikeMacdonald.userId,
ryanGiggs.userId
);

/** Work Package 3 */
const { workPackageWbsNumber: project4WP3WbsNumber, workPackage: project4WP3 } = await seedWorkPackage(
ryanGiggs,
'Stadium Testing',
changeRequestProject8Id,
WorkPackageStage.Testing,
'06/01/2023',
3,
[],
[
'Perform thorough testing of all stadium systems including lighting, sound, and safety equipment',
'Simulate crowd scenarios to evaluate traffic flow and security measures',
'Address any deficiencies and make necessary adjustments'
],
['Stadium testing and commissioning report'],
mikeMacdonald,
WbsElementStatus.Active,
mikeMacdonald.userId,
ryanGiggs.userId
);

/**
* Change Requests
*/
Expand Down
Loading

0 comments on commit ef00b31

Please sign in to comment.