old people time, filter pending

This commit is contained in:
Alexander Wong
2018-04-23 14:58:14 -06:00
parent 47e5291317
commit 9a5489425e
4 changed files with 17 additions and 14 deletions
+6 -4
View File
@@ -119,8 +119,10 @@ const ClientShiftsView = ({
const approvedOptions = [
{ text: "Approved", value: true },
{ text: "Rejected", value: false },
{ text: "Pending", value: "" },
{ text: "All", value: null }
];
const OLD_PEOPLE_TIME_FORMAT = "dddd, MMMM Do YYYY, h:mm a ";
return (
<Container>
<Header>Shifts</Header>
@@ -140,7 +142,7 @@ const ClientShiftsView = ({
{"Filter by Approval: "}
<Dropdown
inline
placeholder="All"
placeholder={approvalFilter === null ? `All` : `Pending`}
options={approvedOptions}
onChange={handleChangeApprovalFilter}
value={approvalFilter}
@@ -207,7 +209,7 @@ const ClientShiftsView = ({
{"At " +
utc(result.set_start, ISO_8601)
.local(false)
.format("dddd, MMMM Do YYYY, h:mm a Z")}
.format(OLD_PEOPLE_TIME_FORMAT)}
</Item.Meta>
<Item.Meta>{displayDuration}</Item.Meta>
<Item.Meta>{`Rate $${price.amount}/hour`}</Item.Meta>
@@ -265,14 +267,14 @@ const ClientShiftsView = ({
{"Checked in at " +
checkedIn
.local(false)
.format("dddd, MMMM Do YYYY, h:mm a Z")}
.format(OLD_PEOPLE_TIME_FORMAT)}
</List.Item>
{checkedOut && (
<List.Item>
{"Checked out at " +
checkedOut
.local(false)
.format("dddd, MMMM Do YYYY, h:mm a Z")}
.format(OLD_PEOPLE_TIME_FORMAT)}
</List.Item>
)}
</List>