Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app: Allow for auto-accepting of orders for specific restaurants #1736

Merged
merged 76 commits into from
Jul 2, 2024

Conversation

vladimir-8
Copy link
Contributor

@vladimir-8 vladimir-8 commented Apr 2, 2024

Allow for auto-accepting of orders for specific restaurants

coopcycle/coopcycle#49 Demo: coopcycle/coopcycle#49 (comment)

  • changed: remove pop-up when a new order is autoaccepted (restaurant.autoAcceptOrdersEnabled), but the "ding" sound does remain
  • added: When these orders are accepted automatically it also automatically prints a ticket if a printer is connected

foodtech orders dashboard

Demo: #1708 (comment)

  • refactored dashboard using react function components
  • added: in preparation and ready sections
  • hide new orders section for the restaurants with autoAcceptOrdersEnabled
  • fixed: section header background

Green button to move orders from one column and state to the next

#1708 Demo: #1708 (comment)

  • use new 'order:state_changed' event to get order updates

mics: Push Notifications

  • refactor NotificationHandler
  • configure push notifications in redux middleware
  • manage sound inside redux middleware
cases tested (both android and iOS)
foreground: one order (both push and centrifugo working)
foreground: multiple orders coming at once (both push and centrifugo working)
foreground: only push (emulate broken centrifugo)
foreground: only centrifugo (emulate broken push notifications)
background: app in recents
background: cold start

mics: redux

  • improved debug tools; print redux store states and diff
  • import createAction from redux/toolkit

mics: fixes

  • fixed: handle tasks:changed push notification on android while the app is in the foreground
  • fixed: do not re-send the token if it does not change
  • fixed: disconnect centrifuge on logout

…utoAcceptOrdersEnabled), but the "ding" sound does remain
…ally prints a ticket if a printer is connected
# Conflicts:
#	src/components/NotificationHandler.js
#	src/navigation/navigators/RestaurantNavigator.js
#	src/navigation/restaurant/Dashboard.js
#	src/navigation/restaurant/Date.js
#	src/navigation/restaurant/List.js
#	src/navigation/restaurant/LoopeatFormats.js
#	src/navigation/restaurant/Menus.js
#	src/navigation/restaurant/OpeningHours.js
#	src/navigation/restaurant/Order.js
#	src/navigation/restaurant/OrderCancel.js
#	src/navigation/restaurant/OrderDelay.js
#	src/navigation/restaurant/OrderRefuse.js
#	src/navigation/restaurant/Printer.js
#	src/navigation/restaurant/ProductOptions.js
#	src/navigation/restaurant/Products.js
#	src/navigation/restaurant/Settings.js
#	src/navigation/restaurant/SettingsNavigator.js
#	src/navigation/restaurant/components/BigButton.js
#	src/navigation/restaurant/components/DatePickerHeader.js
#	src/navigation/restaurant/components/HeaderRight.js
#	src/navigation/restaurant/components/OrderAcceptedFooter.js
#	src/navigation/restaurant/components/OrderButtons.js
#	src/navigation/restaurant/components/OrderHeading.js
#	src/navigation/restaurant/components/OrderList.js
#	src/navigation/restaurant/components/SwipeToAcceptOrRefuse.js
#	src/navigation/restaurant/components/WebSocketIndicator.js
@vladimir-8 vladimir-8 marked this pull request as ready for review July 2, 2024 21:49
@vladimir-8 vladimir-8 merged commit 0435756 into master Jul 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants