old people time, filter pending
This commit is contained in:
parent
47e5291317
commit
9a5489425e
|
@ -99,7 +99,7 @@ export const ClientShiftFormView = ({
|
|||
showTimeSelect
|
||||
showTimeSelectOnly
|
||||
timeIntervals={30}
|
||||
dateFormat="LT Z"
|
||||
dateFormat="LT"
|
||||
timeFormat="h:mm a"
|
||||
placeholderText="Select shift start time"
|
||||
/>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -112,6 +112,7 @@ const ProviderShiftFormView = ({
|
|||
handleCheckInPShift,
|
||||
handleCheckOutPShift
|
||||
}) => {
|
||||
const OLD_PEOPLE_TIME_FORMAT = "dddd, MMMM Do YYYY, h:mm a";
|
||||
const employer = getEmployerFromPrice(shift.price, user) || {};
|
||||
const client = employer.client || {};
|
||||
const workType = getWorkTypeFromPrice(shift.price, user) || {};
|
||||
|
@ -157,7 +158,7 @@ const ProviderShiftFormView = ({
|
|||
{"Scheduled at " +
|
||||
utc(shift.set_start, ISO_8601)
|
||||
.local(false)
|
||||
.format("dddd, MMMM Do YYYY, h:mm a Z")}
|
||||
.format(OLD_PEOPLE_TIME_FORMAT)}
|
||||
</List.Item>
|
||||
<List.Item>{displayDuration}</List.Item>
|
||||
<List.Item>{`Rate $${price.amount}/hour`}</List.Item>
|
||||
|
@ -198,13 +199,13 @@ const ProviderShiftFormView = ({
|
|||
{checkedIn && (
|
||||
<List.Item>
|
||||
<strong>Checked In At:</strong>{" "}
|
||||
{checkedIn.local(false).format("dddd, MMMM Do YYYY, h:mm a Z")}
|
||||
{checkedIn.local(false).format(OLD_PEOPLE_TIME_FORMAT)}
|
||||
</List.Item>
|
||||
)}
|
||||
{checkedOut && (
|
||||
<List.Item>
|
||||
<strong>Checked Out At:</strong>{" "}
|
||||
{checkedOut.local(false).format("dddd, MMMM Do YYYY, h:mm a Z")}
|
||||
{checkedOut.local(false).format(OLD_PEOPLE_TIME_FORMAT)}
|
||||
</List.Item>
|
||||
)}
|
||||
</List>
|
||||
|
|
|
@ -119,10 +119,12 @@ const ProviderShiftsView = ({
|
|||
handlePaginationChange,
|
||||
handleChangePShiftApproval
|
||||
}) => {
|
||||
const OLD_PEOPLE_TIME_FORMAT = "dddd, MMMM Do YYYY, h:mm a";
|
||||
const { count = 0, results = [] } = pShiftRequestSuccess;
|
||||
const approvedOptions = [
|
||||
{ text: "Approved", value: true },
|
||||
{ text: "Rejected", value: false },
|
||||
{ text: "Pending", value: "" },
|
||||
{ text: "All", value: null }
|
||||
];
|
||||
return (
|
||||
|
@ -133,7 +135,7 @@ const ProviderShiftsView = ({
|
|||
{"Filter by Approval: "}
|
||||
<Dropdown
|
||||
inline
|
||||
placeholder="All"
|
||||
placeholder={approvalFilter === null ? `All` : `Pending`}
|
||||
options={approvedOptions}
|
||||
onChange={handleChangeApprovalFilter}
|
||||
value={approvalFilter}
|
||||
|
@ -200,7 +202,7 @@ const ProviderShiftsView = ({
|
|||
{"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>
|
||||
|
@ -214,9 +216,7 @@ const ProviderShiftsView = ({
|
|||
{checkedIn && (
|
||||
<Item.Meta>
|
||||
{"Checked in at: " +
|
||||
checkedIn
|
||||
.local(false)
|
||||
.format("dddd, MMMM Do YYYY, h:mm a Z")}
|
||||
checkedIn.local(false).format(OLD_PEOPLE_TIME_FORMAT)}
|
||||
</Item.Meta>
|
||||
)}
|
||||
{checkedOut && (
|
||||
|
@ -224,7 +224,7 @@ const ProviderShiftsView = ({
|
|||
{"Checked out at: " +
|
||||
checkedOut
|
||||
.local(false)
|
||||
.format("dddd, MMMM Do YYYY, h:mm a Z")}
|
||||
.format(OLD_PEOPLE_TIME_FORMAT)}
|
||||
</Item.Meta>
|
||||
)}
|
||||
</Item.Content>
|
||||
|
|
Loading…
Reference in New Issue
Block a user