49
app/routes/Apps/Projects/Projects.js
Executable file
49
app/routes/Apps/Projects/Projects.js
Executable file
@@ -0,0 +1,49 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
Container,
|
||||
Row,
|
||||
Col
|
||||
} from './../../../components';
|
||||
|
||||
import { HeaderMain } from "../../components/HeaderMain";
|
||||
|
||||
import ProjectsList from './ProjectsList';
|
||||
import ProjectsGrid from './ProjectsGrid';
|
||||
import { ProjectsLeftNav } from "../../components/Projects/ProjectsLeftNav";
|
||||
import { ProjectsSmHeader } from "../../components/Projects/ProjectsSmHeader";
|
||||
|
||||
const Projects = (props) => (
|
||||
<React.Fragment>
|
||||
<Container>
|
||||
<HeaderMain
|
||||
title="Projects"
|
||||
className="mb-5 mt-4"
|
||||
/>
|
||||
<Row>
|
||||
<Col lg={ 3 }>
|
||||
<ProjectsLeftNav />
|
||||
</Col>
|
||||
<Col lg={ 9 }>
|
||||
<ProjectsSmHeader
|
||||
subTitle={props.match.params.type === "list"?"Projects List":"Projects Grid"}
|
||||
linkList="/apps/projects/list"
|
||||
linkGrid="/apps/projects/grid"
|
||||
/>
|
||||
|
||||
{
|
||||
props.match.params.type === "list" ?
|
||||
<ProjectsList /> :
|
||||
<ProjectsGrid />
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
</React.Fragment>
|
||||
);
|
||||
Projects.propTypes = {
|
||||
match: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
export default Projects;
|
23
app/routes/Apps/Projects/ProjectsGrid.js
Executable file
23
app/routes/Apps/Projects/ProjectsGrid.js
Executable file
@@ -0,0 +1,23 @@
|
||||
import React from 'react';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { CardColumns } from './../../../components';
|
||||
import { ProjectsCardGrid } from "../../components/Projects/ProjectsCardGrid";
|
||||
import { Paginations } from "../../components/Paginations";
|
||||
|
||||
const ProjectsGrid = () => (
|
||||
<React.Fragment>
|
||||
<CardColumns>
|
||||
{
|
||||
_.times(12, (index) => (
|
||||
<ProjectsCardGrid key={ index } />
|
||||
))
|
||||
}
|
||||
</CardColumns>
|
||||
<div className="d-flex justify-content-center">
|
||||
<Paginations />
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
export default ProjectsGrid;
|
71
app/routes/Apps/Projects/ProjectsList.js
Executable file
71
app/routes/Apps/Projects/ProjectsList.js
Executable file
@@ -0,0 +1,71 @@
|
||||
import React from 'react';
|
||||
|
||||
import {
|
||||
Pagination,
|
||||
PaginationItem,
|
||||
PaginationLink,
|
||||
Card,
|
||||
CardFooter,
|
||||
Table
|
||||
} from './../../../components';
|
||||
|
||||
import {
|
||||
TrTableProjectsList
|
||||
} from "./components/TrTableProjectsList";
|
||||
|
||||
const ProjectsList = () => (
|
||||
<Card className="mb-3">
|
||||
{ /* START Table */}
|
||||
<div className="table-responsive-xl">
|
||||
<Table className="mb-0" hover>
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="align-middle bt-0">Star</th>
|
||||
<th className="align-middle bt-0">Project</th>
|
||||
<th className="align-middle bt-0">Status</th>
|
||||
<th className="align-middle bt-0">Tasks Completed</th>
|
||||
<th className="align-middle bt-0">People</th>
|
||||
<th className="align-middle bt-0 text-right">
|
||||
Actions
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<TrTableProjectsList />
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
{ /* END Table */}
|
||||
<CardFooter className="d-flex justify-content-center pb-0">
|
||||
<Pagination aria-label="Page navigation example">
|
||||
<PaginationItem>
|
||||
<PaginationLink previous href="#">
|
||||
<i className="fa fa-fw fa-angle-left"></i>
|
||||
</PaginationLink>
|
||||
</PaginationItem>
|
||||
<PaginationItem active>
|
||||
<PaginationLink href="#">
|
||||
1
|
||||
</PaginationLink>
|
||||
</PaginationItem>
|
||||
<PaginationItem>
|
||||
<PaginationLink href="#">
|
||||
2
|
||||
</PaginationLink>
|
||||
</PaginationItem>
|
||||
<PaginationItem>
|
||||
<PaginationLink href="#">
|
||||
3
|
||||
</PaginationLink>
|
||||
</PaginationItem>
|
||||
<PaginationItem>
|
||||
<PaginationLink next href="#">
|
||||
<i className="fa fa-fw fa-angle-right"></i>
|
||||
</PaginationLink>
|
||||
</PaginationItem>
|
||||
</Pagination>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
);
|
||||
|
||||
export default ProjectsList;
|
115
app/routes/Apps/Projects/components/TrTableProjectsList.js
Executable file
115
app/routes/Apps/Projects/components/TrTableProjectsList.js
Executable file
@@ -0,0 +1,115 @@
|
||||
import React from 'react';
|
||||
import faker from 'faker/locale/en_US';
|
||||
import _ from 'lodash';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import {
|
||||
Badge,
|
||||
Progress,
|
||||
Avatar,
|
||||
UncontrolledButtonDropdown,
|
||||
DropdownToggle,
|
||||
DropdownMenu,
|
||||
DropdownItem
|
||||
} from './../../../../components';
|
||||
import { randomAvatar } from './../../../../utilities';
|
||||
|
||||
/*eslint-disable */
|
||||
const status = [
|
||||
<Badge pill color="success">
|
||||
Active
|
||||
</Badge>,
|
||||
<Badge pill color="danger">
|
||||
Suspended
|
||||
</Badge>,
|
||||
<Badge pill color="warning">
|
||||
Waiting
|
||||
</Badge>,
|
||||
<Badge pill color="secondary">
|
||||
Paused
|
||||
</Badge>
|
||||
];
|
||||
/*eslint-enable */
|
||||
/*eslint-disable */
|
||||
const tasksCompleted = [
|
||||
"25",
|
||||
"50",
|
||||
"70",
|
||||
"90"
|
||||
];
|
||||
/*eslint-enable */
|
||||
|
||||
const TrTableProjectsList = () => (
|
||||
<React.Fragment>
|
||||
{
|
||||
_.times(12, (index) => (
|
||||
<tr key={ index }>
|
||||
<td className="align-middle">
|
||||
<div className="text-inverse">
|
||||
<a href="#">
|
||||
<i className="fa fa-fw fa-lg fa-star-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td className="align-middle">
|
||||
<div>
|
||||
<Link to="/apps/tasks/list" className="text-decoration-none">
|
||||
{ faker.company.catchPhrase() }
|
||||
</Link>
|
||||
</div>
|
||||
<span>
|
||||
Last Edited by: { faker.name.firstName() } { faker.name.lastName() } <br />
|
||||
{ faker.date.weekday() }, 12 { faker.date.month() }, 2018
|
||||
</span>
|
||||
</td>
|
||||
<td className="align-middle">
|
||||
{ status[index%4] }
|
||||
</td>
|
||||
<td className="align-middle">
|
||||
<Progress value={ tasksCompleted[index%4] } style={{height: "5px"}} className="mb-2" />
|
||||
<div>
|
||||
Tasks Completed:
|
||||
<span className="text-inverse">
|
||||
36/94
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="align-middle">
|
||||
<Avatar.Image
|
||||
size="md"
|
||||
src={ randomAvatar() }
|
||||
/>
|
||||
</td>
|
||||
<td className="align-middle text-right">
|
||||
<UncontrolledButtonDropdown>
|
||||
<DropdownToggle color="link" outline>
|
||||
<i className="fa fa-gear" /><i className="fa fa-angle-down ml-2" />
|
||||
</DropdownToggle>
|
||||
<DropdownMenu right>
|
||||
<DropdownItem>
|
||||
<i className="fa fa-fw fa-folder-open mr-2"></i>
|
||||
View
|
||||
</DropdownItem>
|
||||
<DropdownItem>
|
||||
<i className="fa fa-fw fa-ticket mr-2"></i>
|
||||
Add Task
|
||||
</DropdownItem>
|
||||
<DropdownItem>
|
||||
<i className="fa fa-fw fa-paperclip mr-2"></i>
|
||||
Add Files
|
||||
</DropdownItem>
|
||||
<DropdownItem divider />
|
||||
<DropdownItem>
|
||||
<i className="fa fa-fw fa-trash mr-2"></i>
|
||||
Delete
|
||||
</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</UncontrolledButtonDropdown>
|
||||
</td>
|
||||
</tr>
|
||||
))
|
||||
}
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
export { TrTableProjectsList };
|
3
app/routes/Apps/Projects/index.js
Executable file
3
app/routes/Apps/Projects/index.js
Executable file
@@ -0,0 +1,3 @@
|
||||
import Projects from './Projects';
|
||||
|
||||
export default Projects;
|
Reference in New Issue
Block a user