In progress changes for Kanban Board and updated schema migrations. Performed some cleanup.
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import React from "react";
|
||||
import { useSubscription } from "@apollo/react-hooks";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
|
||||
import { Col } from "antd";
|
||||
import { SUBSCRIPTION_ALL_OPEN_JOBS } from "../../graphql/jobs.queries";
|
||||
|
||||
import JobsList from "../../components/jobs-list/jobs-list.component";
|
||||
import Test from "./test";
|
||||
|
||||
export default function JobsPage() {
|
||||
const { loading, error, data } = useSubscription(SUBSCRIPTION_ALL_OPEN_JOBS, {
|
||||
@@ -15,9 +14,8 @@ export default function JobsPage() {
|
||||
if (error) return <AlertComponent message={error.message} />;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Col span={22} offset={1}>
|
||||
<JobsList loading={loading} jobs={data ? data.jobs : null} />
|
||||
<Test />
|
||||
</div>
|
||||
</Col>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import JobsDetailPage from "../jobs-detail/jobs-detail.page";
|
||||
import HeaderContainer from "../../components/header/header.container";
|
||||
import FooterComponent from "../../components/footer/footer.component";
|
||||
|
||||
import { Layout, BackTop, Col } from "antd";
|
||||
import { Layout, BackTop } from "antd";
|
||||
|
||||
const { Header, Content, Footer } = Layout;
|
||||
//This page will handle all routing for the entire application.
|
||||
@@ -20,15 +20,10 @@ export default function Manage({ match }) {
|
||||
</Header>
|
||||
|
||||
<Content>
|
||||
<Col span={22} offset={1}>
|
||||
<Route exact path={`${match.path}`} component={WhiteBoardPage} />
|
||||
<Route exact path={`${match.path}`} component={WhiteBoardPage} />
|
||||
|
||||
<Route exact path={`${match.path}/jobs`} component={JobsPage} />
|
||||
<Route
|
||||
path={`${match.path}/jobs/:jobId`}
|
||||
component={JobsDetailPage}
|
||||
/>
|
||||
</Col>
|
||||
<Route exact path={`${match.path}/jobs`} component={JobsPage} />
|
||||
<Route path={`${match.path}/jobs/:jobId`} component={JobsDetailPage} />
|
||||
</Content>
|
||||
|
||||
<Footer>
|
||||
|
||||
@@ -1,41 +1,10 @@
|
||||
import React from "react";
|
||||
import Board from "react-trello";
|
||||
import WhiteBoardCard from "../../components/white-board-card/white-board-card.component";
|
||||
|
||||
import WhiteBoardLeftSiderContainer from "../../components/white-board-left-sider/white-board-left-sider.container";
|
||||
import WhiteBoardKanBanContainer from "../../components/white-board-kanban/white-board-kanban.container";
|
||||
import { Layout } from "antd";
|
||||
|
||||
export default function WhiteBoardPage({ whiteBoardLeftSiderVisible }) {
|
||||
const data = {
|
||||
lanes: [
|
||||
{
|
||||
id: "lane1",
|
||||
title: "Planned Tasks",
|
||||
label: "2/2",
|
||||
cards: [
|
||||
{
|
||||
id: "Card1",
|
||||
title: "Write Blog",
|
||||
description: "Can AI make memes",
|
||||
label: "30 mins"
|
||||
},
|
||||
{
|
||||
id: "Card2",
|
||||
title: "Pay Rent",
|
||||
description: "Transfer via NEFT",
|
||||
label: "5 mins",
|
||||
metadata: { sha: "be312a1" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "lane2",
|
||||
title: "Completed",
|
||||
label: "0/0",
|
||||
cards: []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const { Sider, Content } = Layout;
|
||||
return (
|
||||
<Layout>
|
||||
@@ -54,17 +23,7 @@ export default function WhiteBoardPage({ whiteBoardLeftSiderVisible }) {
|
||||
</Sider>
|
||||
|
||||
<Content>
|
||||
<Board
|
||||
tagStyle={{ fontSize: "80%" }}
|
||||
data={data}
|
||||
draggable
|
||||
components={{ Card: WhiteBoardCard }}
|
||||
onCardClick={(cardId, metadata) =>
|
||||
alert(
|
||||
`Card with id:${cardId} clicked. Has metadata.id: ${metadata.id}`
|
||||
)
|
||||
}
|
||||
/>
|
||||
<WhiteBoardKanBanContainer />
|
||||
</Content>
|
||||
</Layout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user