div, promise timeout

This commit is contained in:
Alexander Wong 2018-07-02 15:14:52 -06:00
parent fb5f71a881
commit 0995bd916a
No known key found for this signature in database
GPG Key ID: E90E5D6448C2C663
2 changed files with 4 additions and 1 deletions

View File

@ -129,7 +129,7 @@ class ClientShifts extends Component {
this.props.dispatch(deleteCShiftRequest(uuid)); this.props.dispatch(deleteCShiftRequest(uuid));
}; };
approveHoursCShift = cshift => { approveHoursCShift = async cshift => {
const { const {
set_start: approved_start, set_start: approved_start,
set_end: approved_end, set_end: approved_end,
@ -145,6 +145,7 @@ class ClientShifts extends Component {
set_end: null set_end: null
}) })
); );
await new Promise(resolve => setTimeout(resolve, 500));
this.props.dispatch( this.props.dispatch(
getCShiftsRequest({ getCShiftsRequest({
page: this.props.page, page: this.props.page,

View File

@ -172,6 +172,7 @@ const ProviderShiftFormView = ({
</Message> </Message>
)} )}
{!checkedIn && ( {!checkedIn && (
<div>
<Button.Group> <Button.Group>
{!approved && ( {!approved && (
<Button <Button
@ -190,6 +191,7 @@ const ProviderShiftFormView = ({
</Button> </Button>
)} )}
</Button.Group> </Button.Group>
</div>
)} )}
{shift.approved_start && ( {shift.approved_start && (
<Fragment> <Fragment>