ordering-ui-react-native 0.12.45 → 0.12.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -136,11 +136,6 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
136
136
|
timerRef.current.blur();
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
if (!isFocus) {
|
|
140
|
-
if (time.length > 1) timerRef.current.clear();
|
|
141
|
-
timerRef?.current?.focus?.();
|
|
142
|
-
handleFocusTimer();
|
|
143
|
-
}
|
|
144
139
|
};
|
|
145
140
|
|
|
146
141
|
const openTextTareaOInput = () => {
|
|
@@ -163,7 +158,7 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
163
158
|
|
|
164
159
|
const time = parseInt(hour || '0') * 60 + (parseInt(minsToSend) || 0);
|
|
165
160
|
|
|
166
|
-
let bodyToSend
|
|
161
|
+
let bodyToSend: any = {};
|
|
167
162
|
const orderStatus: any = {
|
|
168
163
|
acceptByBusiness: {
|
|
169
164
|
prepared_in: time,
|
|
@@ -215,6 +210,17 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
215
210
|
handleUpdateOrder && handleUpdateOrder(bodyToSend.status, bodyToSend);
|
|
216
211
|
};
|
|
217
212
|
|
|
213
|
+
useEffect(() => {
|
|
214
|
+
if (actions && action === 'accept') {
|
|
215
|
+
const interval = setTimeout(() => {
|
|
216
|
+
timerRef?.current?.focus?.()
|
|
217
|
+
}, 250)
|
|
218
|
+
return () => {
|
|
219
|
+
clearTimeout(interval)
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}, [timerRef?.current])
|
|
223
|
+
|
|
218
224
|
return (
|
|
219
225
|
<KeyboardAvoidingView
|
|
220
226
|
enabled
|
|
@@ -359,7 +365,6 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
359
365
|
onChangeText={handleTime}
|
|
360
366
|
onPressOut={() => handleFixTime()}
|
|
361
367
|
editable={true}
|
|
362
|
-
autoFocus={actions && action === 'accept'}
|
|
363
368
|
selectionColor={theme.colors.primary}
|
|
364
369
|
placeholderTextColor={theme.colors.textGray}
|
|
365
370
|
color={theme.colors.textGray}
|