ordering-ui-admin-external 1.30.6 → 1.31.0
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/_bundles/{ordering-ui-admin.7f043fd81bc0483e027b.js → ordering-ui-admin.2f5049887bf500c65392.js} +2 -2
- package/_bundles/{ordering-ui-admin.7f043fd81bc0483e027b.js.LICENSE.txt → ordering-ui-admin.2f5049887bf500c65392.js.LICENSE.txt} +1 -1
- package/_modules/components/BusinessIntelligence/AnalyticsAvailableTimes/index.js +10 -10
- package/_modules/components/BusinessIntelligence/AnalyticsBusinessFilter/index.js +1 -1
- package/_modules/components/BusinessIntelligence/AnalyticsBusyTimes/index.js +10 -10
- package/_modules/components/BusinessIntelligence/AnalyticsCalendar/index.js +1 -1
- package/_modules/components/BusinessIntelligence/AnalyticsCustomerSatisfaction/index.js +10 -10
- package/_modules/components/BusinessIntelligence/AnalyticsDriverOrders/index.js +80 -47
- package/_modules/components/BusinessIntelligence/AnalyticsMap/index.js +4 -4
- package/_modules/components/BusinessIntelligence/AnalyticsOrdersOrSales/index.js +3 -3
- package/_modules/components/BusinessIntelligence/AnalyticsOrdersStatus/index.js +1 -1
- package/_modules/components/BusinessIntelligence/AnalyticsRegisterUsers/index.js +6 -6
- package/_modules/components/BusinessIntelligence/AnalyticsSpendTimes/index.js +12 -12
- package/_modules/components/BusinessIntelligence/BusinessAnalytics/index.js +2 -1
- package/_modules/components/BusinessIntelligence/BusinessAnalytics/styles.js +6 -4
- package/_modules/components/BusinessIntelligence/BusinessReviewDetails/index.js +4 -4
- package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +4 -4
- package/_modules/components/BusinessIntelligence/CountryFilter/index.js +1 -1
- package/_modules/components/BusinessIntelligence/InvoiceBusinessPdf/index.js +20 -20
- package/_modules/components/BusinessIntelligence/InvoiceDriverPdf/index.js +20 -20
- package/_modules/components/BusinessIntelligence/InvoiceGeneral/index.js +2 -2
- package/_modules/components/BusinessIntelligence/ReportsAverageSales/index.js +16 -15
- package/_modules/components/BusinessIntelligence/ReportsAverageSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsBarChart/index.js +3 -3
- package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/index.js +27 -26
- package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/index.js +12 -11
- package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsCustomer/index.js +18 -17
- package/_modules/components/BusinessIntelligence/ReportsCustomer/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverDistance/index.js +12 -11
- package/_modules/components/BusinessIntelligence/ReportsDriverDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverFilter/index.js +3 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverOrder/index.js +12 -11
- package/_modules/components/BusinessIntelligence/ReportsDriverOrder/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +12 -11
- package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverSchedule/index.js +11 -10
- package/_modules/components/BusinessIntelligence/ReportsDriverSchedule/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverSpend/index.js +12 -11
- package/_modules/components/BusinessIntelligence/ReportsDriverSpend/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsGeneralSales/index.js +12 -11
- package/_modules/components/BusinessIntelligence/ReportsGeneralSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsHeatMap/index.js +12 -11
- package/_modules/components/BusinessIntelligence/ReportsHeatMap/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderDistance/index.js +24 -23
- package/_modules/components/BusinessIntelligence/ReportsOrderDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderStatus/index.js +18 -17
- package/_modules/components/BusinessIntelligence/ReportsOrderStatus/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderTypeFilter/index.js +2 -2
- package/_modules/components/BusinessIntelligence/ReportsOrders/index.js +22 -21
- package/_modules/components/BusinessIntelligence/ReportsOrders/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsPaymethodSales/index.js +11 -10
- package/_modules/components/BusinessIntelligence/ReportsPaymethodSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +20 -19
- package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSales/index.js +22 -21
- package/_modules/components/BusinessIntelligence/ReportsSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSpentTIme/index.js +11 -10
- package/_modules/components/BusinessIntelligence/ReportsSpentTIme/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsTopDrivers/index.js +27 -26
- package/_modules/components/BusinessIntelligence/ReportsTopDrivers/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsUsers/index.js +17 -16
- package/_modules/components/BusinessIntelligence/ReportsUsers/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/index.js +4 -4
- package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +1 -1
- package/_modules/components/CartRecovery/OpenCartBill/index.js +24 -24
- package/_modules/components/CartRecovery/OpenCartList/index.js +6 -6
- package/_modules/components/CartRecovery/OpenCartsContactInformation/index.js +8 -8
- package/_modules/components/CartRecovery/OpenCartsDetail/index.js +3 -3
- package/_modules/components/CartRecovery/RecoveryActionAdd/index.js +8 -8
- package/_modules/components/CartRecovery/RecoveryActionDetail/index.js +1 -1
- package/_modules/components/CartRecovery/RecoveryActionList/index.js +2 -2
- package/_modules/components/CartRecovery/RecoveryGeneral/index.js +6 -6
- package/_modules/components/CartRecovery/SingleRecoveryNotification/index.js +5 -5
- package/_modules/components/Delivery/AddressForm/index.js +29 -29
- package/_modules/components/Delivery/AddressList/index.js +22 -12
- package/_modules/components/Delivery/DriverGroupSetting/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupAddForm/BusinessesForm/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupAddForm/PaymethodsForm/index.js +2 -2
- package/_modules/components/Delivery/DriversGroupAddForm/index.js +2 -2
- package/_modules/components/Delivery/DriversGroupBusinesses/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupCompanies/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupDeliveryDetails/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +18 -18
- package/_modules/components/Delivery/DriversGroupDeliveryZoneList/index.js +4 -4
- package/_modules/components/Delivery/DriversGroupDetails/index.js +2 -2
- package/_modules/components/Delivery/DriversGroupDrivers/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupLogs/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupOrders/index.js +5 -5
- package/_modules/components/Delivery/DriversGroupPaymethods/index.js +2 -2
- package/_modules/components/Delivery/DriversGroupsDeliveryZoneDetails/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupsList/index.js +2 -2
- package/_modules/components/Delivery/DriversGroupsListing/index.js +4 -4
- package/_modules/components/Delivery/UserAddForm/index.js +13 -13
- package/_modules/components/Delivery/UserDetails/index.js +6 -6
- package/_modules/components/Delivery/UserFormDetails/index.js +10 -10
- package/_modules/components/Delivery/UserProfileForm/index.js +7 -7
- package/_modules/components/Home/HomePage/index.js +10 -9
- package/_modules/components/LanguageSelector/index.js +1 -1
- package/_modules/components/Login/ForgotPasswordForm/index.js +3 -3
- package/_modules/components/Login/LoginForm/index.js +11 -11
- package/_modules/components/Login/ResetPassword/index.js +5 -5
- package/_modules/components/Loyalty/GiftCardDetail/index.js +8 -8
- package/_modules/components/Loyalty/GiftCards/index.js +3 -3
- package/_modules/components/Loyalty/LoyaltyLevelDetail/index.js +10 -10
- package/_modules/components/Loyalty/PointsWalletBusinessDetail/index.js +6 -6
- package/_modules/components/Loyalty/PointsWalletBusinessList/index.js +3 -3
- package/_modules/components/Loyalty/PointsWalletLevels/index.js +3 -3
- package/_modules/components/Marketing/BannerDetails/Businesses/index.js +1 -1
- package/_modules/components/Marketing/BannerDetails/index.js +5 -5
- package/_modules/components/Marketing/BannerImageDetails/BusinessLink.js +2 -2
- package/_modules/components/Marketing/BannerImageDetails/ProductLink.js +3 -3
- package/_modules/components/Marketing/BannerImageDetails/SelectBusinessProducts/index.js +7 -7
- package/_modules/components/Marketing/BannerImageDetails/index.js +1 -1
- package/_modules/components/Marketing/CampaignAmountOption/index.js +4 -4
- package/_modules/components/Marketing/CampaignDetail/index.js +1 -1
- package/_modules/components/Marketing/CampaignDetailContent/index.js +2 -2
- package/_modules/components/Marketing/CampaignDetailGeneral/index.js +19 -19
- package/_modules/components/Marketing/CampaignEmail/index.js +15 -15
- package/_modules/components/Marketing/CampaignHeader/index.js +1 -1
- package/_modules/components/Marketing/CampaignList/index.js +2 -2
- package/_modules/components/Marketing/CampaignNotification/index.js +12 -12
- package/_modules/components/Marketing/CampaignPopup/index.js +10 -10
- package/_modules/components/Marketing/CampaignSMS/index.js +11 -11
- package/_modules/components/Marketing/CampaignSignUpOption/index.js +5 -5
- package/_modules/components/Marketing/CampaignUsersList/index.js +4 -4
- package/_modules/components/Marketing/CampaignWebHook/index.js +11 -11
- package/_modules/components/Marketing/CampaignWhatsapp/index.js +10 -10
- package/_modules/components/Marketing/EnterprisePromotionDeliveryzones/index.js +6 -6
- package/_modules/components/Marketing/EnterprisePromotionDetails/index.js +4 -4
- package/_modules/components/Marketing/EnterprisePromotionGeneralDetails/index.js +9 -9
- package/_modules/components/Marketing/EnterprisePromotionMaxOrders/index.js +1 -1
- package/_modules/components/Marketing/EnterprisePromotionOrderTypes/index.js +2 -2
- package/_modules/components/Marketing/EnterprisePromotionPaymethods/index.js +7 -7
- package/_modules/components/Marketing/EnterprisePromotionRules/index.js +8 -8
- package/_modules/components/Marketing/EnterprisePromotionSpecficCategory/index.js +12 -12
- package/_modules/components/Marketing/EnterprisePromotionSpecficProducts/index.js +7 -7
- package/_modules/components/Marketing/PageBanner/index.js +1 -1
- package/_modules/components/Messages/ChatBusinessesList/index.js +2 -2
- package/_modules/components/Messages/ChatContactList/index.js +2 -2
- package/_modules/components/MyProducts/AdvancedLayouts/index.js +14 -14
- package/_modules/components/MyProducts/AdvancedSettings/index.js +40 -40
- package/_modules/components/MyProducts/AppResources/index.js +15 -15
- package/_modules/components/MyProducts/CustomDomain/index.js +2 -2
- package/_modules/components/MyProducts/OrderingWebsite/SelectBusiness.js +2 -2
- package/_modules/components/MyProducts/OrderingWebsite/SelectFranchise.js +2 -2
- package/_modules/components/MyProducts/OrderingWebsite/index.js +39 -32
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +1 -1
- package/_modules/components/MyProducts/UploadAudio/index.js +2 -2
- package/_modules/components/NotNetworkConnectivity/index.js +2 -2
- package/_modules/components/OrderingProducts/OrderingProductGeneralDetails/index.js +18 -18
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +1 -1
- package/_modules/components/OrderingProducts/SiteTheme/ThemeComponent.js +1 -1
- package/_modules/components/OrderingProducts/SiteTheme/index.js +10 -10
- package/_modules/components/Orders/AllInOne/DriversManager/index.js +2 -2
- package/_modules/components/Orders/AllInOne/index.js +15 -6
- package/_modules/components/Orders/Appointments/EventComponent.js +3 -3
- package/_modules/components/Orders/Appointments/index.js +2 -2
- package/_modules/components/Orders/CompanySelector/index.js +4 -4
- package/_modules/components/Orders/CreateCustomOrder/CardForm/index.js +3 -3
- package/_modules/components/Orders/CreateCustomOrder/CardFormCustom/index.js +2 -2
- package/_modules/components/Orders/CreateCustomOrder/CartBill/index.js +21 -21
- package/_modules/components/Orders/CreateCustomOrder/Checkout/index.js +26 -26
- package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +102 -9
- package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/styles.js +19 -3
- package/_modules/components/Orders/CreateCustomOrder/DriverTips/index.js +4 -4
- package/_modules/components/Orders/CreateCustomOrder/Map/index.js +11 -11
- package/_modules/components/Orders/CreateCustomOrder/OrderTypeSelector/index.js +3 -3
- package/_modules/components/Orders/CreateCustomOrder/PaymentOptionCard/index.js +1 -1
- package/_modules/components/Orders/CreateCustomOrder/PaymentOptionCash/index.js +2 -2
- package/_modules/components/Orders/CreateCustomOrder/PaymentOptionPaypal/index.js +1 -1
- package/_modules/components/Orders/CreateCustomOrder/PaymentOptionStripe/index.js +8 -8
- package/_modules/components/Orders/CreateCustomOrder/PaymentOptionStripe/styles.js +1 -1
- package/_modules/components/Orders/CreateCustomOrder/PaymentOptionWallet/index.js +3 -3
- package/_modules/components/Orders/CreateCustomOrder/PaymentOptions/index.js +35 -35
- package/_modules/components/Orders/CreateCustomOrder/ProductForm/index.js +24 -24
- package/_modules/components/Orders/CreateCustomOrder/ProductOptionSubOption/index.js +2 -2
- package/_modules/components/Orders/CreateCustomOrder/SelectBusinesses/index.js +2 -2
- package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/index.js +22 -10
- package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +8 -5
- package/_modules/components/Orders/CreateCustomOrder/SelectProducts/index.js +2 -2
- package/_modules/components/Orders/CreateCustomOrder/SingleProductCard/index.js +10 -10
- package/_modules/components/Orders/CreateCustomOrder/SingleProductCard/styles.js +5 -5
- package/_modules/components/Orders/CreateCustomOrder/StripeMethodForm/index.js +7 -7
- package/_modules/components/Orders/DeliveriesLocation/index.js +27 -27
- package/_modules/components/Orders/DeliveriesManager/index.js +13 -4
- package/_modules/components/Orders/DeliveryDashboard/index.js +6 -6
- package/_modules/components/Orders/DriverMapMarkerAndInfo/index.js +3 -3
- package/_modules/components/Orders/DriversList/index.js +2 -2
- package/_modules/components/Orders/DriversLocation/index.js +11 -11
- package/_modules/components/Orders/DriversManager/index.js +2 -2
- package/_modules/components/Orders/GoogleMapsApiKeySettingButton/index.js +1 -1
- package/_modules/components/Orders/InterActOrderMarker/index.js +3 -3
- package/_modules/components/Orders/Logistics/index.js +1 -1
- package/_modules/components/Orders/Messages/index.js +4 -4
- package/_modules/components/Orders/OrderBill/RefundToWallet.js +16 -16
- package/_modules/components/Orders/OrderBill/index.js +46 -46
- package/_modules/components/Orders/OrderContactInformation/index.js +22 -22
- package/_modules/components/Orders/OrderDashboardSLASetting/index.js +3 -3
- package/_modules/components/Orders/OrderDetails/index.js +6 -6
- package/_modules/components/Orders/OrderDetailsHeader/index.js +6 -6
- package/_modules/components/Orders/OrderLogisticInformation/index.js +1 -1
- package/_modules/components/Orders/OrderNotification/index.js +47 -18
- package/_modules/components/Orders/OrderNotification/styles.js +18 -3
- package/_modules/components/Orders/OrderStatusFilterBar/index.js +6 -6
- package/_modules/components/Orders/OrderToPrint/index.js +22 -22
- package/_modules/components/Orders/OrderToPrintTicket/index.js +5 -5
- package/_modules/components/Orders/OrdersCards/index.js +29 -29
- package/_modules/components/Orders/OrdersContentHeader/index.js +13 -4
- package/_modules/components/Orders/OrdersContentHeader/styles.js +20 -4
- package/_modules/components/Orders/OrdersDashboardList/index.js +34 -5
- package/_modules/components/Orders/OrdersExportCSV/index.js +1 -1
- package/_modules/components/Orders/OrdersFilterGroup/index.js +18 -1
- package/_modules/components/Orders/OrdersLateralBar/index.js +3 -3
- package/_modules/components/Orders/OrdersListing/index.js +9 -3
- package/_modules/components/Orders/OrdersManager/index.js +16 -7
- package/_modules/components/Orders/OrdersTable/index.js +53 -53
- package/_modules/components/Orders/PaymethodTypeSelector/index.js +1 -1
- package/_modules/components/Orders/ProductItemAccordion/index.js +4 -4
- package/_modules/components/Orders/ReviewCustomer/index.js +2 -2
- package/_modules/components/Orders/WebsocketStatus/index.js +6 -1
- package/_modules/components/PageNotFound/index.js +3 -3
- package/_modules/components/Settings/ApiKeysList/index.js +1 -1
- package/_modules/components/Settings/CountriesList/index.js +1 -1
- package/_modules/components/Settings/DropdownOptionList/index.js +2 -2
- package/_modules/components/Settings/EmailSetting/index.js +5 -5
- package/_modules/components/Settings/InsertImage/index.js +3 -3
- package/_modules/components/Settings/IntegrationListing/Analytics.js +1 -1
- package/_modules/components/Settings/IntegrationListing/PaymentGateway.js +1 -1
- package/_modules/components/Settings/LanguageSetting/index.js +1 -1
- package/_modules/components/Settings/LanguageTransSpread/index.js +2 -2
- package/_modules/components/Settings/LanguageTransTable/index.js +4 -4
- package/_modules/components/Settings/NotificationSetting/index.js +6 -6
- package/_modules/components/Settings/PlaceListing/index.js +1 -1
- package/_modules/components/Settings/Settings/index.js +3 -3
- package/_modules/components/Settings/SettingsCountryFilter/index.js +1 -1
- package/_modules/components/Settings/SettingsList/index.js +4 -4
- package/_modules/components/Settings/SettingsSelectUI/index.js +1 -1
- package/_modules/components/Settings/WebhookListSelector/index.js +6 -0
- package/_modules/components/Settings/ZoneDropdownDetails/index.js +1 -1
- package/_modules/components/Shared/AutoScroll/index.js +4 -4
- package/_modules/components/Shared/CitySelector/index.js +1 -1
- package/_modules/components/Shared/ColumnAllowSettingPopover/index.js +2 -2
- package/_modules/components/Shared/ConfirmAdmin/index.js +1 -1
- package/_modules/components/Shared/DragScroll/index.js +5 -5
- package/_modules/components/Shared/HtmlEditor/InsertImage/index.js +3 -3
- package/_modules/components/Shared/InputPhoneNumber/index.js +3 -4
- package/_modules/components/Shared/NotFoundSource/index.js +2 -2
- package/_modules/components/Shared/Personalization/index.js +1 -1
- package/_modules/components/Shared/RangeCalendar/index.js +2 -2
- package/_modules/components/Shared/Schedule/index.js +6 -6
- package/_modules/components/Shared/SelectBusinessCategories/index.js +2 -2
- package/_modules/components/Shared/SelectBusinessProducts/index.js +7 -7
- package/_modules/components/Shared/SelectBusinesses/index.js +3 -3
- package/_modules/components/Shared/SelectLoyaltyLevels/index.js +1 -1
- package/_modules/components/Shared/SelectSites/index.js +1 -1
- package/_modules/components/Shared/SpreadSheetEditor/index.js +21 -21
- package/_modules/components/SidebarMenu/index.js +37 -40
- package/_modules/components/Stores/AddBusinessForm/index.js +18 -18
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +8 -8
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +11 -11
- package/_modules/components/Stores/BusinessAdd/Images/index.js +5 -5
- package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +2 -2
- package/_modules/components/Stores/BusinessAdd/OtherDetails/index.js +1 -1
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +1 -1
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +7 -3
- package/_modules/components/Stores/BusinessAdd/index.js +9 -9
- package/_modules/components/Stores/BusinessAddStore/index.js +2 -2
- package/_modules/components/Stores/BusinessBrandBUSIDetail/index.js +3 -3
- package/_modules/components/Stores/BusinessBrandGENDetail/index.js +16 -16
- package/_modules/components/Stores/BusinessBrandListing/index.js +8 -8
- package/_modules/components/Stores/BusinessDeliveryDetails/index.js +3 -3
- package/_modules/components/Stores/BusinessDeliveryGroupsDetails/index.js +4 -4
- package/_modules/components/Stores/BusinessDeliveryZoneDetails/index.js +1 -1
- package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +11 -11
- package/_modules/components/Stores/BusinessDeliveryZoneList/index.js +3 -3
- package/_modules/components/Stores/BusinessDetails/index.js +7 -7
- package/_modules/components/Stores/BusinessDeviceDetail/index.js +13 -13
- package/_modules/components/Stores/BusinessDeviceListing/index.js +7 -7
- package/_modules/components/Stores/BusinessFrontLayout/index.js +2 -2
- package/_modules/components/Stores/BusinessGprsPrinters/index.js +1 -1
- package/_modules/components/Stores/BusinessImages/index.js +4 -4
- package/_modules/components/Stores/BusinessInformation/index.js +35 -35
- package/_modules/components/Stores/BusinessLocation/index.js +7 -7
- package/_modules/components/Stores/BusinessMenu/index.js +2 -2
- package/_modules/components/Stores/BusinessMenuBasicOptions/index.js +13 -13
- package/_modules/components/Stores/BusinessMenuCategoryTreeNode/index.js +3 -3
- package/_modules/components/Stores/BusinessMenuChannels/index.js +8 -8
- package/_modules/components/Stores/BusinessMenuOptions/index.js +1 -1
- package/_modules/components/Stores/BusinessOwners/index.js +1 -1
- package/_modules/components/Stores/BusinessPaymentMethods/index.js +4 -4
- package/_modules/components/Stores/BusinessPickupDetails/index.js +2 -2
- package/_modules/components/Stores/BusinessPlace/index.js +1 -1
- package/_modules/components/Stores/BusinessPlaceGroup/index.js +3 -3
- package/_modules/components/Stores/BusinessPlaceGroupList/index.js +3 -3
- package/_modules/components/Stores/BusinessPreorderDetails/index.js +3 -3
- package/_modules/components/Stores/BusinessPreview/index.js +19 -19
- package/_modules/components/Stores/BusinessProductAddForm/index.js +10 -10
- package/_modules/components/Stores/BusinessProductList/index.js +5 -5
- package/_modules/components/Stores/BusinessProductsCategories/index.js +4 -4
- package/_modules/components/Stores/BusinessProductsCategoyDetails/index.js +3 -3
- package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +22 -22
- package/_modules/components/Stores/BusinessProductsListing/index.js +25 -21
- package/_modules/components/Stores/BusinessPromotionGeneralForm/index.js +25 -25
- package/_modules/components/Stores/BusinessQRCodeOption/index.js +2 -2
- package/_modules/components/Stores/BusinessSalesChannel/index.js +1 -1
- package/_modules/components/Stores/BusinessSelectHeader/index.js +1 -1
- package/_modules/components/Stores/BusinessServiceProfessionals/index.js +3 -3
- package/_modules/components/Stores/BusinessSharedMenuProductDetails/index.js +4 -4
- package/_modules/components/Stores/BusinessSharedMenuProducts/index.js +1 -1
- package/_modules/components/Stores/BusinessSpreadSheet/index.js +1 -1
- package/_modules/components/Stores/BusinessSummary/index.js +14 -11
- package/_modules/components/Stores/BusinessSupport/index.js +2 -2
- package/_modules/components/Stores/BusinessSyncStore/index.js +3 -3
- package/_modules/components/Stores/BusinessTypeDetail/index.js +6 -6
- package/_modules/components/Stores/BusinessTypes/index.js +2 -2
- package/_modules/components/Stores/BusinessVideos/index.js +2 -2
- package/_modules/components/Stores/BusinessWalletsList/index.js +2 -2
- package/_modules/components/Stores/BusinessWebhooks/index.js +11 -5
- package/_modules/components/Stores/BusinessesListing/index.js +1 -1
- package/_modules/components/Stores/ImporterForm/index.js +3 -3
- package/_modules/components/Stores/ImporterJobForm/index.js +7 -7
- package/_modules/components/Stores/PaymentOption/index.js +11 -11
- package/_modules/components/Stores/PaymentOptionMethods/index.js +11 -11
- package/_modules/components/Stores/PaymentOptionPaypal/index.js +11 -11
- package/_modules/components/Stores/PaymentOptionSquare/index.js +13 -13
- package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +11 -11
- package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +7 -7
- package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +11 -11
- package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +11 -11
- package/_modules/components/Stores/ProductDesktopPreview/index.js +8 -8
- package/_modules/components/Stores/ProductDetailsAdvanced/index.js +7 -7
- package/_modules/components/Stores/ProductDetatilsInformation/index.js +21 -21
- package/_modules/components/Stores/ProductExtraOptionDetails/index.js +26 -21
- package/_modules/components/Stores/ProductExtraOptionForm/index.js +15 -15
- package/_modules/components/Stores/ProductExtraOptions/index.js +10 -4
- package/_modules/components/Stores/ProductExtraSuboption/index.js +10 -5
- package/_modules/components/Stores/ProductExtras/index.js +9 -4
- package/_modules/components/Stores/ProductGallery/index.js +3 -3
- package/_modules/components/Stores/ProductIngredientDetails/index.js +2 -2
- package/_modules/components/Stores/ProductStep/index.js +2 -2
- package/_modules/components/Stores/ProductSummary/index.js +11 -8
- package/_modules/components/Stores/ProductTagDetails/index.js +2 -2
- package/_modules/components/Stores/ProductTagsList/index.js +1 -1
- package/_modules/components/Stores/ProductVideos/index.js +1 -1
- package/_modules/components/Stores/RestaurantSelectGuide/index.js +2 -2
- package/_modules/components/Stores/SelectPosGuide/index.js +4 -4
- package/_modules/components/Stores/SeoOptions/index.js +9 -9
- package/_modules/components/Stores/ServiceDetail/index.js +5 -5
- package/_modules/components/Stores/SingleBusiness/index.js +14 -14
- package/_modules/components/Stores/SingleBusinessCategoryEdit/index.js +2 -2
- package/_modules/components/Stores/SingleBusinessProduct/index.js +12 -12
- package/_modules/components/Stores/SingleBusinessSubCateogries/index.js +2 -2
- package/_modules/components/Stores/UploadMenuGuide/index.js +3 -3
- package/_modules/components/Users/CustomerDetails/index.js +2 -2
- package/_modules/components/Users/CustomerPointsWallet/index.js +2 -2
- package/_modules/components/Users/CustomerWalletEvents/index.js +1 -1
- package/_modules/components/Users/ProfessionalAddForm/index.js +11 -11
- package/_modules/components/Users/ProfessionalBusinessService/index.js +3 -3
- package/_modules/components/Users/ProfessionalCategoryTreeNode/index.js +3 -3
- package/_modules/components/Users/ProfessionalDetail/index.js +2 -2
- package/_modules/components/Users/ProfessionalListing/index.js +1 -1
- package/_modules/components/Users/ProfessionalSchedule/index.js +1 -1
- package/_modules/components/Users/ProfessionalServices/index.js +3 -3
- package/_modules/components/Users/UserAddForm/index.js +11 -13
- package/_modules/components/Users/UserDetails/index.js +4 -4
- package/_modules/components/Users/UserFilterGroup/index.js +2 -2
- package/_modules/components/Users/UserFormDetails/index.js +12 -12
- package/_modules/components/Users/UserProfileForm/index.js +7 -7
- package/_modules/styles/Select/index.js +1 -1
- package/_modules/themes/origin/src/components/AutoScroll/index.js +2 -2
- package/_modules/themes/origin/src/components/DeadlineSettingInterface/index.js +4 -4
- package/_modules/themes/origin/src/components/DeadlinesTypeSelector/index.js +6 -6
- package/_modules/themes/origin/src/components/DriverMapMarkerAndInfo/index.js +3 -3
- package/_modules/themes/origin/src/components/DriverSelector/index.js +2 -2
- package/_modules/themes/origin/src/components/DriversLocation/index.js +16 -16
- package/_modules/themes/origin/src/components/ForgotPasswordForm/index.js +3 -3
- package/_modules/themes/origin/src/components/GroupTypeSelector/index.js +2 -2
- package/_modules/themes/origin/src/components/Header/index.js +3 -3
- package/_modules/themes/origin/src/components/InterActOrderMarker/index.js +3 -3
- package/_modules/themes/origin/src/components/LoginForm/index.js +5 -5
- package/_modules/themes/origin/src/components/LogisticInformation/index.js +1 -1
- package/_modules/themes/origin/src/components/Logistics/index.js +6 -6
- package/_modules/themes/origin/src/components/MainOrdersManager/index.js +2 -2
- package/_modules/themes/origin/src/components/Messages/index.js +13 -13
- package/_modules/themes/origin/src/components/Messages/styles.js +2 -2
- package/_modules/themes/origin/src/components/MobileSidebarMenu/index.js +5 -5
- package/_modules/themes/origin/src/components/NotFoundSource/index.js +2 -2
- package/_modules/themes/origin/src/components/NotNetworkConnectivity/index.js +2 -2
- package/_modules/themes/origin/src/components/OrderDetails/index.js +34 -34
- package/_modules/themes/origin/src/components/OrderItemAccordion/index.js +9 -9
- package/_modules/themes/origin/src/components/OrderListing/index.js +2 -2
- package/_modules/themes/origin/src/components/OrderListing/styles.js +1 -1
- package/_modules/themes/origin/src/components/OrderProductQuickDetail/index.js +7 -7
- package/_modules/themes/origin/src/components/OrderStatusFilterBar/index.js +5 -5
- package/_modules/themes/origin/src/components/OrderStatusTypeSelector/index.js +5 -5
- package/_modules/themes/origin/src/components/OverView/index.js +1 -1
- package/_modules/themes/origin/src/components/OverView/styles.js +3 -3
- package/_modules/themes/origin/src/components/PageNotFound/index.js +3 -3
- package/_modules/themes/origin/src/components/SearchBar/index.js +2 -2
- package/_modules/themes/origin/src/components/SideMenu/index.js +5 -5
- package/_modules/themes/origin/src/components/SmallOrderItemAccordion/index.js +8 -8
- package/_modules/themes/origin/src/components/UserPopover/index.js +2 -2
- package/_modules/utils/index.js +1 -1
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/AnalyticsDriverOrders/index.js +39 -17
- package/src/components/BusinessIntelligence/BusinessAnalytics/index.js +6 -1
- package/src/components/BusinessIntelligence/BusinessAnalytics/styles.js +2 -0
- package/src/components/BusinessIntelligence/ReportsAverageSales/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsAverageSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsBusinessDistance/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsBusinessDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsBusinessSpend/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsBusinessSpend/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsCustomer/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsCustomer/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverDistance/index.js +10 -2
- package/src/components/BusinessIntelligence/ReportsDriverDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverOrder/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverOrder/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverOrderTime/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverSchedule/index.js +16 -8
- package/src/components/BusinessIntelligence/ReportsDriverSchedule/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverSpend/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverSpend/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsGeneralSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsGeneralSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsHeatMap/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsHeatMap/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrderDistance/index.js +10 -1
- package/src/components/BusinessIntelligence/ReportsOrderDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrderStatus/index.js +10 -2
- package/src/components/BusinessIntelligence/ReportsOrderStatus/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrders/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsOrders/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsPaymethodSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsPaymethodSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsSaleAndCategory/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSpentTIme/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsSpentTIme/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsTopDrivers/index.js +9 -2
- package/src/components/BusinessIntelligence/ReportsTopDrivers/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsUsers/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsUsers/styles.js +34 -0
- package/src/components/Delivery/AddressList/index.js +11 -1
- package/src/components/Home/HomePage/index.js +5 -1
- package/src/components/MyProducts/OrderingWebsite/index.js +25 -12
- package/src/components/MyProducts/OrderingWebsite/styles.js +0 -2
- package/src/components/Orders/AllInOne/index.js +8 -2
- package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +118 -6
- package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/styles.js +56 -0
- package/src/components/Orders/CreateCustomOrder/OrderTypeSelector/index.js +1 -1
- package/src/components/Orders/CreateCustomOrder/SelectCustomer/index.js +19 -11
- package/src/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +3 -0
- package/src/components/Orders/DeliveriesManager/index.js +8 -2
- package/src/components/Orders/DeliveryDashboard/index.js +4 -4
- package/src/components/Orders/OrderNotification/index.js +31 -5
- package/src/components/Orders/OrderNotification/styles.js +37 -0
- package/src/components/Orders/OrderStatusFilterBar/index.js +10 -9
- package/src/components/Orders/OrdersContentHeader/index.js +17 -3
- package/src/components/Orders/OrdersContentHeader/styles.js +54 -0
- package/src/components/Orders/OrdersDashboardList/index.js +6 -1
- package/src/components/Orders/OrdersFilterGroup/index.js +16 -0
- package/src/components/Orders/OrdersListing/index.js +7 -0
- package/src/components/Orders/OrdersManager/index.js +11 -3
- package/src/components/Orders/WebsocketStatus/index.js +5 -2
- package/src/components/Settings/WebhookListSelector/index.js +3 -1
- package/src/components/Shared/InputPhoneNumber/index.js +2 -3
- package/src/components/SidebarMenu/index.js +6 -6
- package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +16 -12
- package/src/components/Stores/BusinessDeviceDetail/index.js +1 -1
- package/src/components/Stores/BusinessProductsListing/index.js +4 -0
- package/src/components/Stores/BusinessSummary/index.js +21 -15
- package/src/components/Stores/BusinessWebhooks/index.js +3 -1
- package/src/components/Stores/ProductExtraOptionDetails/index.js +8 -0
- package/src/components/Stores/ProductExtraOptions/index.js +10 -1
- package/src/components/Stores/ProductExtraSuboption/index.js +7 -1
- package/src/components/Stores/ProductExtras/index.js +6 -1
- package/src/components/Stores/ProductSummary/index.js +7 -1
- package/src/components/Users/UserAddForm/index.js +0 -2
|
@@ -38,7 +38,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
38
38
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
39
39
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
40
40
|
var CheckoutUI = function CheckoutUI(props) {
|
|
41
|
-
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _validationFields$fie, _validationFields$fie2,
|
|
41
|
+
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _validationFields$fie, _validationFields$fie2, _cart$comment, _validationFields$fie3, _validationFields$fie4, _paymethodSelected$da, _paymethodSelected$da2, _cardList$cards, _cartState$cart, _validationFields$fie5, _validationFields$fie6, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _validationFields$fie7, _businessDetails$busi3, _businessDetails$busi4, _businessDetails$busi5, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _validationFields$fie12, _validationFields$fie13;
|
|
42
42
|
var cart = props.cart,
|
|
43
43
|
errors = props.errors,
|
|
44
44
|
placing = props.placing,
|
|
@@ -105,21 +105,21 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
105
105
|
paymethodClicked = _useState12[0],
|
|
106
106
|
setPaymethodClicked = _useState12[1];
|
|
107
107
|
var cardsMethods = ['stripe', 'credomatic'];
|
|
108
|
-
var businessConfigs = (_businessDetails$busi = businessDetails === null || businessDetails === void 0
|
|
109
|
-
var isTableNumberEnabled = configs === null || configs === void 0
|
|
108
|
+
var businessConfigs = (_businessDetails$busi = businessDetails === null || businessDetails === void 0 || (_businessDetails$busi2 = businessDetails.business) === null || _businessDetails$busi2 === void 0 ? void 0 : _businessDetails$busi2.configs) !== null && _businessDetails$busi !== void 0 ? _businessDetails$busi : [];
|
|
109
|
+
var isTableNumberEnabled = configs === null || configs === void 0 || (_configs$table_numer_ = configs.table_numer_enabled) === null || _configs$table_numer_ === void 0 ? void 0 : _configs$table_numer_.value;
|
|
110
110
|
var isWalletCashEnabled = ((_businessConfigs$find = businessConfigs.find(function (config) {
|
|
111
111
|
return config.key === 'wallet_cash_enabled';
|
|
112
112
|
})) === null || _businessConfigs$find === void 0 ? void 0 : _businessConfigs$find.value) === '1';
|
|
113
113
|
var isWalletCreditPointsEnabled = ((_businessConfigs$find2 = businessConfigs.find(function (config) {
|
|
114
114
|
return config.key === 'wallet_credit_point_enabled';
|
|
115
115
|
})) === null || _businessConfigs$find2 === void 0 ? void 0 : _businessConfigs$find2.value) === '1';
|
|
116
|
-
var isWalletEnabled = (configs === null || configs === void 0
|
|
116
|
+
var isWalletEnabled = (configs === null || configs === void 0 || (_configs$cash_wallet = configs.cash_wallet) === null || _configs$cash_wallet === void 0 ? void 0 : _configs$cash_wallet.value) && (configs === null || configs === void 0 || (_configs$wallet_enabl = configs.wallet_enabled) === null || _configs$wallet_enabl === void 0 ? void 0 : _configs$wallet_enabl.value) === '1' && (isWalletCashEnabled || isWalletCreditPointsEnabled) && !isCustomerMode;
|
|
117
117
|
var isGiftCardCart = !(cart !== null && cart !== void 0 && cart.business_id);
|
|
118
|
-
var validateCommentsCartField = (validationFields === null || validationFields === void 0
|
|
119
|
-
var validateZipcodeCard = (validationFields === null || validationFields === void 0
|
|
120
|
-
var isDisablePlaceOrderButton = !(cart !== null && cart !== void 0 && cart.valid) || !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 || cardsMethods.includes(paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) && (cardList === null || cardList === void 0
|
|
121
|
-
var driverTipsOptions = typeof (configs === null || configs === void 0
|
|
122
|
-
var driverTipsField = !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && options.type === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0
|
|
118
|
+
var validateCommentsCartField = (validationFields === null || validationFields === void 0 || (_validationFields$fie = validationFields.fields) === null || _validationFields$fie === void 0 || (_validationFields$fie = _validationFields$fie.checkout) === null || _validationFields$fie === void 0 || (_validationFields$fie = _validationFields$fie.comments) === null || _validationFields$fie === void 0 ? void 0 : _validationFields$fie.enabled) && (validationFields === null || validationFields === void 0 || (_validationFields$fie2 = validationFields.fields) === null || _validationFields$fie2 === void 0 || (_validationFields$fie2 = _validationFields$fie2.checkout) === null || _validationFields$fie2 === void 0 || (_validationFields$fie2 = _validationFields$fie2.comments) === null || _validationFields$fie2 === void 0 ? void 0 : _validationFields$fie2.required) && ((cart === null || cart === void 0 ? void 0 : cart.comment) === null || (cart === null || cart === void 0 || (_cart$comment = cart.comment) === null || _cart$comment === void 0 ? void 0 : _cart$comment.trim().length) === 0);
|
|
119
|
+
var validateZipcodeCard = (validationFields === null || validationFields === void 0 || (_validationFields$fie3 = validationFields.fields) === null || _validationFields$fie3 === void 0 || (_validationFields$fie3 = _validationFields$fie3.card) === null || _validationFields$fie3 === void 0 || (_validationFields$fie3 = _validationFields$fie3.zipcode) === null || _validationFields$fie3 === void 0 ? void 0 : _validationFields$fie3.enabled) && (validationFields === null || validationFields === void 0 || (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 || (_validationFields$fie4 = _validationFields$fie4.card) === null || _validationFields$fie4 === void 0 || (_validationFields$fie4 = _validationFields$fie4.zipcode) === null || _validationFields$fie4 === void 0 ? void 0 : _validationFields$fie4.required) && (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'stripe' && (paymethodSelected === null || paymethodSelected === void 0 || (_paymethodSelected$da = paymethodSelected.data) === null || _paymethodSelected$da === void 0 ? void 0 : _paymethodSelected$da.card) && !(paymethodSelected !== null && paymethodSelected !== void 0 && (_paymethodSelected$da2 = paymethodSelected.data) !== null && _paymethodSelected$da2 !== void 0 && (_paymethodSelected$da2 = _paymethodSelected$da2.card) !== null && _paymethodSelected$da2 !== void 0 && _paymethodSelected$da2.zipcode);
|
|
120
|
+
var isDisablePlaceOrderButton = !(cart !== null && cart !== void 0 && cart.valid) || !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 || cardsMethods.includes(paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) && (cardList === null || cardList === void 0 || (_cardList$cards = cardList.cards) === null || _cardList$cards === void 0 ? void 0 : _cardList$cards.length) === 0 || placing || errorCash || loading || isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cartState !== null && cartState !== void 0 && (_cartState$cart = cartState.cart) !== null && _cartState$cart !== void 0 && _cartState$cart.spot_number || cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) || !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) || options.type === 1 && (validationFields === null || validationFields === void 0 || (_validationFields$fie5 = validationFields.fields) === null || _validationFields$fie5 === void 0 || (_validationFields$fie5 = _validationFields$fie5.checkout) === null || _validationFields$fie5 === void 0 || (_validationFields$fie5 = _validationFields$fie5.driver_tip) === null || _validationFields$fie5 === void 0 ? void 0 : _validationFields$fie5.enabled) && (validationFields === null || validationFields === void 0 || (_validationFields$fie6 = validationFields.fields) === null || _validationFields$fie6 === void 0 || (_validationFields$fie6 = _validationFields$fie6.checkout) === null || _validationFields$fie6 === void 0 || (_validationFields$fie6 = _validationFields$fie6.driver_tip) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 || validateCommentsCartField || validateZipcodeCard;
|
|
121
|
+
var driverTipsOptions = typeof (configs === null || configs === void 0 || (_configs$driver_tip_o = configs.driver_tip_options) === null || _configs$driver_tip_o === void 0 ? void 0 : _configs$driver_tip_o.value) === 'string' ? JSON.parse(configs === null || configs === void 0 || (_configs$driver_tip_o2 = configs.driver_tip_options) === null || _configs$driver_tip_o2 === void 0 ? void 0 : _configs$driver_tip_o2.value) || [] : (configs === null || configs === void 0 || (_configs$driver_tip_o3 = configs.driver_tip_options) === null || _configs$driver_tip_o3 === void 0 ? void 0 : _configs$driver_tip_o3.value) || [];
|
|
122
|
+
var driverTipsField = !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && options.type === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 || (_validationFields$fie7 = validationFields.fields) === null || _validationFields$fie7 === void 0 || (_validationFields$fie7 = _validationFields$fie7.checkout) === null || _validationFields$fie7 === void 0 || (_validationFields$fie7 = _validationFields$fie7.driver_tip) === null || _validationFields$fie7 === void 0 ? void 0 : _validationFields$fie7.enabled) && driverTipsOptions.length > 0;
|
|
123
123
|
var handlePlaceOrder = function handlePlaceOrder() {
|
|
124
124
|
if (!userErrors.length && (!(requiredFields !== null && requiredFields !== void 0 && requiredFields.length) || (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'cash' || (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'card_delivery')) {
|
|
125
125
|
var body = {};
|
|
@@ -134,20 +134,20 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
134
134
|
});
|
|
135
135
|
};
|
|
136
136
|
var checkValidationFields = function checkValidationFields() {
|
|
137
|
-
var _validationFields$
|
|
137
|
+
var _validationFields$fie8, _validationFields$fie9, _validationFields$fie10, _configs$verification;
|
|
138
138
|
setUserErrors([]);
|
|
139
139
|
var errors = [];
|
|
140
140
|
var notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes', 'comments'];
|
|
141
141
|
var userSelected = isCustomerMode ? customerState.user : user;
|
|
142
142
|
var _requiredFields = [];
|
|
143
|
-
Object.values(validationFields === null || validationFields === void 0
|
|
143
|
+
Object.values(validationFields === null || validationFields === void 0 || (_validationFields$fie8 = validationFields.fields) === null || _validationFields$fie8 === void 0 ? void 0 : _validationFields$fie8.checkout).map(function (field) {
|
|
144
144
|
if (field !== null && field !== void 0 && field.enabled && field !== null && field !== void 0 && field.required && !notFields.includes(field.code)) {
|
|
145
145
|
if (userSelected && !userSelected[field === null || field === void 0 ? void 0 : field.code]) {
|
|
146
146
|
_requiredFields.push(field === null || field === void 0 ? void 0 : field.code);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
|
-
if (userSelected && !(userSelected !== null && userSelected !== void 0 && userSelected.cellphone) && (validationFields !== null && validationFields !== void 0 && (_validationFields$
|
|
150
|
+
if (userSelected && !(userSelected !== null && userSelected !== void 0 && userSelected.cellphone) && (validationFields !== null && validationFields !== void 0 && (_validationFields$fie9 = validationFields.fields) !== null && _validationFields$fie9 !== void 0 && (_validationFields$fie9 = _validationFields$fie9.checkout) !== null && _validationFields$fie9 !== void 0 && (_validationFields$fie9 = _validationFields$fie9.cellphone) !== null && _validationFields$fie9 !== void 0 && _validationFields$fie9.enabled && validationFields !== null && validationFields !== void 0 && (_validationFields$fie10 = validationFields.fields) !== null && _validationFields$fie10 !== void 0 && (_validationFields$fie10 = _validationFields$fie10.checkout) !== null && _validationFields$fie10 !== void 0 && (_validationFields$fie10 = _validationFields$fie10.cellphone) !== null && _validationFields$fie10 !== void 0 && _validationFields$fie10.required || (configs === null || configs === void 0 || (_configs$verification = configs.verification_phone_required) === null || _configs$verification === void 0 ? void 0 : _configs$verification.value) === '1')) {
|
|
151
151
|
_requiredFields.push('cellphone');
|
|
152
152
|
}
|
|
153
153
|
setRequiredFields(_requiredFields);
|
|
@@ -166,8 +166,8 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
166
166
|
setUserErrors(errors);
|
|
167
167
|
};
|
|
168
168
|
(0, _react.useEffect)(function () {
|
|
169
|
-
var _validationFields$
|
|
170
|
-
if (validationFields && validationFields !== null && validationFields !== void 0 && (_validationFields$
|
|
169
|
+
var _validationFields$fie11;
|
|
170
|
+
if (validationFields && validationFields !== null && validationFields !== void 0 && (_validationFields$fie11 = validationFields.fields) !== null && _validationFields$fie11 !== void 0 && _validationFields$fie11.checkout) {
|
|
171
171
|
checkValidationFields();
|
|
172
172
|
}
|
|
173
173
|
}, [validationFields, user, customerState]);
|
|
@@ -194,9 +194,9 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
194
194
|
}, /*#__PURE__*/_react.default.createElement(_VscWarning.default, null), /*#__PURE__*/_react.default.createElement("h1", null, t('CART_STATUS_CANCEL_MESSAGE', 'The payment has not been successful, please try again'))), /*#__PURE__*/_react.default.createElement(_PaymentOptions.PaymentOptions, {
|
|
195
195
|
cart: cart,
|
|
196
196
|
isDisabled: (cart === null || cart === void 0 ? void 0 : cart.status) === 2,
|
|
197
|
-
businessId: !isGiftCardCart ? businessDetails === null || businessDetails === void 0
|
|
197
|
+
businessId: !isGiftCardCart ? businessDetails === null || businessDetails === void 0 || (_businessDetails$busi3 = businessDetails.business) === null || _businessDetails$busi3 === void 0 ? void 0 : _businessDetails$busi3.id : -1,
|
|
198
198
|
isLoading: !isGiftCardCart ? businessDetails.loading : false,
|
|
199
|
-
paymethods: businessDetails === null || businessDetails === void 0
|
|
199
|
+
paymethods: businessDetails === null || businessDetails === void 0 || (_businessDetails$busi4 = businessDetails.business) === null || _businessDetails$busi4 === void 0 ? void 0 : _businessDetails$busi4.paymethods,
|
|
200
200
|
onPaymentChange: handlePaymethodChange,
|
|
201
201
|
errorCash: errorCash,
|
|
202
202
|
setErrorCash: setErrorCash,
|
|
@@ -212,13 +212,13 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
212
212
|
})), isWalletEnabled && !(businessDetails !== null && businessDetails !== void 0 && businessDetails.loading) && /*#__PURE__*/_react.default.createElement(_PaymentOptionWallet.PaymentOptionWallet, {
|
|
213
213
|
cart: cart,
|
|
214
214
|
loyaltyPlansState: loyaltyPlansState,
|
|
215
|
-
businessConfigs: businessDetails === null || businessDetails === void 0
|
|
215
|
+
businessConfigs: businessDetails === null || businessDetails === void 0 || (_businessDetails$busi5 = businessDetails.business) === null || _businessDetails$busi5 === void 0 ? void 0 : _businessDetails$busi5.configs
|
|
216
216
|
}), driverTipsField && /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
|
|
217
217
|
businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
|
|
218
218
|
driverTipsOptions: driverTipsOptions,
|
|
219
|
-
isFixedPrice: parseInt(configs === null || configs === void 0
|
|
220
|
-
isDriverTipUseCustom: !!parseInt(configs === null || configs === void 0
|
|
221
|
-
driverTip: parseInt(configs === null || configs === void 0
|
|
219
|
+
isFixedPrice: parseInt(configs === null || configs === void 0 || (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 1,
|
|
220
|
+
isDriverTipUseCustom: !!parseInt(configs === null || configs === void 0 || (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10),
|
|
221
|
+
driverTip: parseInt(configs === null || configs === void 0 || (_configs$driver_tip_t2 = configs.driver_tip_type) === null || _configs$driver_tip_t2 === void 0 ? void 0 : _configs$driver_tip_t2.value, 10) === 1 ? cart === null || cart === void 0 ? void 0 : cart.driver_tip : cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate,
|
|
222
222
|
cart: cart,
|
|
223
223
|
useOrderContext: true
|
|
224
224
|
}), !cartState.loading && cart && /*#__PURE__*/_react.default.createElement(_CartBill.CartBill, {
|
|
@@ -229,7 +229,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
229
229
|
onClick: function onClick() {
|
|
230
230
|
return handlePlaceOrder();
|
|
231
231
|
}
|
|
232
|
-
}, !(cart !== null && cart !== void 0 && cart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order'), ": ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.maximum)) : !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:'), " ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.minimum)) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order'))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_NOT_PAYMENT_SELECTED', 'Please, select a payment method to place order.')), !(cart !== null && cart !== void 0 && cart.valid_products) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')), isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')), options.type === 1 && (validationFields === null || validationFields === void 0
|
|
232
|
+
}, !(cart !== null && cart !== void 0 && cart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order'), ": ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.maximum)) : !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:'), " ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.minimum)) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order'))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_NOT_PAYMENT_SELECTED', 'Please, select a payment method to place order.')), !(cart !== null && cart !== void 0 && cart.valid_products) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')), isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')), options.type === 1 && (validationFields === null || validationFields === void 0 || (_validationFields$fie12 = validationFields.fields) === null || _validationFields$fie12 === void 0 || (_validationFields$fie12 = _validationFields$fie12.checkout) === null || _validationFields$fie12 === void 0 || (_validationFields$fie12 = _validationFields$fie12.driver_tip) === null || _validationFields$fie12 === void 0 ? void 0 : _validationFields$fie12.enabled) && (validationFields === null || validationFields === void 0 || (_validationFields$fie13 = validationFields.fields) === null || _validationFields$fie13 === void 0 || (_validationFields$fie13 = _validationFields$fie13.checkout) === null || _validationFields$fie13 === void 0 || (_validationFields$fie13 = _validationFields$fie13.driver_tip) === null || _validationFields$fie13 === void 0 ? void 0 : _validationFields$fie13.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.')), validateCommentsCartField && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_INVALID_CART_COMMENTS', 'Cart comments is required.')), validateZipcodeCard && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('WARNING_CARD_ZIPCODE_REQUIRED', 'Your card selected has not zipcode')), (cart === null || cart === void 0 ? void 0 : cart.valid_preorder) !== undefined && !(cart !== null && cart !== void 0 && cart.valid_preorder) && /*#__PURE__*/_react.default.createElement(_styles2.WarningText, null, t('INVALID_CART_MOMENT', 'Selected schedule time is invalid, please select a schedule into the business schedule interval.')), /*#__PURE__*/_react.default.createElement(_Shared.Alert, {
|
|
233
233
|
title: t('CUSTOMER_DETAILS', 'Customer Details'),
|
|
234
234
|
content: alertState.content,
|
|
235
235
|
acceptText: t('ACCEPT', 'Accept'),
|
|
@@ -296,11 +296,11 @@ var Checkout = function Checkout(props) {
|
|
|
296
296
|
setIsResetPaymethod = _useState20[1];
|
|
297
297
|
var cartsWithProducts = (orderState === null || orderState === void 0 ? void 0 : orderState.carts) && (((_Object$values = Object.values(orderState === null || orderState === void 0 ? void 0 : orderState.carts)) === null || _Object$values === void 0 ? void 0 : _Object$values.filter(function (cart) {
|
|
298
298
|
var _cart$products;
|
|
299
|
-
return (cart === null || cart === void 0 ? void 0 : cart.products) && (cart === null || cart === void 0
|
|
299
|
+
return (cart === null || cart === void 0 ? void 0 : cart.products) && (cart === null || cart === void 0 || (_cart$products = cart.products) === null || _cart$products === void 0 ? void 0 : _cart$products.length);
|
|
300
300
|
})) || null);
|
|
301
301
|
var carts = businessSlug ? cartsWithProducts.filter(function (cart) {
|
|
302
302
|
var _cart$business;
|
|
303
|
-
return (cart === null || cart === void 0
|
|
303
|
+
return (cart === null || cart === void 0 || (_cart$business = cart.business) === null || _cart$business === void 0 ? void 0 : _cart$business.slug) === businessSlug || businessSlug === (cart === null || cart === void 0 ? void 0 : cart.business_id);
|
|
304
304
|
}) : cartsWithProducts;
|
|
305
305
|
var closeAlert = function closeAlert() {
|
|
306
306
|
setAlertState({
|
|
@@ -327,7 +327,7 @@ var Checkout = function Checkout(props) {
|
|
|
327
327
|
}, [errors]);
|
|
328
328
|
var getOrder = /*#__PURE__*/function () {
|
|
329
329
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cartId) {
|
|
330
|
-
var _result$order, result, cart, userCustomer, url, response, content, _result,
|
|
330
|
+
var _result$order, result, cart, userCustomer, url, response, content, _result, credomaticData, urlParams, paramsObj, _confirmCartRes$resul, confirmCartRes, _cart, spotNumberFromStorage, _JSON$parse, _JSON$parse2, _cart2, spotNumber, slug;
|
|
331
331
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
332
332
|
while (1) switch (_context.prev = _context.next) {
|
|
333
333
|
case 0:
|
|
@@ -382,7 +382,7 @@ var Checkout = function Checkout(props) {
|
|
|
382
382
|
break;
|
|
383
383
|
}
|
|
384
384
|
credomaticData = null;
|
|
385
|
-
if (((_result = result) === null || _result === void 0
|
|
385
|
+
if (((_result = result) === null || _result === void 0 || (_result = _result.paymethod_data) === null || _result === void 0 ? void 0 : _result.gateway) === 'credomatic') {
|
|
386
386
|
urlParams = new URLSearchParams(window.location.search);
|
|
387
387
|
paramsObj = Object.fromEntries(urlParams.entries());
|
|
388
388
|
credomaticData = {
|
|
@@ -426,7 +426,7 @@ var Checkout = function Checkout(props) {
|
|
|
426
426
|
if (spotNumberFromStorage) {
|
|
427
427
|
spotNumber = (_JSON$parse = JSON.parse(spotNumberFromStorage)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.tableNumber;
|
|
428
428
|
slug = (_JSON$parse2 = JSON.parse(spotNumberFromStorage)) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2.slug;
|
|
429
|
-
if (((_cart2 = _cart) === null || _cart2 === void 0
|
|
429
|
+
if (((_cart2 = _cart) === null || _cart2 === void 0 || (_cart2 = _cart2.business) === null || _cart2 === void 0 ? void 0 : _cart2.slug) === slug) {
|
|
430
430
|
_cart = _objectSpread(_objectSpread({}, _cart), {}, {
|
|
431
431
|
spot_number: parseInt(spotNumber, 10)
|
|
432
432
|
});
|
|
@@ -14,7 +14,9 @@ var _Map = require("../Map");
|
|
|
14
14
|
var _SelectProducts = require("../SelectProducts");
|
|
15
15
|
var _Checkout = require("../Checkout");
|
|
16
16
|
var _Shared = require("../../../Shared");
|
|
17
|
-
var _styles = require("
|
|
17
|
+
var _styles = require("../../../../styles");
|
|
18
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
19
|
+
var _styles2 = require("./styles");
|
|
18
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -46,10 +48,16 @@ var CustomOrderDetailsUI = function CustomOrderDetailsUI(props) {
|
|
|
46
48
|
cart = props.cart,
|
|
47
49
|
onClose = props.onClose,
|
|
48
50
|
handleOpenCustomOrderDetail = props.handleOpenCustomOrderDetail,
|
|
49
|
-
|
|
51
|
+
handlePlaceOrderByTotal = props.handlePlaceOrderByTotal,
|
|
52
|
+
extraFields = props.extraFields,
|
|
53
|
+
setExtraFields = props.setExtraFields,
|
|
54
|
+
actionState = props.actionState;
|
|
50
55
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
51
56
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
52
57
|
t = _useLanguage2[1];
|
|
58
|
+
var _useValidationFields = (0, _orderingComponentsAdminExternal.useValidationFields)(),
|
|
59
|
+
_useValidationFields2 = _slicedToArray(_useValidationFields, 1),
|
|
60
|
+
validationFields = _useValidationFields2[0];
|
|
53
61
|
var _useOrder = (0, _orderingComponentsAdminExternal.useOrder)(),
|
|
54
62
|
_useOrder2 = _slicedToArray(_useOrder, 2),
|
|
55
63
|
orderState = _useOrder2[0],
|
|
@@ -61,6 +69,10 @@ var CustomOrderDetailsUI = function CustomOrderDetailsUI(props) {
|
|
|
61
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
62
70
|
alertState = _useState2[0],
|
|
63
71
|
setAlertState = _useState2[1];
|
|
72
|
+
var _useState3 = (0, _react.useState)(true),
|
|
73
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
74
|
+
isOrderByProducts = _useState4[0],
|
|
75
|
+
setIsOrderByProducts = _useState4[1];
|
|
64
76
|
var handleCloseAlert = function handleCloseAlert() {
|
|
65
77
|
setCustomersPhones(_objectSpread(_objectSpread({}, customersPhones), {}, {
|
|
66
78
|
error: null
|
|
@@ -70,6 +82,27 @@ var CustomOrderDetailsUI = function CustomOrderDetailsUI(props) {
|
|
|
70
82
|
content: []
|
|
71
83
|
});
|
|
72
84
|
};
|
|
85
|
+
var handlePlaceOrder = function handlePlaceOrder() {
|
|
86
|
+
var _validationFields$fie, _validationFields$fie2;
|
|
87
|
+
var errMessage = [];
|
|
88
|
+
if (!selectedBusiness) {
|
|
89
|
+
errMessage.push(t('VALIDATION_ERROR_REQUIRED', 'Name is required').replace('_attribute_', t('BUSINESS', 'Business')));
|
|
90
|
+
}
|
|
91
|
+
if (!(extraFields !== null && extraFields !== void 0 && extraFields.total)) {
|
|
92
|
+
errMessage.push(t('VALIDATION_ERROR_REQUIRED', 'Name is required').replace('_attribute_', t('TOTAL', 'Total')));
|
|
93
|
+
}
|
|
94
|
+
if (validationFields !== null && validationFields !== void 0 && (_validationFields$fie = validationFields.fields) !== null && _validationFields$fie !== void 0 && (_validationFields$fie = _validationFields$fie.checkout) !== null && _validationFields$fie !== void 0 && (_validationFields$fie = _validationFields$fie.comments) !== null && _validationFields$fie !== void 0 && _validationFields$fie.enabled && validationFields !== null && validationFields !== void 0 && (_validationFields$fie2 = validationFields.fields) !== null && _validationFields$fie2 !== void 0 && (_validationFields$fie2 = _validationFields$fie2.checkout) !== null && _validationFields$fie2 !== void 0 && (_validationFields$fie2 = _validationFields$fie2.comments) !== null && _validationFields$fie2 !== void 0 && _validationFields$fie2.required && !(extraFields !== null && extraFields !== void 0 && extraFields.comment)) {
|
|
95
|
+
errMessage.push(t('VALIDATION_ERROR_REQUIRED', 'Name is required').replace('_attribute_', t('COMMENT', 'Comment')));
|
|
96
|
+
}
|
|
97
|
+
if (errMessage.length > 0) {
|
|
98
|
+
setAlertState({
|
|
99
|
+
open: true,
|
|
100
|
+
content: errMessage
|
|
101
|
+
});
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
handlePlaceOrderByTotal();
|
|
105
|
+
};
|
|
73
106
|
var customerAddress = (0, _react.useMemo)(function () {
|
|
74
107
|
var address = null;
|
|
75
108
|
if (selectedUser !== null && selectedUser !== void 0 && selectedUser.addresses) {
|
|
@@ -95,7 +128,22 @@ var CustomOrderDetailsUI = function CustomOrderDetailsUI(props) {
|
|
|
95
128
|
});
|
|
96
129
|
}
|
|
97
130
|
}, [customersPhones === null || customersPhones === void 0 ? void 0 : customersPhones.error]);
|
|
98
|
-
|
|
131
|
+
(0, _react.useEffect)(function () {
|
|
132
|
+
if (actionState !== null && actionState !== void 0 && actionState.error) {
|
|
133
|
+
setAlertState({
|
|
134
|
+
open: true,
|
|
135
|
+
content: actionState === null || actionState === void 0 ? void 0 : actionState.error
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}, [actionState]);
|
|
139
|
+
(0, _react.useEffect)(function () {
|
|
140
|
+
if (!isOrderByProducts) {
|
|
141
|
+
setExtraFields({
|
|
142
|
+
external_id: extraFields === null || extraFields === void 0 ? void 0 : extraFields.external_id
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}, [isOrderByProducts]);
|
|
146
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles2.DetailsContainer, {
|
|
99
147
|
className: "custom-order-content"
|
|
100
148
|
}, /*#__PURE__*/_react.default.createElement("h2", null, t('CREATE_CUSTOM_ORDER', 'Create custom order')), /*#__PURE__*/_react.default.createElement(_SelectCustomer.SelectCustomer, {
|
|
101
149
|
phone: phone,
|
|
@@ -104,8 +152,7 @@ var CustomOrderDetailsUI = function CustomOrderDetailsUI(props) {
|
|
|
104
152
|
setSelectedUser: setSelectedUser,
|
|
105
153
|
onChangeNumber: onChangeNumber,
|
|
106
154
|
handleParentSidebarMove: handleParentSidebarMove,
|
|
107
|
-
customerAddress: customerAddress
|
|
108
|
-
defaultCountryCodeState: defaultCountryCodeState
|
|
155
|
+
customerAddress: customerAddress
|
|
109
156
|
}), (customerAddress === null || customerAddress === void 0 ? void 0 : customerAddress.location) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_OrderTypeSelector.OrderTypeSelector, null), /*#__PURE__*/_react.default.createElement(_SelectBusinesses.SelectBusinesses, {
|
|
110
157
|
businessList: businessList,
|
|
111
158
|
selectedBusiness: selectedBusiness,
|
|
@@ -114,19 +161,65 @@ var CustomOrderDetailsUI = function CustomOrderDetailsUI(props) {
|
|
|
114
161
|
customer: selectedUser,
|
|
115
162
|
customerLocation: customerAddress === null || customerAddress === void 0 ? void 0 : customerAddress.location,
|
|
116
163
|
business: selectedBusiness
|
|
117
|
-
}),
|
|
164
|
+
}), /*#__PURE__*/_react.default.createElement(_styles2.ToggleOptions, null, /*#__PURE__*/_react.default.createElement(_styles2.RaidoButton, {
|
|
165
|
+
onClick: function onClick() {
|
|
166
|
+
return setIsOrderByProducts(true);
|
|
167
|
+
}
|
|
168
|
+
}, isOrderByProducts ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.RecordCircleFill, {
|
|
169
|
+
className: "active"
|
|
170
|
+
}) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Circle, null), /*#__PURE__*/_react.default.createElement("span", null, t('ORDER_BY_PRODUCTS', 'Order by products'))), /*#__PURE__*/_react.default.createElement(_styles2.RaidoButton, {
|
|
171
|
+
onClick: function onClick() {
|
|
172
|
+
return setIsOrderByProducts(false);
|
|
173
|
+
}
|
|
174
|
+
}, isOrderByProducts ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Circle, null) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.RecordCircleFill, {
|
|
175
|
+
className: "active"
|
|
176
|
+
}), /*#__PURE__*/_react.default.createElement("span", null, t('ORDER_BY_TOTAL', 'Order by total')))), !isOrderByProducts && /*#__PURE__*/_react.default.createElement(_styles2.FormControl, null, /*#__PURE__*/_react.default.createElement("label", null, t('TOTAL', 'Total')), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
177
|
+
value: (extraFields === null || extraFields === void 0 ? void 0 : extraFields.total) || '',
|
|
178
|
+
onKeyPress: function onKeyPress(e) {
|
|
179
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
180
|
+
e.preventDefault();
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
onChange: function onChange(e) {
|
|
184
|
+
return setExtraFields(_objectSpread(_objectSpread({}, extraFields), {}, {
|
|
185
|
+
total: e.target.value
|
|
186
|
+
}));
|
|
187
|
+
},
|
|
188
|
+
placeholder: t('TOTAL', 'Total')
|
|
189
|
+
})), /*#__PURE__*/_react.default.createElement(_styles2.FormControl, null, /*#__PURE__*/_react.default.createElement("label", null, t('EXTERNAL_ID', 'External id'), /*#__PURE__*/_react.default.createElement("span", null, t('OPTIONAL', 'Optional'))), /*#__PURE__*/_react.default.createElement(_styles.Input, {
|
|
190
|
+
value: (extraFields === null || extraFields === void 0 ? void 0 : extraFields.external_id) || '',
|
|
191
|
+
onChange: function onChange(e) {
|
|
192
|
+
return setExtraFields(_objectSpread(_objectSpread({}, extraFields), {}, {
|
|
193
|
+
external_id: e.target.value
|
|
194
|
+
}));
|
|
195
|
+
},
|
|
196
|
+
placeholder: t('EXTERNAL_ID', 'External id')
|
|
197
|
+
})), !isOrderByProducts && /*#__PURE__*/_react.default.createElement(_styles2.FormControl, null, /*#__PURE__*/_react.default.createElement("label", null, t('COMMENT', 'Comment')), /*#__PURE__*/_react.default.createElement(_styles.TextArea, {
|
|
198
|
+
value: (extraFields === null || extraFields === void 0 ? void 0 : extraFields.comment) || '',
|
|
199
|
+
onChange: function onChange(e) {
|
|
200
|
+
return setExtraFields(_objectSpread(_objectSpread({}, extraFields), {}, {
|
|
201
|
+
comment: e.target.value
|
|
202
|
+
}));
|
|
203
|
+
},
|
|
204
|
+
placeholder: t('COMMENT', 'Comment')
|
|
205
|
+
})), selectedBusiness && isOrderByProducts && /*#__PURE__*/_react.default.createElement(_SelectProducts.SelectProducts, {
|
|
118
206
|
productList: productList,
|
|
119
207
|
getProducts: getProducts,
|
|
120
208
|
handeUpdateProductCart: handeUpdateProductCart,
|
|
121
209
|
cart: cart,
|
|
122
210
|
business: selectedBusiness
|
|
123
|
-
}), cart && (cart === null || cart === void 0 ? void 0 : cart.products.length) > 0 && /*#__PURE__*/_react.default.createElement(_Checkout.Checkout, {
|
|
211
|
+
}), cart && (cart === null || cart === void 0 ? void 0 : cart.products.length) > 0 && isOrderByProducts && /*#__PURE__*/_react.default.createElement(_Checkout.Checkout, {
|
|
124
212
|
cartUuid: cart.uuid,
|
|
125
213
|
onPlaceOrderClick: function onPlaceOrderClick(data, paymethod, cart) {
|
|
126
214
|
(cart === null || cart === void 0 ? void 0 : cart.uuid) && handleOpenCustomOrderDetail(cart.uuid);
|
|
127
215
|
onClose();
|
|
128
|
-
}
|
|
129
|
-
|
|
216
|
+
},
|
|
217
|
+
extraFields: extraFields
|
|
218
|
+
}), !isOrderByProducts && /*#__PURE__*/_react.default.createElement(_styles2.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Button, {
|
|
219
|
+
color: "primary",
|
|
220
|
+
onClick: handlePlaceOrder,
|
|
221
|
+
disabled: actionState === null || actionState === void 0 ? void 0 : actionState.loading
|
|
222
|
+
}, t('PLACE_ORDER', 'Place Order')))), /*#__PURE__*/_react.default.createElement(_Shared.Alert, {
|
|
130
223
|
title: t('ERROR', 'Error'),
|
|
131
224
|
open: alertState.open,
|
|
132
225
|
content: alertState.content,
|
|
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.DetailsContainer = void 0;
|
|
7
|
+
exports.ToggleOptions = exports.RaidoButton = exports.FormControl = exports.DetailsContainer = exports.ButtonWrapper = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -14,4 +14,20 @@ var DetailsContainer = _styledComponents.default.div(_templateObject || (_templa
|
|
|
14
14
|
var _props$theme;
|
|
15
15
|
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: 40px;\n "]))) : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: 40px;\n "])));
|
|
16
16
|
});
|
|
17
|
-
exports.DetailsContainer = DetailsContainer;
|
|
17
|
+
exports.DetailsContainer = DetailsContainer;
|
|
18
|
+
var FormControl = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 20px;\n label {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n margin-bottom: 10px;\n span {\n font-size: 12px;\n color: ", ";\n }\n }\n input, textarea {\n width: 100%;\n }\n"])), function (props) {
|
|
19
|
+
return props.theme.colors.primary;
|
|
20
|
+
});
|
|
21
|
+
exports.FormControl = FormControl;
|
|
22
|
+
var ToggleOptions = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-top: 30px;\n"])));
|
|
23
|
+
exports.ToggleOptions = ToggleOptions;
|
|
24
|
+
var RaidoButton = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 15px;\n cursor: pointer;\n\n svg {\n color: ", ";\n &.active {\n color: ", ";\n }\n font-size: 16px;\n min-width: 16px;\n margin-right: 12px;\n ", "\n }\n span {\n font-size: 14px;\n line-height: 24px;\n margin: 0px;\n }\n"])), function (props) {
|
|
25
|
+
return props.theme.colors.secundaryLight;
|
|
26
|
+
}, function (props) {
|
|
27
|
+
return props.theme.colors.primary;
|
|
28
|
+
}, function (props) {
|
|
29
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: 13px;\n margin-right: 0px;\n "])));
|
|
30
|
+
});
|
|
31
|
+
exports.RaidoButton = RaidoButton;
|
|
32
|
+
var ButtonWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-top: 30px;\n button {\n border-radius: 8px;\n height: 44px;\n }\n"])));
|
|
33
|
+
exports.ButtonWrapper = ButtonWrapper;
|
|
@@ -48,15 +48,15 @@ var DriverTipsUI = function DriverTipsUI(props) {
|
|
|
48
48
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
49
49
|
value = _useState4[0],
|
|
50
50
|
setvalue = _useState4[1];
|
|
51
|
-
var isFixedPriceType = parseInt(configs === null || configs === void 0
|
|
51
|
+
var isFixedPriceType = parseInt(configs === null || configs === void 0 || (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 1;
|
|
52
52
|
var currentTip = customTip ? parseFloat(driverTip || 0) > 0 : (!customTip && !driverTipsOptions.includes(driverTip) && parseFloat(driverTip || 0)) > 0;
|
|
53
53
|
var handleChangeDriverTip = function handleChangeDriverTip(e) {
|
|
54
54
|
var _e$target, _e$target2;
|
|
55
|
-
var tip = Number(e === null || e === void 0
|
|
55
|
+
var tip = Number(e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
56
56
|
if (isNaN(tip) || tip < 0) return;
|
|
57
|
-
setvalue(e === null || e === void 0
|
|
57
|
+
setvalue(e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value);
|
|
58
58
|
};
|
|
59
|
-
var placeholderCurrency = !isFixedPriceType ? '0%' : ((configs === null || configs === void 0
|
|
59
|
+
var placeholderCurrency = !isFixedPriceType ? '0%' : ((configs === null || configs === void 0 || (_configs$currency_pos = configs.currency_position) === null || _configs$currency_pos === void 0 ? void 0 : _configs$currency_pos.value) || 'left') === 'left' ? "".concat(configs === null || configs === void 0 || (_configs$format_numbe = configs.format_number_currency) === null || _configs$format_numbe === void 0 ? void 0 : _configs$format_numbe.value, "0") : "0".concat(configs === null || configs === void 0 || (_configs$format_numbe2 = configs.format_number_currency) === null || _configs$format_numbe2 === void 0 ? void 0 : _configs$format_numbe2.value);
|
|
60
60
|
var multiCartTipsAmmout = carts === null || carts === void 0 ? void 0 : carts.reduce(function (total, cart) {
|
|
61
61
|
return total + parseFloat((cart === null || cart === void 0 ? void 0 : cart.driver_tip) || 0);
|
|
62
62
|
}, 0);
|
|
@@ -38,14 +38,14 @@ var Map = function Map(props) {
|
|
|
38
38
|
var mapRef = (0, _react.useRef)(null);
|
|
39
39
|
var googleMapsApiKey = (0, _react.useMemo)(function () {
|
|
40
40
|
var _configs$google_maps_;
|
|
41
|
-
return configs === null || configs === void 0
|
|
41
|
+
return configs === null || configs === void 0 || (_configs$google_maps_ = configs.google_maps_api_key) === null || _configs$google_maps_ === void 0 ? void 0 : _configs$google_maps_.value;
|
|
42
42
|
}, [configs]);
|
|
43
43
|
var deliveryType = (0, _react.useMemo)(function () {
|
|
44
44
|
var _orderState$options;
|
|
45
|
-
return orderState === null || orderState === void 0
|
|
45
|
+
return orderState === null || orderState === void 0 || (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type;
|
|
46
46
|
}, [orderState]);
|
|
47
|
-
var defaultLatitude = Number(configs === null || configs === void 0
|
|
48
|
-
var defaultLongitude = Number(configs === null || configs === void 0
|
|
47
|
+
var defaultLatitude = Number(configs === null || configs === void 0 || (_configs$location_def = configs.location_default_latitude) === null || _configs$location_def === void 0 ? void 0 : _configs$location_def.value);
|
|
48
|
+
var defaultLongitude = Number(configs === null || configs === void 0 || (_configs$location_def2 = configs.location_default_longitude) === null || _configs$location_def2 === void 0 ? void 0 : _configs$location_def2.value);
|
|
49
49
|
var isInvalidDefaultLocation = isNaN(defaultLatitude) || isNaN(defaultLongitude);
|
|
50
50
|
var defaultCenter = {
|
|
51
51
|
lat: !isInvalidDefaultLocation ? defaultLatitude : 40.7744146,
|
|
@@ -144,7 +144,7 @@ var Map = function Map(props) {
|
|
|
144
144
|
var _newCircleZone = new window.google.maps.Circle(_objectSpread(_objectSpread({}, greenFillStyle), {}, {
|
|
145
145
|
editable: false,
|
|
146
146
|
center: _center,
|
|
147
|
-
radius: (deliveryZone === null || deliveryZone === void 0 ? void 0 : deliveryZone.data.distance) * units[deliveryZone === null || deliveryZone === void 0
|
|
147
|
+
radius: (deliveryZone === null || deliveryZone === void 0 ? void 0 : deliveryZone.data.distance) * units[deliveryZone === null || deliveryZone === void 0 || (_deliveryZone$data4 = deliveryZone.data) === null || _deliveryZone$data4 === void 0 ? void 0 : _deliveryZone$data4.unit]
|
|
148
148
|
}));
|
|
149
149
|
_newCircleZone.setMap(map);
|
|
150
150
|
bounds.union(_newCircleZone.getBounds());
|
|
@@ -187,12 +187,12 @@ var Map = function Map(props) {
|
|
|
187
187
|
// fit map center and zoone
|
|
188
188
|
var newBounds = {
|
|
189
189
|
ne: {
|
|
190
|
-
lat: (_bounds$getNorthEast = bounds.getNorthEast()) === null || _bounds$getNorthEast === void 0
|
|
191
|
-
lng: (_bounds$getNorthEast2 = bounds.getNorthEast()) === null || _bounds$getNorthEast2 === void 0
|
|
190
|
+
lat: (_bounds$getNorthEast = bounds.getNorthEast()) === null || _bounds$getNorthEast === void 0 || (_bounds$getNorthEast$ = _bounds$getNorthEast.lat) === null || _bounds$getNorthEast$ === void 0 ? void 0 : _bounds$getNorthEast$.call(_bounds$getNorthEast),
|
|
191
|
+
lng: (_bounds$getNorthEast2 = bounds.getNorthEast()) === null || _bounds$getNorthEast2 === void 0 || (_bounds$getNorthEast3 = _bounds$getNorthEast2.lng) === null || _bounds$getNorthEast3 === void 0 ? void 0 : _bounds$getNorthEast3.call(_bounds$getNorthEast2)
|
|
192
192
|
},
|
|
193
193
|
sw: {
|
|
194
|
-
lat: (_bounds$getSouthWest = bounds.getSouthWest()) === null || _bounds$getSouthWest === void 0
|
|
195
|
-
lng: (_bounds$getSouthWest2 = bounds.getSouthWest()) === null || _bounds$getSouthWest2 === void 0
|
|
194
|
+
lat: (_bounds$getSouthWest = bounds.getSouthWest()) === null || _bounds$getSouthWest === void 0 || (_bounds$getSouthWest$ = _bounds$getSouthWest.lat) === null || _bounds$getSouthWest$ === void 0 ? void 0 : _bounds$getSouthWest$.call(_bounds$getSouthWest),
|
|
195
|
+
lng: (_bounds$getSouthWest2 = bounds.getSouthWest()) === null || _bounds$getSouthWest2 === void 0 || (_bounds$getSouthWest3 = _bounds$getSouthWest2.lng) === null || _bounds$getSouthWest3 === void 0 ? void 0 : _bounds$getSouthWest3.call(_bounds$getSouthWest2)
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
var mapSize = {
|
|
@@ -240,8 +240,8 @@ var Map = function Map(props) {
|
|
|
240
240
|
yesIWantToUseGoogleMapApiInternals: true
|
|
241
241
|
}, (business === null || business === void 0 ? void 0 : business.location) && /*#__PURE__*/_react.default.createElement(_InterActOrderMarker.InterActOrderMarker, {
|
|
242
242
|
business: business,
|
|
243
|
-
lat: business === null || business === void 0
|
|
244
|
-
lng: business === null || business === void 0
|
|
243
|
+
lat: business === null || business === void 0 || (_business$location = business.location) === null || _business$location === void 0 ? void 0 : _business$location.lat,
|
|
244
|
+
lng: business === null || business === void 0 || (_business$location2 = business.location) === null || _business$location2 === void 0 ? void 0 : _business$location2.lng,
|
|
245
245
|
image: business === null || business === void 0 ? void 0 : business.logo
|
|
246
246
|
}), /*#__PURE__*/_react.default.createElement(_InterActOrderMarker.InterActOrderMarker, {
|
|
247
247
|
customer: customer,
|
|
@@ -23,7 +23,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
23
23
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
24
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
25
|
var OrderTypeSelectorUI = function OrderTypeSelectorUI(props) {
|
|
26
|
-
var _configState$configs
|
|
26
|
+
var _configState$configs;
|
|
27
27
|
var typeSelected = props.typeSelected,
|
|
28
28
|
defaultValue = props.defaultValue,
|
|
29
29
|
orderTypes = props.orderTypes,
|
|
@@ -34,7 +34,7 @@ var OrderTypeSelectorUI = function OrderTypeSelectorUI(props) {
|
|
|
34
34
|
var _useConfig = (0, _orderingComponentsAdminExternal.useConfig)(),
|
|
35
35
|
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
36
36
|
configState = _useConfig2[0];
|
|
37
|
-
var configTypes = (configState === null || configState === void 0
|
|
37
|
+
var configTypes = (configState === null || configState === void 0 || (_configState$configs = configState.configs) === null || _configState$configs === void 0 || (_configState$configs = _configState$configs.order_types_allowed) === null || _configState$configs === void 0 ? void 0 : _configState$configs.value.split('|').map(function (value) {
|
|
38
38
|
return Number(value);
|
|
39
39
|
})) || [];
|
|
40
40
|
var defaultType = configTypes !== null && configTypes !== void 0 && configTypes.includes(typeSelected) ? null : configTypes === null || configTypes === void 0 ? void 0 : configTypes[0];
|
|
@@ -44,7 +44,7 @@ var OrderTypeSelectorUI = function OrderTypeSelectorUI(props) {
|
|
|
44
44
|
setSearchValue = _useState2[1];
|
|
45
45
|
return /*#__PURE__*/_react.default.createElement(_styles2.SelectWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will you delivery type?')), /*#__PURE__*/_react.default.createElement(_styles.DefaultSelect, {
|
|
46
46
|
placeholder: /*#__PURE__*/_react.default.createElement(_styles2.Option, null, t('SELECT_DELIVERY_TYPE', 'Select delivery type')),
|
|
47
|
-
options: configTypes ? orderTypes.filter(function (type) {
|
|
47
|
+
options: configTypes.length > 0 ? orderTypes.filter(function (type) {
|
|
48
48
|
return configTypes === null || configTypes === void 0 ? void 0 : configTypes.includes(type.value);
|
|
49
49
|
}).filter(function (type) {
|
|
50
50
|
return type.name.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase());
|
|
@@ -46,7 +46,7 @@ var PaymentOptionCardUI = function PaymentOptionCardUI(props) {
|
|
|
46
46
|
setAddCardOpen = _useState2[1];
|
|
47
47
|
(0, _react.useEffect)(function () {
|
|
48
48
|
var _cardsList$cards;
|
|
49
|
-
if ((cardsList === null || cardsList === void 0
|
|
49
|
+
if ((cardsList === null || cardsList === void 0 || (_cardsList$cards = cardsList.cards) === null || _cardsList$cards === void 0 ? void 0 : _cardsList$cards.length) > 0) {
|
|
50
50
|
setAddCardOpen(true);
|
|
51
51
|
}
|
|
52
52
|
}, [cardsList === null || cardsList === void 0 ? void 0 : cardsList.cards]);
|
|
@@ -36,11 +36,11 @@ var PaymentOptionCash = function PaymentOptionCash(props) {
|
|
|
36
36
|
var timeout = null;
|
|
37
37
|
var onChangeCash = function onChangeCash(e) {
|
|
38
38
|
var _e$target;
|
|
39
|
-
if (!/^(?=.)([+-]?([0-9]*)(\.([0-9]+))?)$/.test(e === null || e === void 0
|
|
39
|
+
if (!/^(?=.)([+-]?([0-9]*)(\.([0-9]+))?)$/.test(e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value)) return;
|
|
40
40
|
clearTimeout(timeout);
|
|
41
41
|
timeout = setTimeout(function () {
|
|
42
42
|
var _e$target2;
|
|
43
|
-
var cash = parseFloat(e === null || e === void 0
|
|
43
|
+
var cash = parseFloat(e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value);
|
|
44
44
|
cash = isNaN(cash) ? null : cash;
|
|
45
45
|
setvalue(cash);
|
|
46
46
|
if (cash >= orderTotal || !cash) {
|
|
@@ -38,7 +38,7 @@ var PaymentOptionPaypal = function PaymentOptionPaypal(props) {
|
|
|
38
38
|
configs = _useConfig2[0].configs;
|
|
39
39
|
var paymentPaypalProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
40
40
|
UIComponent: PaymentOptionPaypalUI,
|
|
41
|
-
currency: configs === null || configs === void 0
|
|
41
|
+
currency: configs === null || configs === void 0 || (_configs$stripe_curre = configs.stripe_currency) === null || _configs$stripe_curre === void 0 ? void 0 : _configs$stripe_curre.value
|
|
42
42
|
});
|
|
43
43
|
return /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.PaymentOptionPaypal, paymentPaypalProps);
|
|
44
44
|
};
|