Skip to content

Commit e80a72d

Browse files
author
Antonio Contreras LEMONCODE
committed
Create data, employee and report components
1 parent 0e2a84a commit e80a72d

7 files changed

Lines changed: 63 additions & 3 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export interface Project {
2+
id: string;
3+
name: string;
4+
externalId?: string;
5+
comments?: string;
6+
isActive: boolean;
7+
emplyees: ProloyeeSummary[];
8+
}
9+
10+
export interface ProloyeeSummary {
11+
id: string;
12+
isAssigned?: boolean;
13+
employeeName: string;
14+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import React from 'react';
2+
3+
export const DataComponent: React.FunctionComponent = () => {
4+
return <h1>Hello Data Component</h1>;
5+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import React from 'react';
2+
3+
export const EmployeeComponent: React.FunctionComponent = () => {
4+
return <h1>Hello Employee Component</h1>;
5+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './data.component';
2+
export * from './employee.component';
3+
export * from './report.component';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import React from 'react';
2+
3+
export const ReportComponent: React.FunctionComponent = () => {
4+
return <h1>Hello Report Component</h1>;
5+
};

src/pods/project/project.component.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import {
55
TabPanelComponent,
66
} from 'common/components';
77
import { AppBar } from '@material-ui/core';
8+
import {
9+
DataComponent,
10+
EmployeeComponent,
11+
ReportComponent,
12+
} from './components';
813

914
export const ProjectComponent: React.FunctionComponent = () => {
1015
const [tab, setTab] = React.useState(0);
@@ -18,13 +23,13 @@ export const ProjectComponent: React.FunctionComponent = () => {
1823
</TabListComponent>
1924
</AppBar>
2025
<TabPanelComponent value={tab} index={0}>
21-
Hello Data component
26+
<DataComponent />
2227
</TabPanelComponent>
2328
<TabPanelComponent value={tab} index={1}>
24-
Hello Employee component
29+
<EmployeeComponent />
2530
</TabPanelComponent>
2631
<TabPanelComponent value={tab} index={2}>
27-
Hello Report component
32+
<ReportComponent />
2833
</TabPanelComponent>
2934
</>
3035
);

src/pods/project/project.vm.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export interface Project {
2+
id: string;
3+
name: string;
4+
externalId?: string;
5+
comments?: string;
6+
isActive: boolean;
7+
emplyees: ProloyeeSummary[];
8+
}
9+
10+
export interface ProloyeeSummary {
11+
id: string;
12+
isAssigned?: boolean;
13+
employeeName: string;
14+
}
15+
16+
export const createEmptyProject = (): Project => ({
17+
id: '',
18+
name: '',
19+
externalId: '',
20+
comments: '',
21+
isActive: false,
22+
emplyees: [],
23+
});

0 commit comments

Comments
 (0)