From 0995bd916afc5f9931329977697cabaa59380605 Mon Sep 17 00:00:00 2001 From: Alexander Wong Date: Mon, 2 Jul 2018 15:14:52 -0600 Subject: [PATCH] div, promise timeout --- src/components/User/Client/ClientShifts.jsx | 3 ++- src/components/User/Provider/ProviderShift.jsx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/User/Client/ClientShifts.jsx b/src/components/User/Client/ClientShifts.jsx index f163833..d647323 100644 --- a/src/components/User/Client/ClientShifts.jsx +++ b/src/components/User/Client/ClientShifts.jsx @@ -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, diff --git a/src/components/User/Provider/ProviderShift.jsx b/src/components/User/Provider/ProviderShift.jsx index 504c32a..846c903 100644 --- a/src/components/User/Provider/ProviderShift.jsx +++ b/src/components/User/Provider/ProviderShift.jsx @@ -172,6 +172,7 @@ const ProviderShiftFormView = ({ )} {!checkedIn && ( +
{!approved && (
)} {shift.approved_start && (