Skip to content

Commit 8c8cd48

Browse files
committed
#1189: Changed Work Page Stage Integration to Install on Front and Back end
1 parent 97fb630 commit 8c8cd48

8 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/backend/src/prisma/migrations/20230214001747_add_wp_stage_and_tasks/migration.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CREATE TYPE "Task_Priority" AS ENUM ('LOW', 'MEDIUM', 'HIGH');
55
CREATE TYPE "Task_Status" AS ENUM ('IN_BACKLOG', 'IN_PROGRESS', 'DONE');
66

77
-- CreateEnum
8-
CREATE TYPE "Work_Package_Stage" AS ENUM ('RESEARCH', 'DESIGN', 'MANUFACTURING', 'INTEGRATION');
8+
CREATE TYPE "Work_Package_Stage" AS ENUM ('RESEARCH', 'DESIGN', 'MANUFACTURING', 'INSTALL');
99

1010
-- AlterTable
1111
ALTER TABLE "Work_Package" ADD COLUMN "stage" "Work_Package_Stage";

src/backend/src/prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ enum Work_Package_Stage {
6767
RESEARCH
6868
DESIGN
6969
MANUFACTURING
70-
INTEGRATION
70+
INSTALL
7171
}
7272

7373
model User {

src/backend/src/utils/validation.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const isWorkPackageStageOrNone = (validationObject: ValidationChain): Val
3636
WorkPackageStage.Research,
3737
WorkPackageStage.Design,
3838
WorkPackageStage.Manufacturing,
39-
WorkPackageStage.Integration,
39+
WorkPackageStage.Install,
4040
'NONE'
4141
]);
4242
};

src/frontend/src/tests/pages/ProjectDetailPage/ProjectViewContainer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe('Rendering Project View Container', () => {
7777
[WorkPackageStage.Research]: 'Research',
7878
[WorkPackageStage.Design]: 'Design',
7979
[WorkPackageStage.Manufacturing]: 'Manufacturing',
80-
[WorkPackageStage.Integration]: 'Integration'
80+
[WorkPackageStage.Install]: 'Install'
8181
};
8282

8383
exampleProject1.workPackages.forEach((wp) => {

src/frontend/src/tests/pages/WorkPackageDetailPage/WorkPackageViewContainer/WorkPackageDetails.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
exampleResearchWorkPackage,
1111
exampleDesignWorkPackage,
1212
exampleManufacturingWorkPackage,
13-
exampleIntegrationWorkPackage,
13+
exampleInstallWorkPackage,
1414
exampleWorkPackage5
1515
} from '../../../test-support/test-data/work-packages.stub';
1616
import WorkPackageDetails from '../../../../pages/WorkPackageDetailPage/WorkPackageViewContainer/WorkPackageDetails';
@@ -76,12 +76,12 @@ describe('Work Package Details Component', () => {
7676
expect(chips[0]).toHaveTextContent('Manufacturing');
7777
});
7878

79-
it('renders work package integration stage label', () => {
79+
it('renders work package install stage label', () => {
8080
mockHook(false, false, users);
81-
const { container } = renderComponent(exampleIntegrationWorkPackage);
81+
const { container } = renderComponent(exampleInstallWorkPackage);
8282
const chips = Array.from(container.getElementsByClassName('MuiChip-label'));
8383
expect(chips.length).toBe(2);
84-
expect(chips[0]).toHaveTextContent('Integration');
84+
expect(chips[0]).toHaveTextContent('Install');
8585
});
8686
});
8787

src/frontend/src/tests/test-support/test-data/work-packages.stub.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export const exampleManufacturingWorkPackage: WorkPackage = {
200200
stage: WorkPackageStage.Manufacturing
201201
};
202202

203-
export const exampleIntegrationWorkPackage: WorkPackage = {
203+
export const exampleInstallWorkPackage: WorkPackage = {
204204
id: 4,
205205
wbsNum: exampleWbsWorkPackage4,
206206
dateCreated: new Date('2022-02-20'),
@@ -252,7 +252,7 @@ export const exampleIntegrationWorkPackage: WorkPackage = {
252252
}
253253
],
254254
projectName: 'project3',
255-
stage: WorkPackageStage.Integration
255+
stage: WorkPackageStage.Install
256256
};
257257

258258
export const exampleWorkPackage5: WorkPackage = {

src/frontend/src/utils/enum-pipes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const WorkPackageStageColorPipe: (stage: WorkPackageStage | undefined) =>
1515
return green[600];
1616
case WorkPackageStage.Manufacturing:
1717
return blue[600];
18-
case WorkPackageStage.Integration:
18+
case WorkPackageStage.Install:
1919
return purple[400];
2020
default:
2121
return grey[500];
@@ -31,8 +31,8 @@ export const WorkPackageStageTextPipe: (stage: WorkPackageStage | undefined) =>
3131
return 'Design';
3232
case WorkPackageStage.Manufacturing:
3333
return 'Manufacturing';
34-
case WorkPackageStage.Integration:
35-
return 'Integration';
34+
case WorkPackageStage.Install:
35+
return 'Install';
3636
default:
3737
return 'No Stage';
3838
}

src/shared/src/types/work-package-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ export enum WorkPackageStage {
1414
Research = 'RESEARCH',
1515
Design = 'DESIGN',
1616
Manufacturing = 'MANUFACTURING',
17-
Integration = 'INTEGRATION'
17+
Install = 'INSTALL'
1818
}

0 commit comments

Comments
 (0)