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

View File

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