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H,EAAAA,EAAAA,KAAA,KAAAG,SAAG,WAAU,KAAEkN,EAAAA,EAAAA,IAAoBoB,EAAOtT,qBAAqBlH,OAAOmE,cAE/E4H,EAAAA,EAAAA,KAAA,OAAAG,UACIH,EAAAA,EAAAA,KAACgM,EAAAA,EAAM,CAAC3L,MAAO,CAAC6C,MAAM,SAAU6M,WAAW/P,EAAAA,EAAAA,KAACmD,EAAAA,EAAI,IAAImB,QAAS,OAAQ7D,QAASoO,EAAmB1O,SAAC,+BA5BtG,OAAO4O,GA5DpC,IAAkC5S,EAwCNnB,CAsDnB,KAIhB,C","sources":["functions/BasketFunctions.js","functions/DiscountFunctions.js","functions/LocationFunctions.js","functions/MenuFunctions.js","functions/OrderCalculationFunctions.js","functions/ServiceFunctions.js","views/menu/ControlCollectionOrDelivery.js","views/menu/checkout/CheckoutDeliveryOrCollectionDetails.js","views/menu/ControlSingleOrRepeat.js","views/menu/checkout/CheckoutRepeatSchedule.js","views/menu/checkout/CheckoutOrderTime.js","views/menu/checkout/CheckoutModalPaymentToggle.js","views/menu/checkout/CheckoutUserDetails.js","views/menu/checkout/CheckoutModal.js","views/menu/checkout/MenuCheckoutBasketLine.js","views/menu/checkout/MenuCheckoutBasket.js","views/shared/SimpleOrderDisplay.js","views/userOrdersAndBookings/UserSubscriptionsSection.js"],"sourcesContent":["import {\r\n ServiceEnumPayAtTable, ServiceEnumPreorder,\r\n ServiceEnumSubscription,\r\n ServiceEnumSingleOrder, ServiceEnumTableBooking,\r\n} from \"./GeneralFunctions\";\r\n\r\nexport function setServiceEnum(menuConfig, serviceEnum) {\r\n menuConfig.basket.serviceOfferingEnum = serviceEnum\r\n refreshServiceCache(menuConfig)\r\n}\r\nexport function refreshServiceCache(menuConfig) {\r\n const serviceEnum = menuConfig.basket.serviceOfferingEnum\r\n menuConfig.isSingleOrder = serviceEnum === ServiceEnumSingleOrder\r\n menuConfig.isSubscription = serviceEnum === ServiceEnumSubscription\r\n menuConfig.isPreorder = serviceEnum === ServiceEnumPreorder\r\n menuConfig.isPayAtTable = serviceEnum === ServiceEnumPayAtTable\r\n menuConfig.isTableBooking = serviceEnum === ServiceEnumTableBooking\r\n}\r\n\r\n\r\n","import * as GeneralFunctions from \"./GeneralFunctions\";\r\n\r\n\r\nexport const discountCategories = [{enumName: \"NHS\", name: \"NHS Staff\"},{enumName: \"Students\", name: \"Students\"},{enumName: \"ArmedForces\", name: \"Armed Forces\"},{enumName: \"OAP\", name:\"OAP\"}]\r\n\r\n\r\nexport const bestGlobalDiscountMultiplier = (establishment) => {\r\n let bestDiscount = bestGlobalDiscountToday(establishment)\r\n if (!bestDiscount)\r\n bestDiscount = 0\r\n return bestDiscount / 100.0\r\n}\r\n\r\nexport const bestGlobalDiscountToday = (establishment) => {\r\n // alert('rest:'+JSON.stringify(establishment))\r\n if (!establishment.discounts)\r\n return\r\n\r\n const discounts = establishment.discounts.filter (discount =>\r\n discount.applicableCategories.length === 0\r\n && (discount.daysOfWeek.length === 0 || discount.daysOfWeek.includes(GeneralFunctions.dayOfWeekCapitalisedName) )\r\n )\r\n if (discounts.length === 0)\r\n return\r\n\r\n let bestDiscount = discounts[0]\r\n discounts.forEach (discount => {\r\n if (discount.discountPercent > bestDiscount.discountPercent)\r\n bestDiscount = discount\r\n })\r\n return bestDiscount.discountPercent\r\n}\r\n","import {makePost} from \"./GeneralFunctions\";\r\nimport {closeBackdropSpinner, openBackdropSpinner} from \"./GlobalStateFunctions\";\r\n\r\n\r\nexport const lookupAddress = (postcode, firstLineOfAddress, setFullAddress, setLongitude, setLatitude, setErrorMessage, setGlobalState) => {\r\n if (!postcode || !firstLineOfAddress) {\r\n alert(\"ERROR: unable to lookup address, without 1st line of address and postcode\")\r\n return\r\n }\r\n openBackdropSpinner(setGlobalState)\r\n makePost(\r\n setGlobalState,\r\n '/api/lookup-address',\r\n JSON.stringify({address1: firstLineOfAddress, postcode: postcode}),\r\n response => {\r\n closeBackdropSpinner(setGlobalState)\r\n\r\n const candidates = response.payload.candidates\r\n if (Object.keys(candidates).length === 0) {\r\n setErrorMessage(\"Unable to locate address. Please confirm that address provided is accurate.\")\r\n return\r\n } else {\r\n setErrorMessage(\"\")\r\n }\r\n\r\n const candidate = candidates[0]\r\n const fullAdd = candidate.formatted_address\r\n if (fullAdd.toLowerCase().includes(postcode.toLowerCase())) {\r\n setFullAddress( fullAdd )\r\n } else {\r\n setErrorMessage(\"Unable to find address, please update the 1st Line of address or postcode and try again.\")\r\n return\r\n }\r\n\r\n const location = candidate.geometry.location\r\n setLongitude( location.lng )\r\n setLatitude( location.lat )\r\n }\r\n )\r\n}\r\n\r\n\r\n","import {\r\n convertToDoubleOrZero, makeFetch, makePost,\r\n reportErrorWithServer,\r\n ServiceEnumPreorder,\r\n ServiceEnumSubscription,\r\n to2dp\r\n} from \"./GeneralFunctions\";\r\nimport {\r\n additionalSpendForFreeDelivery,\r\n calculateDeliveryFeeOrNull,\r\n calculateLinePrice\r\n} from \"./OrderCalculationFunctions\";\r\nimport * as DiscountFunctions from \"./DiscountFunctions\";\r\nimport React from \"react\";\r\nimport {closeReservationsModal, openBackdropSpinner} from \"./GlobalStateFunctions\";\r\nimport {isInFuture, parseJsonDateTimeToDate} from \"./DateFunctions\";\r\nimport {refreshServiceCache} from \"./BasketFunctions\";\r\n\r\nexport const revalueBasket = (setGlobalState, deliveryDetails, menuConfig) => {\r\n\r\n // alert(\"Revaluing basket with menuConfig: \"+JSON.stringify(menuConfig))\r\n\r\n const establishment = menuConfig.establishment\r\n const basket = menuConfig.basket\r\n\r\n basket.establishmentName = establishment.name\r\n basket.establishmentId = establishment.id\r\n\r\n //Note: Order is very important, subtotal required first - don't want to refactor to be stateless as some of the functions used elsewhere\r\n basket.subtotal = to2dp((!basket.lines) ? 0.0 : basket.lines.reduce ( (total, line) => total + calculateLinePrice(line), 0.0 ))\r\n basket.additionalSpendForFreeDelivery = to2dp(additionalSpendForFreeDelivery(deliveryDetails, basket.subtotal))\r\n basket.requiresFeePerMileButNotAvailable = deliveryDetails.deliveryFeePerMile > 0.0 && (basket.distance == null)\r\n if (basket.deliverySelected)\r\n basket.deliveryFee = to2dp(calculateDeliveryFeeOrNull(deliveryDetails, basket.distance, basket.subtotal))\r\n else\r\n basket.deliveryFee = 0.0\r\n // alert(\"requiresFeePerMileButNotAvailable:\"+basket.requiresFeePerMileButNotAvailable+\", distance:\"+basket.distance+\", free delivery after:\"+deliveryDetails.freeDeliveryAfterSpend+\", calculated fee:\"+basket.deliveryFee+\", deliveryFeePerMile\"+ deliveryDetails.deliveryFeePerMile)\r\n if (basket.deliveryFee > 10.0)\r\n reportErrorWithServer(setGlobalState, \"\", \"Abnormal delivery fee detected: \"+basket.deliveryFee+\", for:\"+establishment.ref)\r\n // alert(\"fee:\" + basket.deliveryFee + \", used distance:\"+distance+\", fixed:\"+deliveryDetails.deliveryFixedFee+\", fee/mile:\"+deliveryDetails.deliveryFeePerMile)\r\n basket.discount = to2dp(DiscountFunctions.bestGlobalDiscountMultiplier(establishment) * basket.subtotal)\r\n basket.total = to2dp(basket.subtotal - convertToDoubleOrZero(basket.discount) + convertToDoubleOrZero(basket.deliveryFee))\r\n\r\n refreshServiceCache(menuConfig)\r\n}\r\n\r\n\r\nexport const fetchItem = (menu, categoryId, itemId) => menu.categories.find(cat => cat.id===categoryId).items.find(i => i.id===itemId)\r\n\r\nexport const filterCategories = (menu) => menu.categories.filter(category => category.items.length > 0)\r\n\r\nexport const loadMenu = (setGlobalState, menuId, onComplete) => makeFetch(setGlobalState, \"/api/fetch-menu?menuId=\"+menuId, onComplete)\r\n\r\nexport const isBasketReadyToShowTotalAmount = (basket) => {\r\n if (basket.requiresFeePerMileButNotAvailable)\r\n return false\r\n if (!basket.deliverySelected)\r\n return true\r\n const qualifiesForFreeDelivery = typeof basket.additionalSpendForFreeDelivery === 'number' && basket.additionalSpendForFreeDelivery <= 0.0\r\n if (qualifiesForFreeDelivery)\r\n return true\r\n return basket.deliveryFee != null && basket.deliveryFee >= 0.0\r\n}\r\n\r\nexport const DEBUG_isBasketReadyToShowTotalAmount = (basket) => {\r\n let msg = \"fallback\"\r\n if (basket.requiresFeePerMileButNotAvailable)\r\n msg = \"requires fee per mile\"\r\n if (!basket.deliverySelected)\r\n msg = \"true 0\"\r\n const qualifiesForFreeDelivery = typeof basket.additionalSpendForFreeDelivery === 'number' && basket.additionalSpendForFreeDelivery <= 0.0\r\n if (qualifiesForFreeDelivery)\r\n msg = \"true 1\"\r\n if (basket.deliveryFee != null && basket.deliveryFee >= 0.0)\r\n msg = \"true 2\"\r\n\r\n return
\r\n
DEBUG:
\r\n
distance: {basket.distance}
\r\n
{msg}
\r\n
\r\n}\r\n\r\nfunction serviceEnumToDefaultFrequency(service) {\r\n if (service === ServiceEnumSubscription)\r\n return \"EveryWeek\"\r\n else\r\n return \"Once\"\r\n}\r\n\r\nexport const closeAllMenuModals = (setGlobalState, menuConfig) => {\r\n menuConfig.menuItemModalOpen=false\r\n menuConfig.checkoutModalOpen=false\r\n menuConfig.loginOrGuestModalOpen=false\r\n menuConfig.orderSuccessfulModalOpen=false\r\n menuConfig.orderFailedModalOpen=false\r\n menuConfig.moreInfoModalOpen=false\r\n menuConfig.tableReservationModalOpen=false\r\n menuConfig.tableReservationCompleteModalOpen=false\r\n menuConfig.confirmReservationModalOpen=false\r\n menuConfig.preorderModalOpen=false\r\n if (menuConfig.parent)\r\n closeAllMenuModals(setGlobalState, menuConfig.parent)\r\n closeReservationsModal(setGlobalState)\r\n}\r\nexport function fetchAllSubscriptionIds(currentUser, establishment) {\r\n console.log(\"fetch all subscriptions with establishment:\" + JSON.stringify(establishment.id))\r\n if (!currentUser?.subscriptionIds)\r\n return []\r\n else\r\n return currentUser.subscriptionIds.filter(o => o.establishmentId === establishment.id).map(o => o.subscriptionId)\r\n}\r\nexport function populateMenuConfigWithSubscriptionFromServer(setGlobalState, menuConfig, subscriptionId, onComplete) {\r\n openBackdropSpinner(setGlobalState)\r\n //TODO R2: in the future this could be cached, so that switching between the tabs does not need to go back to server\r\n makeFetch(setGlobalState, \"/api/fetch-subscription?subscriptionId=\"+subscriptionId, subscription => {\r\n menuConfig.selectedSubscription = subscription\r\n menuConfig.basket = subscription.basket\r\n if (onComplete) {\r\n onComplete()\r\n }\r\n refreshServiceCache(menuConfig)\r\n }, \"Unable to load subscription:\"+subscriptionId)\r\n}\r\nexport function pauseSubscription(setGlobalState, setCurrentUser, currentUser, menuConfig, resumesAt, triggerRender) {\r\n openBackdropSpinner(setGlobalState)\r\n makePost(setGlobalState, \"/api/pause-subscription\",\r\n JSON.stringify({ establishmentId: menuConfig.establishment.id, userId: currentUser.id, subscriptionId: menuConfig.selectedSubscription.id, resumesAt: resumesAt }), response => {\r\n makeFetch(setGlobalState, '/api/v0/current-user/', user => {\r\n setCurrentUser(user)\r\n triggerRender()\r\n })\r\n }\r\n )\r\n}\r\n\r\nexport function cancelSubscription(setGlobalState, setCurrentUser, currentUserId, menuConfig, curriedRevalueBasket, triggerRender, onComplete) {\r\n // alert(JSON.stringify(currentUser))\r\n openBackdropSpinner(setGlobalState)\r\n makePost(setGlobalState, \"/api/cancel-subscription\",\r\n JSON.stringify({ establishmentId: menuConfig.establishment.id, userId: currentUserId, subscriptionId: menuConfig.selectedSubscription.id }), response => {\r\n makeFetch(setGlobalState, '/api/v0/current-user/', user => {\r\n setCurrentUser(user)\r\n createEmptyBasket(menuConfig)\r\n menuConfig.allSubscriptionIds = fetchAllSubscriptionIds(user, menuConfig.establishment)\r\n if (onComplete)\r\n onComplete()\r\n triggerRender()\r\n })\r\n\r\n }\r\n )\r\n}\r\nexport const createEmptyBasket = (menuConfig) => {\r\n if (!menuConfig.selectedMenu) {\r\n console.log(\"No Menu Selected, so no basket will be created\")\r\n return\r\n }\r\n console.log(\"Creating an empty basket\")\r\n const establishment = menuConfig.establishment\r\n menuConfig.basket = {\r\n establishmentName: establishment.name,\r\n establishmentRef: establishment.ref,\r\n serviceOfferingEnum: menuConfig.isPreorder ? ServiceEnumPreorder : establishment.servicesOffered[0],\r\n menuId: menuConfig.selectedMenu.id,\r\n frequency: serviceEnumToDefaultFrequency(establishment.servicesOffered[0]),\r\n lines: [], subtotal: 0.0, total: 0.0,\r\n deliverySelected: menuConfig.isPreorder ? false : establishment.takeawaysDetails.deliveryDetails.enabled === true,\r\n paymentMethod:\"\",\r\n subscriptionId: \"\",\r\n subscriptionDeliverySlotId: \"\",\r\n preOrderBookingDate:menuConfig.tableBookingDetails.lastBookingDate,\r\n preOrderBookingId:menuConfig.tableBookingDetails.lastBookingId,\r\n }\r\n refreshServiceCache(menuConfig)\r\n}\r\nexport function isSubscriptionPaused(subscription) {\r\n return subscription && subscription.pausedButResumesAt && isInFuture(parseJsonDateTimeToDate(subscription.pausedButResumesAt))\r\n}\r\n","import * as GeneralFunctions from \"./GeneralFunctions\";\r\n\r\nexport const calculateLinePrice = (line) => {\r\n const basePrice = GeneralFunctions.convertToDoubleOrZero(line.itemPrice)\r\n const choicesPrices = line.requiredChoices.reduce((total, choice) => total + choice.selection.price, 0.0 )\r\n const addPartsPrice = line.addParts.reduce ( (total, part) => total + part.price, 0.0 )\r\n const totalPriceForOneItem = basePrice + choicesPrices + addPartsPrice\r\n\r\n const linePrice = totalPriceForOneItem * line.quantity\r\n // console.log(\"Calculated Line Price: \"+linePrice)\r\n return linePrice\r\n}\r\n\r\nconst relevantForFreeDelivery = (deliveryDetails) => deliveryDetails.deliveryFeeType === \"NoFee\" || deliveryDetails.deliveryFeeType === \"FixedPlusPerMileUntilThreshold\"\r\n\r\nexport const qualificationForFreeDeliveryAchieved = (deliveryDetails, subtotal) => deliveryDetails.freeDeliveryAfterSpend && (subtotal >= deliveryDetails.freeDeliveryAfterSpend)\r\n\r\nexport const additionalSpendForFreeDelivery = (deliveryDetails, subtotal) => !relevantForFreeDelivery(deliveryDetails) || qualificationForFreeDeliveryAchieved(deliveryDetails, subtotal) ? null : Math.min(0.0, deliveryDetails.freeDeliveryAfterSpend - subtotal)\r\n\r\nexport const calculateDeliveryFeeOrNull = (deliveryDetails, distance, subtotal) => qualificationForFreeDeliveryAchieved(deliveryDetails, subtotal) ? 0.0\r\n : deliveryDetails.deliveryFeeType === \"NoFee\" ? null\r\n : deliveryDetails.deliveryFeePerMile > 0.0 && !distance ? null\r\n : deliveryDetails.deliveryFixedFee + (distance * deliveryDetails.deliveryFeePerMile)\r\n","\r\nexport const hasSingleCollectionEnabled = (establishment) => establishment.takeawaysDetails.collectionDetails.enabled\r\nexport const hasSingleDeliveryEnabled = (establishment) => establishment.takeawaysDetails.deliveryDetails.enabled\r\nexport const hasSingleOrderEnabled = (establishment) => hasSingleCollectionEnabled(establishment) || hasSingleDeliveryEnabled(establishment)\r\n\r\nexport const hasSubscriptionCollectionEnabled = (establishment) => establishment.repeatOrdersDetails.collectionDetails.enabled\r\nexport const hasSubscriptionDeliveryEnabled = (establishment) => establishment.repeatOrdersDetails.deliveryDetails.enabled\r\nexport const hasSubscriptionEnabled = (establishment) => hasSubscriptionCollectionEnabled(establishment) || hasSubscriptionDeliveryEnabled(establishment)\r\n\r\nexport const hasSingleAndSubscriptionEnabled = (establishment) => hasSingleOrderEnabled(establishment) && hasSubscriptionEnabled(establishment)\r\nexport const hasSingleOrSubscriptionEnabled = (establishment) => hasSingleOrderEnabled(establishment) || hasSubscriptionEnabled(establishment)\r\n\r\nexport const hasEatInEnabled = (establishment) => establishment.eatInServiceDetails.enabled\r\n\r\nexport const hasAnyServiceEnabled = (establishment) => hasSingleOrSubscriptionEnabled(establishment) || hasEatInEnabled(establishment)\r\n\r\n\r\n\r\n","import {\r\n IconButton,\r\n ToggleButton,\r\n ToggleButtonGroup, Tooltip,\r\n} from \"@mui/material\";\r\nimport React, {useEffect} from \"react\";\r\nimport {\r\n calculateClosedMsg, fetchIsWithinDeliveryPostcodes, fetchIsWithinMaxDeliveryDistance,\r\n fetchTakeawayOrRepeatDetails, fetchUsersPostcodeDistrict\r\n} from \"../../functions/AvailabilityFunctions\";\r\nimport {Redo} from \"@mui/icons-material\";\r\n\r\nexport default function ControlCollectionOrDelivery({isCompactMode, currentUser, menuConfig, revalueBasket, triggerRender}) {\r\n\r\n const establishment = menuConfig.establishment\r\n const basket = menuConfig.basket\r\n\r\n const takeawayOrRepeatDetails = fetchTakeawayOrRepeatDetails(menuConfig)\r\n const usersPostcodeDistrict = fetchUsersPostcodeDistrict(takeawayOrRepeatDetails, currentUser, basket)\r\n const isWithinDeliveryPostcodes = fetchIsWithinDeliveryPostcodes(takeawayOrRepeatDetails, usersPostcodeDistrict)\r\n const isWithinMaxDeliveryDistance = fetchIsWithinMaxDeliveryDistance(takeawayOrRepeatDetails, currentUser, basket.distance)\r\n\r\n useEffect(() => {\r\n if (!menuConfig.canDeliver && basket.deliverySelected) {\r\n basket.deliverySelected = false\r\n if (basket.lines.length > 0) {\r\n alert(\"Unfortunately \"+establishment.name+\" does not deliver your location. Your order has been updated to Collection.\")\r\n }\r\n triggerRender()\r\n }\r\n }, [basket, menuConfig.canDeliver, establishment, triggerRender])\r\n\r\n const onDeliveryUpdate = (e, newValue) => {\r\n updateDelivery(newValue)\r\n }\r\n\r\n function updateDelivery(newValue) {\r\n if (newValue !== null) {\r\n basket.deliverySelected = newValue\r\n menuConfig.closedMsg = calculateClosedMsg(menuConfig)\r\n revalueBasket()\r\n triggerRender()\r\n }\r\n }\r\n\r\n const isDisabled = !menuConfig.canDeliver || !menuConfig.canCollect\r\n\r\n return (\r\n isCompactMode\r\n ? ( isDisabled ?
: updateDelivery(!basket.deliverySelected)}> )\r\n : \r\n
Delivery{!menuConfig.canDeliver &&  n/a}{!menuConfig.canDeliver &&
{!isWithinDeliveryPostcodes ? \"Outside Delivery Area\" : !isWithinMaxDeliveryDistance ? \"Outside Delivery Radius\" : \"\"}
}
\r\n Collection{!menuConfig.canCollect &&  n/a}\r\n
\r\n )\r\n}\r\n","import React, {Fragment, useContext, useEffect} from \"react\"\r\nimport Grid from '@mui/material/Grid'\r\nimport {Divider, TextField} from \"@mui/material\";\r\nimport {lookupAddress} from \"../../../functions/LocationFunctions\";\r\nimport IconButton from \"@mui/material/IconButton\";\r\nimport SearchIcon from \"@mui/icons-material/Search\";\r\nimport GlobalState from \"../../../functions/GlobalStateFunctions\";\r\nimport * as GeneralFunctions from \"../../../functions/GeneralFunctions\";\r\nimport {Edit} from \"@mui/icons-material\";\r\nimport ControlCollectionOrDelivery from \"../ControlCollectionOrDelivery\";\r\nimport {StyledCheckoutModalHeading} from \"./CheckoutModal\";\r\n\r\nexport default function CheckoutDeliveryOrCollectionDetails({currentUser, menuConfig, fullAddressErrorMsg, setFullAddressErrorMsg, revalueBasket, triggerRender}) {\r\n\r\n const basket = menuConfig.basket\r\n const establishment = menuConfig.establishment\r\n\r\n const [, setGlobalState] = useContext(GlobalState)\r\n\r\n const [firstLineOfAddress, setFirstLineOfAddress] = React.useState(\"\")\r\n const [updatedPostcode, setUpdatedPostcode] = React.useState(\"\")\r\n\r\n const [deliverToDifferentAddress, setDeliverToDifferentAddress] = React.useState(false)\r\n\r\n const [firstLineOfAddressErrorMsg, setFirstLineOfAddressErrorMsg] = React.useState(\"\")\r\n const [postcodeErrorMsg, setPostcodeErrorMsg] = React.useState(\"\")\r\n const [longitude, setLongitude] = React.useState(\"\")\r\n const [latitude, setLatitude] = React.useState(\"\")\r\n\r\n const triggerLookupAddress = () => {\r\n if (!firstLineOfAddress) setFirstLineOfAddressErrorMsg(\"Required field\"); else setFirstLineOfAddressErrorMsg(\"\")\r\n if (!updatedPostcode) setPostcodeErrorMsg(\"Required field\"); else setPostcodeErrorMsg(\"\")\r\n\r\n if (!updatedPostcode || !firstLineOfAddress)\r\n return\r\n\r\n lookupAddress(updatedPostcode, firstLineOfAddress, (v) => {basket.customerAddress = v; basket.customerPostcode = updatedPostcode}, setLongitude, setLatitude, setFullAddressErrorMsg, setGlobalState)\r\n }\r\n\r\n useEffect(() => {\r\n const localLongitude = longitude ? longitude : currentUser?.location?.longitude\r\n const localLatitude = latitude ? latitude : currentUser?.location?.latitude\r\n setLatitude(localLatitude)\r\n setLongitude(localLongitude)\r\n\r\n if (establishment && localLongitude && localLongitude) {\r\n basket.distance = GeneralFunctions.calcDistanceBetweenInKm(establishment.location.latitude, establishment.location.longitude, localLatitude, localLongitude)\r\n } else {\r\n basket.distance = null\r\n }\r\n revalueBasket()\r\n triggerRender()\r\n },[currentUser, longitude, latitude, establishment, basket])\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n {\r\n basket.deliverySelected\r\n ? \r\n Delivery Address\r\n {\r\n currentUser.isRegistered && !deliverToDifferentAddress &&\r\n setDeliverToDifferentAddress(true)}>\r\n }\r\n \r\n : Collection Address\r\n }\r\n \r\n \r\n
\r\n
\r\n {\r\n !basket.deliverySelected\r\n ?
  • {establishment.location.fullAddress}
\r\n : currentUser.isRegistered && !deliverToDifferentAddress\r\n ?
\r\n
  • { basket.customerAddress }
\r\n
\r\n : \r\n { setFirstLineOfAddress(e.target.value); setFirstLineOfAddressErrorMsg(\"\"); triggerRender()}} error={firstLineOfAddressErrorMsg !== \"\"} helperText={firstLineOfAddressErrorMsg} />\r\n { setUpdatedPostcode(e.target.value); setPostcodeErrorMsg(\"\"); triggerRender()}} error={postcodeErrorMsg !== \"\"} helperText={postcodeErrorMsg} />\r\n {/* { setFirstLineOfAddressErrorMessage(\"\"); setFullAddress(\"\"); setFullAddressErrorMessage(\"\"); setFirstLineOfAddress(e.target.value)} } error={firstLineOfAddressErrorMessage !== \"\"} helperText={firstLineOfAddressErrorMessage} />*/}\r\n {/* { setPhoneNumberErrorMessage(\"\"); setFullAddressErrorMessage(\"\"); setFullAddress(\"\"); setPostcode(e.target.value) } } error={postcodeErrorMessage !== \"\"} helperText={postcodeErrorMessage} />*/}\r\n \r\n { fullAddressErrorMsg &&
{fullAddressErrorMsg}
}\r\n \r\n
\r\n }\r\n
\r\n
\r\n
\r\n )\r\n}\r\n","import {\r\n FormControl, FormControlLabel, IconButton, Radio, RadioGroup,\r\n} from \"@mui/material\";\r\nimport React, {Fragment} from \"react\";\r\nimport {Event, EventRepeat} from \"@mui/icons-material\";\r\nimport {ServiceEnumSubscription, ServiceEnumSingleOrder} from \"../../functions/GeneralFunctions\";\r\nimport {setServiceEnum} from \"../../functions/BasketFunctions\";\r\n\r\nexport default function ControlSingleOrRepeat({menuConfig, triggerRender}) {\r\n\r\n const basket = menuConfig.basket\r\n const singleOrderLabel = \r\n \r\n Single Order\r\n \r\n const repeatOrderLabel = \r\n \r\n Subscription\r\n \r\n\r\n function onServiceEnumUpdate(e) {\r\n setServiceEnum(menuConfig, e.target.value)\r\n\r\n if (menuConfig.isSingleOrder) {\r\n basket.frequency = \"Once\"\r\n basket.subscriptionDeliverySlotId = \"\"\r\n } else if (basket.serviceOfferingEnum === ServiceEnumSubscription) {\r\n basket.frequency = \"\"\r\n basket.requestedDate = \"\"\r\n basket.requestedTime = \"\"\r\n }\r\n triggerRender()\r\n }\r\n\r\n return (\r\n \r\n \r\n } label={singleOrderLabel} />\r\n } label={repeatOrderLabel} />\r\n \r\n \r\n )\r\n}\r\n","import React, {Fragment} from \"react\"\r\n\r\nimport {\r\n Divider,\r\n FormControl,\r\n InputLabel,\r\n MenuItem,\r\n Select,\r\n} from \"@mui/material\";\r\nimport {fetchAvailability, getDayOfWeek} from \"../../../functions/GeneralFunctions\";\r\nimport { fetchAllAvailabilityLines } from \"../../../functions/AvailabilityFunctions\";\r\nimport {StyledCheckoutModalHeading} from \"./CheckoutModal\";\r\nimport {formatTimePeriod} from \"../../../functions/DateFunctions\";\r\n\r\nexport default function CheckoutRepeatSchedule({menuConfig, revalueBasket, setErrorMsg, triggerRender}) {\r\n\r\n const basket = menuConfig.basket\r\n\r\n const availability = fetchAvailability(menuConfig.availabilities, menuConfig.selectedMenu.availabilityRef)\r\n const availabilityLines = fetchAllAvailabilityLines(availability)\r\n\r\n function setSubscriptionDeliverySlot(newSlot) {\r\n setErrorMsg(\"\")\r\n basket.subscriptionDeliverySlotId = newSlot\r\n triggerRender()\r\n }\r\n\r\n function setRepeatFrequency(newFrequency) {\r\n setErrorMsg(\"\")\r\n basket.frequency = newFrequency\r\n triggerRender()\r\n }\r\n\r\n return (\r\n \r\n \r\n Schedule\r\n {\r\n menuConfig.isSubscription && [\r\n \r\n {basket.deliverySelected ? \"Delivery Slot\" : \"Collection Time\"}\r\n \r\n ,\r\n \r\n Frequency\r\n \r\n \r\n ]\r\n }\r\n \r\n )\r\n}\r\n","import React, {Fragment, useEffect} from \"react\"\r\nimport Grid from '@mui/material/Grid'\r\n\r\nimport { styled} from '@mui/material/styles'\r\nimport {\r\n Divider,\r\n MenuItem,\r\n Select,\r\n} from \"@mui/material\";\r\nimport {\r\n calculatePossibleSelectionDates,\r\n calculatePossibleSelectionTimes,\r\n} from \"../../../functions/AvailabilityFunctions\";\r\nimport {today, todayString} from \"../../../functions/DateFunctions\";\r\nimport {StyledCheckoutModalHeading} from \"./CheckoutModal\";\r\n\r\nexport default function CheckoutOrderTime({menuConfig, setErrorMsg, triggerRender}) {\r\n\r\n const basket = menuConfig.basket\r\n\r\n const [possibleSelectionDates, setPossibleSelectionDates] = React.useState([])\r\n const [possibleSelectionTimes, setPossibleSelectionTimes] = React.useState([])\r\n\r\n useEffect(() =>{ // populate possible dates / times\r\n const establishment = menuConfig.establishment\r\n const selectedMenu = menuConfig.selectedMenu\r\n if (establishment && menuConfig.isSingleOrder && selectedMenu) {\r\n const selectionDates = calculatePossibleSelectionDates(establishment, menuConfig.availabilities, selectedMenu.availabilityRef, basket.serviceOfferingEnum, basket.deliverySelected)\r\n setPossibleSelectionDates(selectionDates)\r\n if (selectionDates.some(d => d.prettyDateString === \"Today\")) {\r\n basket.requestedDate = todayString()\r\n const selectionTimes = calculatePossibleSelectionTimes(establishment, menuConfig.availabilities, selectedMenu.availabilityRef, basket.serviceOfferingEnum, basket.deliverySelected, today())\r\n setPossibleSelectionTimes(selectionTimes)\r\n if (selectionTimes.length > 0)\r\n basket.requestedTime = selectionTimes[0]\r\n }\r\n }\r\n }, [menuConfig, basket])\r\n\r\n\r\n function updatePossibleSelectionTimes(newDate) {\r\n basket.requestedTime = \"\"\r\n setPossibleSelectionTimes(calculatePossibleSelectionTimes(menuConfig.establishment, menuConfig.availabilities, menuConfig.selectedMenu.availabilityRef, basket.serviceOfferingEnum, basket.deliverySelected, newDate))\r\n }\r\n\r\n const StyledMinimalSelect = styled(Select)({\r\n fontSize: \"0.8rem\",\r\n \"&&&:before\": { borderBottom: \"none\" },\r\n \"&&:after\": { borderBottom: \"none\" }\r\n })\r\n\r\n return (\r\n \r\n \r\n {basket.deliverySelected ? \"Drop-off\" : \"Pickup\"} Time\r\n \r\n \r\n \r\n {\"Desired Date\"}\r\n {\r\n possibleSelectionDates.map( dateObj =>\r\n { basket.requestedDate = dateObj.dateString; updatePossibleSelectionTimes(dateObj.date); setErrorMsg(\"\"); triggerRender() } }>\r\n {dateObj.prettyDateString}\r\n \r\n )\r\n }\r\n \r\n \r\n \r\n { basket.requestedTime = e.target.value; setErrorMsg(\"\"); triggerRender() } }>\r\n {\"Desired Time\"}\r\n {\r\n possibleSelectionTimes.map( possibleTime =>\r\n {possibleTime}\r\n )\r\n }\r\n \r\n \r\n \r\n \r\n\r\n )\r\n}\r\n","import React, {Fragment, useEffect} from \"react\"\r\nimport {\r\n FormControl,\r\n FormControlLabel,\r\n IconButton,\r\n Radio,\r\n RadioGroup,\r\n} from \"@mui/material\";\r\nimport {CreditCard} from \"@mui/icons-material\";\r\nimport AccountBalanceWalletOutlinedIcon from '@mui/icons-material/AccountBalanceWalletOutlined';\r\nimport {StyledCheckoutModalHeading} from \"./CheckoutModal\";\r\n\r\nexport default function CheckoutModalPaymentToggle({menuConfig, triggerRender}) {\r\n const establishment = menuConfig.establishment\r\n const basket = menuConfig.basket\r\n\r\n const stripePaymentMethod = \"Stripe\"\r\n const collectionPaymentMethod = \"Collection\"\r\n\r\n const stripeEnabled = establishment.stripeDetails.enabled\r\n const cashEnabled = establishment.payByCashDetails.enabled\r\n\r\n const onlyOnePaymentOptionEnabled = (stripeEnabled && !cashEnabled) || (!stripeEnabled && cashEnabled)\r\n\r\n useEffect(() => {\r\n if (onlyOnePaymentOptionEnabled) {\r\n basket.paymentMethod = stripeEnabled ? stripePaymentMethod : cashEnabled ? collectionPaymentMethod : Error(\"Either Stripe or Cash on Collection should be selected\")\r\n }\r\n }, [onlyOnePaymentOptionEnabled, stripeEnabled, cashEnabled, collectionPaymentMethod, basket])\r\n\r\n return (\r\n
\r\n Payment\r\n \r\n { basket.paymentMethod = e.target.value; triggerRender()}}>\r\n { stripeEnabled && } label={Credit / Debit Card} /> }\r\n { cashEnabled && } label={{menuConfig.isPreorder ? \"Pay at Restaurant\" : basket.deliverySelected ? \"Cash on Delivery\" : \"Cash on Collection\"}} /> }\r\n \r\n \r\n
\r\n )\r\n}\r\n","import React from \"react\"\r\nimport Grid from '@mui/material/Grid'\r\nimport { TextField } from \"@mui/material\";\r\nimport {StyledCheckoutModalHeading} from \"./CheckoutModal\";\r\n\r\nexport default function CheckoutUserDetails({currentUser, basket, triggerRender, customerNameErrorMsg, setCustomerNameErrorMsg, customerTelephoneErrorMsg, setCustomerTelephoneErrorMsg}) {\r\n\r\n return (\r\n
\r\n Your Details\r\n {\r\n currentUser.isRegistered\r\n ? \r\n : \r\n {basket.customerName = e.target.value; setCustomerNameErrorMsg(\"\"); triggerRender()}} helperText={customerNameErrorMsg} error={Boolean(customerNameErrorMsg)}>\r\n {basket.customerTelephone = e.target.value; setCustomerTelephoneErrorMsg(\"\"); triggerRender()}} helperText={customerTelephoneErrorMsg} error={Boolean(customerTelephoneErrorMsg)}>\r\n \r\n }\r\n
\r\n )\r\n}\r\n","import React, {Fragment, useContext, useEffect} from \"react\"\r\nimport {styled} from '@mui/material/styles'\r\nimport Grid from '@mui/material/Grid'\r\n\r\nimport CardHeader from \"../../../components/Card/CardHeader\"\r\n\r\nimport Hidden from \"@mui/material/Hidden\";\r\nimport {\r\n Button, Dialog, DialogContent, Divider,\r\n IconButton, useMediaQuery,\r\n} from \"@mui/material\";\r\nimport {makeFetch, makePost, reportErrorWithServer, ServiceEnumSubscription} from \"../../../functions/GeneralFunctions\";\r\nimport {Close} from \"@mui/icons-material\";\r\nimport MenuCheckoutBasket from \"./MenuCheckoutBasket\";\r\nimport GlobalState, {closeBackdropSpinner, openBackdropSpinner} from \"../../../functions/GlobalStateFunctions\";\r\nimport CheckoutDeliveryOrCollectionDetails from \"./CheckoutDeliveryOrCollectionDetails\";\r\nimport ControlSingleOrRepeat from \"../ControlSingleOrRepeat\";\r\nimport CheckoutRepeatSchedule from \"./CheckoutRepeatSchedule\";\r\nimport CheckoutOrderTime from \"./CheckoutOrderTime\";\r\nimport CheckoutModalPaymentToggle from \"./CheckoutModalPaymentToggle\";\r\nimport CheckoutUserDetails from \"./CheckoutUserDetails\";\r\nimport {\r\n hasSingleAndSubscriptionEnabled\r\n} from \"../../../functions/ServiceFunctions\";\r\nimport {fetchAllSubscriptionIds} from \"../../../functions/MenuFunctions\";\r\n\r\nexport const StyledCheckoutModalHeading = styled(\"div\") (\r\n {\r\n fontSize: \"1.1em\",\r\n marginTop: \"1px\",\r\n marginBottom: \"10px\",\r\n fontWeight: \"bold\",\r\n height: \"20px\"\r\n }\r\n)\r\n\r\n//TODO remove remove from basket and revalue basket\r\nexport default function CheckoutModal({currentUser, setCurrentUser, menuConfig, removeFromBasket, revalueBasket, triggerRender}) {\r\n\r\n const establishment = menuConfig.establishment\r\n const basket = menuConfig.basket\r\n\r\n const [customerAddressErrorMsg, setCustomerAddressErrorMsg] = React.useState(\"\")\r\n const [errorMsg, setErrorMsg] = React.useState(\"\")\r\n\r\n const [customerNameErrorMsg, setCustomerNameErrorMsg] = React.useState(\"\")\r\n const [customerTelephoneErrorMsg, setCustomerTelephoneErrorMsg] = React.useState(\"\")\r\n\r\n const [, setGlobalState] = useContext(GlobalState)\r\n\r\n const selectedSubscription = menuConfig.selectedSubscription\r\n\r\n const onCheckoutConfirm = () => {\r\n let validationError = false\r\n if (basket.deliverySelected && !basket.customerAddress) { setCustomerAddressErrorMsg(\"Please search for a valid address\"); validationError=true }\r\n if (!basket.customerName) { setCustomerNameErrorMsg(\"Required\"); validationError=true }\r\n if (!basket.customerTelephone) { setCustomerTelephoneErrorMsg(\"Required\"); validationError=true }\r\n if (menuConfig.isSubscription && !basket.subscriptionDeliverySlotId) {setErrorMsg(\"Repeat Orders require the \" + (basket.deliverySelected?\"delivery\":\"collection\")+\" slot\"); validationError=true }\r\n if (menuConfig.isSubscription && !basket.frequency) {setErrorMsg(\"Repeat Orders Require you to specify the Frequency\"); validationError=true }\r\n if (!basket.paymentMethod) { setErrorMsg(\"Please select your desired payment method.\"); validationError=true }\r\n if (menuConfig.isSingleOrder && !basket.requestedTime) { setErrorMsg(\"Please select your desired \" + (basket.deliverySelected?\"delivery\":\"collection\")+\" time.\"); validationError=true }\r\n if (basket.deliverySelected && basket.requiresFeePerMileButNotAvailable) { setErrorMsg(\"Unable to calculate the delivery fee. Is your address correct? If you keep having this problem, please sign in to continue.\"); validationError=true }\r\n\r\n if (validationError)\r\n return\r\n\r\n revalueBasket() //saves cookie\r\n openBackdropSpinner(setGlobalState)\r\n if (basket.paymentMethod === \"Collection\" || basket.paymentMethod === \"Stripe\") {\r\n createOrUpdateOrder()\r\n } else {\r\n reportErrorWithServer(setGlobalState, currentUser.email, \"Error: payment method not recognised\")\r\n alert(\"Error: payment method not recognised\")\r\n }\r\n }\r\n\r\n function createOrUpdateOrder() {\r\n makePost(setGlobalState, \"/api/start-create-or-update-order\",\r\n JSON.stringify({basket: basket, currentUrl: window.location.href}),\r\n (response) => {\r\n if (response.redirectUrl)\r\n window.location.href = response.redirectUrl\r\n else if (response.error)\r\n alert(\"An Error has occurred: \" + response.error)\r\n else {\r\n closeBackdropSpinner(setGlobalState)\r\n menuConfig.checkoutModalOpen = false\r\n menuConfig.orderSuccessfulModalOpen = true\r\n if (menuConfig.isSubscription) {\r\n makeFetch(setGlobalState, '/api/v0/current-user/', user => {\r\n setCurrentUser(user)\r\n menuConfig.allSubscriptionIds = fetchAllSubscriptionIds(user, establishment)\r\n })\r\n establishment.detachedSubscriptionUpdated = false\r\n } else if (menuConfig.isPreorder) {\r\n menuConfig.preorderSuccess = true\r\n }\r\n }\r\n })\r\n }\r\n\r\n useEffect(() => { // populate delivery details etc (for guest checkout)\r\n if (currentUser.isRegistered) {\r\n basket.customerAddress = currentUser.location.fullAddress\r\n basket.customerPostcode = currentUser.location.postcode\r\n basket.customerName = currentUser.firstName + \" \" + currentUser.lastName\r\n basket.customerTelephone = currentUser.telephone\r\n } else {\r\n basket.customerAddress = \"\"\r\n basket.customerPostcode = \"\"\r\n basket.customerName = \"\"\r\n basket.customerTelephone = \"\"\r\n }\r\n }, [currentUser, basket])\r\n\r\n const isSmDownScreen = useMediaQuery(theme => theme.breakpoints.down(\"sm\"))\r\n\r\n function setModalOpen(b) {\r\n menuConfig.checkoutModalOpen = b\r\n triggerRender()\r\n }\r\n\r\n return (\r\n setModalOpen(false)} aria-label={\"Order Checkout\"}>\r\n \r\n setModalOpen(false)} style={{float:\"right\"}}>\r\n

{establishment.name} - Checkout

\r\n
\r\n \r\n \r\n \r\n \r\n {\r\n (menuConfig.isSingleOrder || menuConfig.isSubscription) &&\r\n \r\n }\r\n {\r\n currentUser.isRegistered && (menuConfig.isSingleOrder || menuConfig.isSubscription) && hasSingleAndSubscriptionEnabled(establishment) &&\r\n \r\n \r\n Frequency\r\n
\r\n \r\n
\r\n
\r\n }\r\n {\r\n menuConfig.isSingleOrder\r\n ? \r\n : menuConfig.isSubscription ? \r\n : \"\"\r\n }\r\n {\r\n menuConfig.isSingleOrder && \r\n }\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n { errorMsg &&

{errorMsg}
}\r\n {/**/}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/**/}\r\n
\r\n
\r\n )\r\n}\r\n","import React, {Fragment} from \"react\"\r\nimport Grid from '@mui/material/Grid'\r\n\r\nimport * as GeneralFunctions from \"../../../functions/GeneralFunctions\";\r\nimport {IconButton} from \"@mui/material\";\r\nimport {DeleteForever} from \"@mui/icons-material\";\r\nimport {red} from \"@mui/material/colors\";\r\nimport {calculateLinePrice} from \"../../../functions/OrderCalculationFunctions\";\r\n\r\nexport default function MenuCheckoutBasketLine({menuConfig, basketLine, removeFromBasket}) {\r\n\r\n const basket = menuConfig.basket\r\n\r\n const mainTextColour = \"\" //!isValid ? \"pink\" : \"\"\r\n const subTextColour = \"#999999\" // !isValid ? \"pink\" : \"#999999\"\r\n\r\n console.log(\"Basket Line:\"+basketLine.itemName+\", selectedService:\"+basket.serviceOfferingEnum)\r\n\r\n return (\r\n \r\n removeFromBasket(basketLine)}> \r\n\r\n {basketLine.quantity} x {basketLine.itemName}\r\n {GeneralFunctions.convertDecimalToGbp(calculateLinePrice(basketLine))}\r\n \r\n
\r\n {basketLine.requiredChoices.map(choice =>
{choice.name} {GeneralFunctions.convertDecimalToGbpStringInBrackets(choice.selection.price)}
)}\r\n {basketLine.removeParts.map(part =>
- {part.name}
)}\r\n {basketLine.addParts.map(part =>
+ {part.name + \" \" + GeneralFunctions.convertDecimalToGbpStringInBrackets(part.price)}
)}\r\n
\r\n
\r\n
\r\n\r\n )\r\n}\r\n","import React from \"react\"\r\nimport Grid from '@mui/material/Grid'\r\n\r\nimport * as GeneralFunctions from \"../../../functions/GeneralFunctions\";\r\nimport {convertDecimalToGbp} from \"../../../functions/GeneralFunctions\";\r\nimport * as DiscountFunctions from \"../../../functions/DiscountFunctions\";\r\nimport {\r\n isBasketReadyToShowTotalAmount\r\n} from \"../../../functions/MenuFunctions\";\r\nimport MenuCheckoutBasketLine from \"./MenuCheckoutBasketLine\";\r\nimport {StyledCheckoutModalHeading} from \"./CheckoutModal\";\r\n\r\nexport function convertFrequencyToPretty(frequency) {\r\n return (frequency === \"Once\") ? \"\"\r\n : (frequency === \"EveryWeek\") ? \"every week\"\r\n : (frequency === \"EveryTwoWeeks\") ? \"every two weeks\"\r\n : (frequency === \"EveryThreeWeeks\") ? \"every three weeks\"\r\n : (frequency === \"EveryFourWeeks\") ? \"every four weeks\"\r\n : \"\"\r\n}\r\nexport function convertFrequencyToInterval(frequency) {\r\n return (frequency === \"Once\") ? \"\"\r\n : (frequency === \"EveryWeek\") ? 1\r\n : (frequency === \"EveryTwoWeeks\") ? 2\r\n : (frequency === \"EveryThreeWeeks\") ? 3\r\n : (frequency === \"EveryFourWeeks\") ? 4\r\n : \"\"\r\n}\r\n\r\nexport default function MenuCheckoutBasket({menuConfig, removeFromBasket}) {\r\n\r\n const establishment = menuConfig.establishment\r\n const basket = menuConfig.basket\r\n\r\n const prettyFrequency = convertFrequencyToPretty(basket.frequency)\r\n\r\n return (\r\n
\r\n\r\n Basket\r\n\r\n
\r\n \r\n {\r\n basket.lines.map((basketLine, index) =>\r\n \r\n )\r\n }\r\n \r\n\r\n {/**/}\r\n\r\n \r\n Subtotal\r\n \r\n {convertDecimalToGbp(basket.subtotal)}\r\n \r\n \r\n { basket.deliverySelected &&\r\n \r\n Delivery\r\n \r\n {\r\n basket.additionalSpendForFreeDelivery <= 0.0\r\n ? \"Free\"\r\n : basket.requiresFeePerMileButNotAvailable ? \"TBC\" : GeneralFunctions.convertDecimalToGbp(basket.deliveryFee, \"Free\")\r\n }\r\n \r\n \r\n }\r\n {/*{DEBUG_isBasketReadyToShowTotalAmount(basket)}*/}\r\n \r\n Service Fee\r\n Always Free\r\n \r\n {\r\n DiscountFunctions.bestGlobalDiscountToday(establishment) &&\r\n \r\n Discount ({DiscountFunctions.bestGlobalDiscountToday(establishment)}%)\r\n {convertDecimalToGbp(basket.discount)}\r\n \r\n }\r\n \r\n Total {prettyFrequency}\r\n \r\n \r\n {\r\n isBasketReadyToShowTotalAmount(basket) ? convertDecimalToGbp(basket.total) : \"TBC\"\r\n }\r\n \r\n \r\n \r\n
\r\n
\r\n )\r\n}\r\n","import React, {Fragment} from \"react\"\r\nimport * as GeneralFunctions from \"../../functions/GeneralFunctions\";\r\n\r\n\r\nexport default function SimpleOrderDisplay({uniqueKey, lines}) {\r\n\r\n return (\r\n \r\n {\r\n lines.map((basketLine, index) => {\r\n // const item = basketLine.itemId\r\n return
\r\n {basketLine.quantity} x {basketLine.itemName} {GeneralFunctions.convertDecimalToGbpStringInBrackets(basketLine.itemPrice, true)}\r\n
\r\n {/*{JSON.stringify(basketLine)}*/}\r\n {basketLine.requiredChoices.map(choice =>
{choice.name} {choice.selection.name}: {GeneralFunctions.convertDecimalToGbpStringInBrackets(choice.selection.price)}
)}\r\n {basketLine.removeParts.map(part =>
- {part.name}
)}\r\n {basketLine.addParts.map(part =>
+ {part.name + \" \" + GeneralFunctions.convertDecimalToGbpStringInBrackets(part.price)}
)}\r\n
\r\n
\r\n }\r\n )\r\n }\r\n
\r\n )\r\n}\r\n","import React, {Fragment, useContext} from \"react\"\r\nimport {\r\n Accordion, AccordionDetails,\r\n AccordionSummary,\r\n Button,\r\n IconButton,\r\n Tooltip\r\n} from \"@mui/material\";\r\nimport {convertDecimalToGbp, navigateToEstablishmentId} from \"../../functions/GeneralFunctions\";\r\nimport SimpleOrderDisplay from \"../shared/SimpleOrderDisplay\";\r\nimport {Circle, Edit} from \"@mui/icons-material\";\r\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\r\nimport GlobalState from \"../../functions/GlobalStateFunctions\";\r\nimport {StyledAccordionHeading} from \"../../components/CommonStyledComponents\";\r\nimport {\r\n convertToPrettyDate,\r\n parseJsonDateToDate\r\n} from \"../../functions/DateFunctions\";\r\nimport {convertFrequencyToInterval} from \"../menu/checkout/MenuCheckoutBasket\";\r\nimport {populateMenuConfigWithSubscriptionFromServer} from \"../../functions/MenuFunctions\";\r\n\r\nexport function convertToPrettyFrequency(frequency) {\r\n if (frequency === \"EveryWeek\")\r\n return \"Once per week\"\r\n else if (frequency === \"EveryTwoWeeks\")\r\n return \"Once every two weeks\"\r\n else if (frequency === \"EveryThreeWeeks\")\r\n return \"Once every three weeks\"\r\n else if (frequency === \"EveryFourWeeks\")\r\n return \"Once every four weeks\"\r\n else\r\n return \"ERROR: Invalid frequency: \"+frequency\r\n}\r\n\r\nexport function calculateNextBillingPrettyDate(subscription) {\r\n const billingDate = calculateBillingDate(subscription, 0)\r\n if (!billingDate)\r\n return \"No Bill Due\"\r\n return convertToPrettyDate(billingDate)\r\n}\r\n\r\nexport function calculateBillingDate(subscription, weeksToAdd) {\r\n const firstBillingDate = parseJsonDateToDate(subscription.firstElectronicBillingDate)\r\n if (!firstBillingDate)\r\n return\r\n const interval = convertFrequencyToInterval(subscription.basket.frequency)\r\n const today = new Date()\r\n\r\n let nextBillingDate = firstBillingDate\r\n if (nextBillingDate < today) {\r\n nextBillingDate.setDate(nextBillingDate.getDate() + (interval * 7))\r\n }\r\n nextBillingDate.setDate(firstBillingDate.getDate() + (weeksToAdd * 7))\r\n\r\n return nextBillingDate\r\n}\r\n\r\nexport default function UserSubscriptionsSection({currentUser}) {\r\n const [, setGlobalState] = useContext(GlobalState)\r\n const [config, ] = React.useState({})\r\n const [expandedAccordion, setExpandedAccordion] = React.useState(\"false\")\r\n const handleAccordionChange = (subscriptionId) => (event, isExpanded) => {\r\n if (isExpanded && subscriptionId)\r\n populateMenuConfigWithSubscriptionFromServer(setGlobalState, config, subscriptionId, () => {\r\n alert(\"set expanded:\"+subscriptionId)\r\n setExpandedAccordion(isExpanded ? subscriptionId : false)\r\n })\r\n else\r\n setExpandedAccordion(isExpanded ? subscriptionId : false)\r\n }\r\n const subscriptionIdObjects = (currentUser && currentUser.subscriptionIds) ? currentUser.subscriptionIds : []\r\n\r\n function onEditSubscription() {\r\n navigateToEstablishmentId(setGlobalState, \"\", config.selectedSubscription.establishmentId)\r\n }\r\n\r\n return (\r\n \r\n {\r\n subscriptionIdObjects.length === 0 ?
You don't currently have any subscriptions
\r\n : subscriptionIdObjects.map(subscriptionIdObj =>\r\n \r\n }>\r\n \r\n {subscriptionIdObj.name}\r\n \r\n \r\n {\r\n config.selectedSubscription &&\r\n
\r\n \r\n \r\n \r\n \r\n { config.selectedSubscription.basket.deliverySelected && }\r\n \r\n\r\n \r\n \r\n\r\n \r\n
Payment Method:{config.selectedSubscription.basket.paymentMethod}
{config.selectedSubscription.basket.deliverySelected?\"Delivery\":\"Collection\"} Slot:{config.selectedSubscription.basket.subscriptionDeliverySlotDescription}
Delivery Address:{config.selectedSubscription.basket.customerAddress}
Frequency:{convertToPrettyFrequency(config.selectedSubscription.basket.frequency)}
First Billing Date:{convertToPrettyDate(parseJsonDateToDate(config.selectedSubscription.firstElectronicBillingDate))}
Next Billing Date:{calculateNextBillingPrettyDate(config.selectedSubscription)}
\r\n
\r\n

Basket

\r\n \r\n
Delivery: {convertDecimalToGbp(config.selectedSubscription.basket.deliveryFee)}
\r\n
Total: {convertDecimalToGbp(config.selectedSubscription.basket.total)}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n }\r\n
\r\n
\r\n )\r\n }\r\n
\r\n )\r\n}\r\n"],"names":["setServiceEnum","menuConfig","serviceEnum","basket","serviceOfferingEnum","refreshServiceCache","isSingleOrder","ServiceEnumSingleOrder","isSubscription","ServiceEnumSubscription","isPreorder","ServiceEnumPreorder","isPayAtTable","ServiceEnumPayAtTable","isTableBooking","ServiceEnumTableBooking","discountCategories","enumName","name","bestGlobalDiscountMultiplier","establishment","bestDiscount","bestGlobalDiscountToday","discounts","filter","discount","applicableCategories","length","daysOfWeek","includes","GeneralFunctions","forEach","discountPercent","lookupAddress","postcode","firstLineOfAddress","setFullAddress","setLongitude","setLatitude","setErrorMessage","setGlobalState","openBackdropSpinner","makePost","JSON","stringify","address1","response","closeBackdropSpinner","candidates","payload","Object","keys","candidate","fullAdd","formatted_address","toLowerCase","location","geometry","lng","lat","alert","revalueBasket","deliveryDetails","establishmentName","establishmentId","id","subtotal","to2dp","lines","reduce","total","line","calculateLinePrice","additionalSpendForFreeDelivery","requiresFeePerMileButNotAvailable","deliveryFeePerMile","distance","deliverySelected","deliveryFee","calculateDeliveryFeeOrNull","reportErrorWithServer","ref","DiscountFunctions","convertToDoubleOrZero","filterCategories","menu","categories","category","items","loadMenu","menuId","onComplete","makeFetch","isBasketReadyToShowTotalAmount","closeAllMenuModals","menuItemModalOpen","checkoutModalOpen","loginOrGuestModalOpen","orderSuccessfulModalOpen","orderFailedModalOpen","moreInfoModalOpen","tableReservationModalOpen","tableReservationCompleteModalOpen","confirmReservationModalOpen","preorderModalOpen","parent","closeReservationsModal","fetchAllSubscriptionIds","currentUser","console","log","subscriptionIds","o","map","subscriptionId","populateMenuConfigWithSubscriptionFromServer","subscription","selectedSubscription","pauseSubscription","setCurrentUser","resumesAt","triggerRender","userId","user","cancelSubscription","currentUserId","curriedRevalueBasket","createEmptyBasket","allSubscriptionIds","selectedMenu","service","establishmentRef","servicesOffered","frequency","takeawaysDetails","enabled","paymentMethod","subscriptionDeliverySlotId","preOrderBookingDate","tableBookingDetails","lastBookingDate","preOrderBookingId","lastBookingId","isSubscriptionPaused","pausedButResumesAt","isInFuture","parseJsonDateTimeToDate","itemPrice","requiredChoices","choice","selection","price","addParts","part","quantity","qualificationForFreeDeliveryAchieved","freeDeliveryAfterSpend","deliveryFeeType","relevantForFreeDelivery","Math","min","deliveryFixedFee","hasSingleOrderEnabled","collectionDetails","hasSingleCollectionEnabled","hasSingleDeliveryEnabled","hasSubscriptionEnabled","repeatOrdersDetails","hasSubscriptionCollectionEnabled","hasSubscriptionDeliveryEnabled","hasSingleAndSubscriptionEnabled","hasSingleOrSubscriptionEnabled","hasEatInEnabled","eatInServiceDetails","hasAnyServiceEnabled","ControlCollectionOrDelivery","_ref","isCompactMode","takeawayOrRepeatDetails","fetchTakeawayOrRepeatDetails","usersPostcodeDistrict","fetchUsersPostcodeDistrict","isWithinDeliveryPostcodes","fetchIsWithinDeliveryPostcodes","isWithinMaxDeliveryDistance","fetchIsWithinMaxDeliveryDistance","useEffect","canDeliver","updateDelivery","newValue","closedMsg","calculateClosedMsg","isDisabled","canCollect","_jsx","Tooltip","title","children","IconButton","style","paddingBottom","paddingTop","marginTop","onClick","Redo","_jsxs","ToggleButtonGroup","color","value","size","fullWidth","exclusive","onChange","onDeliveryUpdate","e","ToggleButton","disabled","fontSize","CheckoutDeliveryOrCollectionDetails","fullAddressErrorMsg","setFullAddressErrorMsg","useContext","GlobalState","setFirstLineOfAddress","React","updatedPostcode","setUpdatedPostcode","deliverToDifferentAddress","setDeliverToDifferentAddress","firstLineOfAddressErrorMsg","setFirstLineOfAddressErrorMsg","postcodeErrorMsg","setPostcodeErrorMsg","longitude","latitude","_currentUser$location","_currentUser$location2","localLongitude","localLatitude","Fragment","Divider","marginBottom","StyledCheckoutModalHeading","isRegistered","float","Edit","marginRight","marginLeft","customerAddress","Grid","container","spacing","item","xs","TextField","label","target","error","helperText","padding","triggerLookupAddress","v","customerPostcode","SearchIcon","variant","type","fullAddress","ControlSingleOrRepeat","singleOrderLabel","Event","fontWeight","repeatOrderLabel","EventRepeat","FormControl","RadioGroup","requestedDate","requestedTime","FormControlLabel","control","Radio","CheckoutRepeatSchedule","setErrorMsg","availability","fetchAvailability","availabilities","availabilityRef","availabilityLines","fetchAllAvailabilityLines","InputLabel","Select","textTransform","newSlot","MenuItem","availabilityLine","avIndex","dayOfWeekName","getDayOfWeek","repeatDeliveryWindows","repeatCollectionWindows","window","formatTimePeriod","from","to","newFrequency","CheckoutOrderTime","possibleSelectionDates","setPossibleSelectionDates","possibleSelectionTimes","setPossibleSelectionTimes","selectionDates","calculatePossibleSelectionDates","some","d","prettyDateString","todayString","selectionTimes","calculatePossibleSelectionTimes","today","StyledMinimalSelect","styled","borderBottom","paddingRight","dateObj","dateString","newDate","date","paddingLeft","possibleTime","CheckoutModalPaymentToggle","stripePaymentMethod","collectionPaymentMethod","stripeEnabled","stripeDetails","cashEnabled","payByCashDetails","onlyOnePaymentOptionEnabled","Error","checked","CreditCard","AccountBalanceWalletOutlinedIcon","CheckoutUserDetails","customerNameErrorMsg","setCustomerNameErrorMsg","customerTelephoneErrorMsg","setCustomerTelephoneErrorMsg","telephone","email","customerName","Boolean","customerTelephone","height","CheckoutModal","removeFromBasket","customerAddressErrorMsg","setCustomerAddressErrorMsg","errorMsg","firstName","lastName","isSmDownScreen","useMediaQuery","theme","breakpoints","down","setModalOpen","b","Dialog","maxWidth","fullScreen","open","onClose","CardHeader","Close","sx","margin","DialogContent","sm","Hidden","smDown","orientation","flexItem","display","flexDirection","justifyContent","smUp","MenuCheckoutBasket","md","Button","onCheckoutConfirm","validationError","currentUrl","href","redirectUrl","detachedSubscriptionUpdated","preorderSuccess","MenuCheckoutBasketLine","basketLine","subTextColour","itemName","DeleteForever","red","alignItems","lineHeight","removeParts","convertFrequencyToPretty","convertFrequencyToInterval","prettyFrequency","index","convertDecimalToGbp","width","textAlign","whiteSpace","SimpleOrderDisplay","uniqueKey","calculateNextBillingPrettyDate","billingDate","calculateBillingDate","convertToPrettyDate","weeksToAdd","firstBillingDate","parseJsonDateToDate","firstElectronicBillingDate","interval","nextBillingDate","Date","setDate","getDate","UserSubscriptionsSection","config","expandedAccordion","setExpandedAccordion","subscriptionIdObjects","onEditSubscription","navigateToEstablishmentId","subscriptionIdObj","Accordion","expanded","event","isExpanded","AccordionSummary","expandIcon","ExpandMoreIcon","cursor","Circle","StyledAccordionHeading","AccordionDetails","subscriptionDeliverySlotDescription","border","borderRadius","customerRef","startIcon"],"sourceRoot":""}