working edit cshift functionality
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user