Functionality to add prices as a client, and view them as a provider

This commit is contained in:
Alexander Wong
2018-02-07 15:52:29 -07:00
parent e6ee51f481
commit 631d1f6d39
13 changed files with 875 additions and 4 deletions
@@ -89,6 +89,44 @@ const ProviderClientsView = ({ user, updateEmployer }) => (
: !!employer.approved ? "Approved" : "Ended"}
</Label>
</Card.Content>
{employer.approved && (
<Card.Content extra>
<Card.Description>
<Card.Header as="h3">Assigned Work</Card.Header>
<List>
{employer.prices
.filter(price => !price.deleted)
.map((price, index) => (
<List.Item key={index}>
<List.Header>
<Label
circular
empty
style={{
backgroundColor: price.work_type.color,
borderColor: price.work_type.color
}}
/>
<span>
{" "}
{price.work_type.label || "No Label"}
</span>
</List.Header>
<List.Description>
Hourly Rate: ${price.amount}
</List.Description>
</List.Item>
))}
{employer.prices.filter(price => !price.deleted)
.length === 0 && (
<List.Item>
<List.Header>No Prices for this Client</List.Header>
</List.Item>
)}
</List>
</Card.Description>
</Card.Content>
)}
<Card.Content extra>
<Button.Group>
{!employer.approved && (