working edit cshift functionality

This commit is contained in:
Alexander Wong
2018-04-22 21:07:50 -06:00
parent 0950f264e8
commit 4f548d529f
13 changed files with 543 additions and 160 deletions
+17 -2
View File
@@ -7,7 +7,8 @@ import {
Header,
Item,
Segment,
Pagination
Pagination,
Loader
} from "semantic-ui-react";
import { getCShiftsRequest } from "../../../actions/cShift/saga.actions";
@@ -91,15 +92,29 @@ const ClientShiftsView = ({
Schedule a Shift
</Button>
</Segment>
{!!isSendingCShiftRequest && <Loader content="Loading" />}
{!isSendingCShiftRequest &&
results.length > 0 && (
<Item.Group>
<Item.Group divided>
{results.map(result => (
<Item key={result.uuid}>
<Item.Content>
<Item.Header content={result.uuid} />
<code>{JSON.stringify(result, null, 2)}</code>
</Item.Content>
<Item.Extra>
<Button
primary
floated="right"
as={Link}
to={`/user/profile/client/edit-shift/${result.uuid}`}
>
Edit
</Button>
<Button color="red" floated="right">
Delete
</Button>
</Item.Extra>
</Item>
))}
</Item.Group>